forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'emc/develop' into feature/spack-stack
- Loading branch information
Showing
15 changed files
with
289 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#! /usr/bin/env bash | ||
|
||
source "${HOMEgfs}/ush/preamble.sh" | ||
source "${HOMEgfs}/ush/jjob_header.sh" -e "metp" -c "base metp" | ||
|
||
############################################################### | ||
## Abstract: | ||
## Inline METplus verification and diagnostics driver script | ||
## HOMEgfs : /full/path/to/workflow | ||
## EXPDIR : /full/path/to/config/files | ||
## CDATE : current analysis date (YYYYMMDDHH) | ||
## CDUMP : cycle name (gdas / gfs) | ||
## PDY : current date (YYYYMMDD) | ||
## cyc : current cycle (HH) | ||
## SDATE_GFS : first date of GFS cycle (YYYYMMDDHHMM) | ||
## METPCASE : METplus verification use case (g2g1 | g2o1 | pcp1) | ||
############################################################### | ||
|
||
# TODO: This should not be permitted as DATAROOT is set at the job-card level. | ||
# TODO: DATAROOT is being used as DATA in metp jobs. This should be rectified in metp. | ||
# TODO: The temporary directory is DATA and is created at the top of the J-Job. | ||
# TODO: remove this line | ||
export DATAROOT=${DATA} | ||
|
||
VDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${VRFYBACK_HRS} hours") | ||
export VDATE=${VDATE:0:8} | ||
|
||
# Since this is currently a one-element list, shellcheck things we would rather run this as a command | ||
# shellcheck disable=SC2041 | ||
for grid in '1p00'; do | ||
prod_dir="COM_ATMOS_GRIB_${grid}" | ||
GRID=${grid} YMD=${PDY} HH=${cyc} generate_com -rx "${prod_dir}:COM_ATMOS_GRIB_GRID_TMPL" | ||
done | ||
|
||
# TODO: If none of these are on, why are we running this job? | ||
if [[ "${RUN_GRID2GRID_STEP1}" == "YES" || "${RUN_GRID2OBS_STEP1}" == "YES" || "${RUN_PRECIP_STEP1}" == "YES" ]]; then | ||
${VERIF_GLOBALSH} | ||
status=$? | ||
if (( status != 0 )); then exit "${status}"; fi | ||
fi | ||
|
||
if [[ ${KEEPDATA:-"NO"} = "NO" ]] ; then rm -rf "${DATAROOT}" ; fi # TODO: This should be $DATA | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
#! /usr/bin/env bash | ||
|
||
########## config.wave ########## | ||
# Wave steps specific | ||
|
||
echo "BEGIN: config.wave" | ||
|
||
# Parameters that are common to all wave model steps | ||
|
||
# System and version | ||
export wave_sys_ver=v1.0.0 | ||
|
||
export EXECwave="${HOMEgfs}/exec" | ||
export FIXwave="${HOMEgfs}/fix/wave" | ||
export PARMwave="${HOMEgfs}/parm/wave" | ||
export USHwave="${HOMEgfs}/ush" | ||
|
||
# This config contains variables/parameters used in the fcst step | ||
# Some others are also used across the workflow in wave component scripts | ||
|
||
# General runtime labels | ||
export CDUMPwave="${RUN}wave" | ||
|
||
# In GFS/GDAS, restart files are generated/read from gdas runs | ||
export CDUMPRSTwave="gdas" | ||
|
||
# Grids for wave model | ||
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' | ||
export waveuoutpGRD=${waveGRD} | ||
;; | ||
"mx025") | ||
#Grid used for HR1 (tripolar 1/4 deg) | ||
export waveinterpGRD='reg025' | ||
export wavepostGRD='' | ||
export waveuoutpGRD=${waveGRD} | ||
;; | ||
"glo_025") | ||
#GEFSv13 regular lat/lon 1/4 deg grid | ||
export waveinterpGRD='' | ||
export wavepostGRD='glo_025' | ||
export waveuoutpGRD=${waveGRD} | ||
;; | ||
"glo_200") | ||
#Global regular lat/lon 2deg deg grid | ||
export waveinterpGRD='' | ||
export wavepostGRD='glo_200' | ||
export waveuoutpGRD=${waveGRD} | ||
;; | ||
"glo_500") | ||
#Global regular lat/lon 5deg deg grid | ||
export waveinterpGRD='' | ||
export wavepostGRD='glo_500' | ||
export waveuoutpGRD=${waveGRD} | ||
;; | ||
*) | ||
echo "FATAL ERROR: No grid specific wave config values exist for ${waveGRD}. Aborting." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# Grids for input wind fields | ||
export WAVEWND_DID= | ||
export WAVEWND_FID= | ||
|
||
# The start time reflects the number of hindcast hours prior to the cycle initial time | ||
export FHMAX_WAV=${FHMAX_GFS} | ||
export WAVHINDH=0 | ||
export FHMIN_WAV=0 | ||
export FHOUT_WAV=3 | ||
export FHMAX_HF_WAV=120 | ||
export FHOUT_HF_WAV=1 | ||
export FHMAX_WAV_IBP=180 | ||
if (( FHMAX_WAV < FHMAX_WAV_IBP )); then export FHMAX_WAV_IBP=${FHMAX_GFS} ; fi | ||
|
||
# gridded and point output rate | ||
export DTFLD_WAV=$(( FHOUT_HF_WAV * 3600 )) | ||
export DTPNT_WAV=3600 | ||
export FHINCP_WAV=$(( DTPNT_WAV / 3600 )) | ||
|
||
# Selected output parameters (gridded) | ||
export OUTPARS_WAV="WND CUR ICE HS T01 T02 DIR FP DP PHS PTP PDIR CHA" | ||
|
||
# Restart file config | ||
export WAVHCYC=${assim_freq:-6} | ||
export FHMAX_WAV_CUR=192 # RTOFS forecasts only out to 8 days | ||
|
||
# Restart timing business | ||
|
||
export RSTTYPE_WAV='T' # generate second tier of restart files | ||
rst_dt_gfs=$(( restart_interval_gfs * 3600 )) # TODO: This calculation needs to move to parsing_namelists_WW3.sh | ||
if [[ ${rst_dt_gfs} -gt 0 ]]; then | ||
export DT_1_RST_WAV=0 #${rst_dt_gfs:-0} # time between restart files, set to DTRST=1 for a single restart file | ||
#temporarily set to zero to avoid a clash in requested restart times | ||
#which makes the wave model crash a fix for the model issue will be coming | ||
export DT_2_RST_WAV=${rst_dt_gfs:-0} # restart stride for checkpointing restart | ||
else | ||
rst_dt_fhmax=$(( FHMAX_WAV * 3600 )) | ||
export DT_1_RST_WAV=0 # time between restart files, set to DTRST=1 for a single restart file | ||
export DT_2_RST_WAV=${rst_dt_fhmax:-0} # use checkpoint restart file name for creating restart at end of run | ||
fi | ||
export RSTIOFF_WAV=0 # first restart file offset relative to model start | ||
# | ||
# Set runmember to default value if not GEFS cpl run | ||
# (for a GFS coupled run, RUNMEN would be unset, this should default to -1) | ||
export RUNMEM=${RUNMEM:--1} | ||
# Set wave model member tags if ensemble run | ||
# -1: no suffix, deterministic; xxxNN: extract two last digits to make ofilename prefix=gwesNN | ||
if [[ ${RUNMEM} = -1 ]]; then | ||
# No suffix added to model ID in case of deterministic run | ||
export waveMEMB= | ||
else | ||
# Extract member number only | ||
export waveMEMB="${RUNMEM: -2}" | ||
fi | ||
|
||
# Determine if wave component needs input and/or is coupled | ||
export WW3ATMINP='CPL' | ||
if [[ ${DO_ICE} == "YES" ]]; then | ||
export WW3ICEINP='CPL' | ||
export WAVEICE_FID= | ||
else | ||
export WW3ICEINP='YES' | ||
export WAVEICE_FID=glix_10m | ||
fi | ||
|
||
export WAVECUR_DID=rtofs | ||
if [[ ${DO_OCN} == "YES" ]]; then | ||
export WW3CURINP='CPL' | ||
export WAVECUR_FID= | ||
else | ||
export WW3CURINP='YES' | ||
export WAVECUR_FID=glix_10m | ||
fi | ||
|
||
# Determine if input is from perturbed ensemble (T) or single input file (F) for all members | ||
export WW3ATMIENS='F' | ||
export WW3ICEIENS='F' | ||
export WW3CURIENS='F' | ||
|
||
export GOFILETYPE=1 # GOFILETYPE=1 one gridded file per output step | ||
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_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 | ||
export FGRDPROC='F' | ||
# Flag for masking computation in two-way nesting | ||
export FLAGMASKCOMP="F" | ||
# Flag for masking at printout time. | ||
export FLAGMASKOUT="F" | ||
|
||
echo "END: config.wave" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../gfs/config.waveinit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.