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

wave configuration update #81

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
217e390
Pointing to v3.1 tag for ufs-s2s-model
JessicaMeixner-NOAA Feb 28, 2020
1a444c5
bug fix, POSTGRB2TBL undefined
Mar 4, 2020
5d2d80c
Merge remote-tracking branch 'EMC/feature/coupled-crow' into feature/…
JessicaMeixner-NOAA Mar 5, 2020
82f148a
Squashing commits to wave2global
ajhenrique Mar 4, 2020
b2c244e
Fix to JWAVE_PREP to look back a day for rtofs
KateFriedman-NOAA Mar 4, 2020
dd7d44d
Moving standalone fv3 model_config exglobal_fcst block into if/else/f…
ajhenrique Mar 5, 2020
57fd721
Clean up exwave_post_sbs
ajhenrique Mar 5, 2020
1b25a6d
Merge remote-tracking branch 'EMC/feature/coupled-crow' into feature/…
JessicaMeixner-NOAA Mar 5, 2020
57b0362
clean up unused schema
Mar 6, 2020
2068e43
move all default values into /defaults from /schema
Mar 6, 2020
1187453
Merge remote-tracking branch 'origin/bugfix/coupled-crow' into ccpp-s…
Mar 9, 2020
8845076
model_configure_DATM
Mar 9, 2020
32f5b29
merge in the latest revision from IPD work
Mar 9, 2020
a7fa12d
Merge remote-tracking branch 'origin/feature/coupled-crow' into ccpp-…
Mar 9, 2020
c21ecc8
add stoch variables to config.fcst
Mar 9, 2020
b8b757b
capital case CDUMP values in config.fv3
Mar 10, 2020
318d608
stochy variable namelist update,
Mar 11, 2020
668182b
OCNTIM and ICETIM are included in config.fv3
Mar 13, 2020
3c76868
stochastic variables update
Mar 27, 2020
9b660f3
delete falseful copy after namelist and model_configure parsing
Mar 30, 2020
0b9c792
update on sandbox platform, for FIX_SCRUB settings
Mar 31, 2020
ab91e83
Merge remote-tracking branch 'main/feature/coupled-crow' into ccpp-sc…
Mar 31, 2020
ef11740
Merge branch 'feature/coupled-crow' into ccpp-scripts
Apr 2, 2020
a23e7d0
turn off stochastic features in case file
Apr 2, 2020
244bac0
configuration update for CCPP scripts
Apr 6, 2020
56d0bf8
Merge branch 'ccpp-scripts' of https://github.com/JianKuang-NOAA/glob…
Apr 6, 2020
3fce0f5
generalize fix file directory for imp_physics 8
Apr 7, 2020
fdb2595
reiflag default value changed to 1
Apr 8, 2020
ea17112
Merge remote-tracking branch 'EMC/feature/coupled-crow' into feature/…
JessicaMeixner-NOAA Apr 14, 2020
5035f69
port to Orion
Apr 17, 2020
ed9296a
remove HERA-like paths in platform.yaml of Orion
Apr 17, 2020
67b3bb2
Merge remote-tracking branch 'remotes/main/feature/coupled-crow' into…
Apr 20, 2020
a666161
checkout and External.cfg update
Apr 20, 2020
27d70f4
update checkout and External.cfg
Apr 20, 2020
3f26563
case file adjustment for Orion IC
Apr 22, 2020
17bc672
Merge remote-tracking branch 'main/feature/coupled-crow' into ccpp-sc…
May 22, 2020
f843588
expand gitignore
May 22, 2020
cf36a46
automate fix file linking, to this location:
May 27, 2020
ef9d6d9
Merge remote-tracking branch 'EMC/feature/coupled-crow' into feature/…
JessicaMeixner-NOAA May 27, 2020
b6ec718
updates to checkout, build and link to run prototype 4
JessicaMeixner-NOAA May 27, 2020
3d23685
update UPP version to v1.0.8
May 28, 2020
233db66
Merge remote-tracking branch 'main/feature/coupled-crow' into ccpp-sc…
May 28, 2020
fcd7614
Merge remote-tracking branch 'EMC/feature/coupled-crow' into feature/…
JessicaMeixner-NOAA May 28, 2020
cba56c4
making Externals_coupled.cfg consistent with checkout.sh
JessicaMeixner-NOAA May 28, 2020
835747c
removing fix from .gitignore
JessicaMeixner-NOAA May 28, 2020
af11bb1
fixed error when linking on hera
JessicaMeixner-NOAA May 28, 2020
a3fcc20
replace MOM6IC with BASE_CPLIC for base directory location of
JessicaMeixner-NOAA May 28, 2020
0078c49
updates for copying ICs
JessicaMeixner-NOAA May 28, 2020
84ab8c8
more updates for ICs
JessicaMeixner-NOAA May 28, 2020
89cf362
updates for new fix (which includes prep for multiple resolutions) an…
JessicaMeixner-NOAA May 28, 2020
c1719f7
renaming exe to reflect updated build
JessicaMeixner-NOAA May 28, 2020
3ed8689
update diag_table for ocean
JessicaMeixner-NOAA May 28, 2020
6542bf3
updates for ice_in to match prototype 4
JessicaMeixner-NOAA May 28, 2020
26979f7
updates for CCPP suite used in p4
JessicaMeixner-NOAA May 28, 2020
e28f85a
making a fix dir of all available ccpp suite files
JessicaMeixner-NOAA May 28, 2020
3fb4438
updating for reorganized tar files, pulling in changes from wcoss-p2 …
JessicaMeixner-NOAA May 28, 2020
c2c7824
last of archive updates for p4
JessicaMeixner-NOAA May 29, 2020
c2b1046
updating module files to match s2s model and ncep post modules
JessicaMeixner-NOAA May 29, 2020
0a805e4
we don't want to cycle/have 4 runs per day so setting the cases to be…
JessicaMeixner-NOAA May 29, 2020
1951f68
updating module files on hera
JessicaMeixner-NOAA May 29, 2020
b841a26
Merge remote-tracking branch 'main/feature/coupled-crow' into ccpp-sc…
May 29, 2020
e413a0d
updates to readme for orion
JessicaMeixner-NOAA May 29, 2020
57adda0
mediator cold start succeeds on hera and forecast job starts
JessicaMeixner-NOAA May 29, 2020
ba2ec08
adding ncks, updating ocean post, some fixes for tar files
JessicaMeixner-NOAA Jun 1, 2020
de2df04
updates for tar files and do not keep data
JessicaMeixner-NOAA Jun 1, 2020
5de48cd
fix typo
JessicaMeixner-NOAA Jun 1, 2020
dab6761
updating module_base.orion that allows cold start to run.
JessicaMeixner-NOAA Jun 2, 2020
e5c423f
both forecast and atm post seem to be running okay on orion
JessicaMeixner-NOAA Jun 2, 2020
c788fad
wave configuration files
Jun 2, 2020
a0f1946
wave configuration update
Jun 2, 2020
fece0cc
Merge remote-tracking branch 'jessica/feature/coupled-crow-addWW3jobs…
Jun 2, 2020
0889ce7
fix module-setup.sh.inc script, which causes module purge unsuccessful
Jun 2, 2020
2cb7382
1, Moved some of the variables into configuration system from JWAVE s…
Jun 3, 2020
1f27581
Fix suite name of CCPP
Jun 3, 2020
d8bca2e
Revise CCPP_SUITE variable name, default option, to "IPD"
Jun 3, 2020
42c3e1a
wave post-process job update
Jun 3, 2020
5734ffc
reg2grb2 for test on feature coupled-crow
lgannoaa Jun 3, 2020
1b2538c
orion hera build test
lgannoaa Jun 3, 2020
1b678ac
reg2grb2 Build on Hera and Orion
lgannoaa Jun 4, 2020
2a2a89a
Merged and ready for test
lgannoaa Jun 5, 2020
7c9d7d0
Merge remote-tracking branch 'main/feature/coupled-crow' into ccpp-sc…
Jun 8, 2020
e18ef4c
Merge remote-tracking branch 'EMC/feature/coupled-crow' into pr/lin/r…
JessicaMeixner-NOAA Jun 9, 2020
6abc5ea
Merge remote-tracking branch 'JK/ccpp-scripts' into s2s_prototype4
JessicaMeixner-NOAA Jun 9, 2020
d2783fb
add ocn-ice build to readme
JessicaMeixner-NOAA Jun 9, 2020
aa33b21
adding updates to wave scripts from gfsv16b branch by @ajhenrique
JessicaMeixner-NOAA Jun 9, 2020
1bafe05
cleaning up double cplwav
JessicaMeixner-NOAA Jun 9, 2020
66bcf5f
changes to wave case
JessicaMeixner-NOAA Jun 9, 2020
402e4eb
bugfix in layout file
Jun 9, 2020
ab6b2b1
Merge remote-tracking branch 'JK/ccpp-scripts' into s2s_prototype4
JessicaMeixner-NOAA Jun 9, 2020
a40e05a
bug fix in layout file
Jun 9, 2020
fa16b37
move OCNPETS, ICEPETS and WAVEPETS into dedicated model-specific
Jun 9, 2020
4d74b90
first try for adding wave ICs
JessicaMeixner-NOAA Jun 10, 2020
29b0988
Merge remote-tracking branch 'JK/ccpp-scripts' into s2s_prototype4
JessicaMeixner-NOAA Jun 10, 2020
8bfc889
fix bugs in config.wave and coupled_ic.sh
Jun 10, 2020
339ddd8
Merge remote-tracking branch 'JK/ccpp-scripts' into s2s_prototype4
JessicaMeixner-NOAA Jun 10, 2020
7393efc
updates for wave defaults for s2s p4
JessicaMeixner-NOAA Jun 10, 2020
7a692ed
updates for running wave jobs
JessicaMeixner-NOAA Jun 11, 2020
4e12aa9
point WW3-related executables through HOMEgfs/fv3_coupled.fd/exec
Jun 12, 2020
cc60ba2
Merge remote-tracking branch 'JK/ccpp-scripts' into s2s_prototype4
JessicaMeixner-NOAA Jun 15, 2020
5234e19
Merge pull request #1 from JessicaMeixner-NOAA/s2s_prototype4
JianKuang-Intelsat Jun 15, 2020
d702455
ocean post hours at boundary are processed twice, now fixed.
Jun 15, 2020
a0afd7e
wave init job now works on hera
JessicaMeixner-NOAA Jun 18, 2020
59c35f0
adding missing file from last commit
JessicaMeixner-NOAA Jun 18, 2020
d74f139
add ocean, ice and wave configurable variables
Jun 18, 2020
2909c7d
add ocean, ice and wave configurable variables
Jun 18, 2020
575b8ff
put ic type variable into config.fv3ic
Jun 18, 2020
3a28b00
wave init now works on orion
JessicaMeixner-NOAA Jun 18, 2020
2f547a5
updates to run wave prep for s2s case
JessicaMeixner-NOAA Jun 18, 2020
37dc405
updating forecast job for wave jobs
JessicaMeixner-NOAA Jun 19, 2020
878d2a8
Merge remote-tracking branch 'JK/ccpp-scripts' into s2s_prototype4
JessicaMeixner-NOAA Jun 19, 2020
0a684d7
updates for forecast with waves
JessicaMeixner-NOAA Jun 23, 2020
1ac9d9e
at this point the ocean post is now running
JessicaMeixner-NOAA Jun 26, 2020
d5de2c7
fix nems.configure for cold start
JessicaMeixner-NOAA Jun 26, 2020
65c9a87
updated wave-realted scripts to match gfsv16 branch
Jun 29, 2020
bf7d7ef
Merge remote-tracking branch 'jessica/s2s_prototype4' into ccpp-scripts
Jun 30, 2020
eb745e3
S2s prototype4 (#2)
JessicaMeixner-NOAA Jul 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,5 @@ util/sub_wcoss_d
workflow/user.yaml
sorc/checkout-gldas.fd.log
sorc/gldas.fd/
sorc/reg2grb2.fd/*.o
sorc/reg2grb2.fd/*.mod
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ sh checkout.sh coupled # Check out the couple
```
## Compile code used in ufs-s2s-model and EMC_post and link fixed files and executable programs:
```
sh build_ncep_post.sh #This command will build ncep_post.
sh build_ncep_post.sh #This command will build ncep_post
sh build_fv3_coupled.sh #This command will build ufs-s2s-model
sh build_reg2grb2.sh #This command will build exes for ocean-ice post

To link fixed files and executable programs for the coupled application:
On Hera:
Expand Down Expand Up @@ -85,6 +86,13 @@ module load rocoto
rocotorun -w workflow.xml -d workflow.db
```

## Using crons on Orion

On orion, you will need to update the path to rocotorun in the autogenerated workflow.crontab to be
/apps/contrib/rocoto/1.3.1/bin/rocotorun

Also note, on orion you need to be on login node 1 for cronjobs.

## Resource handling
There are two ways of changing resource settings (cpu count, time limits, threads) for a job that has already been defined in the workflow.

Expand Down
5 changes: 5 additions & 0 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ elif [ $step = "fv3ic" ]; then
[[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max
export APRUN_CHGRES="time"

elif [ $step = "waveinit" -o $step = "waveprep" -o $step = "wavepostsbs" ]; then

export mpmd="--multi-prog"
export CFP_MP="YES"

elif [ $step = "postsnd" ]; then

nth_max=$(($npe_node_max / $npe_node_postsnd))
Expand Down
5 changes: 5 additions & 0 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ elif [ $step = "fv3ic" ]; then
[[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max
export APRUN_CHGRES="time"

elif [ $step = "waveinit" -o $step = "waveprep" -o $step = "wavepostsbs" ]; then

export mpmd="--multi-prog"
export CFP_MP="YES"

elif [ $step = "postsnd" ]; then

nth_max=$(($npe_node_max / $npe_node_postsnd))
Expand Down
4 changes: 3 additions & 1 deletion jobs/JGLOBAL_FORECAST
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ date
#############################
# Source relevant config files
#############################
configs="base fcst"
configs="base fcst wave"
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config}
config_path=${EXPDIR:-$NWROOT/gfs.${gfs_ver}/parm/config}
for config in $configs; do
Expand Down Expand Up @@ -62,6 +62,8 @@ if [ $RUN_ENVIR = "nco" ]; then
export RSTDIR=${GESROOT:?}/$envir
fi

export COMPONENTwave=${COMPONENTwave:-${RUN}wave}
export WAV_MOD_TAG=${COMPONENTwave}${waveMEMB}

##############################################
# Begin JOB SPECIFIC work
Expand Down
4 changes: 3 additions & 1 deletion jobs/JGLOBAL_FORECAST_MEDCOLD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ date
#############################
# Source relevant config files
#############################
configs="base fcst"
configs="base fcst wave"
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config}
config_path=${EXPDIR:-$NWROOT/gfs.${gfs_ver}/parm/config}
for config in $configs; do
Expand Down Expand Up @@ -62,6 +62,8 @@ if [ $RUN_ENVIR = "nco" ]; then
export RSTDIR=${GESROOT:?}/$envir
fi

export COMPONENTwave=${COMPONENTwave:-${RUN}wave}
export WAV_MOD_TAG=${COMPONENTwave}${waveMEMB}

##############################################
# Begin JOB SPECIFIC work
Expand Down
41 changes: 10 additions & 31 deletions jobs/JWAVE_INIT
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -x -e
#############################
# Source relevant config files
#############################
configs="base wave waveinit"
configs="base wave"
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config}
config_path=${EXPDIR:-$NWROOT/gfs.${gfs_ver}/parm/config}
for config in $configs; do
Expand All @@ -26,18 +26,13 @@ status=$?
# PATH for working directory
export NET=${NET:-gfs}
export RUN=${RUN:-gfs}
export COMPONENTwave=${COMPONENTwave:-${RUN}wave}

export HOMEgfs=${HOMEgfs:-$NWROOT/${NET}.${gfs_ver}}
export COMPONENTwave=${COMPONENTwave:-${RUN}wave}

# Add default errchk = err_chk
export errchk=${errchk:-err_chk}

# Set HOMEwave to HOMEgfs
HOMEwave=${HOMEwave:-${HOMEgfs}}

# Create and go to DATA directory
export DATA=${DATA:-${DATAROOT:?}/${jobid}}
export DATA=${DATA:-${DATAROOT}/${jobid:?}}
mkdir -p $DATA
cd $DATA

Expand All @@ -50,21 +45,10 @@ sh ./PDY

export pgmout=OUTPUT.$$

export MP_PULSE=0

# Set resources to propagate NTASKS across cfp call
NTASKS=${NTASKS:-${npe_node_waveinit}}
export NTASKS=${NTASKS:?NTASKS required to be set}

# Path to HOME Directory
export CODEwave=${CODEwave:-${HOMEfv3gfs}/WW3}
export EXECwave=${EXECwave:-$HOMEwave/exec}
export FIXwave=${FIXwave:-$HOMEwave/fix/fix_wave_${NET}}
export PARMwave=${PARMwave:-$HOMEwave/parm/wave}
export USHwave=${USHwave:-$HOMEwave/ush}
export EXECcode=${EXECcode:-$CODEwave/exec}
export COMINice=${COMINice:-$COMROOTp2/omb/prod}
export COMINwnd=${COMINwnd:-$COMROOT/gfs/prod}
export COMIN_WAV_CUR=${COMIN_WAV_CUR:-$COMROOTp2/rtofs/prod}

# Set COM Paths and GETGES environment
export COMINwave=${COMINwave:-${ROTDIR:?}}
export COMOUTwave=${COMOUTwave:-${ROTDIR:?}}
export COMIN=${COMIN:-${COMINwave}/${COMPONENTwave}.${PDY}/${cyc}}
Expand All @@ -75,19 +59,14 @@ if [ $SENDCOM = YES ]; then
mkdir -p $COMOUT/rundata
fi

export wavelog=${COMOUTwave}/wave.log

# Set mpi serial command
export wavempexec=${wavempexec:-"mpirun -n"}
export wave_mpmd=${wave_mpmd:-"cfp"}
export wavempexec=${launcher:-"mpirun -n"}
export wave_mpmd=${mpmd:-"cfp"}

# Execute the Script
$HOMEwave/scripts/exwave_init.sh

# Remove temp directories
if [ "$KEEPDATA" != "YES" ]; then
cd $DATAROOT
rm -rf $DATA
fi
date
[[ $KEEPDATA = "NO" ]] && rm -rf $DATA

date
46 changes: 9 additions & 37 deletions jobs/JWAVE_POST_SBS
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -x -e
#############################
# Source relevant config files
#############################
configs="base wave wavepostsbs"
configs="base wave"
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config}
config_path=${EXPDIR:-$NWROOT/gfs.${gfs_ver}/parm/config}
for config in $configs; do
Expand All @@ -26,72 +26,45 @@ status=$?
# PATH for working directory
export NET=${NET:-gfs}
export RUN=${RUN:-gfs}
export COMPONENTwave=${COMPONENTwave:-${RUN}wave}

export HOMEgefs=${HOMEgefs:-$NWROOT/$NET.${gefs_ver}}
export HOMEgfs=${HOMEgfs:-$NWROOT/$NET.${gfs_ver}}
export COMPONENTwave=${COMPONENTwave:-${RUN}wave}

# Add default errchk = err_chk
export errchk=${errchk:-err_chk}

# Set HOMEwave to HOMEgefs
HOMEwave=${HOMEwave:-${HOMEgfs}}

# Set resources to propagate NTASKS across cfp call
NTASKS=${NTASKS:-${npe_node_waveprep}}
export NTASKS=${NTASKS:?NTASKS required to be set}

# Create and go to DATA directory
export DATA=${DATA:-${DATAROOT:?}/${jobid}}
export DATA=${DATA:-${DATAROOT}/${jobid:?}}
mkdir -p $DATA
cd $DATA

export cyc=${cyc:-00}
cyc=${cyc:-00}
export cycle=${cycle:-t${cyc}z}

# Set PDY
setpdy.sh
sh ./PDY

export pgmout=OUTPUT.$$

export MP_PULSE=0
export COMINice=$((COMINice:-$COMROOTp2/omb/prod))
export COMINwnd=$((COMINwnd:-$COMROOT/gfs/prod))
export COMIN_WAV_CUR=$((COMIN_WAV_CUR:-$COMROOTp2/rtofs/prod))

# Path to HOME Directory
export CODEwave=${CODEwave:-${HOMEfv3gfs}/WW3}
export EXECwave=${EXECwave:-$HOMEwave/exec}
export FIXwave=${FIXwave:-$HOMEwave/fix/fix_wave_${NET}}
export PARMwave=${PARMwave:-$HOMEwave/parm/wave}
export USHwave=${USHwave:-$HOMEwave/ush}
export EXECcode=${EXECcode:-$CODEwave/exec}

# Set COM Paths and GETGES environment
export COMINwave=${COMINwave:-${ROTDIR:?}}
export COMOUTwave=${COMOUTwave:-${ROTDIR:?}}
export COMIN=${COMIN:-${COMINwave}/${COMPONENTwave}.${PDY}/${cyc}}
export COMOUT=${COMOUT:-${COMOUTwave}/${COMPONENTwave}.${PDY}/${cyc}}

export COMINice=${COMINice:-${COMROOTp2}/omb/prod}
export COMINwnd=${COMINwnd:-${COMROOT}/gfs/prod}
export COMIN_WAV_CUR=${COMIN_WAV_CUR:-${COMROOTp2}/rtofs/prod}

mkdir -p $COMOUT/gridded
mkdir -p $COMOUT/station
mkdir -p $COMOUT/stats

export wavelog=${COMOUTwave}/wave.log

# Set mpi serial command
export wavempexec=${wavempexec:-"mpirun -n"}
export wave_mpmd=${wave_mpmd:-"cfp"}

env | sort

# Set wave model ID tag to include member number
# if ensemble; waveMEMB var empty in deterministic
# Set wave model ID tag to include member number
# if ensemble; waveMEMB var empty in deterministic
membTAG='p'
export membTAG='p'
if [ "${waveMEMB}" == "00" ]; then membTAG='c'; fi
export membTAG
export WAV_MOD_TAG=${COMPONENTwave}${waveMEMB}
Expand All @@ -114,4 +87,3 @@ if [ "$KEEPDATA" != "YES" ]; then
rm -rf $DATA
fi
date

50 changes: 12 additions & 38 deletions jobs/JWAVE_PREP
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -x

date
export PS4=' $SECONDS + '
set -x -e
Expand All @@ -26,22 +28,14 @@ status=$?
# PATH for working directory
export NET=${NET:-gfs}
export RUN=${RUN:-gfs}
export COMPONENTwave=${COMPONENTwave:-${RUN}wave}

export HOMEgfs=${HOMEgfs:-$NWROOT/gfs.${gfs_ver}}
export COMPONENTwave=${COMPONENTwave:-${RUN}wave}
export WAV_MOD_TAG=${COMPONENTwave}${waveMEMB}

# Add default errchk = err_chk
export errchk=${errchk:-err_chk}

# Set HOMEwave to HOMEgfs
HOMEwave=${HOMEwave:-${HOMEgfs}}

# Set resources to propagate NTASKS across cfp call
NTASKS=${NTASKS:-${npe_node_waveprep}}
export NTASKS=${NTASKS:?NTASKS required to be set}

# Create and go to DATA directory
export DATA=${DATA:-${DATAROOT:?}/${jobid}}
export DATA=${DATA:-${DATAROOT}/${jobid:?}}
mkdir -p $DATA
cd $DATA

Expand All @@ -56,24 +50,10 @@ export RPDY=$PDY

export pgmout=OUTPUT.$$

export MP_PULSE=0
export COMINice=${COMINice:-${COMROOTp2}/omb/prod}
export COMINwnd=${COMINwnd:-${COMROOT}/gfs/prod}
export COMIN_WAV_CUR=${COMIN_WAV_CUR:-${COMROOTp2}/rtofs/prod}

# CDO required for processing RTOFS currents
# export CDO=${COMROOTp2}/nwprod/rtofs_glo.v1.2.0/bin/cdo
export CDO=/gpfs/dell2/emc/verification/noscrub/Todd.Spindler/CDO/bin/cdo

# Path to HOME Directory
export CODEwave=${CODEwave:-${HOMEfv3gfs}/WW3}
export EXECwave=${EXECwave:-$HOMEwave/exec}
export FIXwave=${FIXwave:-$HOMEwave/fix/fix_wave_${NET}}
export PARMwave=${PARMwave:-$HOMEwave/parm/wave}
export USHwave=${USHwave:-$HOMEwave/ush}
export EXECcode=${EXECcode:-$CODEwave/exec}

###################################
# Set COM Paths and GETGES environment
###################################
# Set COM Paths and GETGES environment
export COMINwave=${COMINwave:-${ROTDIR:?}}
export COMOUTwave=${COMOUTwave:-${ROTDIR:?}}
export COMIN=${COMIN:-${COMINwave}/${COMPONENTwave}.${PDY}/${cyc}}
Expand All @@ -88,7 +68,7 @@ if [ $RUN_ENVIR = "nco" ]; then
export RPDY=`$NDATE -24 ${PDY}00 | cut -c1-8`
export COMIN_WAV_CUR=$(compath.py ${WAVECUR_DID}/prod)/${WAVECUR_DID}.${RPDY}
fi
else
else
if [ ! -d $DMPDIR/${WAVECUR_DID}.${RPDY} ]; then export RPDY=`$NDATE -24 ${PDY}00 | cut -c1-8`; fi
if [ ! -L $ROTDIR/${WAVECUR_DID}.${RPDY} ]; then # Check if symlink already exists in ROTDIR
$NLN $DMPDIR/${WAVECUR_DID}.${RPDY} $ROTDIR/${WAVECUR_DID}.${RPDY}
Expand All @@ -104,15 +84,9 @@ if [ $SENDCOM = YES ]; then
mkdir -p $COMOUT
fi

export wavelog=${COMOUTwave}/wave.log

# Set mpi serial command
export wavempexec=${wavempexec:-"mpirun -n"}
export wave_mpmd=${wave_mpmd:-"cfp"}

# Set wave model ID tag to include member number
# if ensemble; waveMEMB var empty in deterministic
export WAV_MOD_TAG=${COMPONENTwave}${waveMEMB}
export wavempexec=${launcher:-"mpirun -n"}
export wave_mpmd=${mpmd:-"cfp"}

# Execute the Script
$HOMEwave/scripts/exwave_prep.sh
Expand All @@ -123,4 +97,4 @@ if [ "$KEEPDATA" != "YES" ]; then
rm -rf $DATA
fi
date

exit 0
Loading