From 5deb7a85a5f011bf77062db6fe2b30e5848ee71b Mon Sep 17 00:00:00 2001 From: "Jeff.Beck" Date: Wed, 10 Jun 2020 21:27:19 +0000 Subject: [PATCH 1/9] Remove all references to /lfs3 on Jet --- modulefiles/module-setup.csh.inc | 2 +- modulefiles/module-setup.sh.inc | 2 +- modulefiles/tasks/jet/make_ics.hardcoded | 34 ------------------- modulefiles/tasks/jet/make_ics.local | 5 --- modulefiles/tasks/jet/make_lbcs.hardcoded | 34 ------------------- modulefiles/tasks/jet/make_lbcs.local | 5 --- tests/baseline_configs/config.nco_conus.sh | 6 ++-- .../baseline_configs/config.nco_conus_c96.sh | 6 ++-- tests/baseline_configs/config.regional_006.sh | 7 ++-- tests/baseline_configs/config.regional_009.sh | 4 +-- ush/load_fv3gfs_modules.sh | 2 +- ush/setup.sh | 2 +- 12 files changed, 15 insertions(+), 94 deletions(-) delete mode 100644 modulefiles/tasks/jet/make_ics.hardcoded delete mode 100644 modulefiles/tasks/jet/make_ics.local delete mode 100644 modulefiles/tasks/jet/make_lbcs.hardcoded delete mode 100644 modulefiles/tasks/jet/make_lbcs.local diff --git a/modulefiles/module-setup.csh.inc b/modulefiles/module-setup.csh.inc index a93b21a3c..5ac893cab 100644 --- a/modulefiles/module-setup.csh.inc +++ b/modulefiles/module-setup.csh.inc @@ -2,7 +2,7 @@ set __ms_shell=csh eval "if ( -d / ) set __ms_shell=tcsh" -if ( { test -d /lfs3 } ) then +if ( { test -d /lfs4 } ) then if ( ! { module help >& /dev/null } ) then source /apps/lmod/lmod/init/$__ms_shell endif diff --git a/modulefiles/module-setup.sh.inc b/modulefiles/module-setup.sh.inc index 82a60938e..ec81c0187 100644 --- a/modulefiles/module-setup.sh.inc +++ b/modulefiles/module-setup.sh.inc @@ -16,7 +16,7 @@ else __ms_shell=sh fi -if [[ -d /lfs3 ]] ; then +if [[ -d /lfs4 ]] ; then # We are on NOAA Jet if ( ! eval module help > /dev/null 2>&1 ) ; then source /apps/lmod/lmod/init/$__ms_shell diff --git a/modulefiles/tasks/jet/make_ics.hardcoded b/modulefiles/tasks/jet/make_ics.hardcoded deleted file mode 100644 index 5e63864de..000000000 --- a/modulefiles/tasks/jet/make_ics.hardcoded +++ /dev/null @@ -1,34 +0,0 @@ -#%Module##################################################### -## Module file for make_ics task. -############################################################# - -module load intel/18.0.5.274 -module load impi/2018.4.274 -module load szip -module load hdf5 -module load netcdf/4.2.1.1 - -module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/modulefiles -module load esmflocal/ESMF_8_0_0_beta_snapshot_21 - -module load w3nco-intel-sandybridge/2.0.6 -module load sp-intel-sandybridge/2.0.2 -module load bacio-intel-sandybridge/2.0.2 -module load sigio-intel-sandybridge/2.0.1 -module load sfcio-intel-sandybridge/1.0.0 -module load nemsio-intel-sandybridge/2.2.3 - -export FCOMP=mpiifort -#export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl" -# for debugging -export FFLAGS="-O0 -g -traceback -r8 -i4 -qopenmp -convert big_endian -check bounds -warn unused -assume byterecl" - -export WGRIB2API_LIB="/apps/wgrib2/2.0.8/intel/18.0.5.274/lib/libwgrib2_api.a" -export WGRIB2API_INC="/apps/wgrib2/2.0.8/intel/18.0.5.274/lib" -export WGRIB2_LIB="/apps/wgrib2/2.0.8/intel/18.0.5.274/lib/libwgrib2.a" -export WGRIB2_DIR="/apps/wgrib2/2.0.8/intel/18.0.5.274/bin" -module load wgrib2/2.0.8 - -module use -a /contrib/miniconda3/modulefiles -module load miniconda3 -conda activate regional_workflow diff --git a/modulefiles/tasks/jet/make_ics.local b/modulefiles/tasks/jet/make_ics.local deleted file mode 100644 index d5fa8e56b..000000000 --- a/modulefiles/tasks/jet/make_ics.local +++ /dev/null @@ -1,5 +0,0 @@ -module load wgrib2/2.0.8 - -module use -a /contrib/miniconda3/modulefiles -module load miniconda3 -conda activate regional_workflow diff --git a/modulefiles/tasks/jet/make_lbcs.hardcoded b/modulefiles/tasks/jet/make_lbcs.hardcoded deleted file mode 100644 index 5e63864de..000000000 --- a/modulefiles/tasks/jet/make_lbcs.hardcoded +++ /dev/null @@ -1,34 +0,0 @@ -#%Module##################################################### -## Module file for make_ics task. -############################################################# - -module load intel/18.0.5.274 -module load impi/2018.4.274 -module load szip -module load hdf5 -module load netcdf/4.2.1.1 - -module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/modulefiles -module load esmflocal/ESMF_8_0_0_beta_snapshot_21 - -module load w3nco-intel-sandybridge/2.0.6 -module load sp-intel-sandybridge/2.0.2 -module load bacio-intel-sandybridge/2.0.2 -module load sigio-intel-sandybridge/2.0.1 -module load sfcio-intel-sandybridge/1.0.0 -module load nemsio-intel-sandybridge/2.2.3 - -export FCOMP=mpiifort -#export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl" -# for debugging -export FFLAGS="-O0 -g -traceback -r8 -i4 -qopenmp -convert big_endian -check bounds -warn unused -assume byterecl" - -export WGRIB2API_LIB="/apps/wgrib2/2.0.8/intel/18.0.5.274/lib/libwgrib2_api.a" -export WGRIB2API_INC="/apps/wgrib2/2.0.8/intel/18.0.5.274/lib" -export WGRIB2_LIB="/apps/wgrib2/2.0.8/intel/18.0.5.274/lib/libwgrib2.a" -export WGRIB2_DIR="/apps/wgrib2/2.0.8/intel/18.0.5.274/bin" -module load wgrib2/2.0.8 - -module use -a /contrib/miniconda3/modulefiles -module load miniconda3 -conda activate regional_workflow diff --git a/modulefiles/tasks/jet/make_lbcs.local b/modulefiles/tasks/jet/make_lbcs.local deleted file mode 100644 index d5fa8e56b..000000000 --- a/modulefiles/tasks/jet/make_lbcs.local +++ /dev/null @@ -1,5 +0,0 @@ -module load wgrib2/2.0.8 - -module use -a /contrib/miniconda3/modulefiles -module load miniconda3 -conda activate regional_workflow diff --git a/tests/baseline_configs/config.nco_conus.sh b/tests/baseline_configs/config.nco_conus.sh index 26051f68e..9da21f187 100644 --- a/tests/baseline_configs/config.nco_conus.sh +++ b/tests/baseline_configs/config.nco_conus.sh @@ -105,9 +105,9 @@ STMP="/scratch2/BMC/det/Gerard.Ketefian/UFS_CAM/NCO_dirs/stmp" PTMP="/scratch2/BMC/det/Gerard.Ketefian/UFS_CAM/NCO_dirs/ptmp" #On Jet: -#COMINgfs="/lfs1/projects/hwrf-data/hafs-input/COMGFS" -#STMP="/lfs3/BMC/wrfruc/beck/NCO_dirs/stmp" -#PTMP="/lfs3/BMC/wrfruc/beck/NCO_dirs/ptmp" +#COMINgfs="/lfs1/HFIP/hwrf-data/hafs-input/COMGFS" +#STMP="" +#PTMP="" # # In NCO mode, the user must manually (e.g. after doing the build step) diff --git a/tests/baseline_configs/config.nco_conus_c96.sh b/tests/baseline_configs/config.nco_conus_c96.sh index 9d01489af..ba07895a8 100644 --- a/tests/baseline_configs/config.nco_conus_c96.sh +++ b/tests/baseline_configs/config.nco_conus_c96.sh @@ -105,9 +105,9 @@ STMP="/scratch2/BMC/det/Gerard.Ketefian/UFS_CAM/NCO_dirs/stmp" PTMP="/scratch2/BMC/det/Gerard.Ketefian/UFS_CAM/NCO_dirs/ptmp" #On Jet: -#COMINgfs="/lfs1/projects/hwrf-data/hafs-input/COMGFS" -#STMP="/lfs3/BMC/wrfruc/beck/NCO_dirs/stmp" -#PTMP="/lfs3/BMC/wrfruc/beck/NCO_dirs/ptmp" +#COMINgfs="/lfs1/HFIP/hwrf-data/hafs-input/COMGFS" +#STMP="" +#PTMP="" # # In NCO mode, the user must manually (e.g. after doing the build step) diff --git a/tests/baseline_configs/config.regional_006.sh b/tests/baseline_configs/config.regional_006.sh index bfa1b0f8b..9ad8eb981 100644 --- a/tests/baseline_configs/config.regional_006.sh +++ b/tests/baseline_configs/config.regional_006.sh @@ -51,7 +51,6 @@ RUN_TASK_MAKE_SFC_CLIMO="FALSE" SFC_CLIMO_DIR="/scratch2/BMC/det/FV3SAR_pregen/sfc_climo/GSD_HRRR25km" #On Jet -#GRID_DIR="/lfs3/projects/wrfruc/beck/FV3SAR_pregen/grid/GSD_HRRR25km" -#OROG_DIR="/lfs3/projects/wrfruc/beck/FV3SAR_pregen/orog/GSD_HRRR25km" -#SFC_CLIMO_DIR="/lfs3/projects/wrfruc/beck/FV3SAR_pregen/sfc_climo/GSD_HRRR25km" - +#GRID_DIR="" +#OROG_DIR="" +#SFC_CLIMO_DIR="" diff --git a/tests/baseline_configs/config.regional_009.sh b/tests/baseline_configs/config.regional_009.sh index ff4515a01..935039f60 100644 --- a/tests/baseline_configs/config.regional_009.sh +++ b/tests/baseline_configs/config.regional_009.sh @@ -105,8 +105,8 @@ PTMP="/scratch2/BMC/det/Gerard.Ketefian/UFS_CAM/NCO_dirs/ptmp" #On Jet: #COMINgfs="/lfs1/projects/hwrf-data/hafs-input/COMGFS" -#STMP="/lfs3/BMC/wrfruc/beck/NCO_dirs/stmp" -#PTMP="/lfs3/BMC/wrfruc/beck/NCO_dirs/ptmp" +#STMP="" +#PTMP="" # # In NCO mode, the user must manually (e.g. after doing the build step) diff --git a/ush/load_fv3gfs_modules.sh b/ush/load_fv3gfs_modules.sh index e48f1af47..f95b0237a 100755 --- a/ush/load_fv3gfs_modules.sh +++ b/ush/load_fv3gfs_modules.sh @@ -12,7 +12,7 @@ source "$HOMEgfs/modulefiles/module-setup.sh.inc" # Load our modules: module use "$HOMEgfs/modulefiles" -if [[ -d /lfs3 ]] ; then +if [[ -d /lfs4 ]] ; then # We are on NOAA Jet module load module_base.jet elif [[ -d /scratch3 ]] ; then diff --git a/ush/setup.sh b/ush/setup.sh index 5d61fb9f5..5aff206f4 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -664,7 +664,7 @@ case $MACHINE in ;; "JET") - FIXgsm="/lfs3/projects/hpc-wof1/ywang/regional_fv3/fix/fix_am" + FIXgsm="/lfs4/HFIP/gsd-fv3-hfip/FV3/fix/fix_am" SFC_CLIMO_INPUT_DIR="/lfs1/HFIP/hwrf-data/git/fv3gfs/fix/fix_sfc_climo" ;; From 43722f863b0bbff0868d26beb7ba3ec2aed697d2 Mon Sep 17 00:00:00 2001 From: "Jeff.Beck" Date: Wed, 10 Jun 2020 21:35:41 +0000 Subject: [PATCH 2/9] Add Ben and Ratko to the CODEOWNERS file --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 633d0445b..40196de74 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,7 +3,7 @@ # These owners will be the default owners for everything in the repo. #* @defunkt -* @JulieSchramm @mkavulich @gsketefian @JeffBeck-NOAA +* @JulieSchramm @mkavulich @gsketefian @JeffBeck-NOAA @RatkoVasic-NOAA @BenjaminBlake-NOAA # Order is important. The last matching pattern has the most precedence. # So if a pull request only touches javascript files, only these owners From 6f3e29428c27d502a6cd240a32b67dace460cbd1 Mon Sep 17 00:00:00 2001 From: "Jeff.Beck" Date: Thu, 11 Jun 2020 19:44:15 +0000 Subject: [PATCH 3/9] Replace hard-coded make_orog module file with build-level module file in UFS_UTILS --- modulefiles/tasks/jet/make_orog.hardcoded | 9 --------- ush/generate_FV3SAR_wflow.sh | 5 ++--- 2 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 modulefiles/tasks/jet/make_orog.hardcoded diff --git a/modulefiles/tasks/jet/make_orog.hardcoded b/modulefiles/tasks/jet/make_orog.hardcoded deleted file mode 100644 index 128da319a..000000000 --- a/modulefiles/tasks/jet/make_orog.hardcoded +++ /dev/null @@ -1,9 +0,0 @@ -#%Module##################################################### -## Module file for make_orog task. -############################################################# - -module purge -# Loading Intel Compiler Suite -module load intel/18.0.5.274 -module load netcdf/4.7.0 -module load hdf5/1.10.5 diff --git a/ush/generate_FV3SAR_wflow.sh b/ush/generate_FV3SAR_wflow.sh index 79b97eae8..1f59eb540 100755 --- a/ush/generate_FV3SAR_wflow.sh +++ b/ush/generate_FV3SAR_wflow.sh @@ -237,9 +237,8 @@ cd_vrfy "${MODULES_DIR}/tasks/$machine" # that is defined. That needs to be fixed. Until then, we have to use # a hard-coded module file, which may or may not be compatible with the # modules used in the UFS_UTILS repo to build the orog code. -#ln_vrfy -fs "${UFS_UTILS_DIR}/modulefiles/fv3gfs/orog.$machine" \ -# "${MAKE_OROG_TN}" -ln_vrfy -fs "${MAKE_OROG_TN}.hardcoded" "${MAKE_OROG_TN}" +ln_vrfy -fs "${UFS_UTILS_DIR}/modulefiles/fv3gfs/orog.$machine" \ + "${MAKE_OROG_TN}" ln_vrfy -fs "${UFS_UTILS_DIR}/modulefiles/modulefile.sfc_climo_gen.$machine" \ "${MAKE_SFC_CLIMO_TN}" From bf87e023386f7afb958655f6774c256e7d0856fc Mon Sep 17 00:00:00 2001 From: "Jeff.Beck" Date: Thu, 11 Jun 2020 19:47:22 +0000 Subject: [PATCH 4/9] Remove hard-coded make_sfc_climo module file --- modulefiles/tasks/jet/make_sfc_climo.hardcoded | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 modulefiles/tasks/jet/make_sfc_climo.hardcoded diff --git a/modulefiles/tasks/jet/make_sfc_climo.hardcoded b/modulefiles/tasks/jet/make_sfc_climo.hardcoded deleted file mode 100644 index 3e06d3e73..000000000 --- a/modulefiles/tasks/jet/make_sfc_climo.hardcoded +++ /dev/null @@ -1,12 +0,0 @@ -#%Module##################################################### -## Module file for make_sfc_climo task. -############################################################# - -module purge - -module load intel/18.0.5.274 -module load impi/2018.0.4 - -module use -a /scratch1/NCEPDEV/global/gwv/l819/lib/modulefiles -module load esmflocal/8_0_48b.netcdf47 - From a5397683de0a3d6688f8674f5d11d148f023206f Mon Sep 17 00:00:00 2001 From: jeff beck Date: Tue, 18 Aug 2020 05:35:39 +0000 Subject: [PATCH 5/9] Fixes after updating fork with authoritative repo --- scripts/exregional_make_ics.sh | 261 +++++++++++++------------------- scripts/exregional_make_lbcs.sh | 166 ++++++-------------- ush/config_defaults.sh | 12 +- 3 files changed, 164 insertions(+), 275 deletions(-) diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 0da673482..4dcaac7ef 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -42,21 +42,20 @@ print_info_msg " Entering script: \"${scrfunc_fn}\" In directory: \"${scrfunc_dir}\" -This is the ex-script for the task that generates initial condition -(IC), surface, and zeroth hour lateral boundary condition (LBC0) files +This is the ex-script for the task that generates initial condition +(IC), surface, and zeroth hour lateral boundary condition (LBC0) files for FV3 (in NetCDF format). ========================================================================" # #----------------------------------------------------------------------- # -# Specify the set of valid argument names for this script/function. Then -# process the arguments provided to this script/function (which should +# Specify the set of valid argument names for this script/function. Then +# process the arguments provided to this script/function (which should # consist of a set of name-value pairs of the form arg1="value1", etc). # #----------------------------------------------------------------------- # valid_args=( \ -"wgrib2_dir" \ "ics_dir" \ "APRUN" \ ) @@ -71,10 +70,10 @@ process_args valid_args "$@" #----------------------------------------------------------------------- # print_input_args valid_args -# -#----------------------------------------------------------------------- -# -# Source the file containing definitions of variables associated with the +# +#----------------------------------------------------------------------- +# +# Source the file containing definitions of variables associated with the # external model for ICs. # #----------------------------------------------------------------------- @@ -95,39 +94,30 @@ cd_vrfy $workdir # #----------------------------------------------------------------------- # -# Set physics-suite-dependent variables that are needed in the FORTRAN -# namelist file that the chgres executable will read in. +# Set physics-suite-dependent variable mapping table needed in the FORTRAN +# namelist file that the chgres_cube executable will read in. # #----------------------------------------------------------------------- # -phys_suite="" +varmap_file="" case "${CCPP_PHYS_SUITE}" in -"FV3_GFS_2017_gfdlmp" | "FV3_GFS_2017_gfdlmp_regional" ) - phys_suite="GFS" +"FV3_GFS_2017_gfdlmp" | "FV3_GFS_2017_gfdlmp_regional" | "FV3_GFS_v16beta" | \ +"FV3_GFS_v15p2" ) + varmap_file="GFSphys_var_map.txt" ;; "FV3_GSD_v0" | "FV3_GSD_SAR" | "FV3_GSD_SAR_v1" |"FV3_RRFS_v0" ) - phys_suite="GSD" - ;; -"FV3_CPT_v0") - phys_suite="CPT" - ;; -"FV3_GFS_v15p2") - phys_suite="v15p2" - ;; -"FV3_GFS_v16beta") - phys_suite="v16beta" + varmap_file="GSDphys_var_map.txt" ;; *) print_err_msg_exit "\ -Physics-suite-dependent namelist variables have not yet been specified -for this physics suite: +A variable mapping table has not yet been defined for this physics suite: CCPP_PHYS_SUITE = \"${CCPP_PHYS_SUITE}\"" ;; esac -# + #----------------------------------------------------------------------- # # Set external-model-dependent variables that are needed in the FORTRAN @@ -136,7 +126,7 @@ esac # subset of these all variables are set (since some may be irrelevant). # # external_model: -# Name of the external model from which we are obtaining the fields +# Name of the external model from which we are obtaining the fields # needed to generate the ICs. # # fn_atm_nemsio: @@ -150,22 +140,22 @@ esac # input_type: # The "type" of input being provided to chgres. This contains a combi- # nation of information on the external model, external model file for- -# mat, and maybe other parameters. For clarity, it would be best to +# mat, and maybe other parameters. For clarity, it would be best to # eliminate this variable in chgres and replace with with 2 or 3 others # (e.g. extrn_mdl, extrn_mdl_file_format, etc). -# +# # tracers_input: # List of atmospheric tracers to read in from the external model file # containing these tracers. # # tracers: -# Names to use in the output NetCDF file for the atmospheric tracers +# Names to use in the output NetCDF file for the atmospheric tracers # specified in tracers_input. With the possible exception of GSD phys- # ics, the elements of this array should have a one-to-one correspond- # ence with the elements in tracers_input, e.g. if the third element of # tracers_input is the name of the O3 mixing ratio, then the third ele- # ment of tracers should be the name to use for the O3 mixing ratio in -# the output file. For GSD physics, three additional tracers -- ice, +# the output file. For GSD physics, three additional tracers -- ice, # rain, and water number concentrations -- may be specified at the end # of tracers, and these will be calculated by chgres. # @@ -174,27 +164,29 @@ esac # face model (LSM) variables available in the HRRRX grib2 files created # after about 2019111500. # -# numsoil_out: +# nsoill_out: # The number of soil layers to include in the output NetCDF file. # -# replace_FIELD, where FIELD="vgtyp", "sotyp", or "vgfrc": -# Logical variable indicating whether or not to obtain the field in +# FIELD_from_climo, where FIELD = "vgtyp", "sotyp", "vgfrc", "lai", or +# "minmax_vgfrc": +# Logical variable indicating whether or not to obtain the field in # question from climatology instead of the external model. The field in # question is one of vegetation type (FIELD="vgtyp"), soil type (FIELD= -# "sotyp"), and vegetation fraction (FIELD="vgfrc"). If replace_FIELD -# is set to ".true.", then the field is obtained from climatology (re- -# gardless of whether or not it exists in an external model file). If -# it is set to ".false.", then the field is obtained from the external -# model. If the external model file does not provide this field, then -# chgres prints out an error message and stops. +# "sotyp"), vegetation fraction (FIELD="vgfrc"), leaf area index +# (FIELD="lai"), or min/max areal fractional coverage of annual green +# vegetation (FIELD="minmax_vfrr"). If FIELD_from_climo is set to +# ".true.", then the field is obtained from climatology (regardless of +# whether or not it exists in an external model file). If it is set +# to ".false.", then the field is obtained from the external model. +# If "false" is chosen and the external model file does not provide +# this field, then chgres_cube prints out an error message and stops. # # tg3_from_soil: # Logical variable indicating whether or not to set the tg3 soil tempe- # Needs to be verified. -# rature field to the temperature of the deepest soil layer. +# rature field to the temperature of the deepest soil layer. # #----------------------------------------------------------------------- # - # GSK comments about chgres: # # The following are the three atmsopheric tracers that are in the atmo- @@ -228,7 +220,6 @@ esac # A non-prognostic variable that appears in the field_table for GSD physics # is cld_amt. Why is that in the field_table at all (since it is a non- # prognostic field), and how should we handle it here?? - # I guess this works for FV3GFS but not for the spectral GFS since these # variables won't exist in the spectral GFS atmanl files. # tracers_input="\"sphum\",\"liq_wat\",\"ice_wat\",\"rainwat\",\"snowwat\",\"graupel\",\"o3mr\"" @@ -243,12 +234,13 @@ fn_grib2="" input_type="" tracers_input="\"\"" tracers="\"\"" -internal_GSD="" -numsoil_out="" +nsoill_out="" geogrid_file_input_grid="\"\"" -replace_vgtyp="" -replace_sotyp="" -replace_vgfrc="" +vgtyp_from_climo="" +sotyp_from_climo="" +vgfrc_from_climo="" +minmax_vgfrc_from_climo="" +lai_from_climo="" tg3_from_soil="" convert_nst="" @@ -262,16 +254,17 @@ case "${EXTRN_MDL_NAME_ICS}" in fn_atm_nemsio="${EXTRN_MDL_FNS[0]}" fn_sfc_nemsio="${EXTRN_MDL_FNS[1]}" - input_type="gfs_gaussian" # For spectral GFS Gaussian grid in nemsio format. + input_type="gfs_gaussian_nemsio" # For spectral GFS Gaussian grid in nemsio format. tracers_input="[\"spfh\",\"clwmr\",\"o3mr\"]" tracers="[\"sphum\",\"liq_wat\",\"o3mr\"]" - internal_GSD=False - numsoil_out="4" - replace_vgtyp=True - replace_sotyp=True - replace_vgfrc=True + nsoill_out="4" + vgtyp_from_climo=True + sotyp_from_climo=True + vgfrc_from_climo=True + minmax_vgfrc_from_climo=True + lai_from_climo=True tg3_from_soil=False convert_nst=False @@ -286,7 +279,8 @@ case "${EXTRN_MDL_NAME_ICS}" in fn_atm_nemsio="${EXTRN_MDL_FNS[0]}" fn_sfc_nemsio="${EXTRN_MDL_FNS[1]}" - input_type="gaussian" # For FV3-GFS Gaussian grid in nemsio format. + input_type="gaussian_nemsio" # For FV3-GFS Gaussian grid in nemsio format. + convert_nst=True tracers_input="[\"spfh\",\"clwmr\",\"o3mr\",\"icmr\",\"rwmr\",\"snmr\",\"grle\"]" @@ -326,16 +320,17 @@ case "${EXTRN_MDL_NAME_ICS}" in fn_grib2="${EXTRN_MDL_FNS[0]}" input_type="grib2" + convert_nst=False fi - internal_GSD=False - numsoil_out="4" - replace_vgtyp=True - replace_sotyp=True - replace_vgfrc=True + nsoill_out="4" + vgtyp_from_climo=True + sotyp_from_climo=True + vgfrc_from_climo=True + minmax_vgfrc_from_climo=True + lai_from_climo=True tg3_from_soil=False - convert_nst=True ;; @@ -347,18 +342,6 @@ case "${EXTRN_MDL_NAME_ICS}" in fn_grib2="${EXTRN_MDL_FNS[0]}" input_type="grib2" - internal_GSD=False - cdate_min_HRRRX="2019111500" - if [ "${CCPP_PHYS_SUITE}" = "FV3_GSD_v0" -o \ - "${CCPP_PHYS_SUITE}" = "FV3_GSD_SAR" ] && \ - [ ${CDATE} -gt ${cdate_min_HRRRX} ]; then - print_info_msg " -Setting the chgres_cube namelist setting \"internal_GSD\" to \".true.\" in -order to read in land surface model (LSM) variables available in the -HRRRX grib2 files created after about \"${cdate_min_HRRRX}\"..." - internal_GSD=True - fi - if [ "${USE_CCPP}" = "TRUE" ]; then if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp" ] || \ [ "${CCPP_PHYS_SUITE}" = "FV3_GSD_SAR_v1" ] || \ @@ -366,10 +349,10 @@ HRRRX grib2 files created after about \"${cdate_min_HRRRX}\"..." [ "${CCPP_PHYS_SUITE}" = "FV3_CPT_v0" ] || \ [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_v15p2" ] || \ [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_v16beta" ]; then - numsoil_out="4" + nsoill_out="4" elif [ "${CCPP_PHYS_SUITE}" = "FV3_GSD_v0" ] || \ [ "${CCPP_PHYS_SUITE}" = "FV3_GSD_SAR" ]; then - numsoil_out="9" + nsoill_out="9" fi fi # @@ -381,9 +364,15 @@ HRRRX grib2 files created after about \"${cdate_min_HRRRX}\"..." geogrid_file_input_grid="/misc/whome/rtrr/HRRR/static/WPS/geo_em.d01.nc" fi - replace_vgtyp=False - replace_sotyp=False - replace_vgfrc=False + + #Note that vgfrc, shdmin/shdmax (minmax_vgfrc), and lai fields are only available in HRRRX + #files after mid-July 2019, and only so long as the record order didn't change afterward + + vgtyp_from_climo=False + sotyp_from_climo=False + vgfrc_from_climo=False + minmax_vgfrc_from_climo=False + lai_from_climo=False tg3_from_soil=True convert_nst=False @@ -396,8 +385,6 @@ HRRRX grib2 files created after about \"${cdate_min_HRRRX}\"..." fn_grib2="${EXTRN_MDL_FNS[0]}" input_type="grib2" - internal_GSD=False - if [ "${USE_CCPP}" = "TRUE" ]; then if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp" ] || \ [ "${CCPP_PHYS_SUITE}" = "FV3_CPT_v0" ] || \ @@ -405,10 +392,10 @@ HRRRX grib2 files created after about \"${cdate_min_HRRRX}\"..." [ "${CCPP_PHYS_SUITE}" = "FV3_RRFS_v0" ] || \ [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_v15p2" ] || \ [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_v16beta" ]; then - numsoil_out="4" + nsoill_out="4" elif [ "${CCPP_PHYS_SUITE}" = "FV3_GSD_v0" ] || \ [ "${CCPP_PHYS_SUITE}" = "FV3_GSD_SAR" ]; then - numsoil_out="9" + nsoill_out="9" fi fi # @@ -420,9 +407,11 @@ HRRRX grib2 files created after about \"${cdate_min_HRRRX}\"..." geogrid_file_input_grid="/misc/whome/rtrr/HRRR/static/WPS/geo_em.d01.nc" fi - replace_vgtyp=False - replace_sotyp=False - replace_vgfrc=False + vgtyp_from_climo=True + sotyp_from_climo=False + vgfrc_from_climo=True + minmax_vgfrc_from_climo=True + lai_from_climo=True tg3_from_soil=True convert_nst=False @@ -430,7 +419,7 @@ HRRRX grib2 files created after about \"${cdate_min_HRRRX}\"..." *) print_err_msg_exit "\ -External-model-dependent namelist variables have not yet been specified +External-model-dependent namelist variables have not yet been specified for this external model: EXTRN_MDL_NAME_ICS = \"${EXTRN_MDL_NAME_ICS}\"" ;; @@ -454,14 +443,14 @@ hh="${EXTRN_MDL_CDATE:8:2}" #----------------------------------------------------------------------- # exec_fn="chgres_cube.exe" -exec_fp="$EXECDIR/${exec_fn}" -if [ ! -f "${exec_fp}" ]; then - print_err_msg_exit "\ +exec_fp="$EXECDIR/${exec_fn}" +if [ ! -f "${exec_fp}" ]; then + print_err_msg_exit "\ The executable (exec_fp) for generating initial conditions on the FV3SAR -native grid does not exist: - exec_fp = \"${exec_fp}\" -Please ensure that you've built this executable." -fi +native grid does not exist: + exec_fp = \"${exec_fp}\" +Please ensure that you've built this executable." +fi # #----------------------------------------------------------------------- # @@ -469,45 +458,6 @@ fi # #----------------------------------------------------------------------- # -# For GFS physics, the character arrays tracers_input(:) and tracers(:) -# must be specified in the namelist file. tracers_input(:) contains the -# tracer name to look for in the external model file(s), while tracers(:) -# contains the names to use for the tracers in the output NetCDF files -# that chgres creates (that will be read in by FV3). Since when FV3 -# reads these NetCDF files it looks for atmospheric traces as specified -# in the file field_table, tracers(:) should be set to the names in -# field_table. -# -# NOTE: This process should be automated where the set of elements that -# tracers(:) should be set to is obtained from reading in field_table. -# -# To know how to set tracers_input(:), you have to know the names of the -# variables in the input atmospheric nemsio file (usually this file is -# named gfs.t00z.atmanl.nemsio). -# -# It is not quite clear how these should be specified. Here are a list -# of examples: -# -# [Gerard.Ketefian@tfe05] /scratch3/.../chgres_cube.fd/run (feature/chgres_grib2_gsk) -# $ grep -n -i "tracers" * | grep theia -# config.C1152.l91.atm.theia.nml:24: tracers="sphum","liq_wat","o3mr","ice_wat","rainwat","snowwat","graupel" -# config.C1152.l91.atm.theia.nml:25: tracers_input="sphum","liq_wat","o3mr","ice_wat","rainwat","snowwat","graupel" -# config.C48.gaussian.theia.nml:20: tracers="sphum","liq_wat","o3mr","ice_wat","rainwat","snowwat","graupel" -# config.C48.gaussian.theia.nml:21: tracers_input="spfh","clwmr","o3mr","icmr","rwmr","snmr","grle" -# config.C48.gfs.gaussian.theia.nml:21: tracers="sphum","liq_wat","o3mr" -# config.C48.gfs.gaussian.theia.nml:22: tracers_input="spfh","clwmr","o3mr" -# config.C48.gfs.spectral.theia.nml:21: tracers_input="spfh","o3mr","clwmr" -# config.C48.gfs.spectral.theia.nml:22: tracers="sphum","o3mr","liq_wat" -# config.C48.theia.nml:21: tracers="sphum","liq_wat","o3mr" -# config.C48.theia.nml:22: tracers_input="spfh","clwmr","o3mr" -# config.C768.atm.theia.nml:24: tracers="sphum","liq_wat","o3mr","ice_wat","rainwat","snowwat","graupel" -# config.C768.atm.theia.nml:25: tracers_input="sphum","liq_wat","o3mr","ice_wat","rainwat","snowwat","graupel" -# config.C768.l91.atm.theia.nml:24: tracers="sphum","liq_wat","o3mr","ice_wat","rainwat","snowwat","graupel" -# config.C768.l91.atm.theia.nml:25: tracers_input="sphum","liq_wat","o3mr","ice_wat","rainwat","snowwat","graupel" -# config.C768.nest.atm.theia.nml:22: tracers="sphum","liq_wat","o3mr","ice_wat","rainwat","snowwat","graupel" -# config.C768.nest.atm.theia.nml:23: tracers_input="sphum","liq_wat","o3mr","ice_wat","rainwat","snowwat","graupel" - - # fix_dir_target_grid="${BASEDIR}/JP_grid_HRRR_like_fix_files_chgres_cube" # base_install_dir="${SORCDIR}/chgres_cube.fd" @@ -520,38 +470,37 @@ fi # settings=" 'config': { + 'fix_dir_input_grid': ${UFS_UTILS_DIR}/fix/fix_chgres, 'fix_dir_target_grid': ${FIXsar}, - 'mosaic_file_target_grid': ${FIXsar}/${CRES}${DOT_OR_USCORE}mosaic.halo${NH4}.nc, + 'mosaic_file_target_grid': ${FIXsar}/${CRES}${DOT_OR_USCORE}mosaic.halo$((10#${NH4})).nc, 'orog_dir_target_grid': ${FIXsar}, - 'orog_files_target_grid': ${CRES}${DOT_OR_USCORE}oro_data.tile${TILE_RGNL}.halo${NH4}.nc, + 'orog_files_target_grid': ${CRES}${DOT_OR_USCORE}oro_data.tile${TILE_RGNL}.halo$((10#${NH4})).nc, 'vcoord_file_target_grid': ${FIXam}/global_hyblev.l65.txt, - 'mosaic_file_input_grid': '', - 'orog_dir_input_grid': '', - 'base_install_dir': ${CHGRES_DIR}, - 'wgrib2_path': ${wgrib2_dir}, + 'varmap_file': ${UFS_UTILS_DIR}/parm/varmap_tables/${varmap_file}, 'data_dir_input_grid': ${extrn_mdl_staging_dir}, 'atm_files_input_grid': ${fn_atm_nemsio}, 'sfc_files_input_grid': ${fn_sfc_nemsio}, 'grib2_file_input_grid': \"${fn_grib2}\", - 'cycle_mon': $((10#$mm)), - 'cycle_day': $((10#$dd)), - 'cycle_hour': $((10#$hh)), + 'cycle_mon': $((10#${mm})), + 'cycle_day': $((10#${dd})), + 'cycle_hour': $((10#${hh})), 'convert_atm': True, 'convert_sfc': True, 'convert_nst': ${convert_nst}, 'regional': 1, - 'halo_bndy': ${NH4}, + 'halo_bndy': $((10#${NH4})), + 'halo_blend': $((10#${HALO_BLEND})), 'input_type': ${input_type}, 'external_model': ${external_model}, 'tracers_input': ${tracers_input}, - 'tracers': ${tracers}, - 'phys_suite': ${phys_suite}, - 'internal_GSD': ${internal_GSD}, - 'numsoil_out': ${numsoil_out}, + 'tracers': ${tracers}, + 'nsoill_out': $((10#${nsoill_out})), 'geogrid_file_input_grid': ${geogrid_file_input_grid}, - 'replace_vgtyp': ${replace_vgtyp}, - 'replace_sotyp': ${replace_sotyp}, - 'replace_vgfrc': ${replace_vgfrc}, + 'vgtyp_from_climo': ${vgtyp_from_climo}, + 'sotyp_from_climo': ${sotyp_from_climo}, + 'vgfrc_from_climo': ${vgfrc_from_climo}, + 'minmax_vgfrc_from_climo': ${minmax_vgfrc_from_climo}, + 'lai_from_climo': ${lai_from_climo}, 'tg3_from_soil': ${tg3_from_soil}, } " @@ -561,8 +510,8 @@ settings=" nml_fn="fort.41" ${USHDIR}/set_namelist.py -q -u "$settings" -o ${nml_fn} || \ print_err_msg_exit "\ -Call to python script set_namelist.py to set the variables in the namelist -file read in by the ${exec_fn} executable failed. Parameters passed to +Call to python script set_namelist.py to set the variables in the namelist +file read in by the ${exec_fn} executable failed. Parameters passed to this script are: Name of output namelist file: nml_fn = \"${nml_fn}\" @@ -580,13 +529,13 @@ $settings" # Often when the chgres_cube.exe run fails, it still returns a zero re- # turn code, so the failure isn't picked up the the logical OR (||) be- # low. That should be fixed. This might be due to the APRUN command - -# maybe that is returning a zero exit code even though the exit code +# maybe that is returning a zero exit code even though the exit code # of chgres_cube is nonzero. # A similar thing happens in the forecast task. # ${APRUN} ${exec_fp} || \ print_err_msg_exit "\ -Call to executable (exec_fp) to generate surface and initial conditions +Call to executable (exec_fp) to generate surface and initial conditions (ICs) files for the FV3SAR failed: exec_fp = \"${exec_fp}\" The external model from which the ICs files are to be generated is: @@ -598,7 +547,7 @@ located in the following directory: #----------------------------------------------------------------------- # # Move initial condition, surface, control, and 0-th hour lateral bound- -# ary files to ICs_BCs directory. +# ary files to ICs_BCs directory. # #----------------------------------------------------------------------- # @@ -610,7 +559,7 @@ mv_vrfy out.sfc.tile${TILE_RGNL}.nc \ mv_vrfy gfs_ctrl.nc ${ics_dir} -mv_vrfy gfs_bndy.nc ${ics_dir}/gfs_bndy.tile${TILE_RGNL}.000.nc +mv_vrfy gfs.bndy.nc ${ics_dir}/gfs_bndy.tile${TILE_RGNL}.000.nc # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index d9a837439..17a5bb5a6 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -49,15 +49,14 @@ hour zero). # #----------------------------------------------------------------------- # -# Specify the set of valid argument names for this script/function. Then -# process the arguments provided to this script/function (which should +# Specify the set of valid argument names for this script/function. Then +# process the arguments provided to this script/function (which should # consist of a set of name-value pairs of the form arg1="value1", etc). # #----------------------------------------------------------------------- # valid_args=( \ "lbcs_dir" \ -"wgrib2_dir" \ "APRUN" \ ) process_args valid_args "$@" @@ -95,34 +94,25 @@ cd_vrfy $workdir # #----------------------------------------------------------------------- # -# Set physics-suite-dependent variables that are needed in the FORTRAN -# namelist file that the chgres executable will read in. +# Set physics-suite-dependent variable mapping table needed in the FORTRAN +# namelist file that the chgres_cube executable will read in. # #----------------------------------------------------------------------- # -phys_suite="" +varmap_file="" case "${CCPP_PHYS_SUITE}" in -"FV3_GFS_2017_gfdlmp" | "FV3_GFS_2017_gfdlmp_regional") - phys_suite="GFS" - ;; -"FV3_GSD_v0" | "FV3_GSD_SAR" | "FV3_GSD_SAR_v1" | "FV3_RRFS_v0" ) - phys_suite="GSD" - ;; -"FV3_CPT_v0" ) - phys_suite="CPT" - ;; +"FV3_GFS_2017_gfdlmp" | "FV3_GFS_2017_gfdlmp_regional" | "FV3_GFS_v16beta" | \ "FV3_GFS_v15p2" ) - phys_suite="v15p2" + varmap_file="GFSphys_var_map.txt" ;; -"FV3_GFS_v16beta" ) - phys_suite="v16beta" +"FV3_GSD_v0" | "FV3_GSD_SAR" | "FV3_GSD_SAR_v1" |"FV3_RRFS_v0" ) + varmap_file="GSDphys_var_map.txt" ;; *) print_err_msg_exit "\ -Physics-suite-dependent namelist variables have not yet been specified -for this physics suite: +A variable mapping table has not yet been defined for this physics suite: CCPP_PHYS_SUITE = \"${CCPP_PHYS_SUITE}\"" ;; @@ -136,9 +126,13 @@ esac # subset of these all variables are set (since some may be irrelevant). # # external_model: -# Name of the external model from which we are obtaining the fields +# Name of the external model from which we are obtaining the fields # needed to generate the LBCs. # +# fn_atm_nemsio: +# Name (not including path) of the nemsio file generated by the external +# model that contains the atmospheric fields. +# # fn_sfc_nemsio: # Name (not including path) of the nemsio file generated by the external # model that contains the surface fields. @@ -146,7 +140,7 @@ esac # input_type: # The "type" of input being provided to chgres. This contains a combi- # nation of information on the external model, external model file for- -# mat, and maybe other parameters. For clarity, it would be best to +# mat, and maybe other parameters. For clarity, it would be best to # eliminate this variable in chgres and replace with with 2 or 3 others # (e.g. extrn_mdl, extrn_mdl_file_format, etc). # @@ -165,24 +159,6 @@ esac # rain, and water number concentrations -- may be specified at the end # of tracers, and these will be calculated by chgres. # -# numsoil_out: -# The number of soil layers to include in the output NetCDF file. -# -# replace_FIELD, where FIELD="vgtyp", "sotyp", or "vgfrc": -# Logical variable indicating whether or not to obtain the field in -# question from climatology instead of the external model. The field in -# question is one of vegetation type (FIELD="vgtyp"), soil type (FIELD= -# "sotyp"), and vegetation fraction (FIELD="vgfrc"). If replace_FIELD -# is set to ".true.", then the field is obtained from climatology (re- -# gardless of whether or not it exists in an external model file). If -# it is set to ".false.", then the field is obtained from the external -# model. If the external model file does not provide this field, then -# chgres prints out an error message and stops. -# -# tg3_from_soil: -# Logical variable indicating whether or not to set the tg3 soil tempe- # Needs to be verified. -# rature field to the temperature of the deepest soil layer. -# #----------------------------------------------------------------------- # @@ -235,13 +211,6 @@ fn_grib2="" input_type="" tracers_input="\"\"" tracers="\"\"" -numsoil_out="" -geogrid_file_input_grid="\"\"" -replace_vgtyp="" -replace_sotyp="" -replace_vgfrc="" -tg3_from_soil="" - case "${EXTRN_MDL_NAME_LBCS}" in @@ -250,17 +219,11 @@ case "${EXTRN_MDL_NAME_LBCS}" in external_model="GSMGFS" - input_type="gfs_gaussian" # For spectral GFS Gaussian grid in nemsio format. + input_type="gfs_gaussian_nemsio" # For spectral GFS Gaussian grid in nemsio format. tracers_input="[\"spfh\",\"clwmr\",\"o3mr\"]" tracers="[\"sphum\",\"liq_wat\",\"o3mr\"]" - numsoil_out="4" - replace_vgtyp=".true." - replace_sotyp=".true." - replace_vgfrc=".true." - tg3_from_soil=".false." - ;; @@ -270,7 +233,7 @@ case "${EXTRN_MDL_NAME_LBCS}" in external_model="FV3GFS" - input_type="gaussian" # For FV3-GFS Gaussian grid in nemsio format. + input_type="gaussian_nemsio" # For FV3-GFS Gaussian grid in nemsio format. tracers_input="[\"spfh\",\"clwmr\",\"o3mr\",\"icmr\",\"rwmr\",\"snmr\",\"grle\"]" # @@ -307,45 +270,19 @@ case "${EXTRN_MDL_NAME_LBCS}" in external_model="GFS" - input_type="grib2" fn_grib2="${EXTRN_MDL_FNS[0]}" + input_type="grib2" fi - numsoil_out="4" - replace_vgtyp=".true." - replace_sotyp=".true." - replace_vgfrc=".true." - tg3_from_soil=".false." - ;; "RAPX") external_model="RAP" - input_type="grib2" - if [ "${USE_CCPP}" = "TRUE" ]; then - if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp" ] || \ - [ "${CCPP_PHYS_SUITE}" = "FV3_CPT_v0" ] || \ - [ "${CCPP_PHYS_SUITE}" = "FV3_GSD_SAR_v1" ] || \ - [ "${CCPP_PHYS_SUITE}" = "FV3_RRFS_v0" ] || \ - [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_v15p2" ] || \ - [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_v16beta" ]; then - numsoil_out="4" - elif [ "${CCPP_PHYS_SUITE}" = "FV3_GSD_v0" ] || \ - [ "${CCPP_PHYS_SUITE}" = "FV3_GSD_SAR" ]; then - numsoil_out="9" - fi - fi - - replace_vgtyp=".false." - replace_sotyp=".false." - replace_vgfrc=".false." - tg3_from_soil=".true." - ;; @@ -417,8 +354,8 @@ list file has not specified for this external model: ;; esac # -# Get the starting date (year, month, and day together), month, day, and -# hour of the the external model forecast. Then add the forecast hour +# Get the starting date (year, month, and day together), month, day, and +# hour of the the external model forecast. Then add the forecast hour # to it to get a date and time corresponding to the current forecast time. # yyyymmdd="${EXTRN_MDL_CDATE:0:8}" @@ -428,7 +365,7 @@ list file has not specified for this external model: cdate_crnt_fhr=$( date --utc --date "${yyyymmdd} ${hh} UTC + ${fhr} hours" "+%Y%m%d%H" ) # -# Get the month, day, and hour corresponding to the current forecast time +# Get the month, day, and hour corresponding to the current forecast time # of the the external model. # mm="${cdate_crnt_fhr:4:2}" @@ -437,9 +374,6 @@ list file has not specified for this external model: # # Build the FORTRAN namelist file that chgres_cube will read in. # -# QUESTION: -# Do numsoil_out, ..., tg3_from_soil need to be in this namelist (as -# they are for the ICs namelist)? # # Create a multiline variable that consists of a yaml-compliant string @@ -448,44 +382,40 @@ list file has not specified for this external model: # this variable will be passed to a python script that will create the # namelist file. # - settings=" +settings=" 'config': { + 'fix_dir_input_grid': ${UFS_UTILS_DIR}/fix/fix_chgres, 'fix_dir_target_grid': ${FIXsar}, - 'mosaic_file_target_grid': ${FIXsar}/${CRES}${DOT_OR_USCORE}mosaic.halo${NH4}.nc, + 'mosaic_file_target_grid': ${FIXsar}/${CRES}${DOT_OR_USCORE}mosaic.halo$((10#${NH4})).nc, 'orog_dir_target_grid': ${FIXsar}, - 'orog_files_target_grid': ${CRES}${DOT_OR_USCORE}oro_data.tile7.halo${NH4}.nc, + 'orog_files_target_grid': ${CRES}${DOT_OR_USCORE}oro_data.tile${TILE_RGNL}.halo$((10#${NH4})).nc, 'vcoord_file_target_grid': ${FIXam}/global_hyblev.l65.txt, - 'mosaic_file_input_grid': '', - 'orog_dir_input_grid': '', - 'base_install_dir': ${CHGRES_DIR}, - 'wgrib2_path': ${wgrib2_dir}, + 'varmap_file': ${UFS_UTILS_DIR}/parm/varmap_tables/${varmap_file}, 'data_dir_input_grid': ${extrn_mdl_staging_dir}, 'atm_files_input_grid': ${fn_atm_nemsio}, 'sfc_files_input_grid': ${fn_sfc_nemsio}, 'grib2_file_input_grid': \"${fn_grib2}\", - 'cycle_mon': $((10#$mm)), - 'cycle_day': $((10#$dd)), - 'cycle_hour': $((10#$hh)), + 'cycle_mon': $((10#${mm})), + 'cycle_day': $((10#${dd})), + 'cycle_hour': $((10#${hh})), 'convert_atm': True, - 'convert_sfc': False, - 'convert_nst': False, 'regional': 2, - 'halo_bndy': ${NH4}, + 'halo_bndy': $((10#${NH4})), + 'halo_blend': $((10#${HALO_BLEND})), 'input_type': ${input_type}, 'external_model': ${external_model}, 'tracers_input': ${tracers_input}, 'tracers': ${tracers}, - 'phys_suite': ${phys_suite}, - } +} " # # Call the python script to create the namelist file. # - nml_fn="fort.41" - ${USHDIR}/set_namelist.py -q -u "$settings" -o ${nml_fn} || \ - print_err_msg_exit "\ -Call to python script set_namelist.py to set the variables in the namelist -file read in by the ${exec_fn} executable failed. Parameters passed to +nml_fn="fort.41" +${USHDIR}/set_namelist.py -q -u "$settings" -o ${nml_fn} || \ + print_err_msg_exit "\ +Call to python script set_namelist.py to set the variables in the namelist +file read in by the ${exec_fn} executable failed. Parameters passed to this script are: Name of output namelist file: nml_fn = \"${nml_fn}\" @@ -507,17 +437,17 @@ $settings" # of chgres_cube is nonzero. # A similar thing happens in the forecast task. # - ${APRUN} ${exec_fp} || \ - print_err_msg_exit "\ -Call to executable (exec_fp) to generate lateral boundary conditions (LBCs) -file for the FV3SAR for forecast hour fhr failed: +${APRUN} ${exec_fp} || \ + print_err_msg_exit "\ +Call to executable (exec_fp) to generate surface and initial conditions +(LBCs) files for the FV3SAR failed: exec_fp = \"${exec_fp}\" fhr = \"$fhr\" -The external model from which the LBCs files are to be generated is: - EXTRN_MDL_NAME_LBCS = \"${EXTRN_MDL_NAME_LBCS}\" -The external model files that are inputs to the executable (exec_fp) are -located in the following directory: - extrn_mdl_staging_dir = \"${extrn_mdl_staging_dir}\"" +The external model from which the LBCs files are to be generated is: + EXTRN_MDL_NAME_LBCS = \"${EXTRN_MDL_NAME_LBCS}\" +The external model files that are inputs to the executable (exec_fp) are +located in the following directory: + extrn_mdl_staging_dir = \"${extrn_mdl_staging_dir}\"" # # Move LBCs file for the current lateral boundary update time to the LBCs # work directory. Note that we rename the file by including in its name @@ -525,7 +455,7 @@ located in the following directory: # that of the external model since their start times may be offset). # fcst_hhh_FV3SAR=$( printf "%03d" "${LBC_SPEC_FCST_HRS[$i]}" ) - mv_vrfy gfs_bndy.nc ${lbcs_dir}/gfs_bndy.tile7.${fcst_hhh_FV3SAR}.nc + mv_vrfy gfs.bndy.nc ${lbcs_dir}/gfs_bndy.tile7.${fcst_hhh_FV3SAR}.nc done # diff --git a/ush/config_defaults.sh b/ush/config_defaults.sh index 7f91c0819..bea848666 100644 --- a/ush/config_defaults.sh +++ b/ush/config_defaults.sh @@ -1204,4 +1204,14 @@ SKEB_TSCALE="21600" #Variable "skeb_tau" in input.nml SKEB_INT="3600" #Variable "skebint" in input.nml SKEB_VDOF="10" USE_ZMTNBLCK="false" - +# +#----------------------------------------------------------------------- +# +# HALO_BLEND: +# Number of rows into the computational domain that should be blended +# with the LBCs. +# +#----------------------------------------------------------------------- +# +HALO_BLEND=10 +# From f10d313978bebeeade26aebef14f152f14bfb7ff Mon Sep 17 00:00:00 2001 From: jeff beck Date: Fri, 11 Sep 2020 03:14:23 +0000 Subject: [PATCH 6/9] Set ad-hoc stochastic physics scheme magnitudes to -999.0 when not used to avoid bug with do_sppt/skeb/shum namelist entries --- ush/generate_FV3LAM_wflow.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ush/generate_FV3LAM_wflow.sh b/ush/generate_FV3LAM_wflow.sh index 6d9ce5798..1424463ce 100755 --- a/ush/generate_FV3LAM_wflow.sh +++ b/ush/generate_FV3LAM_wflow.sh @@ -657,6 +657,22 @@ Please change one or more of these parameters or provide a value for lsoil fi # +# Set magnitude of stochastic ad-hoc schemes to -999.0 if they are not +# being used. This is required at the moment, since "do_shum/sppt/skeb" +# does not override the use of the scheme unless the magnitude is also +# specifically set to -999.0. If all "do_shum/sppt/skeb" are set to +# "false," then none will run, regardless of the magnitude values. +# +if [ "${DO_SHUM}" = "false" ]; then + SHUM_MAG=-999.0 +fi +if [ "${DO_SKEB}" = "false" ]; then + SKEB_MAG=-999.0 +fi +if [ "${DO_SPPT}" = "false" ]; then + SPPT_MAG=-999.0 +fi +# # Create a multiline variable that consists of a yaml-compliant string # specifying the values that the namelist variables that are physics- # suite-independent need to be set to. Below, this variable will be From 25491ed7e322bc04db68f7ac2b98cfa70711ef31 Mon Sep 17 00:00:00 2001 From: jeff beck Date: Fri, 11 Sep 2020 03:29:13 +0000 Subject: [PATCH 7/9] Add nrows to input.nml, HALO_BLEND to config_defaults.sh, and apply HALO_BLEND user-defined value during generate step. --- ush/config_defaults.sh | 10 ++++++++++ ush/generate_FV3LAM_wflow.sh | 17 +---------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/ush/config_defaults.sh b/ush/config_defaults.sh index 23254e7da..048fb6348 100644 --- a/ush/config_defaults.sh +++ b/ush/config_defaults.sh @@ -1219,6 +1219,16 @@ SKEB_VDOF="10" USE_ZMTNBLCK="false" # #----------------------------------------------------------------------- +# +# HALO_BLEND: +# Number of rows into the computational domain that should be blended +# with the LBCs. +# +#----------------------------------------------------------------------- +# +HALO_BLEND=10 +# +#----------------------------------------------------------------------- # # GWD_RRFS_v1beta_BASEDIR: # Temporary workflow variable specifies the base directory in which to diff --git a/ush/generate_FV3LAM_wflow.sh b/ush/generate_FV3LAM_wflow.sh index 1424463ce..a2cf6eea6 100755 --- a/ush/generate_FV3LAM_wflow.sh +++ b/ush/generate_FV3LAM_wflow.sh @@ -657,22 +657,6 @@ Please change one or more of these parameters or provide a value for lsoil fi # -# Set magnitude of stochastic ad-hoc schemes to -999.0 if they are not -# being used. This is required at the moment, since "do_shum/sppt/skeb" -# does not override the use of the scheme unless the magnitude is also -# specifically set to -999.0. If all "do_shum/sppt/skeb" are set to -# "false," then none will run, regardless of the magnitude values. -# -if [ "${DO_SHUM}" = "false" ]; then - SHUM_MAG=-999.0 -fi -if [ "${DO_SKEB}" = "false" ]; then - SKEB_MAG=-999.0 -fi -if [ "${DO_SPPT}" = "false" ]; then - SPPT_MAG=-999.0 -fi -# # Create a multiline variable that consists of a yaml-compliant string # specifying the values that the namelist variables that are physics- # suite-independent need to be set to. Below, this variable will be @@ -687,6 +671,7 @@ settings="\ 'fv_core_nml': { 'target_lon': ${LON_CTR}, 'target_lat': ${LAT_CTR}, + 'nrows_blend': ${HALO_BLEND}, # # Question: # For a ESGgrid type grid, what should stretch_fac be set to? This depends From 8a1058595e6d8f4a03c96a3ba53b596c2ed6d164 Mon Sep 17 00:00:00 2001 From: jeff beck Date: Fri, 11 Sep 2020 03:34:44 +0000 Subject: [PATCH 8/9] Add nrows_blend to the template namelist file. --- ush/templates/input.nml.FV3 | 1 + 1 file changed, 1 insertion(+) diff --git a/ush/templates/input.nml.FV3 b/ush/templates/input.nml.FV3 index aa52e07dd..75cc97c8f 100644 --- a/ush/templates/input.nml.FV3 +++ b/ush/templates/input.nml.FV3 @@ -103,6 +103,7 @@ nord = 2 nord_zs_filter = 4 npz = 64 + nrows_blend = 10 ntiles = 1 nudge_qv = .false. nwat = 6 From dc2e6a045009e62d721872266f498cb2e6bb350a Mon Sep 17 00:00:00 2001 From: jeff beck Date: Mon, 14 Sep 2020 22:59:00 +0000 Subject: [PATCH 9/9] Add comment in config_defaults.sh to set HALO_BLEND to zero if the user wants to shut it off. --- ush/config_defaults.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/config_defaults.sh b/ush/config_defaults.sh index 048fb6348..cbdf53505 100644 --- a/ush/config_defaults.sh +++ b/ush/config_defaults.sh @@ -1222,7 +1222,7 @@ USE_ZMTNBLCK="false" # # HALO_BLEND: # Number of rows into the computational domain that should be blended -# with the LBCs. +# with the LBCs. To shut of halo blending, this can be set to zero. # #----------------------------------------------------------------------- #