Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
b5efdda
Add missing user-defined stochastic physics options; fix stochastic p…
JeffBeck-NOAA Mar 23, 2022
ae9b9fa
Add namelist option for netCDF4 when running with the 3-km NA domain;…
JeffBeck-NOAA Mar 23, 2022
6043f9b
Tweaks to allow compiler and build_env_fn to be specified in the run_…
mark-a-potts Mar 23, 2022
a3e0066
Changed 20200304 to 20200303 in ush/mrms_pull_topofhour.py (#712)
michelleharrold Mar 23, 2022
f9b7284
Remove unused rocoto directory in ush (#720)
christinaholtNOAA Mar 31, 2022
6fc29b0
Fix bug for nco we2e tests on Orion; re-organize we2e input data and …
chan-hoo Apr 1, 2022
e943a1b
Added stand-alone verification scripts (feature/issue_683_standaloneV…
michelleharrold Apr 1, 2022
17f0c03
remove machine base logic (#727)
chan-hoo Apr 2, 2022
b9b0a1a
Allow user-defined file names for input template files (#717)
chan-hoo Apr 4, 2022
360435a
Changes to RRFS 3- and 13-km domains, setup.sh script bug fixes, make…
JeffBeck-NOAA Apr 4, 2022
3f83cde
Adding 25 km tests to Jet/Hera suites. (#718)
christinaholtNOAA Apr 4, 2022
af1587a
Add a small 3km predefined grid over Indianapolis for testing (#725)
gsketefian Apr 11, 2022
79645c5
Use Python tool for get_extrnl_mdl_file tasks (#681)
christinaholtNOAA Apr 12, 2022
05099cd
Increase size of RRFS CONUS grid (#724)
BenjaminBlake-NOAA Apr 13, 2022
99d8da9
add include-style quality mark options in metplus confs (#738)
willmayfield Apr 17, 2022
bedca14
Add Gaea as a supported platform for the regional_workflow (#734)
mark-a-potts Apr 22, 2022
e5e0042
Add more parameters to CSV file containing WE2E test info (#740)
gsketefian Apr 22, 2022
1bd9d5f
Update directory structure of NCO mode (#743)
chan-hoo Apr 25, 2022
d013436
Default CCPP physics option is FV3_GFS_v16 (#746)
natalie-perlin Apr 25, 2022
bf0fae9
Adds an alternative python workflow generation path (#698)
danielabdi-noaa Apr 26, 2022
e2fa6fc
Fix typo and crontab issue on wcoss dell in workflow python scripts (…
chan-hoo Apr 28, 2022
b29822c
Add new WE2E configs (#748)
EdwardSnyder-NOAA Apr 28, 2022
c942b84
Added a fixed WoF grid and the python tool to determine the write com…
ywangwof Apr 29, 2022
6800643
Replace env with modulefiles in scripts (#752)
chan-hoo May 2, 2022
bd13e16
WE2E script improvements for usability (#745)
gsketefian May 2, 2022
ef63cc0
Standardize static data across Tier-1 platforms; fix and improve IC a…
mkavulich May 3, 2022
3bd761e
Merge remote-tracking branch 'ufs/develop' into update_rrfs_ci
christinaholtNOAA May 4, 2022
187f16c
Bug fixes (grid size + suppress screen output from module load) (#756)
gsketefian May 5, 2022
00e2155
Update default SPP ISEED array in config_defaults.sh to use unique va…
JeffBeck-NOAA May 9, 2022
89a0c7f
Update workflow python scripts (#760)
chan-hoo May 9, 2022
1ec6851
Change output file name of run_post to meet NCO standards (#758)
chan-hoo May 10, 2022
d4a6d43
Add POST_OUTPUT_DOMAIN_NAME to WE2E tests for new grids (#763)
chan-hoo May 10, 2022
11dc291
Modifications to `CODEOWNERS` file (#757)
gsketefian May 13, 2022
961300d
Adding a python utility for summarizing compute. (#769)
christinaholtNOAA May 16, 2022
23f5d41
Add github actions for python unittests. (#747)
danielabdi-noaa May 16, 2022
86f8b04
Update sample script for NCO mode (#771)
chan-hoo May 17, 2022
737c687
Feature/noaacloud (#767)
mark-a-potts May 19, 2022
fe820b0
removed cheyenne-specific crontab editing section (#773)
mark-a-potts May 19, 2022
de82b63
Pin down hera miniconda3 module file version. (#770)
christinaholtNOAA May 19, 2022
6a6ebfd
update staged data dir (#774)
EdwardSnyder-NOAA May 20, 2022
e973d9b
Merge remote-tracking branch 'ufs/develop' into update_rrfs_ci
christinaholtNOAA May 23, 2022
3d1cac0
update IC/LBC file paths to match new IC/LBC file structure (#766)
EdwardSnyder-NOAA May 26, 2022
39de1f9
add a machine file for MacOS (#777)
natalie-perlin May 26, 2022
32aa6f2
Add columns for relative test and time step to CSV file containing WE…
gsketefian May 31, 2022
bc68419
Bug fix for calculation of number of time steps for a given WE2E test…
gsketefian Jun 1, 2022
320841a
Bugfix: Pass domain name to python plotting scripts (#783)
gsketefian Jun 2, 2022
d45d2ac
Update scripts to work with the latest hashes of UFS_UTILS and UPP (#…
chan-hoo Jun 9, 2022
0884378
adding new e2e tests (#792)
EdwardSnyder-NOAA Jun 10, 2022
7f23e97
[develop] Update scripts to run with the latest hash of ufs weather m…
chan-hoo Jun 23, 2022
27e5723
[develop] Update MET/METplus versions and configuration files (#779)
willmayfield Jun 24, 2022
9e4f638
add a linux.sh machine file (a template) (#798) (#803)
gspetro-NOAA Jun 27, 2022
5359633
[develop] Rename variables related to GFDLgrid-type grids (#787)
gsketefian Jun 27, 2022
de59f5c
Remove un-readable path to systemdir on Hera. (#806)
christinaholtNOAA Jun 30, 2022
2e336c1
[develop] Add MET/METplus to Jet (#799)
EdwardSnyder-NOAA Jul 1, 2022
65bd12b
Merge remote-tracking branch 'ufs/develop' into update_rrfs_ci
christinaholtNOAA Jul 11, 2022
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
27 changes: 27 additions & 0 deletions .github/workflows/python_unittests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python unittests
on: [push, pull_request]
jobs:

python_unittests:
name: Python unittests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Install dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install python3 python3-pip netcdf-bin
sudo pip3 install pyyaml jinja2 f90nml
sudo pip3 install numpy matplotlib basemap

# Run python unittests
- name: Run python unittests
run: |
cd ush
python3 -m unittest -b python_utils/test_python_utils.py
python3 -m unittest -b *.py

260 changes: 97 additions & 163 deletions jobs/JREGIONAL_GET_EXTRN_MDL_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@
#
#-----------------------------------------------------------------------
#
# Source the file defining the function that will be used to set various
# external-model-associated variables.
#
#-----------------------------------------------------------------------
#
. $USHDIR/get_extrn_mdl_file_dir_info.sh
#
#-----------------------------------------------------------------------
#
# Save current shell options (in a global array). Then set new options
# for this script/function.
#
Expand Down Expand Up @@ -72,66 +63,130 @@ print_info_msg "
Entering script: \"${scrfunc_fn}\"
In directory: \"${scrfunc_dir}\"

This is the J-job script for the task that copies/fetches to a local
directory (either from disk or HPSS) the external model files from which
initial or boundary condition files for the FV3 will be generated.
This is the J-job script for the task that copies or fetches external
model files from disk, HPSS, or URL, and stages them for downstream use
to generate initial or lateral boundary conditions for the FV3 model.
========================================================================"


#
#-----------------------------------------------------------------------
#
# Check whether the environment variable ICS_OR_LBCS is set to a valid
# value. This variable specifies whether we are getting the external
# model files for the purpose of generating initial conditions (ICs) or
# lateral boundary condtions (LBCs) for the forecast model.
#
#-----------------------------------------------------------------------
#
valid_vals_ICS_OR_LBCS=( "ICS" "LBCS" )
check_var_valid_value "ICS_OR_LBCS" "valid_vals_ICS_OR_LBCS"
#
#-----------------------------------------------------------------------
#
# Set parameters for grabbing either the initial conditions from analysis or
# forecast files of external models, or the lateral boundary conditions
# from external models. This script has been called to do the work for
# one or the other.
#
#-----------------------------------------------------------------------
#
if [ "${ICS_OR_LBCS}" = "ICS" ]; then
time_offset_hrs=${EXTRN_MDL_ICS_OFFSET_HRS:-0}
extrn_mdl_name=${EXTRN_MDL_NAME_ICS}

elif [ "${ICS_OR_LBCS}" = "LBCS" ]; then
time_offset_hrs=${EXTRN_MDL_LBCS_OFFSET_HRS:-0}
extrn_mdl_name=${EXTRN_MDL_NAME_LBCS}
fi

#
#-----------------------------------------------------------------------
#
# Set the external model start time
#
#-----------------------------------------------------------------------
#

hh=${CDATE:8:2}
yyyymmdd=${CDATE:0:8}
extrn_mdl_cdate=$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC - ${time_offset_hrs} hours" "+%Y%m%d%H" )

#
#-----------------------------------------------------------------------
#
# Check whether output files from the specified external model (EXTRN_MDL_NAME)
# are available on the specified cycle date and time (CDATE).
# Check whether output files from the specified external model
# (extrn_mdl_name) are available on the specified cycle date and time
# (extrn_mdl_cdate).
#
#-----------------------------------------------------------------------
#
case ${EXTRN_MDL_NAME} in

function data_unavailable() {

local name cdate end_date min_max

name=$1
cdate=$2
end_date=$3
min_max=$4

if [ ${min_max} = max ]; then
msg="\
Output from the specified external model (extrn_mdl_name) is not availa-
ble for the specified cycle date and time (extrn_mdl_cdate) because the latter is
later than the last forecast date and time (cdate_max) with this model:
extrn_mdl_name = \"${name}\"
CDATE_max = \"${end_date}\"
extrn_mdl_cdate = \"${cdate}\""

elif [ ${min_max} = min ]; then
msg="\
Output from the specified external model (extrn_mdl_name) is not availa-
ble for the specified cycle date and time (extrn_mdl_cdate) because the latter is
earlier than the implementation date of this model:
extrn_mdl_name = \"${name}\"
CDATE_min = \"${end_date}\"
extrn_mdl_cdate = \"${cdate}\""
fi

echo ${msg}
}


case ${extrn_mdl_name} in

"GSMGFS")
# 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 [ "$CDATE" -gt "$cdate_max" ]; then
if [ "$extrn_mdl_cdate" -gt "$cdate_max" ]; then
print_err_msg_exit "\
Output from the specified external model (EXTRN_MDL_NAME) is not availa-
ble for the specified cycle date and time (CDATE) because the latter is
later than the last forecast date and time (cdate_max) with this model:
EXTRN_MDL_NAME = \"${EXTRN_MDL_NAME}\"
cdate_max = \"${cdate_max}\"
CDATE = \"${CDATE}\""
$(data_unavailable $extrn_mdl_name $extrn_mdl_cdate $cdate_max max)"
fi
;;

"FV3GFS")
# The transition date from the GSMGFS to the FV3GFS was 2019061212, i.e.
# 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
# CDATE for the FV3GFS to this date and time.
# extrn_mdl_cdate for the FV3GFS to this date and time.
# CDATE_min="2019061212"
CDATE_min="2018121500"
if [ "$CDATE" -lt "$CDATE_min" ]; then
if [ "$extrn_mdl_cdate" -lt "$CDATE_min" ]; then
print_err_msg_exit "\
Output from the specified external model (EXTRN_MDL_NAME) is not availa-
ble for the specified cycle date and time (CDATE) because the latter is
earlier than the implementation date of this model:
EXTRN_MDL_NAME = \"${EXTRN_MDL_NAME}\"
CDATE_min = \"${CDATE_min}\"
CDATE = \"${CDATE}\""
$(data_unavailable $extrn_mdl_name $extrn_mdl_cdate $cdate_min min)"
fi
;;

"RAP")
# Examination of the HPSS archives shows that the RAPX data goes back to
# July 01, 2015.
CDATE_min="2015070100"
if [ "$CDATE" -lt "$CDATE_min" ]; then
if [ "$extrn_mdl_cdate" -lt "$CDATE_min" ]; then
print_err_msg_exit "\
Output from the specified external model (EXTRN_MDL_NAME) is not availa-
ble for the specified cycle date and time (CDATE) because the latter is
earlier than the implementation date of this model:
EXTRN_MDL_NAME = \"${EXTRN_MDL_NAME}\"
CDATE_min = \"${CDATE_min}\"
CDATE = \"${CDATE}\""
$(data_unavailable $extrn_mdl_name $extrn_mdl_cdate $cdate_min min)"
fi
;;

Expand All @@ -140,156 +195,35 @@ earlier than the implementation date of this model:
# implementation of the first version of the operational HRRR was
# September 30, 2014.
CDATE_min="2014103000"
if [ "$CDATE" -lt "$CDATE_min" ]; then
if [ "$extrn_mdl_cdate" -lt "$CDATE_min" ]; then
print_err_msg_exit "\
Output from the specified external model (EXTRN_MDL_NAME) is not availa-
ble for the specified cycle date and time (CDATE) because the latter is
earlier than the implementation date of this model:
EXTRN_MDL_NAME = \"${EXTRN_MDL_NAME}\"
CDATE_min = \"${CDATE_min}\"
CDATE = \"${CDATE}\""
$(data_unavailable $extrn_mdl_name $extrn_mdl_cdate $cdate_min min)"
fi
;;

esac
#
#-----------------------------------------------------------------------
#
# Check whether the environment variable ICS_OR_LBCS is set to a valid
# value. This variable specifies whether we are getting the external
# model files for the purpose of generating initial conditions (ICs) or
# lateral boundary condtions (LBCs) for the forecast model.
#
#-----------------------------------------------------------------------
#
valid_vals_ICS_OR_LBCS=( "ICS" "LBCS" )
check_var_valid_value "ICS_OR_LBCS" "valid_vals_ICS_OR_LBCS"
#
#-----------------------------------------------------------------------
#
# Set parameters for grabbing either the initial conditions from analysis or
# forecast files of external models, or the lateral boundary conditions
# from external models. The script has been called to do the work for
# one or the other.
#
#-----------------------------------------------------------------------
#
if [ "${ICS_OR_LBCS}" = "ICS" ]; then
if [ ${EXTRN_MDL_ICS_OFFSET_HRS} -eq 0 ] ; then
anl_or_fcst="ANL"
time_offset_hrs=0
else
anl_or_fcst="FCST"
time_offset_hrs=${EXTRN_MDL_ICS_OFFSET_HRS:-0}
fi
elif [ "${ICS_OR_LBCS}" = "LBCS" ]; then
anl_or_fcst="FCST"
time_offset_hrs=${EXTRN_MDL_LBCS_OFFSET_HRS:-0}
fi
#
#-----------------------------------------------------------------------
#
# Create the directory where the exetrnal model files should be stored
#
#-----------------------------------------------------------------------
#
extrn_mdl_staging_dir="${CYCLE_DIR}/${EXTRN_MDL_NAME}/for_${ICS_OR_LBCS}"
extrn_mdl_staging_dir="${CYCLE_DIR}/${extrn_mdl_name}/for_${ICS_OR_LBCS}"
mkdir_vrfy -p "${extrn_mdl_staging_dir}"
cd_vrfy "${extrn_mdl_staging_dir}"
#
#-----------------------------------------------------------------------
#
# Call the function that sets various external-model-associated variables.
# See the function defintion file for the definitions of these variables.
#
#-----------------------------------------------------------------------
#
get_extrn_mdl_file_dir_info \
extrn_mdl_name="${EXTRN_MDL_NAME}" \
anl_or_fcst="${anl_or_fcst}" \
cdate_FV3LAM="${CDATE}" \
time_offset_hrs="${time_offset_hrs}" \
varname_extrn_mdl_cdate="extrn_mdl_cdate" \
varname_extrn_mdl_lbc_spec_fhrs="extrn_mdl_lbc_spec_fhrs" \
varname_extrn_mdl_fns_on_disk="extrn_mdl_fns_on_disk" \
varname_extrn_mdl_fns_in_arcv="extrn_mdl_fns_in_arcv" \
varname_extrn_mdl_sysdir="extrn_mdl_sysdir" \
varname_extrn_mdl_arcv_fmt="extrn_mdl_arcv_fmt" \
varname_extrn_mdl_arcv_fns="extrn_mdl_arcv_fns" \
varname_extrn_mdl_arcv_fps="extrn_mdl_arcv_fps" \
varname_extrn_mdl_arcvrel_dir="extrn_mdl_arcvrel_dir" || \
print_err_msg_exit "\
Call to function get_extrn_mdl_file_dir_info failed."
#
#-----------------------------------------------------------------------
#
# Set the directory in which to check for the external model files (which
# we refer to here as the "source" directory) to the default one set above
# for the current machine and external model.
#
#-----------------------------------------------------------------------
#
extrn_mdl_source_dir="${extrn_mdl_sysdir}"
#
#-----------------------------------------------------------------------
#
# If the user has specified that the external model files to be used for
# generating ICs or LBCs are staged, then reset extrn_mdl_source_dir to
# the user-specified directory in which these files are staged, and reset
# extrn_mdl_fns_on_disk to the user-specified array containing the names
# of the files.
#
#-----------------------------------------------------------------------
#
if [ "${USE_USER_STAGED_EXTRN_FILES}" = "TRUE" ]; then

if [ "${ICS_OR_LBCS}" = "ICS" ]; then
extrn_mdl_source_dir="${EXTRN_MDL_SOURCE_BASEDIR_ICS}/$CDATE"
extrn_mdl_fns_on_disk=( $( printf "%s " "${EXTRN_MDL_FILES_ICS[@]}" ))
elif [ "${ICS_OR_LBCS}" = "LBCS" ]; then
extrn_mdl_source_dir="${EXTRN_MDL_SOURCE_BASEDIR_LBCS}/$CDATE"
extrn_mdl_fns_on_disk=( $( printf "%s " "${EXTRN_MDL_FILES_LBCS[@]}" ))
fi

if [ ! -d "${extrn_mdl_source_dir}" ]; then
print_err_msg_exit "\
The directory extrn_mdl_source_dir containing the user-staged external
model files does not exist:
extrn_mdl_source_dir = \"${extrn_mdl_source_dir}\"
Please ensure that the directory specified by extrn_mdl_source_dir exists
and that all the files specified in the array extrn_mdl_fns_on_disk exist
within it:
extrn_mdl_source_dir = \"${extrn_mdl_source_dir}\"
extrn_mdl_fns_on_disk = ( $( printf "\"%s\" " "${extrn_mdl_fns_on_disk[@]}" ))"
fi

fi
#
#-----------------------------------------------------------------------
#
# Call the ex-script for this J-job and pass to it the necessary variables.
#
#-----------------------------------------------------------------------
#
extrn_mdl_lbc_spec_fhrs_str="( "$( printf "\"%s\" " "${extrn_mdl_lbc_spec_fhrs[@]}" )")"
extrn_mdl_fns_on_disk_str="( "$( printf "\"%s\" " "${extrn_mdl_fns_on_disk[@]}" )")"
extrn_mdl_fns_in_arcv_str="( "$( printf "\"%s\" " "${extrn_mdl_fns_in_arcv[@]}" )")"
extrn_mdl_arcv_fns_str="( "$( printf "\"%s\" " "${extrn_mdl_arcv_fns[@]}" )")"
extrn_mdl_arcv_fps_str="( "$( printf "\"%s\" " "${extrn_mdl_arcv_fps[@]}" )")"

$SCRIPTSDIR/exregional_get_extrn_mdl_files.sh \
ics_or_lbcs="${ICS_OR_LBCS}" \
use_user_staged_extrn_files="${USE_USER_STAGED_EXTRN_FILES}" \
extrn_mdl_cdate="${extrn_mdl_cdate}" \
extrn_mdl_lbc_spec_fhrs="${extrn_mdl_lbc_spec_fhrs_str}" \
extrn_mdl_fns_on_disk="${extrn_mdl_fns_on_disk_str}" \
extrn_mdl_fns_in_arcv="${extrn_mdl_fns_in_arcv_str}" \
extrn_mdl_source_dir="${extrn_mdl_source_dir}" \
extrn_mdl_name="${extrn_mdl_name}" \
extrn_mdl_staging_dir="${extrn_mdl_staging_dir}" \
extrn_mdl_arcv_fmt="${extrn_mdl_arcv_fmt}" \
extrn_mdl_arcv_fns="${extrn_mdl_arcv_fns_str}" \
extrn_mdl_arcv_fps="${extrn_mdl_arcv_fps_str}" \
extrn_mdl_arcvrel_dir="${extrn_mdl_arcvrel_dir}" || \
time_offset_hrs=${time_offset_hrs} ||
print_err_msg_exit "\
Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
#
Expand Down
5 changes: 2 additions & 3 deletions modulefiles/tasks/cheyenne/get_extrn_ics
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#%Module#####################################################
## Module file intentionally blank for Cheyenne
#############################################################
#%Module

module load pylib_regional_workflow

5 changes: 2 additions & 3 deletions modulefiles/tasks/cheyenne/get_extrn_lbcs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#%Module#####################################################
## Module file intentionally blank for Cheyenne
#############################################################
#%Module

module load pylib_regional_workflow

9 changes: 1 addition & 8 deletions modulefiles/tasks/cheyenne/make_grid.local
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
#%Module
if [module-info mode load] {
system "ncar_pylib /glade/p/ral/jntp/UFS_CAM/ncar_pylib_20200427"
}

if [module-info mode remove] {
system "deactivate"
}

module load pylib_regional_workflow
Loading