diff --git a/docs/source/wave.rst b/docs/source/wave.rst new file mode 100644 index 00000000000..4ff29ab245a --- /dev/null +++ b/docs/source/wave.rst @@ -0,0 +1,132 @@ +============== +Wave Component +============== + +The wave model, WAVEWATCH III, is one component of the forecast model. This documentation is a work in progress +and currently contains information about how to add a new grid to the workflow. + +^^^^^^^^^^^^^^^^^^^^^^ +Adding a new wave Grid +^^^^^^^^^^^^^^^^^^^^^^ + +******************** +Naming the Wave Grid +******************** + +The naming convention of the wave grid within the workflow is expected to follow a convention of region underscore resolution. +Here are several regional naming conventions: + ++-----------+-----------------------+ +| Acronym | Description | ++===========+=======================+ +| glo | Global domain | ++-----------+-----------------------+ +| ak | Alaska | ++-----------+-----------------------+ +| ao or aoc | Arctic Ocean | ++-----------+-----------------------+ +| at | Atlantic | ++-----------+-----------------------+ +| ep | East Pacific | ++-----------+-----------------------+ +| gnh | Global Northern Ocean | ++-----------+-----------------------+ +| gsh | Global Southern Ocean | ++-----------+-----------------------+ +| so | Southern Ocean | ++-----------+-----------------------+ +| wc | West Coast | ++-----------+-----------------------+ + + +Here are examples of resolution names: + ++---------+----------------------+ +| Acronym | Description | ++=========+======================+ +| 15m | 15 min | ++---------+----------------------+ +| 15mxt | 15 min extended grid | ++---------+----------------------+ +| 025 | 0.25 degrees | ++---------+----------------------+ +| 9km | 9 km | ++---------+----------------------+ + +This new grid name will now be referred to as ${WAVEGRID} for the following documentation. + +**************** +Adding Fix Files +**************** + +The following is a table of fix files to be added with a new grid. + ++-------------------------------------+----------------------------------------+--------------------------------------------------+ +| Name of File | File Description | Notes/Requriements | ++=====================================+========================================+==================================================+ +| ww3_grid.inp_${WAVEGRID} | Grid Input File | Required for all new grids | ++-------------------------------------+----------------------------------------+--------------------------------------------------+ +| mesh.${WAVEGRID}.nc | Mesh grid file used in forecast | This is required if this is a computational grid | ++-------------------------------------+----------------------------------------+--------------------------------------------------+ +| ww3_gint.WHTGRIDINT.bin.${WAVEGRID} | Weight file for ww3_gint interpolation | Required if output is interpolated to this grid | ++-------------------------------------+----------------------------------------+--------------------------------------------------+ + + +While the creation of these files are generally considered out of scope of this document here are some additional information: + +* The ww3_grid.inp_${WAVEGRID} for structured grids can be created with https://github.com/noaA-EMC/gridgen +* The ww3_grid.inp_${WAVEGRID} file must be a single file for the workflow +* Instructions for creating mesh.${WAVEGRID}.nc can be found at https://ufs-weather-model.readthedocs.io/en/latest/InputsOutputs.html#ww3 +* The ww3_gint.WHTGRIDINT.bin.${WAVEGRID} can be created by running the ww3_gint routine as desired and then saved. + +Once the new fix files have been created, :ref:`open an issue to have the master fix file directory updated`. This is a separate step than the process to update the workflow below. + +******************************** +Updating Config and Script Files +******************************** + +You will need to update the following files: + +* parm/config/*/config.ufs +* parm/config/*/config.wave +* scripts/exgfs_wave_post_gridded_sbs.sh + +You will need to add the following files: + +* parm/wave/ww3_grib2.${WAVEGRID}.inp.tmpl +* parm/wave/${WAVEGRID}_interp.inp.tmpl + +For config.ufs: + +If this is a computational you will need to update this file. If this is a new output file you can skip this update. +There are two sections to update: +1. Add the new grid as a possible ww3 resolution at the top of the file +2. In the WW3 specific settings section, add a case for the new grid and define ntasks_ww3 (number of tasks for WW3) and +if the grid requires a different value of nthreads_ww3 (number of threads) add that to the grid specific case as well. + +For config.wave: + +If this is a computational grid, add a section for the newly added grid in the possible cases for waveGRD, adding the appropriate +non-default values for this specific grid. If this is a new output grid, then update all of the waveGRD cases for waveinterpGRD as +needed. Please note that if you change the default wave grid, that initial conditions must be staged for this IC for all ICs used +in global-workflow testing. Ideally ICs for the grids being used for testing will be provided even if its not the default grid. + + + +For scripts/exgfs_wave_post_gridded_sbs.sh and the inp.tmpl files: + +There are two case settings for either interpolated grid output or grib output for a computational grid that should be updated to +add to the possible cases for this new grid as appropriate. If it's a new interpolated grid, you will also need to add a +parm/wave/${WAVEGRID}_interp.inp.tmpl file. See WW3/model/inp/ww3_gint.inp for information about this file. If it's a new +computational grid or just an output grid you will need a new parm/wave/ww3_grib2.${WAVEGRID}.inp.tmpl file. See the file +WW3/model/inp/ww3_grib.inp for more infomration about this input file. The other existing templated input files can be used +as guides to create these new files. + + + + +***************************** +Updates for New Product Grids +***************************** + +If this is a new file for AWIPS Products, additional updates are likely required. diff --git a/parm/config/gefs/config.base.emc.dyn b/parm/config/gefs/config.base.emc.dyn index e03abff84fe..8a336a26505 100644 --- a/parm/config/gefs/config.base.emc.dyn +++ b/parm/config/gefs/config.base.emc.dyn @@ -170,7 +170,7 @@ case "${CASE}" in *) export OCNRES=025;; esac export ICERES=${OCNRES} -export waveGRD='gnh_10m aoc_9km gsh_15m' +export waveGRD='glo_025' case "${APP}" in ATM) diff --git a/parm/config/gefs/config.ufs b/parm/config/gefs/config.ufs index a96ba126e29..562fc9228df 100644 --- a/parm/config/gefs/config.ufs +++ b/parm/config/gefs/config.ufs @@ -15,7 +15,7 @@ if [ $# -le 1 ]; then echo "--fv3 C48|C96|C192|C384|C768|C1152|C3072" echo "--mom6 500|100|025" echo "--cice6 500|100|025" - echo "--ww3 gnh_10m;aoc_9km;gsh_15m|gwes_30m|mx050|mx025" + echo "--ww3 gnh_10m;aoc_9km;gsh_15m|gwes_30m|glo_025|mx025" exit 1 @@ -359,6 +359,9 @@ if [[ "${skip_ww3}" == "false" ]]; then "mx025") ntasks_ww3=80 ;; + "glo_025") + ntasks_ww3=262 + ;; *) echo "FATAL ERROR: Unsupported WW3 resolution = ${ww3_res}, ABORT!" exit 1 diff --git a/parm/config/gfs/config.base.emc.dyn b/parm/config/gfs/config.base.emc.dyn index 7559d60efee..b3ab1eb9281 100644 --- a/parm/config/gfs/config.base.emc.dyn +++ b/parm/config/gfs/config.base.emc.dyn @@ -170,7 +170,7 @@ case "${CASE}" in *) export OCNRES=025;; esac export ICERES=${OCNRES} -export waveGRD='gnh_10m aoc_9km gsh_15m' +export waveGRD='mx025' case "${APP}" in ATM) diff --git a/parm/config/gfs/config.defaults.s2sw b/parm/config/gfs/config.defaults.s2sw index 7f751e02bc9..1b0becefec5 100644 --- a/parm/config/gfs/config.defaults.s2sw +++ b/parm/config/gfs/config.defaults.s2sw @@ -15,25 +15,10 @@ min_seaice="1.0e-6" use_cice_alb=".true." # config.wave - -waveGRD='mx025' -waveinterpGRD='reg025' -waveuoutpGRD='mx025' -MESH_WAV='mesh.mx025.nc' - -waveesmfGRD=' ' -wavepostGRD=' ' -waveGRDN="1" -waveGRDG="10" -USE_WAV_RMP="NO" FHOUT_HF_WAV=3 DTPNT_WAV=10800 OUTPARS_WAV="WND CUR ICE HS T01 T02 DIR FP DP PHS PTP PDIR CHA" DOBNDPNT_WAVE='NO' -waveMULTIGRID='.false.' - -# config.waveprep -IOSRV=1 # config.arch export ARCH_GAUSSIAN="YES" diff --git a/parm/config/gfs/config.ufs b/parm/config/gfs/config.ufs index a96ba126e29..53749697315 100644 --- a/parm/config/gfs/config.ufs +++ b/parm/config/gfs/config.ufs @@ -15,7 +15,7 @@ if [ $# -le 1 ]; then echo "--fv3 C48|C96|C192|C384|C768|C1152|C3072" echo "--mom6 500|100|025" echo "--cice6 500|100|025" - echo "--ww3 gnh_10m;aoc_9km;gsh_15m|gwes_30m|mx050|mx025" + echo "--ww3 gnh_10m;aoc_9km;gsh_15m|gwes_30m|glo_025|mx025" exit 1 @@ -157,7 +157,7 @@ case "${fv3_res}" in export WRITE_GROUP=2 export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=8 export WRITE_GROUP_GFS=2 - export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE_GFS=4 + export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE_GFS=10 ;; "C768") export DELTIM=150 @@ -353,8 +353,8 @@ if [[ "${skip_ww3}" == "false" ]]; then "gwes_30m") ntasks_ww3=100 ;; - "mx050") - ntasks_ww3=240 + "glo_025") + ntasks_ww3=262 ;; "mx025") ntasks_ww3=80 diff --git a/parm/config/gfs/config.wave b/parm/config/gfs/config.wave index 658c4b40ae4..ba7b7ad2594 100644 --- a/parm/config/gfs/config.wave +++ b/parm/config/gfs/config.wave @@ -25,26 +25,60 @@ export CDUMPwave="${RUN}wave" export CDUMPRSTwave="gdas" # Grids for wave model -# GFSv16 -export waveGRD=${waveGRD:-'gnh_10m aoc_9km gsh_15m'} -export waveGRDN=${waveGRDN:-'1 2 3'} # gridnumber for ww3_multi -export waveGRDG=${waveGRDG:-'10 20 30'} # gridgroup for ww3_multi -export USE_WAV_RMP=${USE_WAV_RMP:-'YES'} #yes/no rmp grid remapping pre-processed coefficients -export waveMULTIGRID=${waveMULTIGRID:-'.true.'} -export MESH_WAV=${MESH_WAV:-'mesh.gwes_30m.nc'} - -# ESMF input grid -export waveesmfGRD=${waveesmfGRD:-'glox_10m'} # input grid +export waveGRD=${waveGRD:-'mx025'} + +#grid dependent variable defaults +export waveGRDN='1' # grid number for ww3_multi +export waveGRDG='10' # grid group for ww3_multi +export USE_WAV_RMP='NO' # YES/NO rmp grid remapping pre-processed coefficients +export waveMULTIGRID='.false.' # .true./.false. for multi or shel +export MESH_WAV="mesh.${waveGRD}.nc" # Mesh grid for wave model for CMEPS +export waveesmfGRD=' ' # input grid for multigrid + +#Grid dependent variables for various grids +case "${waveGRD}" in + "gnh_10m;aoc_9km;gsh_15m") + #GFSv16 settings: + export waveGRDN='1 2 3' + export waveGRDG='10 20 30' + export USE_WAV_RMP='YES' + export waveMULTIGRID='.true.' + export IOSRV='3' + export MESH_WAV=' ' + export waveesmfGRD='glox_10m' + export waveuoutpGRD='points' + export waveinterpGRD='glo_15mxt at_10m ep_10m wc_10m glo_30m' + export wavepostGRD='gnh_10m aoc_9km gsh_15m' + ;; + "gwes_30m") + #Grid used for P8 + export waveinterpGRD=' ' + export wavepostGRD='gwes_30m' + ;; + "mx025") + #Grid used for HR1 (tripolar 1/4 deg) + export waveinterpGRD='reg025' + export wavepostGRD=' ' + ;; + "glo_025") + #GEFSv13 regular lat/lon 1/4 deg grid + export waveinterpGRD=' ' + export wavepostGRD='glo_025' + ;; + *) + echo "No grid specific wave config values" + ;; +esac # Grids for input wind fields export WAVEWND_DID= export WAVEWND_FID= # Grids for output fields (used in all steps) -export waveuoutpGRD=${waveuoutpGRD:-'points'} #unified point output grid +export waveuoutpGRD=${waveuoutpGRD:-${waveGRD}} #unified point output grid export waveinterpGRD=${waveinterpGRD:-'glo_15mxt at_10m ep_10m wc_10m glo_30m'} # Grids that need to be interpolated from native # in POST will generate grib unless gribOK not set -export wavepostGRD=${wavepostGRD:-'gnh_10m aoc_9km gsh_15m'} # Native grids that will be post-processed (grib2) +export wavepostGRD=${wavepostGRD:-${waveGRD}} # Native computational grids that will be post-processed (grib2) # The start time reflects the number of hindcast hours prior to the cycle initial time @@ -145,8 +179,8 @@ export POFILETYPE=1 # POFILETYPE=1 one point file per output step # Parameters for ww3_multi/shel.inp # Unified output T or F export FUNIPNT='T' -# Output server type (see ww3_multi.inp in WW3 repo) -export IOSRV=${IOSRV:-'3'} +# Output server type (see ww3_shel/multi.inp in WW3 repo) +export IOSRV=${IOSRV:-'1'} # Flag for dedicated output process for unified points export FPNTPROC='T' # Flag for grids sharing dedicated output processes diff --git a/parm/config/gfs/config.wavepostsbs b/parm/config/gfs/config.wavepostsbs index 4faa4f5ebe5..f9f8c81d44a 100644 --- a/parm/config/gfs/config.wavepostsbs +++ b/parm/config/gfs/config.wavepostsbs @@ -17,7 +17,11 @@ export DOIBP_WAV='NO' # Input boundary points export DOFLD_WAV='YES' # Field data export DOPNT_WAV='YES' # Station data export DOGRB_WAV='YES' # Create grib2 files -export DOGRI_WAV='YES' # Create interpolated grids +if [[ -z ${waveinterpGRD} ]]; then + export DOGRI_WAV='YES' # Create interpolated grids +else + export DOGRI_WAV='NO' # Do not create interpolated grids +fi export DOSPC_WAV='YES' # Spectral post export DOBLL_WAV='YES' # Bulletin post diff --git a/parm/wave/ww3_grib2.glo_025.inp.tmpl b/parm/wave/ww3_grib2.glo_025.inp.tmpl new file mode 100755 index 00000000000..ddfabdb13de --- /dev/null +++ b/parm/wave/ww3_grib2.glo_025.inp.tmpl @@ -0,0 +1,9 @@ +$ WAVEWATCH-III gridded output input file +$ ---------------------------------------- +TIME DT NT +N +FLAGS +$ +TIME 7 MODNR GRIDNR 0 0 +$ +$ end of input file diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 76e2d6d1daa..54350180fea 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -286,6 +286,7 @@ source "$HOMEgfs/ush/preamble.sh" case $grdID in glo_15mxt) GRDNAME='global' ; GRDRES=0p25 ; GRIDNR=255 ; MODNR=11 ;; reg025) GRDNAME='global' ; GRDRES=0p25 ; GRIDNR=255 ; MODNR=11 ;; + glo_025) GRDNAME='global' ; GRDRES=0p25 ; GRIDNR=255 ; MODNR=11 ;; glo_30mxt) GRDNAME='global' ; GRDRES=0p50 ; GRIDNR=255 ; MODNR=11 ;; glo_30m) GRDNAME='global' ; GRDRES=0p50 ; GRIDNR=255 ; MODNR=11 ;; at_10m) GRDNAME='atlocn' ; GRDRES=0p16 ; GRIDNR=255 ; MODNR=11 ;; @@ -317,6 +318,7 @@ source "$HOMEgfs/ush/preamble.sh" so_20m) GRDNAME='antarc' ; GRDRES=0p33 ; GRIDNR=255 ; MODNR=11 ;; glo_15mxt) GRDNAME='global' ; GRDRES=0p25 ; GRIDNR=255 ; MODNR=11 ;; reg025) GRDNAME='global' ; GRDRES=0p25 ; GRIDNR=255 ; MODNR=11 ;; + glo_025) GRDNAME='global' ; GRDRES=0p25 ; GRIDNR=255 ; MODNR=11 ;; gwes_30m) GRDNAME='global' ; GRDRES=0p50 ; GRIDNR=255 ; MODNR=10 ;; esac echo "$USHwave/wave_grib2_sbs.sh $grdID $GRIDNR $MODNR $ymdh $fhr $GRDNAME $GRDRES $gribFL > grib_$grdID.out 2>&1" >> ${fcmdnow}