diff --git a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES index 1c07956433..c75c709b2a 100755 --- a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES +++ b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES @@ -93,10 +93,11 @@ check_var_valid_value "ICS_OR_LBCS" "valid_vals_ICS_OR_LBCS" if [ "${ICS_OR_LBCS}" = "ICS" ]; then export TIME_OFFSET_HRS=${EXTRN_MDL_ICS_OFFSET_HRS:-0} export EXTRN_MDL_NAME=${EXTRN_MDL_NAME_ICS} - + GFS_FILE_FMT=${FV3GFS_FILE_FMT_ICS} elif [ "${ICS_OR_LBCS}" = "LBCS" ]; then export TIME_OFFSET_HRS=${EXTRN_MDL_LBCS_OFFSET_HRS:-0} export EXTRN_MDL_NAME=${EXTRN_MDL_NAME_LBCS} + GFS_FILE_FMT=${FV3GFS_FILE_FMT_LBCS} fi # @@ -159,10 +160,10 @@ case ${EXTRN_MDL_NAME} in # The transition date from the GSMGFS to the FV3GFS was 2019061212, i.e. # this was the first official forecast with the FV3GFS. So we set the # last CDATE for the GSMGFS to the one 6 hours before this. - cdate_max="2019061206" - if [ "$EXTRN_MDL_CDATE" -gt "$cdate_max" ]; then + CDATE_max="2019061206" + if [ "$EXTRN_MDL_CDATE" -gt "$CDATE_max" ]; then print_err_msg_exit "\ - $(data_unavailable $EXTRN_MDL_NAME $EXTRN_MDL_CDATE $cdate_max max)" + $(data_unavailable $EXTRN_MDL_NAME $EXTRN_MDL_CDATE $CDATE_max max)" fi ;; @@ -171,11 +172,20 @@ case ${EXTRN_MDL_NAME} in # this was the first official forecast with the FV3GFS. However, paral- # lel runs with the FV3GFS go back to 2018121500. So we set the first # EXTRN_MDL_CDATE for the FV3GFS to this date and time. -# CDATE_min="2019061212" CDATE_min="2018121500" + CDATE_min_netcdf="2021032100" + CDATE_max_nemsio="2021032018" if [ "$EXTRN_MDL_CDATE" -lt "$CDATE_min" ]; then print_err_msg_exit "\ - $(data_unavailable $EXTRN_MDL_NAME $EXTRN_MDL_CDATE $cdate_min min)" + $(data_unavailable $EXTRN_MDL_NAME $EXTRN_MDL_CDATE $CDATE_min min)" + elif [ "${GFS_FILE_FMT}" = "netcdf" ] && [ "${EXTRN_MDL_CDATE}" -lt "${CDATE_min_netcdf}" ]; then + print_err_msg_exit "\ + NETCDF is not available for this date:: However, NEMSIO is available:: \ + $(data_unavailable $EXTRN_MDL_NAME $EXTRN_MDL_CDATE $CDATE_min_netcdf min)" + elif [ "${GFS_FILE_FMT}" = "nemsio" ] && [ "${EXTRN_MDL_CDATE}" -gt "${CDATE_max_nemsio}" ]; then + print_err_msg_exit "\ + NEMSIO is not available for this date:: However, NETCDF is available:: \ + $(data_unavailable $EXTRN_MDL_NAME $EXTRN_MDL_CDATE $CDATE_max_nemsio max)" fi ;; @@ -185,7 +195,7 @@ case ${EXTRN_MDL_NAME} in CDATE_min="2015070100" if [ "$EXTRN_MDL_CDATE" -lt "$CDATE_min" ]; then print_err_msg_exit "\ - $(data_unavailable $EXTRN_MDL_NAME $EXTRN_MDL_CDATE $cdate_min min)" + $(data_unavailable $EXTRN_MDL_NAME $EXTRN_MDL_CDATE $CDATE_min min)" fi ;; @@ -196,7 +206,7 @@ case ${EXTRN_MDL_NAME} in CDATE_min="2014103000" if [ "$EXTRN_MDL_CDATE" -lt "$CDATE_min" ]; then print_err_msg_exit "\ - $(data_unavailable $EXTRN_MDL_NAME $EXTRN_MDL_CDATE $cdate_min min)" + $(data_unavailable $EXTRN_MDL_NAME $EXTRN_MDL_CDATE $CDATE_min min)" fi ;; diff --git a/parm/FV3LAM_wflow.xml b/parm/FV3LAM_wflow.xml index 622e0b42d6..97d2f1a700 100644 --- a/parm/FV3LAM_wflow.xml +++ b/parm/FV3LAM_wflow.xml @@ -307,7 +307,9 @@ MODULES_RUN_TASK_FP script. {%- endif %} {{ wtime_get_extrn_ics }} &NCORES_PER_NODE; + {%- if machine not in ["WCOSS2"] %} &SCHED_NATIVE_CMD; + {%- endif %} &GET_EXTRN_ICS_TN; &LOGDIR;/&GET_EXTRN_ICS_TN;_@Y@m@d@H&LOGEXT; @@ -335,7 +337,9 @@ MODULES_RUN_TASK_FP script. {%- endif %} {{ wtime_get_extrn_lbcs }} &NCORES_PER_NODE; + {%- if machine not in ["WCOSS2"] %} &SCHED_NATIVE_CMD; + {%- endif %} &GET_EXTRN_LBCS_TN; &LOGDIR;/&GET_EXTRN_LBCS_TN;_@Y@m@d@H&LOGEXT; diff --git a/parm/data_locations.yml b/parm/data_locations.yml index 067708f99f..8297ac975a 100644 --- a/parm/data_locations.yml +++ b/parm/data_locations.yml @@ -64,17 +64,20 @@ FV3GFS: - gfs.t{hh}z.sfcanl.nemsio fcst: - gfs.t{hh}z.atmf{fcst_hr:03d}.nemsio + - gfs.t{hh}z.sfcf{fcst_hr:03d}.nemsio netcdf: anl: - gfs.t{hh}z.atmanl.nc - gfs.t{hh}z.sfcanl.nc fcst: - gfs.t{hh}z.atmf{fcst_hr:03d}.nc + - gfs.t{hh}z.sfcf{fcst_hr:03d}.nc hpss: protocol: htar archive_path: - /NCEPPROD/hpssprod/runhistory/rh{yyyy}/{yyyymm}/{yyyymmdd} - /NCEPPROD/hpssprod/runhistory/rh{yyyy}/{yyyymm}/{yyyymmdd} + - /NCEPPROD/hpssprod/runhistory/rh{yyyy}/{yyyymm}/{yyyymmdd} archive_internal_dir: - ./gfs.{yyyymmdd}/{hh} - ./gfs.{yyyymmdd}/{hh}/atmos @@ -83,9 +86,11 @@ FV3GFS: anl: - gpfs_dell1_nco_ops_com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_pgrb2.tar - com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_pgrb2.tar + - com_gfs_v16.2_gfs.{yyyymmdd}_{hh}.gfs_pgrb2.tar fcst: - gpfs_dell1_nco_ops_com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_pgrb2.tar - com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_pgrb2.tar + - com_gfs_v16.2_gfs.{yyyymmdd}_{hh}.gfs_pgrb2.tar nemsio: anl: - gpfs_dell1_nco_ops_com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_nemsioa.tar @@ -97,9 +102,11 @@ FV3GFS: anl: - gpfs_dell1_nco_ops_com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_nca.tar - com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_nca.tar + - com_gfs_v16.2_gfs.{yyyymmdd}_{hh}.gfs_nca.tar fcst: - ['gpfs_dell1_nco_ops_com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_nca.tar', 'gpfs_dell1_nco_ops_com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_ncb.tar'] - ['com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_nca.tar', 'com_gfs_prod_gfs.{yyyymmdd}_{hh}.gfs_ncb.tar'] + - ['com_gfs_v16.2_gfs.{yyyymmdd}_{hh}.gfs_nca.tar', 'com_gfs_v16.2_gfs.{yyyymmdd}_{hh}.gfs_ncb.tar'] file_names: <<: *gfs_file_names aws: diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 824d2b4fdc..6a7eaa90b2 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -154,6 +154,7 @@ python3 -u ${USHdir}/retrieve_data.py \ --data_stores ${data_stores} \ --external_model ${EXTRN_MDL_NAME} \ --fcst_hrs ${fcst_hrs[@]} \ + --ics_or_lbcs ${ICS_OR_LBCS} \ --output_path ${EXTRN_MDL_STAGING_DIR} \ --summary_file ${EXTRN_DEFNS} \ $additional_flags" diff --git a/tests/WE2E/machine_suites/fundamental.cheyenne.gnu b/tests/WE2E/machine_suites/fundamental.cheyenne.gnu index f269650e98..5cb49719b6 100644 --- a/tests/WE2E/machine_suites/fundamental.cheyenne.gnu +++ b/tests/WE2E/machine_suites/fundamental.cheyenne.gnu @@ -1,4 +1,3 @@ -MET_verification grid_CONUS_25km_GFDLgrid_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_v16 grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_suite_HRRR grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_suite_RRFS_v1beta diff --git a/tests/WE2E/test_configs/grids_extrn_mdls_suites_nco/config.nco_grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_timeoffset_suite_GFS_v16.yaml b/tests/WE2E/test_configs/grids_extrn_mdls_suites_nco/config.nco_grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_timeoffset_suite_GFS_v16.yaml new file mode 100644 index 0000000000..bbfb59f8c5 --- /dev/null +++ b/tests/WE2E/test_configs/grids_extrn_mdls_suites_nco/config.nco_grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_timeoffset_suite_GFS_v16.yaml @@ -0,0 +1,28 @@ +metadata: + description: |- + This test is to ensure that the workflow running in nco mode completes + successfully on the RRFS_CONUS_25km grid using the FV3_GFS_v16 physics + suite with time-offset ICs/LBCs derived from the FV3GFS. +user: + RUN_ENVIR: nco +workflow: + CCPP_PHYS_SUITE: FV3_GFS_v16 + DATE_FIRST_CYCL: '2022081012' + DATE_LAST_CYCL: '2022081012' + FCST_LEN_HRS: 6 + PREEXISTING_DIR_METHOD: rename +workflow_switches: + RUN_TASK_MAKE_GRID: false + RUN_TASK_MAKE_OROG: false + RUN_TASK_MAKE_SFC_CLIMO: false +task_get_extrn_ics: + EXTRN_MDL_NAME_ICS: FV3GFS + FV3GFS_FILE_FMT_ICS: netcdf + EXTRN_MDL_ICS_OFFSET_HRS: 6 +task_get_extrn_lbcs: + EXTRN_MDL_NAME_LBCS: FV3GFS + FV3GFS_FILE_FMT_LBCS: netcdf + LBC_SPEC_INTVL_HRS: 3 + EXTRN_MDL_LBCS_OFFSET_HRS: 6 +task_run_fcst: + PREDEF_GRID_NAME: RRFS_CONUS_25km diff --git a/ush/machine/wcoss2.yaml b/ush/machine/wcoss2.yaml index 4ed9ab7e3d..4a9bfcab50 100644 --- a/ush/machine/wcoss2.yaml +++ b/ush/machine/wcoss2.yaml @@ -34,8 +34,8 @@ task_run_fcst: FIXlut: /lfs/h2/emc/lam/noscrub/UFS_SRW_App/develop/fix/fix_lut data: GSMGFS: compath.py ${envir}/gsmgfs/${gsmgfs_ver}/gsmgfs.${PDY} - FV3GFS: compath.py ${envir}/gfs/${gfs_ver}/gfs.${PDY} + FV3GFS: compath.py ${envir}/gfs/${gfs_ver}/gfs.${PDY}/${hh}/atmos RAP: compath.py ${envir}/rap/${rap_ver}/rap.${PDY} NAM: compath.py ${envir}/nam/${nam_ver}/nam.${PDY} - HRRR: compath.py ${envir}/hrrr/${hrrr_ver}/hrrr.${PDY} + HRRR: compath.py ${envir}/hrrr/${hrrr_ver}/hrrr.${PDY}/conus diff --git a/ush/retrieve_data.py b/ush/retrieve_data.py index a0d7326832..e6ad879fbc 100755 --- a/ush/retrieve_data.py +++ b/ush/retrieve_data.py @@ -34,6 +34,7 @@ import sys from textwrap import dedent import time +from copy import deepcopy import yaml @@ -289,6 +290,16 @@ def get_file_templates(cla, known_data_info, data_store, use_cla_tmpl=False): """ file_templates = known_data_info.get(data_store, {}).get("file_names") + file_templates = deepcopy(file_templates) + + # Remove sfc files from fcst in file_names of external models for LBCs + # sfc files needed in fcst when time_offset is not zero. + if cla.ics_or_lbcs == "LBCS": + for format in ['netcdf', 'nemsio']: + for i, tmpl in enumerate(file_templates.get(format, {}).get('fcst', [])): + if "sfc" in tmpl: + del file_templates[format]['fcst'][i] + if use_cla_tmpl: file_templates = cla.file_templates if cla.file_templates else file_templates @@ -946,6 +957,12 @@ def parse_args(argv): required=True, type=os.path.abspath, ) + parser.add_argument( + "--ics_or_lbcs", + choices=("ICS", "LBCS"), + help="Flag for whether ICS or LBCS.", + required=True, + ) # Optional parser.add_argument( diff --git a/ush/test_retrieve_data.py b/ush/test_retrieve_data.py index dffa638562..e35eac2dad 100644 --- a/ush/test_retrieve_data.py +++ b/ush/test_retrieve_data.py @@ -48,6 +48,7 @@ def test_fv3gfs_grib2_lbcs_from_hpss(self): '--external_model', 'FV3GFS', '--fcst_hrs', '6', '12', '3', '--output_path', tmp_dir, + '--ics_or_lbcs', 'LBCS', '--debug', '--file_type', 'grib2', ] @@ -80,6 +81,7 @@ def test_fv3gfs_netcdf_lbcs_from_hpss(self): '--external_model', 'FV3GFS', '--fcst_hrs', '24', '48', '24', '--output_path', tmp_dir, + '--ics_or_lbcs', 'LBCS', '--debug', '--file_type', 'netcdf', ] @@ -112,6 +114,7 @@ def test_gdas_ics_from_aws(self): '--external_model', 'GDAS', '--fcst_hrs', '6', '9', '3', '--output_path', out_path_tmpl, + '--ics_or_lbcs', 'LBCS', '--debug', '--file_type', 'netcdf', '--members', '9', '10', @@ -147,6 +150,7 @@ def test_gefs_grib2_ics_from_aws(self): '--external_model', 'GEFS', '--fcst_hrs', '6', '--output_path', out_path_tmpl, + '--ics_or_lbcs', 'ICS', '--debug', '--file_type', 'netcdf', '--members', '1', '2', @@ -180,6 +184,7 @@ def test_hrrr_ics_from_hpss(self): '--external_model', 'HRRR', '--fcst_hrs', '0', '--output_path', tmp_dir, + '--ics_or_lbcs', 'ICS', '--debug', ] # fmt: on @@ -209,6 +214,7 @@ def test_hrrr_lbcs_from_hpss(self): '--external_model', 'HRRR', '--fcst_hrs', '3', '24', '3', '--output_path', tmp_dir, + '--ics_or_lbcs', 'LBCS', '--debug', ] # fmt: on @@ -237,6 +243,7 @@ def test_hrrr_ics_from_aws(self): '--external_model', 'HRRR', '--fcst_hrs', '0', '--output_path', tmp_dir, + '--ics_or_lbcs', 'ICS', '--debug', ] # fmt: on @@ -265,6 +272,7 @@ def test_hrrr_lbcs_from_aws(self): '--external_model', 'HRRR', '--fcst_hrs', '3', '24', '3', '--output_path', tmp_dir, + '--ics_or_lbcs', 'LBCS', '--debug', ] # fmt: on @@ -294,6 +302,7 @@ def test_rap_ics_from_aws(self): '--external_model', 'RAP', '--fcst_hrs', '3', '--output_path', tmp_dir, + '--ics_or_lbcs', 'ICS', '--debug', ] # fmt: on @@ -323,6 +332,7 @@ def test_rap_lbcs_from_aws(self): '--external_model', 'RAP', '--fcst_hrs', '3', '30', '6', '--output_path', tmp_dir, + '--ics_or_lbcs', 'LBCS', '--debug', ] # fmt: on