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

Supported resolutions on platforms and defaults for mode #1026

Merged
merged 3 commits into from
Sep 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions parm/config/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export DO_WAVE="NO"
export DO_OCN="NO"
export DO_ICE="NO"
export DO_AERO="NO"
export CCPP_SUITE="FV3_GFS_v17_p8"
export CCPP_SUITE="@CCPP_SUITE@"
export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both
export DOBNDPNT_WAVE="NO"
export cplwav2atm=".false."
Expand Down Expand Up @@ -322,7 +322,7 @@ fi
# fi

# Microphysics Options: 99-ZhaoCarr, 8-Thompson; 6-WSM6, 10-MG, 11-GFDL
export imp_physics=8
export imp_physics=@IMP_PHYSICS@

# Shared parameters
# DA engine
Expand Down
1 change: 1 addition & 0 deletions workflow/hosts/hera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ chgrp_cmd: 'chgrp rstprod'
hpssarch: 'YES'
localarch: 'NO'
atardir: '/NCEPDEV/$HPSS_PROJECT/1year/$USER/$machine/scratch/$PSLOT'
supported_resolutions: ['C768', 'C384', 'C192', 'C96', 'C48']
3 changes: 2 additions & 1 deletion workflow/hosts/orion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ chgrp_rstprod: 'YES'
chgrp_cmd: 'chgrp rstprod'
hpssarch: 'NO'
localarch: 'NO'
atardir: '$NOSCRUB/archive_rotdir/$PSLOT'
atardir: '$NOSCRUB/archive_rotdir/$PSLOT'
supported_resolutions: ['C768', 'C384', 'C192', 'C96', 'C48']
22 changes: 22 additions & 0 deletions workflow/setup_expt.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,19 @@ def edit_baseconfig(host, inputs):
}
tmpl_dict = dict(tmpl_dict, **extend_dict)

if inputs.mode in ['cycled']:
extend_dict = {
"@CCPP_SUITE@": 'FV3_GFS_v16',
"@IMP_PHYSICS@": 11
}
elif inputs.mode in ['forecast-only']:
extend_dict = {
"@CCPP_SUITE@": 'FV3_GFS_v17_p8',
"@IMP_PHYSICS@": 8
}
tmpl_dict = dict(tmpl_dict, **extend_dict)


# Open and read the templated config.base.emc.dyn
base_tmpl = f'{inputs.configdir}/config.base.emc.dyn'
with open(base_tmpl, 'rt') as fi:
Expand Down Expand Up @@ -265,12 +278,21 @@ def query_and_clean(dirname):

return create_dir

def validate_user_request(host, inputs):
expt_res = f'C{inputs.resdet}'
supp_res = host.info['supported_resolutions']
machine = host.machine
if expt_res not in supp_res:
raise NotImplementedError(f"Supported resolutions on {machine} are:\n{', '.join(supp_res)}")


if __name__ == '__main__':

user_inputs = input_args()
host = Host()

validate_user_request(host, user_inputs)

comrot = os.path.join(user_inputs.comrot, user_inputs.pslot)
expdir = os.path.join(user_inputs.expdir, user_inputs.pslot)

Expand Down