Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update subroutine W3IOPO to read/write NetCDF files (point output binary -> netcdf) #682

Closed
JessicaMeixner-NOAA opened this issue Apr 22, 2022 · 122 comments · Fixed by #1230
Closed
Labels
enhancement New feature or request

Comments

@JessicaMeixner-NOAA
Copy link
Collaborator

JessicaMeixner-NOAA commented Apr 22, 2022

Is your feature request related to a problem? Please describe.
Update the subroutine w3iopo in model/src/w3iopomd.F90 to read/write netcdf instead of binary files.

Describe the solution you'd like
Have point output be netcdf instead of binary from the model forecast.

Describe alternatives you've considered
Have point output files be optionally binary or netcdf. This is not impossible but does add a layer of complexity that is not ideal. At one points binary files were preferred due to size and speed, but perhaps those concerns can be overcome or will be outweighed by the benefit of having more readable files. Additionally there was concerns about creating a requirement to have NetCDF and that some users might not have access to this. However, when this was first mentioned was about 5 years ago and NetCDF is a very common library so perhaps that concern is also no longer a reason to not pursue only NetCDF files.

Additional context
This perhaps makes the post processing in ww3_ounp partially redundant. This should also help in refactoring ww3_outp.

@edwardhartnett
Copy link
Contributor

@JessicaMeixner-NOAA can I have one of the data files that are read/written by w3iopo()?

@edwardhartnett
Copy link
Contributor

edwardhartnett commented Oct 30, 2023

Some detail from Matt on running the tests:

Here's some notes for what we talked about:

The matrix compare link above describes the process I was describing to do the comparison (run develop, run pr-branch, then matrix.comp between the two).

Outline of basic regtest steps

    git clone https://github.com/NOAA-EMC/WW3
    cd WW3
    ./model/bin/ww3_from_ftp.sh                 # gets input data for tests
    cd regtests
    ./bin/matrix_cmake_ncep ../model            # prepare "matrix" scripts
                                                # edit a "matrix??" file.  In the example directory, I did:  matrix05 --> w3_pnt05
    sbatch <edited-matrix-file>

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@JessicaMeixner-NOAA can I have one of the data files that are read/written by w3iopo()?

@edwardhartnett this comment got lost. @MatthewMasarik-NOAA have you already shared this info or do we need to set up 1-2 regtests for Ed for this? (one for per time-snap writing)

@MatthewMasarik-NOAA
Copy link
Collaborator

@JessicaMeixner-NOAA, I've shared info with @edwardhartnett for running regtests. I think I will be meeting with him this afternoon for some follow up.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@MatthewMasarik-NOAA sounds good. It might be helpful to pick a single regression test that could be a test to run instead of running all of the regression tests. Have you shared with @edwardhartnett which program makes the output of w3iopo and which reads it as well?

Please let me know if you need anything additional from me.

@edwardhartnett
Copy link
Contributor

OK, I was able to run (at least one) regression test on my local ubuntu laptop. To do that, follow the steps in the .github/workflows/gnu.yml file to install dependencies with spack and build.

Then follow Matthew's steps above to run the regression test. I had to do:

export LD_LIBRARY_PATH=/home/ed/spack/var/spack/environments/ww3-gnu/.spack-env/view/lib
to allow the netcdf fortran shared library to be found.

Then I ran one of the tests and got (I believe) the expected output:

source ./matrix05 
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
module: command not found
 
             **********************************************
           ***  WAVEWATCH III matrix of regression tests  ***
             **********************************************
 
    Tests for single CPU codes                       : y
    Tests for multiple CPU codes (MPI)               : y
    Tests for multiple CPU codes (OMP)               : y
    Tests for threaded multiple CPU codes (MPI/OMPH) : y
 
      1D pure propagation tests          : y
      2D pure propagation tests          : y
      Growth curves (time)               : y
      Growth curves (fetch)              : y
      Shallow water tests                : y
      Unstructured grid tests            : y
      SMC grid tests                     : y
      Rotated pole tests                 : y
      Hurricane with one moving grid     : y
      Mud/Ice and wave interaction tests : y
      Second harmonic generation tests   : y
      Multi 01 (wet and dry)             : y
      Multi 02 (basic nesting)           : y
      Multi 03 (nesting and overlap)     : y
      Multi 04 (swell on mount/current)  : y
      Multi 05 (hurricane 3 moving grds) : y
      Multi 06 (curv. + reg. grds)       : y
      Multi 07 (unstr. + reg. grds)      : y
      Multi 08 (with ice)                : y
      Multi 09 (SMC multi grid)          : y
      Assim Update of the restart file   : y
      OASIS coupling                     : y
      Calendar type                      : y
      ESMF Coupling                      : n
      The Unified Forecast System        : y
      grib file field output             : y
      Restart Reproducibility            : y
      MPI task Reproducibility           : y
      Thread Reproducibility             : y
      Configurable netCDF generation     : y
 
 
 Running now options: run_test -o all -S -T -s ST4_PR2_UQ_MPI -w work_ST4_PR2_UQ_MPI -m grdset_a -f -p mpirun -n 24 ../model mww3_test_05
 
   Building WW3, exes will be in /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/exe
   Build log is in /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/build.log
 
 
                    ==================================   
                  ======> TEST RUN WAVEWATCH III <====== 
                    ==================================   
 
#############################################################################
#                                                                           #
# mww3_test_05 : Tests for static nesting (propagation only)                #
#                Telescoping nests over hurricane, with continuous moving   #
#                grid, no outer boundaries.                                 #
#                                                                           #
# Model should be compiled with the switches :                              #
#                                                                           #
#   !/FLXn !/LNn !/STn !/NLn !/BT0 !/DB0 !/TR0 !/BS0                        #
#                        Deep water source term only.                       #
#   !/PRn                Selecting one of the propagation schemes.          #
#   !/WNX1 !/WNT1 !/CRX1 !/CRT1      Wind and current interpolation.        #
#   !/O0 !/O1 !/O2 !/O3 !/O4 !/O5 !/O6 !/O7 !/O10                           #
#                        Sdt out output options.                            #
#   !/MGP !/MGG          Moving grid options.                               #
#                                                                           #
# No other optional switches should be used.                                #
#                                                                           #
# Remarks :                                                                 #
#                                                                           #
# - Test case input (default):                                              #
#   * ww3_grid_grd0.inp :                   (Single large high-res grid )   #
#     + Spatial grid: 523 x 523 rectilinear Cartesian grid                  #
#       - dx = 5 km, dy = 5 km                                              #
#       - Xrange = -1305:1305 km, Yrange = -1305:1305 km                    #
#     + Spectral grid: ntheta = 24, nf = 25, f1 = 0.04177, fgamma = 1.10    #
#   * ww3_grid_grd1.inp :                                  ( outer grid )   #
#     + Spatial grid: 55 x 55 rectilinear Cartesian grid                    #
#       - dx = 50 km, dy = 50 km                                            #
#       - Xrange = -1350:1350 km, Yrange = -1350:1350 km                    #
#     + Spectral grid: ntheta = 24, nf = 25, f1 = 0.04177, fgamma = 1.10    #
#   * ww3_grid_grd2.inp :                                 ( middle grid )   #
#     + Spatial grid: 51 x 51 rectilinear Cartesian grid                    #
#       - dx = 15 km, dy = 15 km                                            #
#       - Xrange = -375:375 km, Yrange = -375:375 km                        #
#     + Spectral grid: ntheta = 24, nf = 25, f1 = 0.04177, fgamma = 1.10    #
#     + Circular mask.                                                      #
#   * ww3_grid_grd3.inp :                                  ( inner grid )   #
#     + Spatial grid: 55 x 55 rectilinear Cartesian grid                    #
#       - dx = 5 km, dy = 5 km                                              #
#       - Xrange = -125:125 km, Yrange = -125:125 km                        #
#     + Spectral grid: ntheta = 24, nf = 25, f1 = 0.04177, fgamma = 1.10    #
#     + Circular mask.                                                      #
#                                                                           #
#   *  Grid sets available :                                                #
#     + grdset_a : grd1 grd2 grd3                                           #
#     + grdset_b : grd0 (historical only)                                   #
#     + grdset_c : grd1 (historical only)                                   #
#     + grdset_d : grd2 (historical only)                                   #
#     + grdset_e : grd3 (historical only)                                   #
#                                                                           #
#   *  map_m05.gs: GrADS script for grdset_a, requires minor editing for    #
#                  the other grid set options.                              #
#                                                                           #
# - switch options (mostly self-explanatory).                               #
#    + switch_ST1_PR1                                                       #
#    + switch_ST1_PR2_UNO                                                   #
#    + switch_ST1_PR2_UQ                                                    #
#    + switch_ST1_PR3_UNO                                                   #
#    + switch_ST1_PR3_UQ                                                    #
#    + switch_ST1_PR3_UNO_SCRIP                                             #
#    + switch_ST1_PR3_UQ_SCRIP                                              #
#    + switch_ST1_PR3_UNO_SCRIP_T38                                         #
#    + switch_ST1_PR3_UQ_SCRIP_T38                                          #
#    + switch_ST2_PR1                 (default)                             #
#    + switch_ST2_PR2_UNO                                                   #
#    + switch_ST2_PR2_UQ                                                    #
#    + switch_ST2_PR3_UNO                                                   #
#    + switch_ST2_PR3_UQ                                                    #
#    + switch_ST2_PR3_UNO_SCRIP_T38                                         #
#    + switch_ST2_PR3_UQ_SCRIP_T38                                          #
#    + switch_ST3_PR1                                                       #
#    + switch_ST3_PR2_UNO                                                   #
#    + switch_ST3_PR2_UQ                                                    #
#    + switch_ST3_PR3_UNO                                                   #
#    + switch_ST3_PR3_UQ                                                    #
#    + switch_ST4_PR1                                                       #
#    + switch_ST4_PR2_UNO                                                   #
#    + switch_ST4_PR2_UQ                                                    #
#    + switch_ST4_PR3_UNO                                                   #
#    + switch_ST4_PR3_UQ                                                    #
#    + switch_ST6_PR1                                                       #
#    + switch_ST6_PR2_UNO                                                   #
#    + switch_ST6_PR2_UQ                                                    #
#    + switch_ST6_PR3_UNO                                                   #
#    + switch_ST6_PR3_UQ                                                    #
#    + switch_ST1_PR1_MPI                                                   #
#    + switch_ST1_PR2_UNO_MPI                                               #
#    + switch_ST1_PR2_UQ_MPI                                                #
#    + switch_ST1_PR3_UNO_MPI                                               #
#    + switch_ST1_PR3_UQ_MPI                                                #
#    + switch_ST1_PR1_OMP                                                   #
#    + switch_ST1_PR2_UNO_OMP                                               #
#    + switch_ST1_PR2_UQ_OMP                                                #
#    + switch_ST1_PR3_UNO_OMP                                               #
#    + switch_ST1_PR3_UQ_OMP                                                #
#    + switch_ST1_PR3_UNO_MPI_SCRIP                                         #
#    + switch_ST1_PR3_UQ_MPI_SCRIP                                          #
#    + switch_ST2_PR1_MPI                                                   #
#    + switch_ST2_PR2_UNO_MPI                                               #
#    + switch_ST2_PR2_UQ_MPI                                                #
#    + switch_ST2_PR3_UNO_MPI                                               #
#    + switch_ST2_PR3_UQ_MPI                                                #
#    + switch_ST2_PR1_OMP                                                   #
#    + switch_ST2_PR2_UNO_OMP                                               #
#    + switch_ST2_PR2_UQ_OMP                                                #
#    + switch_ST2_PR3_UNO_OMP                                               #
#    + switch_ST2_PR3_UQ_OMP                                                #
#    + switch_ST2_PR3_UNO_MPI_SCRIP                                         #
#    + switch_ST2_PR3_UQ_MPI_SCRIP                                          #
#    + switch_ST2_PR3_UNO_MPI_SCRIPNC                                       #
#    + switch_ST2_PR3_UQ_MPI_SCRIPNC                                        #
#    + switch_ST3_PR1_MPI                                                   #
#    + switch_ST3_PR2_UNO_MPI                                               #
#    + switch_ST3_PR2_UQ_MPI                                                #
#    + switch_ST3_PR3_UNO_MPI                                               #
#    + switch_ST3_PR3_UQ_MPI                                                #
#    + switch_ST3_PR1_OMP                                                   #
#    + switch_ST3_PR2_UNO_OMP                                               #
#    + switch_ST3_PR2_UQ_OMP                                                #
#    + switch_ST3_PR3_UNO_OMP                                               #
#    + switch_ST3_PR3_UQ_OMP                                                #
#    + switch_ST4_PR1_MPI                                                   #
#    + switch_ST4_PR2_UNO_MPI                                               #
#    + switch_ST4_PR2_UQ_MPI                                                #
#    + switch_ST4_PR3_UNO_MPI                                               #
#    + switch_ST4_PR3_UQ_MPI                                                #
#    + switch_ST4_PR1_OMP                                                   #
#    + switch_ST4_PR2_UNO_OMP                                               #
#    + switch_ST4_PR2_UQ_OMP                                                #
#    + switch_ST4_PR3_UNO_OMP                                               #
#    + switch_ST4_PR3_UQ_OMP                                                #
#    + switch_ST6_PR1_MPI                                                   #
#    + switch_ST6_PR2_UNO_MPI                                               #
#    + switch_ST6_PR2_UQ_MPI                                                #
#    + switch_ST6_PR3_UNO_MPI                                               #
#    + switch_ST6_PR3_UQ_MPI                                                #
#    + switch_ST6_PR1_OMP                                                   #
#    + switch_ST6_PR2_UNO_OMP                                               #
#    + switch_ST6_PR2_UQ_OMP                                                #
#    + switch_ST6_PR3_UNO_OMP                                               #
#    + switch_ST6_PR3_UQ_OMP                                                #
#                                                                           #
#  Example run_test commands:                                               #
#  (some details will vary by local system and configuration)               #
#  ./bin/run_test -m grdset_a -n 3 -p mpirun -s ST6_PR3_UQ_MPI -w work_a  \ #
#                                                  ../model mww3_test_05    #
#  ./bin/run_test -m grdset_b -n 3 -p mpirun -s ST6_PR3_UQ_MPI -w work_b  \ #
#                                                  ../model mww3_test_05    #
#                                                                           #
#                                              Hendrik Tolman, Nov 2005     #
#                                                   Last Mod : Dec 2013     #
#                                                                           #
#    Copyright 2009-2013 National Weather Service (NWS),                    #
#       National Oceanic and Atmospheric Administration.  All rights        #
#       reserved.  WAVEWATCH III is a trademark of the NWS.                 #
#       No unauthorized use without permission.                             #
#                                                                           #
#############################################################################
 
 Input directory: /home/ed/WW3/regtests/mww3_test_05/input
 Switch file: /home/ed/WW3/regtests/mww3_test_05/input/switch_ST4_PR2_UQ_MPI
 
 
+--------------------+
|  Grid preprocessor |
+--------------------+
 
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_grid_grd1.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_grid_grd1.out
mv: 'mod_def.ww3' and 'mod_def.grd1' are the same file
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_grid_grd2.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_grid_grd2.out
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_grid_grd3.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_grid_grd3.out
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_grid_input.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_grid_input.out
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_grid_points.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_grid_points.out
 
+--------------------+
| Initial conditions |
+--------------------+
 
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_strt.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_strt_grd1.out
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_strt.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_strt_grd2.out
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_strt.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_strt_grd3.out
 
+---------------------+
| Prep forcing fields |
+---------------------+
 
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_prep_wind.inp for wind
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_prep_wind.out
 
+--------------------+
|    Main program    |
+--------------------+
 
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_multi_grdset_a.inp
   Screen output copied to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_multi.out

                    *** WAVEWATCH III Multi-grid shell ***    
               =================================================

 ========== STARTING MWW3 INITIALIZATION (WMINIT) =============================

  Opening input file ww3_multi.inp (unit number  8)
  Opening output file log.mww3 (unit number  9)

  Comment character : '$'

  Number of grids          :  3
  Input data grids         :  1
  Single point output file : YES/--

  Output server type       :  1
  Single point output proc : YES/--
       Unified point output [points]
          Initializing grids ...

  Input grid information : 
  nr extension  lev.   cur.   wind   ice    tau    rho    data
 ------------------------------------------------------------
   1 input      ---    ---     X     ---    ---    ---    - - -
 ------------------------------------------------------------

  Grid for point output : 
  nr extension  
 ---------------
     points    
 ---------------

  Wave grid information : 
  nr extension  lev.   cur.   wind   ice    tau    rho    data   move1 rnk grp dmp
 ---------------------------------------------------------------------------------
   1 grd1       ---    ---    input  ---    ---    ---    - - -  yes    1   1   -
   2 grd2       ---    ---    input  ---    ---    ---    - - -  yes    2   2   -
   3 grd3       ---    ---    input  ---    ---    ---    - - -  yes    3   3   -
 ----------------------------------------------------------------------------------

  Group information : 
  nr   grids (part of comm.)
 --------------------------------------------------------------------
   1    1 (0.0000-1.0000)
   2    2 (0.0000-1.0000)
   3    3 (0.0000-1.0000)
 --------------------------------------------------------------------


  Time interval : 
 --------------------------------------------------
       Starting time : 1968/06/06 00:00:00 UTC
       Ending time   : 1968/06/06 06:00:00 UTC


  Model settings : 
 --------------------------------------------------
       Masking computation in nesting : YES/--
       Masking output in nesting      : YES/--


  Output requests : (ALL GRIDS) 
 ==================================================

       Type 1 : Fields of mean wave parameters
      -----------------------------------------
            From     : 1968/06/06 00:00:00 UTC
            To       : 1968/06/07 00:00:00 UTC
            Interval :               30:00

            Fields   : Water depth         
                       Current vel.        
                       Wind speed          
                       Wave height         
                       Mean wave period(-1)
                       Peak frequency      
                       Peak direction      
                       Part. wave height   
                       Part. peak period   
                       Part. mean direction
                       Mean square slopes  

       Type 2 : Point output                  
      -----------------------------------------
            From     : 1968/06/06 00:00:00 UTC
            To       : 1968/06/07 00:00:00 UTC
            Interval :               30:00

            Point  1 :   0.000000E+00  0.000000E+00  eye                                     
                   2 :   0.000000E+00  0.500000E+05  mN                                      
                   3 :  -0.350000E+05  0.350000E+05  mNW                                     
                   4 :  -0.500000E+05  0.000000E+00  mW                                      
                   5 :  -0.350000E+05 -0.350000E+05  mSW                                     
                   6 :   0.000000E+00 -0.500000E+05  mS                                      
                   7 :   0.350000E+05 -0.350000E+05  mSE                                     
                   8 :   0.500000E+05  0.000000E+00  mE                                      
                   9 :   0.350000E+05  0.350000E+05  mNE                                     
                  10 :   0.000000E+00  0.100000E+06  aN                                      
                  11 :  -0.700000E+05  0.700000E+05  aNW                                     
                  12 :  -0.100000E+06  0.000000E+00  aW                                      
                  13 :  -0.700000E+05 -0.700000E+05  aSW                                     
                  14 :   0.000000E+00 -0.100000E+06  aS                                      
                  15 :   0.700000E+05 -0.700000E+05  aSE                                     
                  16 :   0.100000E+06  0.000000E+00  aE                                      
                  17 :   0.700000E+05  0.700000E+05  aNE                                     
                  18 :   0.000000E+00  0.210000E+06  bN                                      
                  19 :  -0.150000E+06  0.150000E+06  bNW                                     
                  20 :  -0.210000E+06  0.000000E+00  bW                                      
                  21 :  -0.150000E+06 -0.150000E+06  bSW                                     
                  22 :   0.000000E+00 -0.210000E+06  bS                                      
                  23 :   0.150000E+06 -0.150000E+06  bSE                                     
                  24 :   0.210000E+06  0.000000E+00  bE                                      
                  25 :   0.150000E+06  0.150000E+06  bNE                                     
                  26 :   0.000000E+00  0.800000E+06  cN                                      
                  27 :  -0.550000E+06  0.550000E+06  cNW                                     
                  28 :  -0.800000E+06  0.000000E+00  cW                                      
                  29 :  -0.550000E+06 -0.550000E+06  cSW                                     
                  30 :   0.000000E+00 -0.800000E+06  cS                                      
                  31 :   0.550000E+06 -0.550000E+06  cSE                                     
                  32 :   0.800000E+06  0.000000E+00  cE                                      
                  33 :   0.550000E+06  0.550000E+06  cNE                                     

  Grid movement data (!/MGP, !/MGW): 
 --------------------------------------------------
       Continuous grid movement data
            1  MOV
               1   19680606 000000    5.00   90.00


  Assigning resources : 
 --------------------------------------------------
       No (other) dedicated output processes.

       grid           comp.      grd    pnt    trk    rst    bpt    prt
      -------------------------------------------------------------------
       grd1        00001-00024  00023  00022  -----  -----  -----  -----
       grd2        00001-00024  00023  00022  -----  -----  -----  -----
       grd3        00001-00024  00023  00022  -----  -----  -----  -----
      -------------------------------------------------------------------
         Unified point output at 00022



  Initializations :
 --------------------------------------------------
       Model number  1 [grd1]
          Initializing wave model ...
          Initializing model input ...
            water levels : file not needed
            currents     : file not needed
            winds        : file not needed
            ice fields   : file not needed
            momentum     : file not needed
            air density  : file not needed
       Model number  2 [grd2]
          Initializing wave model ...
          Initializing model input ...
            water levels : file not needed
            currents     : file not needed
            winds        : file not needed
            ice fields   : file not needed
            momentum     : file not needed
            air density  : file not needed
       Model number  3 [grd3]
          Initializing wave model ...
          Initializing model input ...
            water levels : file not needed
            currents     : file not needed
            winds        : file not needed
            ice fields   : file not needed
            momentum     : file not needed
            air density  : file not needed
       Input data grid  1 [input]
          Initializing grids ...
            water levels : file not needed
            currents     : file not needed
            winds        : file OK
            ice fields   : file not needed
            momentum     : file not needed
            air density  : file not needed

  Computing relation to higher ranked grids

  Generating map with distances to boundary.
Starting MAPBDI 1st loop.
Starting MAPBDI 2nd loop.
    bnd. point    25 out of    51
    bnd. point    50 out of    51
Finished MAPBDI 2nd loop.
  Finished generating map with distances to boundary.

  Generating map with distances to boundary.
Starting MAPBDI 1st loop.
Starting MAPBDI 2nd loop.
    bnd. point    25 out of    51
    bnd. point    50 out of    51
Finished MAPBDI 2nd loop.
  Finished generating map with distances to boundary.


  Finished computing relation to higher ranked grids


  Additional group information

  Lower rank grid dependence : 
  nr   grids (part of comm.)
 --------------------------------------------------------------------
   1   Data from file
   2    1
   3    2
 --------------------------------------------------------------------

  No same rank grid dependencies

  Higher rank grid dependence : 
  nr   grids (part of comm.)
 --------------------------------------------------------------------
   1    2
   2    3
   3   No dependencies
 --------------------------------------------------------------------

  Running the model :
 --------------------------------------------------

 ========== END OF MWW3 INITIALIZATION (WMINIT) ===============================

 ========== STARTING WAVE MODEL (WMWAVE) ======================================

  MWW3 calculating for 1968/06/06 00:00:00 UTC at 10:38:23  status [ 0- 0]

  Updating input for grid  1 at 1968/06/06 00:00:00 UTC
     Updating winds        
        First updating input        
     Updating grid speed   
        Past last grid speed   

 *** WAVEWATCH III WARNING IN W3IOBC : 
     INPUT FILE WITH BOUNDARY CONDITIONS NOT FOUND
     BOUNDARY CONDITIONS WILL NOT BE UPDATED     1


  Updating input for grid  2 at 1968/06/06 00:00:00 UTC
     Updating winds        
     Updating grid speed   
        Past last grid speed   

  Updating input for grid  3 at 1968/06/06 00:00:00 UTC
     Updating winds        
     Updating grid speed   
        Past last grid speed   

  MWW3 calculating for 1968/06/06 00:10:00 UTC at 10:38:24  status [ 1- 5]
  MWW3 calculating for 1968/06/06 00:20:00 UTC at 10:38:40  status [ 1- 5]
  MWW3 calculating for 1968/06/06 00:30:00 UTC at 10:39:01  status [ 1- 5]
  MWW3 calculating for 1968/06/06 00:40:00 UTC at 10:39:16  status [ 1- 5]
  MWW3 calculating for 1968/06/06 00:50:00 UTC at 10:39:28  status [ 1- 5]
  MWW3 calculating for 1968/06/06 01:00:00 UTC at 10:39:39  status [ 1- 5]
  MWW3 calculating for 1968/06/06 01:10:00 UTC at 10:39:49  status [ 1- 5]
  MWW3 calculating for 1968/06/06 01:20:00 UTC at 10:39:58  status [ 1- 5]
  MWW3 calculating for 1968/06/06 01:30:00 UTC at 10:40:07  status [ 1- 5]
  MWW3 calculating for 1968/06/06 01:40:00 UTC at 10:40:16  status [ 1- 5]
  MWW3 calculating for 1968/06/06 01:50:00 UTC at 10:40:23  status [ 1- 5]
  MWW3 calculating for 1968/06/06 02:00:00 UTC at 10:40:30  status [ 1- 5]
  MWW3 calculating for 1968/06/06 02:10:00 UTC at 10:40:36  status [ 1- 5]
  MWW3 calculating for 1968/06/06 02:20:00 UTC at 10:40:42  status [ 1- 5]
  MWW3 calculating for 1968/06/06 02:30:00 UTC at 10:40:47  status [ 1- 5]
  MWW3 calculating for 1968/06/06 02:40:00 UTC at 10:40:52  status [ 1- 5]
  MWW3 calculating for 1968/06/06 02:50:00 UTC at 10:40:57  status [ 1- 5]
  MWW3 calculating for 1968/06/06 03:00:00 UTC at 10:41:01  status [ 1- 5]
  MWW3 calculating for 1968/06/06 03:10:00 UTC at 10:41:05  status [ 1- 5]
  MWW3 calculating for 1968/06/06 03:20:00 UTC at 10:41:09  status [ 1- 5]
  MWW3 calculating for 1968/06/06 03:30:00 UTC at 10:41:12  status [ 1- 5]
  MWW3 calculating for 1968/06/06 03:40:00 UTC at 10:41:16  status [ 1- 5]
  MWW3 calculating for 1968/06/06 03:50:00 UTC at 10:41:20  status [ 1- 5]
  MWW3 calculating for 1968/06/06 04:00:00 UTC at 10:41:23  status [ 1- 5]
  MWW3 calculating for 1968/06/06 04:10:00 UTC at 10:41:26  status [ 1- 5]
  MWW3 calculating for 1968/06/06 04:20:00 UTC at 10:41:30  status [ 1- 5]
  MWW3 calculating for 1968/06/06 04:30:00 UTC at 10:41:33  status [ 1- 5]
  MWW3 calculating for 1968/06/06 04:40:00 UTC at 10:41:36  status [ 1- 5]
  MWW3 calculating for 1968/06/06 04:50:00 UTC at 10:41:39  status [ 1- 5]
  MWW3 calculating for 1968/06/06 05:00:00 UTC at 10:41:42  status [ 1- 5]
  MWW3 calculating for 1968/06/06 05:10:00 UTC at 10:41:45  status [ 1- 5]
  MWW3 calculating for 1968/06/06 05:20:00 UTC at 10:41:48  status [ 1- 5]
  MWW3 calculating for 1968/06/06 05:30:00 UTC at 10:41:51  status [ 1- 5]
  MWW3 calculating for 1968/06/06 05:40:00 UTC at 10:41:54  status [ 1- 5]
  MWW3 calculating for 1968/06/06 05:50:00 UTC at 10:41:57  status [ 1- 5]
  MWW3 calculating for 1968/06/06 06:00:00 UTC at 10:42:00  status [ 1- 5]
  MWW3 reached the end of the computation loop at 10:42:03

 ========== END OF WAVE MODEL (WMWAVE) ========================================

 ========== STARTING MWW3 FINALIZATION (WMFINL) ===============================

  Initialization time :      4.41 s
  Elapsed time        :    223.91 s

 ========== END OF MWW3 INITIALIZATION (WMFINL) ===============================



  End of program 
 ========================================
          WAVEWATCH III Multi-grid shell 

[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
[WARNING] yaksa: 6 leaked handle pool objects
 
+--------------------+
|   Gridded output   |
+--------------------+
 
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_outf.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_outf_grd1.out
   ASCII output files moved to ww3_outf_grd1
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_outf.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_outf_grd2.out
   ASCII output files moved to ww3_outf_grd2
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_outf.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_outf_grd3.out
   ASCII output files moved to ww3_outf_grd3
 
+--------------------+
| NC Gridded output  |
+--------------------+
 
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_ounf.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_ounf_grd1.out
   NetCDF output files moved to ww3_ounf_grd1
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_ounf.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_ounf_grd2.out
   NetCDF output files moved to ww3_ounf_grd2
   Processing /home/ed/WW3/regtests/mww3_test_05/input/ww3_ounf.inp
   Screen output routed to /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/ww3_ounf_grd3.out
   NetCDF output files moved to ww3_ounf_grd3
 
 
Files in /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI :
 
total 146828
-rw-rw-r-- 1 ed ed     9203 Oct 30 10:38 build.log
drwxrwxr-x 2 ed ed     4096 Oct 30 10:13 exe
-rw-rw-r-- 1 ed ed       32 Oct 30 10:42 finished
-rw-rw-r-- 1 ed ed     5590 Oct 30 10:42 log.grd1
-rw-rw-r-- 1 ed ed     5590 Oct 30 10:42 log.grd2
-rw-rw-r-- 1 ed ed    11638 Oct 30 10:42 log.grd3
-rw-rw-r-- 1 ed ed    39566 Oct 30 10:42 log.mww3
-rw-rw-r-- 1 ed ed 26932349 Oct 30 10:38 mod_def.grd1
lrwxrwxrwx 1 ed ed       12 Oct 30 10:34 mod_def.grd2 -> mod_def.grd1
-rw-rw-r-- 1 ed ed 26932349 Oct 30 10:38 mod_def.grd3
-rw-rw-r-- 1 ed ed 36642637 Oct 30 10:38 mod_def.input
-rw-rw-r-- 1 ed ed 26956909 Oct 30 10:38 mod_def.points
-rw-rw-r-- 1 ed ed  3243450 Oct 30 10:42 out_grd.grd1
-rw-rw-r-- 1 ed ed  3243450 Oct 30 10:42 out_grd.grd2
-rw-rw-r-- 1 ed ed  3243450 Oct 30 10:42 out_grd.grd3
-rw-rw-r-- 1 ed ed  1061062 Oct 30 10:42 out_pnt.points
-rw-rw-r-- 1 ed ed  4932000 Oct 30 10:38 restart.grd1
-rw-rw-r-- 1 ed ed  4932000 Oct 30 10:38 restart.grd2
-rw-rw-r-- 1 ed ed  4932000 Oct 30 10:38 restart.grd3
-rw-rw-r-- 1 ed ed  4222713 Oct 30 10:14 ST4TABUHF2.bin
-rw-rw-r-- 1 ed ed     1404 Oct 30 10:42 time_count.txt
-rw-rw-r-- 1 ed ed  2188312 Oct 30 10:38 wind.input
-rw-rw-r-- 1 ed ed    16412 Oct 30 10:38 ww3_grid_grd1.out
-rw-rw-r-- 1 ed ed    23162 Oct 30 10:38 ww3_grid_grd2.out
-rw-rw-r-- 1 ed ed    23162 Oct 30 10:38 ww3_grid_grd3.out
-rw-rw-r-- 1 ed ed   568256 Oct 30 10:38 ww3_grid_input.out
-rw-rw-r-- 1 ed ed    16412 Oct 30 10:38 ww3_grid_points.out
-rw-rw-r-- 1 ed ed    13773 Oct 30 10:42 ww3_multi.out
drwxrwxr-x 2 ed ed     4096 Oct 30 10:42 ww3_ounf_grd1
-rw-rw-r-- 1 ed ed     2153 Oct 30 10:42 ww3_ounf_grd1.out
drwxrwxr-x 2 ed ed     4096 Oct 30 10:42 ww3_ounf_grd2
-rw-rw-r-- 1 ed ed     2153 Oct 30 10:42 ww3_ounf_grd2.out
drwxrwxr-x 2 ed ed     4096 Oct 30 10:42 ww3_ounf_grd3
-rw-rw-r-- 1 ed ed     2153 Oct 30 10:42 ww3_ounf_grd3.out
drwxrwxr-x 2 ed ed     4096 Oct 30 10:42 ww3_outf_grd1
-rw-rw-r-- 1 ed ed     1625 Oct 30 10:42 ww3_outf_grd1.out
drwxrwxr-x 2 ed ed     4096 Oct 30 10:42 ww3_outf_grd2
-rw-rw-r-- 1 ed ed     1625 Oct 30 10:42 ww3_outf_grd2.out
drwxrwxr-x 2 ed ed     4096 Oct 30 10:42 ww3_outf_grd3
-rw-rw-r-- 1 ed ed     1625 Oct 30 10:42 ww3_outf_grd3.out
-rw-rw-r-- 1 ed ed     1263 Oct 30 10:38 ww3_prep_wind.out
-rw-rw-r-- 1 ed ed     5714 Oct 30 10:38 ww3_strt_grd1.out
-rw-rw-r-- 1 ed ed     5714 Oct 30 10:38 ww3_strt_grd2.out
-rw-rw-r-- 1 ed ed     5714 Oct 30 10:38 ww3_strt_grd3.out
 
 
                    ==================================   
                  ======>  END OF WAVEWATCH III  <====== 
                    ==================================   
 
 
     **************************************************************
     *  end of WAVEWATCH III matrix05 of regression tests  *
     **************************************************************
 
ed@Pooh-Bah:~/WW3/regtests$ 

I would be helpful to know if this particular test uses w3iopo(). Is there any easy way to tell from the output? Or do all tests use w3iopo()?

If someone could point me to a reasonably small output file, that would be very helpful. Did my regtest produce one? If so, where would it be?

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett this is great that you were able to run a regression tests. /home/ed/WW3/regtests/mww3_test_05/work_ST4_PR2_UQ_MPI/out_pnt.points is the output of w3iopo . This test isn't running any point output which would then read this file.

While we'll eventually want/need all regtests to run, perhaps it'll be easier to choose a very small simple regression test, that we know has point output and is fairly small. @MatthewMasarik-NOAA any ideas which one would be a great candidate for this, otherwise I can look in about an hour.

@MatthewMasarik-NOAA
Copy link
Collaborator

Yes, I was being loose when I said we went over regression testing. We did pick just one test as a small, single test case. The output Ed posted is from that test case, and it has point output, too. Was there something else you had in mind for the test case?

@JessicaMeixner-NOAA
Copy link
Collaborator Author

I only saw gridded post-procssing output, not point post processing in @edwardhartnett log. I might chose a single versus multi-grid test to start with personally, but this test certainly will work. I do think we will eventually need to make sure we get some sort of point post-processing added here.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

So we have the full set of regression tests, but personally I think starting with something simpler (ie ww3_shel versus ww3_multi) might be a good idea, plus this test has point output (ie it will also read the output from w3iopo), and this test is:

./bin/run_cmake_test -b slurm -o all -S -T -s PR1 -w work_PR1 ../model ww3_tp1.4
Remove the -b if you do not wish to run on hera/orion and are on your local machine.

For multi-grid, we have 2 options:

Another option which is admittedly not well documented is to have each point output write it's own time-snap file. You then have to process each time snap differently as it's own out_pnt.ww3 file renamed from the time-stamped file. This is currently done in the global-wrokflow but not in one of the regression tests here. This is the first step toward improving that process.

Please let me know if you have any additional questions or things I can help with.

@MatthewMasarik-NOAA
Copy link
Collaborator

Thanks for this very helpful info, @JessicaMeixner-NOAA!

@edwardhartnett
Copy link
Contributor

OK, here's a simple question, when I run run_cmake_test, what is the actual binary file that is executed?

In other words, how do I use a debugger on the regression test code?

@edwardhartnett
Copy link
Contributor

OK, so I was able to run Jessica's suggested test:

ed@Pooh-Bah:~/WW3/regtests$ ./bin/run_cmake_test -o all -S -T -s PR1 -w work_PR1 ../model ww3_tp1.4
 
 Running now options: run_test -o all -S -T -s PR1 -w work_PR1 ../model ww3_tp1.4
 
   Building WW3, exes will be in /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/exe
   Build log is in /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/build.log
 
 
                    ==================================   
                  ======> TEST RUN WAVEWATCH III <====== 
                    ==================================   
 
#############################################################################
#                                                                           #
# ww3_tp1.4 Test script for WW-III, one-dimensional propagation.            #
#           spectral refraction (X).                                        #
#                                                                           #
# Model should be compiled with the switches :                              #
#                                                                           #
#   !/LN0 !/ST0 !/NL0 !/BT0 !/DB0 !/TR0 !/BS0                               #
#                        Select the 'no source terms' option.               #
#   !/PRn                Selecting one of the propagation schemes.          #
#                         1: First order.                                   #
#                         2: Representative for all UQ schemes              #
#                         3: Switch smoothing off to reproduce 2.           #
#   !/WNX1 !/WNT1 !/CRX1 !/CRT1      Wind and current interpolation.        #
#   !/O0 !/O1 !/O2 !/O3 !/O4 !/O5 !/O6 !/O7   Sdt out output options.       #
#                                                                           #
# Remarks :                                                                 #
#                                                                           #
# - Several initial conditions and shoaling to left or right are available  #
#   in the test case. Select by commenting/uncommenting lines in            #
#   ww3_grid.inp and ww3_strt.inp. NOT YET CONVERTED TO regtests            #
# - Note that the refraction time step is chosen as half the spatial        #
#   time step to avoid slight wiggling due to the otherwise alternating     #
#   order of the spatial and spectral propagation steps.                    #
# - Test case input (default):                                              #
#   * ww3_grid.inp : (default)                                              #
#     + Spatial grid: 13 x 3 rectilinear Cartesian grid                     #
#       - dx = 5 km, dy = 5 km                                              #
#       - Xrange = -5:55 km, Yrange = -5:5 km                               #
#     + Spectral grid: ntheta = 24, nf =  3, f1 = 0.08,    fgamma = 1.25    #
#   * switch options :                                                      #
#     + switch_PR1     : First order scheme                                 #
#     + switch_PR2_UNO : UNO scheme with diffusion (off)                    #
#     + switch_PR2_UQ  : UQ scheme with diffusion (off)                     #
#     + switch_PR3_UNO : UNO scheme with averaging (off)                    #
#     + switch_PR3_UQ  : UQ scheme with averaging (off) (default)           #
#                                                                           #
#  Example run_test commands:                                               #
#  (some details will vary by local system and configuration)               #
#  ./bin/run_test -s PR1    -w work_PR1 ../model ww3_tp1.4                  #
#  ./bin/run_test -s PR2_UQ -w work_PR2 ../model ww3_tp1.4                  #
#  ./bin/run_test -s PR3_UQ -w work_PR3 ../model ww3_tp1.4                  #
#                                                                           #
#                                              Hendrik Tolman, Jun 2002     #
#                                                   Last Mod : Aug 2013     #
#                                                                           #
#    Copyright 2009-2013 National Weather Service (NWS),                    #
#       National Oceanic and Atmospheric Administration.  All rights        #
#       reserved.  WAVEWATCH III is a trademark of the NWS.                 #
#       No unauthorized use without permission.                             #
#                                                                           #
#############################################################################
 
 Input directory: /home/ed/WW3/regtests/ww3_tp1.4/input
 Switch file: /home/ed/WW3/regtests/ww3_tp1.4/input/switch_PR1
 
 
+--------------------+
|  Grid preprocessor |
+--------------------+
 
   Processing /home/ed/WW3/regtests/ww3_tp1.4/input/ww3_grid.inp
   Screen output routed to /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/ww3_grid.out
 
+--------------------+
| Initial conditions |
+--------------------+
 
   Processing /home/ed/WW3/regtests/ww3_tp1.4/input/ww3_strt.inp
   Screen output routed to /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/ww3_strt.out
 
+--------------------+
|    Main program    |
+--------------------+
 
   Processing /home/ed/WW3/regtests/ww3_tp1.4/input/ww3_shel.inp
   Screen output copied to /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/ww3_shel.out

                     *** WAVEWATCH III Program shell ***      
               ===============================================

  Comment character is '$'


  Input fields : 
 --------------------------------------------------
       water levels   ---/NO                      
       currents       ---/NO                      
       winds          ---/NO                      
       ice fields     ---/NO                      
       momentum       ---/NO                      
       air density    ---/NO                      
       mean param.    ---/NO                      
       1D spectra     ---/NO                      
       2D spectra     ---/NO                      
 
            Fields   : Wave height         
                       Mean wave period(+1)
                       Mean wave dir. a1b1 
            Point  1 :      0.0E3     0.0E3  Point1                                  
                   2 :      5.0E3     0.0E3  Point2                                  
                   3 :     10.0E3     0.0E3  Point3                                  
                   4 :     15.0E3     0.0E3  Point4                                  
                   5 :     20.0E3     0.0E3  Point5                                  
                   6 :     25.0E3     0.0E3  Point6                                  
                   7 :     30.0E3     0.0E3  Point7                                  
                   8 :     35.0E3     0.0E3  Point8                                  
                   9 :     40.0E3     0.0E3  Point9                                  
                  10 :     45.0E3     0.0E3  Point10                                 
                  11 :     50.0E3     0.0E3  Point11                                 
            Fields   : no fields defined

  Initializations :
 --------------------------------------------------

  Time interval : 
 --------------------------------------------------
       Starting time : 1968/06/06 00:00:00 UTC
       Ending time   : 1968/06/06 12:00:00 UTC


  Output requests : 
 --------------------------------------------------
       No dedicated output process, any file system.

       Type 1 : Fields of mean wave parameters
      -----------------------------------------
            From     : 1968/06/06 00:00:00 UTC
            To       : 1968/06/06 12:00:00 UTC
            Interval :            00:15:00


       Type 2 : Point output                  
      -----------------------------------------
            From     : 1968/06/06 00:00:00 UTC
            To       : 1968/06/06 12:00:00 UTC
            Interval :            00:15:00

            output dates out of run dates : Restart files second request deactivated
       Wave model ...

  Running model without input fields
 --------------------------------------------------

  WAVEWATCH III calculating for 1968/06/06 00:00:00 UTC at 14:10:42

 *** WAVEWATCH III WARNING IN W3IOBC : 
     INPUT FILE WITH BOUNDARY CONDITIONS NOT FOUND
     BOUNDARY CONDITIONS WILL NOT BE UPDATED     1

  WAVEWATCH III calculating for 1968/06/06 00:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 00:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 00:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 00:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 00:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 00:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 00:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 00:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 00:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 00:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 00:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 01:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 02:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 03:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 04:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 05:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 06:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 07:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 08:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 09:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 10:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:00:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:05:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:10:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:15:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:20:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:25:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:30:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:35:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:40:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:45:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:50:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 11:55:00 UTC at 14:10:42
  WAVEWATCH III calculating for 1968/06/06 12:00:00 UTC at 14:10:42
  WAVEWATCH III reached the end of a computation loop at 14:10:42

  Initialization time :      0.00 s
  Elapsed time        :      0.02 s

  End of program 
 ====================================
         WAVEWATCH III Program shell 

 
+--------------------+
|   Gridded output   |
+--------------------+
 
   Processing /home/ed/WW3/regtests/ww3_tp1.4/input/ww3_outf.inp
   Screen output routed to /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/ww3_outf.out
 
+--------------------+
| NC Gridded output  |
+--------------------+
 
   Processing /home/ed/WW3/regtests/ww3_tp1.4/input/ww3_ounf.inp
   Screen output routed to /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/ww3_ounf.out
 
+--------------------+
|    Point output    |
+--------------------+
 
   Processing /home/ed/WW3/regtests/ww3_tp1.4/input/ww3_outp_spec.inp
   Screen output routed to /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/ww3_outp_spec.out
   Processing /home/ed/WW3/regtests/ww3_tp1.4/input/ww3_outp_tab50.inp
   Screen output routed to /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/ww3_outp_tab50.out
   Processing /home/ed/WW3/regtests/ww3_tp1.4/input/ww3_outp_tab51.inp
   Screen output routed to /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/ww3_outp_tab51.out
 
+--------------------+
| NC Point output    |
+--------------------+
 
   Processing /home/ed/WW3/regtests/ww3_tp1.4/input/ww3_ounp.inp
   Screen output routed to /home/ed/WW3/regtests/ww3_tp1.4/work_PR1/ww3_ounp.out
 
 
Files in /home/ed/WW3/regtests/ww3_tp1.4/work_PR1 :
 
total 452
-rw-rw-r-- 1 ed ed   9051 Oct 30 14:10 build.log
drwxrwxr-x 2 ed ed   4096 Oct 30 14:10 exe
-rw-rw-r-- 1 ed ed     32 Oct 30 14:10 finished
-rw-rw-r-- 1 ed ed   6589 Oct 30 14:10 log.ww3
-rw-rw-r-- 1 ed ed   6321 Oct 30 14:10 mod_def.ww3
-rw-rw-r-- 1 ed ed  55770 Oct 30 14:10 out_grd.ww3
-rw-rw-r-- 1 ed ed 193804 Oct 30 14:10 out_pnt.ww3
-rw-rw-r-- 1 ed ed   3744 Oct 30 14:10 restart.ww3
-rw-rw-r-- 1 ed ed   3476 Oct 30 14:10 tab50.ww3
-rw-rw-r-- 1 ed ed   4109 Oct 30 14:10 tab51.ww3
-rw-rw-r-- 1 ed ed    579 Oct 30 14:10 time_count.txt
-rw-rw-r-- 1 ed ed   9148 Oct 30 14:10 ww3.196806.nc
-rw-rw-r-- 1 ed ed  52348 Oct 30 14:10 ww3.196806_spec.nc
-rw-rw-r-- 1 ed ed   7270 Oct 30 14:10 ww3_grid.out
-rw-rw-r-- 1 ed ed   5141 Oct 30 14:10 ww3_ounf.out
-rw-rw-r-- 1 ed ed   3588 Oct 30 14:10 ww3_ounp.out
-rw-rw-r-- 1 ed ed  17559 Oct 30 14:10 ww3_outf.out
-rw-rw-r-- 1 ed ed  15276 Oct 30 14:10 ww3_outp_spec.out
-rw-rw-r-- 1 ed ed   2316 Oct 30 14:10 ww3_outp_tab50.out
-rw-rw-r-- 1 ed ed   1646 Oct 30 14:10 ww3_outp_tab51.out
-rw-rw-r-- 1 ed ed  13079 Oct 30 14:10 ww3_shel.out
-rw-rw-r-- 1 ed ed   2331 Oct 30 14:10 ww3_strt.out
 
 
                    ==================================   
                  ======>  END OF WAVEWATCH III  <====== 
                    ==================================   
 
ed@Pooh-Bah:~/WW3/regtests$ 

@edwardhartnett
Copy link
Contributor

In the regtest output is says:

# Model should be compiled with the switches :                              #
#                                                                           #
#   !/LN0 !/ST0 !/NL0 !/BT0 !/DB0 !/TR0 !/BS0                               #
#                        Select the 'no source terms' option.               #
#   !/PRn                Selecting one of the propagation schemes.          #
#                         1: First order.                                   #
#                         2: Representative for all UQ schemes              #
#                         3: Switch smoothing off to reproduce 2.           #
#   !/WNX1 !/WNT1 !/CRX1 !/CRT1      Wind and current interpolation.        #
#   !/O0 !/O1 !/O2 !/O3 !/O4 !/O5 !/O6 !/O7   Sdt out output options.       #

I didn't compile the model with these switches. Is that a problem?

@JessicaMeixner-NOAA
Copy link
Collaborator Author

OK, here's a simple question, when I run run_cmake_test, what is the actual binary file that is executed?

Several executables are executed in the run_cmake_test script for the various parts of the code. If it'd be helpful we can create a canned case to run just the executables needed to run to write and then read the binary out_pnt.ww3 files

In other words, how do I use a debugger on the regression test code?

There are several ways to do this. I usually hard-code that cmake is set to debug instead of release. We can set up a meeting to walk you through this if we do not set-up the more limited canned case for you.

If you were writing code to read this file, what global data structures would have to be set up before w3iopo() is called to read the file?

There are likely several data structures that are input to the routine as well as those that are in module files.

In the regtest output is says:

# Model should be compiled with the switches :                              #
#                                                                           #
#   !/LN0 !/ST0 !/NL0 !/BT0 !/DB0 !/TR0 !/BS0                               #
#                        Select the 'no source terms' option.               #
#   !/PRn                Selecting one of the propagation schemes.          #
#                         1: First order.                                   #
#                         2: Representative for all UQ schemes              #
#                         3: Switch smoothing off to reproduce 2.           #
#   !/WNX1 !/WNT1 !/CRX1 !/CRT1      Wind and current interpolation.        #
#   !/O0 !/O1 !/O2 !/O3 !/O4 !/O5 !/O6 !/O7   Sdt out output options.       #

I didn't compile the model with these switches. Is that a problem?

The run_cmake_test compiles the code. For what you are doing the switches are not as important so shouldn't matter.

Sounds like a meeting would be helpful to discuss these and more questions.

@edwardhartnett
Copy link
Contributor

@JessicaMeixner-NOAA I am available to meet at any time you think it would be helpful. Meanwhile, I will try and figure out where the existing code is that reads/writes these data files...

@MatthewMasarik-NOAA
Copy link
Collaborator

@edwardhartnett and I just tried to meet, unfortunately my GFE mic was acting up, so we had to cancel. We were possiibly going to meet tomorrow now instead. Maybe the 3 of use could meet

@JessicaMeixner-NOAA
Copy link
Collaborator Author

Happy to join the meeting

@edwardhartnett
Copy link
Contributor

OK, great. Meanwhile any specific information about what is being run with run_cmake_test that is doing the I/O would be most helpful, I am running it now to try and figure out where to start the debugger, but some specific info would be helpful. Is there any documentation of what is happening?

@edwardhartnett
Copy link
Contributor

When I try and run the tests again I get:

bash ./bin/run_cmake_test -o all -S -T -s PR1 -w work_PR1 ../model ww3_tp1.4
 
 Running now options: run_test -o all -S -T -s PR1 -w work_PR1 ../model ww3_tp1.4
 
 Test already finished, skipping ...

Is there a way to reset them and run them again?

@MatthewMasarik-NOAA
Copy link
Collaborator

Sure, i can give some info on run_cmake_test

@MatthewMasarik-NOAA
Copy link
Collaborator

The program see's the work_* directory and skips it. If you remove ww3_tp1.4/work_PR1 directory, then you can re-run it

@MatthewMasarik-NOAA
Copy link
Collaborator

OK, great. Meanwhile any specific information about what is being run with run_cmake_test that is doing the I/O would be most helpful, I am running it now to try and figure out where to start the debugger, but some specific info would be helpful. Is there any documentation of what is happening?

run_cmake_test is doing a complete simulation as in: build all (pre/run/post) executables, then run preprocessing programs, the actual run, post processing. It is all streamlined into one call. To do just the run (which is where w3iopo() is called) we can set you up with a canned case.

@edwardhartnett
Copy link
Contributor

Well by all means, set me up with anything you think is helpful. I don't know what you mean by canned case. ;-)

I will continue to dig into the code.

@edwardhartnett
Copy link
Contributor

OK from a grep I see that some of the read code can be found in model/src/gx_outp.F90. There is some I/O set up going on here. Presumably this code is called by the regtest somewhere.

Here's some I/O setup from gx_outp.F90:

  ! 1.  IO set-up.
  !
  CALL W3NMOD ( 1, 6, 6 )
  CALL W3SETG ( 1, 6, 6 )
  CALL W3NDAT (    6, 6 )
  CALL W3SETW ( 1, 6, 6 )
#ifdef W3_NL1
  CALL W3NAUX (    6, 6 )
  CALL W3SETA ( 1, 6, 6 )
#endif
  CALL W3NOUT (    6, 6 )
  CALL W3SETO ( 1, 6, 6 )

Looks like these have to be called before w3iopo()...

@MatthewMasarik-NOAA
Copy link
Collaborator

I just sent some info to the email thread. gx_outp.F90 does call w3iopo(), but that is the standalone GrADS point output routine, and is not the call to w3iopo we are interested in. We are interested in the w3wave call.

@edwardhartnett
Copy link
Contributor

From Matt's email, answers to question about what binary is calling the I/O subroutine w3iopo().

The program that is called as a binary is ww3_shel, from ww3_shel.F90. This is the driver for w3wavemd.F90, which is the main WW3 routine. w3wave calls w3iopo(), as does ww3_ounp, and ww3_outp. ww3_ounp is the standalone netcdf point post-processing program, and I don't think it is the call to w3iopo() that we are interested in. I believe we are interested in the w3wave call to w3iopo.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett try removing ww3_tp1.1/work_PR1 before re-trying.

@MatthewMasarik-NOAA
Copy link
Collaborator

@edwardhartnett I recommended using the call string @JessicaMeixner-NOAA had posted,

./bin/run_cmake_test -b slurm -o all -S -T -s PR1 -w work_PR1 ../model ww3_tp1.1 

You used a different signature

run_cmake_test -o all -S -T -s PR1 -w work_PR1 -f -p mpirun -n 24 ../model ww3_tp1.1

that will not look for the MPI switch, so it won't be compiled with MPI, but later in the string the mpirun launcher passed, so it will attempt to start the run with MPI.

@edwardhartnett
Copy link
Contributor

Duh. That worked better...

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett Just wanted to check in to see if you had any ideas of things for us to try for reading in 2D variables in W3IOPON_READ?

@edwardhartnett
Copy link
Contributor

I have made a lot of progress, but am still failing at the end of the tp1.1 regtest due to the ww3_outp code which reads the points file, and then apparently re-reads it for some testing purpose (around line 790).

My current work can be see in edwardhartnett#37.

Please do not attempt to modify the IO code on other branches, it has changed a bit in the past week.

The read of the point data, unlike the write, always reads the entire file, so there is no need to slice the time dimension in the read code, just in the write code, which writes out a timestep at a time. Part of the problem, which I fixed this morning, is that the read code needs to call w3dmo2() to allocate a bunch of the arrays to read into.

I have tests running on GitHub but these are slow; for interactive development I'm using a local version of Jenkins and have automated testing running quickly enough to be used in interactive development.

What would be helpful would be one or more namelist settings to control whether netCDF is used. Then I could run tests with and without that namelist and directly compare results to ensure the netCDF files contain the correct data. However, I can take a stab at this later when I get tp1.1 working OK...

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett - I will be working on the namelist settings, but before we add that, we plan to test all regression tests with the netCDF and see if things match with the binary as a first set of tests. Sounds like I can grab your branch and potentially try that? And if that goes well I'll start adding in the input control for netcdf vs binary.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett I'm about to start some tests with your branch, but in the meantime I wanted to follow up about not being able to read slices as it seems like we can only read parts of variables according to https://docs.unidata.ucar.edu/netcdf-fortran/current/f90-variables.html

image

@edwardhartnett
Copy link
Contributor

NetCDF can read the entire variable at once, as well as slices, or strided slices.

In Fortran, just leave out the optional start/count/stride parameters, and netCDF will get (or put) the entire variable at once.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

Thanks for clarifying @edwardhartnett !

I think for this routine as it is now, we might want to only grab slices as that's how the binary read worked.

I'm running a test with your branch and the ww3_outp job is running, but it's taking much longer than expected. It's taking me about 2 hours (and counting) and with the binary the whole job is only a few minutes (I don't have an exact number). Is this expected?

@edwardhartnett
Copy link
Contributor

No that is not expected.

Let me look at the binary read code again to see what it does...

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett am about to do the same myself. Let me know if it'd be useful to look at anything together. I'll be sure to chime in with anything I learn here.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett I'm still getting long run times running your branch, however I pulled in the change from your branch to CALL W3DMO2 and I'm now able to read 2D variables! I pushed my updates here: https://github.com/JessicaMeixner-NOAA/WW3/tree/feature/pointbinary2nc and will keep you up to date on progress.

@edwardhartnett
Copy link
Contributor

It's not clear to me whether you are intending to merge your code or my code, but I am only testing my code and don't plan to attempt to merge your code back into mine. There are significant changes to the code.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett I looked at the differences between our two branches. I couldn't find all of the updates I made in your branch and when i was having trouble figuring out what was going on, I just went back to my branch. I have not yet merged in your changes as it didn't have the time dimension changes I made in the read routine. At this point, the changes from your branch that are not included in mine are mostly the change in error handling, which can be added via merge or other updates. I added time in the reading of my branch, which pointed out that your branch is stuck in an infinite reading loop, and my branch fails with an error when time runs out. I need to add a quick check to see if we have another time step to read, and if not set the flag to -1. I should have that update shortly and will share.

@edwardhartnett
Copy link
Contributor

It's not clear that it's helpful to run manual tests on code that is not quite the code I am working on.

Some things that would be helpful:

  • documentation build
  • better regtest documentation
  • automating some regtests in the GitHub CI (I have tp1.1 working, so it should not be hard to get others working)
  • namelist selection between netCDF and binary, which would be useful in testing effort

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett great news on my end - I'm able to run the regression test successfully from my branch! My next steps will be:

  • comparing the single test with develop
  • running the full set of develop tests
  • merging in your changes for error checking
  • seeing if I can clean up or add to any of the netcdf files/processes (for example remove variables that are set to zero, etc)
  • re-running regtests
  • adding in namelist capability

I think we're at a great spot and it's really exciting! Thank you so much for all of your help!!!

@JessicaMeixner-NOAA
Copy link
Collaborator Author

JessicaMeixner-NOAA commented Apr 16, 2024

@edwardhartnett here's my current status:

  • found a bug and fixed when comparing with single test
  • Currently running full set of regression tests to compare against develop
  • Simultaneously will be working on merging in your changes

Will likely not have an update until much later today or early tomorrow, but I'll keep you posted.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett working on merging your changes to my branch and want to confirm that https://github.com/edwardhartnett/WW3/tree/ejh_develop is the correct branch to merge in. Thanks in advance for the help!

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett I'm running some new tests with the full set of regression tests because I had some issues with input yesterday, but nothing related to this branch itself. I'd like to start working on merging your changes into my branch, so I'm hoping you can confirm which branch has your latest changes. Your help is greatly appreciated!

@edwardhartnett
Copy link
Contributor

My latest changes are on ejh_develop.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

Thanks @edwardhartnett ! I'll share the branch after I've reply back here after I have merged in the changes and done some testing.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett More good news! I have merged in your changes to my branch here: https://github.com/JessicaMeixner-NOAA/WW3/tree/feature/pointbinary2nc and found and fixed some FLX5 bugs. A few spot checks look good, so my next steps are to run the full set of regtests overnight on hera, then look into a few clean-up things (remove un-used variables from the write for example), after which I will then re-run regtests and then lastly work on adding the namelist control capability. I'll keep you posted!

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@edwardhartnett I ran the regression tests overnight and mostly had good results. There are a few regression tests that failed and I'm looking into their causes as I in parallel work on some clean-up items.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

Hi @edwardhartnett good news from regression tests last night: All ran without error and matched the output from the develop branch (excpet known not b4b ones). I'm going to make a couple of minor updates and then add control to turn on/off, but I think we're good to go. Do you plan any other updates for the unit tests? Thanks again for all of your help with this!!!

miguelsolanocordoba added a commit to wavespotter/WW3 that referenced this issue Apr 19, 2024
* Bugfix - initialised VD and VS to zero in w3srcemd. (NOAA-EMC#1037)

* More efficient test for binary files in matrix.comp (NOAA-EMC#1035)

* Tidy up of pre-processor directives and unused variables in w3srcemd.F90 (NOAA-EMC#1010)

* Correct typo in w3srcemd.F90 pre-processor directive. (NOAA-EMC#1039)

* minor bugfix for matrix grepping on keywords (NOAA-EMC#1049)

* Stop masking group 1 output where icec > icen (NOAA-EMC#1019)

* Doxygen documentation added, 8th subset.(NOAA-EMC#1046)

* NC4 ,F90 ,XX0 switches removed from ww3_tp2.19 regtest (NOAA-EMC#1054)

* CI:  Fix for Intel scripts. GNU scripts updated. (NOAA-EMC#1064)

* correct the computation of QP parameter, add QKK output parameter, change UST scale factor (NOAA-EMC#1050)

* correct issue with ww3_multi when requesting restart2 and using nml file instead of inp file (NOAA-EMC#1070)

* correct calendar for track netcdf output (NOAA-EMC#1079)

* Fix missing mod_def.ww3 file in multigrid regression tests for track output (NOAA-EMC#1091)

* STAB3: fix cmake build for ST4 or ST3 (NOAA-EMC#1086)

* new feature to output out_grd.ww3, out_pnt.ww3 and mod_def.ww3 both in binary and ascii format using switch ASCII. (NOAA-EMC#1089)

* Update local unit number arrays (NDS, MDS) to be same size of array defined in w3odatmd (size=15). Also, defined unit numbers for NDS(14) and NDS(15). (NOAA-EMC#1098)

* Removed code referencing PHIOC in output section for PHICE in ww3_ounf (NOAA-EMC#1093)

* implementation of the GQM (Gaussian Quadrature Method) to replace the DIA in NL1 or NL2. (NOAA-EMC#1083)

* update logic to ensure you are not accessing uninitialized dates (NOAA-EMC#1114)

* Initialised S and D arrays in W3SDB1 before potential early return if zero energy. (NOAA-EMC#1115)

* ww3_ounp.F90:  x/y units attribute corrected from 'm' to 'km' (NOAA-EMC#1088)

* Bugfix: Assign unit numbers to ASCII gridded/point output in multi-grid mode. (NOAA-EMC#1118)

* correct bugs to run correctly GQM implementation (NOAA-EMC#1127)

* Adding documentation to w3iopo() in preparation for code for NOAA-EMC#682. (NOAA-EMC#1131)

* NCEP regtest module updates: uses spack-stack/1.5.0, includes scotch/7.0.4 (NOAA-EMC#1137)

* Minor update to ncep regtests (NOAA-EMC#1138)

* Updated intel workflow to install oneapi compilers from new location. (NOAA-EMC#1157)

* Add unit test for points I/O code. (NOAA-EMC#1158)

* Update Intel CI (relocate /usr/local; ensure intel-oneapi-mpi; use ubuntu-latest) (NOAA-EMC#1161)

* remove lookup table for ST4 to speed up computation and clean up the ST4 code (NOAA-EMC#1124)

Co-authored-by: Fabrice Ardhuin <fabrice.ardhuin@ifremer.fr>

* initialize USSP_WN for mod_def (NOAA-EMC#1165)

* Introduce IC4M8 and IC4M9 to WW3 (NOAA-EMC#1176)

* clean up and add ST4 variables (NOAA-EMC#1181)

* w3fld1md.F90: fix divide by zero in CRIT2 parameter (NOAA-EMC#1184)

* ww3_prnc.F90: fix out-of-scope grid index write statement (NOAA-EMC#1185)

* Bugfix: address potential divide-by-zero in APPENDTAIL (NOAA-EMC#1188)

Co-authored-by: Denise Worthen <denise.worthen@noaa.gov>

* Provide initial drying of cells with depth < ZLIM for SMC grid. (NOAA-EMC#1192)

* Output OMP threading info to screen when running ww3_shel/ww3_multi compiled with the OMPG switch. Also fixes truncation of build.log when running run_cmake_build. (NOAA-EMC#1191)

* Added screen output showing number of threads when OMP enabled.

* update build to get more info in logs (NOAA-EMC#46)

---------

Co-authored-by: Jessica Meixner <jessica.meixner@noaa.gov>

* update run_cmake_test to catch build errors and exit (NOAA-EMC#1194)

* fix merge conflicts

* Fix gustiness bug, as suggst by Pieter

* Change USTARsigma to WAM implementation

---------

Co-authored-by: Chris Bunney <48915820+ukmo-ccbunney@users.noreply.github.com>
Co-authored-by: Mickael Accensi <49198861+mickaelaccensi@users.noreply.github.com>
Co-authored-by: Benoit Pouliot <51411504+benoitp-cmc@users.noreply.github.com>
Co-authored-by: Matthew Masarik <86749872+MatthewMasarik-NOAA@users.noreply.github.com>
Co-authored-by: Ghazal-Mohammadpour <124626872+Ghazal-Mohammadpour@users.noreply.github.com>
Co-authored-by: Jessica Meixner <jessica.meixner@noaa.gov>
Co-authored-by: Biao Zhao <zhaobiaodeyouxiang@163.com>
Co-authored-by: Edward Hartnett <38856240+edwardhartnett@users.noreply.github.com>
Co-authored-by: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com>
Co-authored-by: Fabrice Ardhuin <fabrice.ardhuin@ifremer.fr>
Co-authored-by: W. Erick Rogers <156342000+ErickRogers@users.noreply.github.com>
Co-authored-by: Denise Worthen <denise.worthen@noaa.gov>
Co-authored-by: Camille Teicheira <cteicheira@gmail.com>
@edwardhartnett
Copy link
Contributor

I have no further plans for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants