Skip to content

Commit

Permalink
HSD test cases: HSD_INPUT_DATA variable added
Browse files Browse the repository at this point in the history
  • Loading branch information
Natalie Perlin authored and Natalie Perlin committed Oct 30, 2024
1 parent ceadc2a commit 0780855
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
8 changes: 8 additions & 0 deletions tests-dev/baseline_setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ hera:
INPUTDATA_ROOT: /scratch2/NAGAPE/epic/UFS-WM_RT/NEMSfv3gfs/input-data-20240501
INPUTDATA_ROOT_WW3: /scratch2/NAGAPE/epic/UFS-WM_RT/NEMSfv3gfs/input-data-20240501/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC: /scratch2/NAGAPE/epic/UFS-WM_RT/NEMSfv3gfs/BM_IC-20220207
HSD_INPUT_DATA: /scratch1/NCEPDEV/nems/role.epic/HSD_INPUT_DATA
orion:
QUEUE: batch
COMPILE_QUEUE: batch
Expand All @@ -24,6 +25,7 @@ orion:
INPUTDATA_ROOT: /work/noaa/epic/UFS-WM_RT/NEMSfv3gfs/input-data-20240501
INPUTDATA_ROOT_WW3: /work/noaa/epic/UFS-WM_RT/NEMSfv3gfs/input-data-20240501/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC: /work/noaa/epic/UFS-WM_RT/NEMSfv3gfs/BM_IC-20220207
HSD_INPUT_DATA: /work/noaa/epic/role-epic/contrib/HSD_INPUT_DATA
hercules:
QUEUE: batch
COMPILE_QUEUE: batch
Expand All @@ -37,6 +39,7 @@ hercules:
INPUTDATA_ROOT: /work/noaa/epic/hercules/UFS-WM_RT/NEMSfv3gfs/input-data-20240501
INPUTDATA_ROOT_WW3: /work/noaa/epic/hercules/UFS-WM_RT/NEMSfv3gfs/input-data-20240501/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC: /work/noaa/epic/hercules/UFS-WM_RT/NEMSfv3gfs/BM_IC-20220207
HSD_INPUT_DATA: /work/noaa/epic/role-epic/contrib/HSD_INPUT_DATA
gaea:
QUEUE: normal
COMPILE_QUEUE: normal
Expand All @@ -50,6 +53,7 @@ gaea:
INPUTDATA_ROOT: /gpfs/f5/epic/world-shared/UFS-WM_RT/NEMSfv3gfs/input-data-20240501
INPUTDATA_ROOT_WW3: /gpfs/f5/epic/world-shared/UFS-WM_RT/NEMSfv3gfs/input-data-20240501/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC: /gpfs/f5/epic/world-shared/UFS-WM_RT/NEMSfv3gfs/BM_IC-20220207
HSD_INPUT_DATA: /glade/work/epicufsrt/contrib/HSD_INPUT_DATA
jet:
QUEUE: batch
COMPILE_QUEUE: batch
Expand All @@ -63,6 +67,7 @@ jet:
INPUTDATA_ROOT: /lfs5/HFIP/hfv3gfs/role.epic/RT/NEMSfv3gfs/input-data-20240501
INPUTDATA_ROOT_WW3: /lfs5/HFIP/hfv3gfs/role.epic/RT/NEMSfv3gfs/input-data-20240501/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC: /lfs5/HFIP/hfv3gfs/role.epic/RT/NEMSfv3gfs/BM_IC-20220207
HSD_INPUT_DATA: /mnt/lfs5/HFIP/hfv3gfs/role.epic/HSD_INPUT_DATA
derecho:
QUEUE: main
COMPILE_QUEUE: main
Expand All @@ -76,6 +81,7 @@ derecho:
INPUTDATA_ROOT: /glade/derecho/scratch/epicufsrt/ufs-weather-model/RT/NEMSfv3gfs/input-data-20240501
INPUTDATA_ROOT_WW3: /glade/derecho/scratch/epicufsrt/ufs-weather-model/RT/NEMSfv3gfs/input-data-20240501/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC: /glade/derecho/scratch/epicufsrt/ufs-weather-model/RT/NEMSfv3gfs/BM_IC-20220207
HSD_INPUT_DATA: /glade/work/epicufsrt/contrib/HSD_INPUT_DATA
noaacloud:
QUEUE: batch
COMPILE_QUEUE: batch
Expand All @@ -89,6 +95,7 @@ noaacloud:
INPUTDATA_ROOT: /contrib/ufs-weather-model/RT/NEMSfv3gfs/input-data-20240501
INPUTDATA_ROOT_WW3: /contrib/ufs-weather-model/RT/NEMSfv3gfs/input-data-20240501/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC: /contrib/ufs-weather-model/RT/NEMSfv3gfs/BM_IC-20220207
HSD_INPUT_DATA: /contrib/EPIC/HSD_INPUT_DATA
s4:
QUEUE: s4
COMPILE_QUEUE: s4
Expand All @@ -102,3 +109,4 @@ s4:
INPUTDATA_ROOT: /data/prod/emc.nemspara/RT/NEMSfv3gfs/input-data-20240501
INPUTDATA_ROOT_WW3: /data/prod/emc.nemspara/RT/NEMSfv3gfs/input-data-20240501/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC: /data/prod/emc.nemspara/RT/NEMSfv3gfs/BM_IC-20220207
HSD_INPUT_DATA:
10 changes: 8 additions & 2 deletions tests-dev/create_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import yaml
from ufs_test_utils import get_testcase, write_logfile, rrmdir, machine_check_off

def rocoto_create_entries(RTPWD,MACHINE_ID,INPUTDATA_ROOT,INPUTDATA_ROOT_WW3,INPUTDATA_ROOT_BMIC,RUNDIR_ROOT,NEW_BASELINE,ROCOTO_XML):
def rocoto_create_entries(RTPWD,MACHINE_ID,INPUTDATA_ROOT,INPUTDATA_ROOT_WW3,INPUTDATA_ROOT_BMIC,HSD_INPUT_DATA,RUNDIR_ROOT,NEW_BASELINE,ROCOTO_XML):
"""Generate header information for Rocoto xml file
Args:
Expand All @@ -13,6 +13,7 @@ def rocoto_create_entries(RTPWD,MACHINE_ID,INPUTDATA_ROOT,INPUTDATA_ROOT_WW3,INP
INPUTDATA_ROOT (str): Input data directory
INPUTDATA_ROOT_WW3 (str): WW3 input data directory
INPUTDATA_ROOT_BMIC (str): BMIC input data directory
HSD_INPUT_DATA (str): HSD tests input data directory
RUNDIR_ROOT (str): Test run directory
NEW_BASELINE (str): Directory for newly generated baselines
ROCOTO_XML (str): Rocoto .xml filename to write to
Expand All @@ -31,6 +32,7 @@ def rocoto_create_entries(RTPWD,MACHINE_ID,INPUTDATA_ROOT,INPUTDATA_ROOT_WW3,INP
<!ENTITY INPUTDATA_ROOT "{INPUTDATA_ROOT}">
<!ENTITY INPUTDATA_ROOT_WW3 "{INPUTDATA_ROOT_WW3}">
<!ENTITY INPUTDATA_ROOT_BMIC "{INPUTDATA_ROOT_BMIC}">
<!ENTITY HSD_INPUT_DATA "{HSD_INPUT_DATA}">
<!ENTITY RUNDIR_ROOT "{RUNDIR_ROOT}">
<!ENTITY NEW_BASELINE "{NEW_BASELINE}">
]>
Expand Down Expand Up @@ -166,6 +168,7 @@ def write_runtest_env():
INPUTDATA_ROOT = str(os.getenv('INPUTDATA_ROOT'))
INPUTDATA_ROOT_WW3 = str(os.getenv('INPUTDATA_ROOT_WW3'))
INPUTDATA_ROOT_BMIC= str(os.getenv('INPUTDATA_ROOT_BMIC'))
HSD_INPUT_DATA= str(os.getenv('HSD_INPUT_DATA'))
PATHRT = str(os.getenv('PATHRT'))
PATHTR, tail = os.path.split(PATHRT)
NEW_BASELINE = str(os.getenv('NEW_BASELINE'))
Expand Down Expand Up @@ -194,6 +197,7 @@ def write_runtest_env():
export INPUTDATA_ROOT={INPUTDATA_ROOT}
export INPUTDATA_ROOT_WW3={INPUTDATA_ROOT_WW3}
export INPUTDATA_ROOT_BMIC={INPUTDATA_ROOT_BMIC}
export HSD_INPUT_DATA={HSD_INPUT_DATA}
export PATHRT={PATHRT}
export PATHTR={PATHTR}
export NEW_BASELINE={NEW_BASELINE}
Expand Down Expand Up @@ -343,6 +347,7 @@ def xml_loop():
INPUTDATA_ROOT= str(base['INPUTDATA_ROOT'])
INPUTDATA_ROOT_WW3 = str(base['INPUTDATA_ROOT_WW3'])
INPUTDATA_ROOT_BMIC= str(base['INPUTDATA_ROOT_BMIC'])
HSD_INPUT_DATA= str(base['HSD_INPUT_DATA'])

path = STMP+'/'+USER
os.makedirs(path, exist_ok=True)
Expand Down Expand Up @@ -387,6 +392,7 @@ def xml_loop():
os.environ["INPUTDATA_ROOT"] = INPUTDATA_ROOT
os.environ["INPUTDATA_ROOT_WW3"] = INPUTDATA_ROOT_WW3
os.environ["INPUTDATA_ROOT_BMIC"]= INPUTDATA_ROOT_BMIC
os.environ["HSD_INPUT_DATA"]= HSD_INPUT_DATA
os.environ["PARTITION"] = PARTITION
os.environ["SCHEDULER"] = SCHEDULER
os.environ["RTPWD"] = RTPWD
Expand All @@ -395,7 +401,7 @@ def xml_loop():
JOB_NR = 0
ROCOTO = True
ROCOTO_XML = os.getenv('ROCOTO_XML')
rocoto_create_entries(RTPWD,MACHINE_ID,INPUTDATA_ROOT,INPUTDATA_ROOT_WW3,INPUTDATA_ROOT_BMIC,RUNDIR_ROOT,NEW_BASELINE,ROCOTO_XML)
rocoto_create_entries(RTPWD,MACHINE_ID,INPUTDATA_ROOT,INPUTDATA_ROOT_WW3,INPUTDATA_ROOT_BMIC,HSD_INPUT_DATA,RUNDIR_ROOT,NEW_BASELINE,ROCOTO_XML)
UFS_TEST_YAML = str(os.getenv('UFS_TEST_YAML'))
with open(UFS_TEST_YAML, 'r') as f:
rt_yaml = yaml.load(f, Loader=yaml.FullLoader)
Expand Down
2 changes: 1 addition & 1 deletion tests-dev/test_cases/exp_conf/2020_CAPE.IN
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if [ $WARM_START = .false. ]; then
elif [ "$V2_SFC_FILE" = "true" ]; then
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127_v2_sfc/* ./INPUT/.
elif [ "$HSD_CASE" = "true" ]; then
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127_v2_sfc/* ./INPUT/.
cp -r @[HSD_INPUT_DATA]/${inputdir}/INPUT_L127_v2_sfc/* ./INPUT/.
else
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127_gfsv17/* ./INPUT/.
fi
Expand Down
6 changes: 4 additions & 2 deletions tests-dev/test_cases/exp_conf/baroclinic_wave.IN
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ elif [ $NPX = 769 ]; then
fi

echo "inputdir=$inputdir,NPX=$NPX,NESTED=$NESTED"

cp @[INPUTDATA_ROOT]/${inputdir}/global_hyblev.l128.txt .
HSD_CASE=${HSD_CASE:-false}
if [ "$HSD_CASE" = "true" ]; then
cp @[HSD_INPUT_DATA]/global_hyblev.l128.txt .
fi

OPNREQ_TEST=${OPNREQ_TEST:-false}
V2_SFC_FILE=${V2_SFC_FILE:-false}
Expand Down

0 comments on commit 0780855

Please sign in to comment.