Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Oct 8, 2024
2 parents 813047d + bcdcf3c commit ae52034
Show file tree
Hide file tree
Showing 37 changed files with 189 additions and 155 deletions.
1 change: 0 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ xarray
matplotlib
netCDF4
matplotlib

4 changes: 2 additions & 2 deletions jobs/JRRFS_ANALYSIS_GSI
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fi
if [ "${GSI_TYPE}" = "OBSERVER" ]; then
if [ "${MEM_TYPE}" = "MEAN" ]; then
export jobid=${RUN}_observer_${workname}_ensmean_${envir}_${cyc}
observer_nwges_dir="${GESROOT}/ensmean/observer_${workname}"
observer_nwges_dir="${GESROOT}/${RUN}.${PDY}/${cyc}/ensmean/observer_${workname}"
else
# GSI_TYPE = OBSERVER is only for EnKF (ensemble forecasts do not have ANALYSIS tasks)
export jobid=${RUN}_observer_${workname}_${mem_num}_${envir}_${cyc}
Expand Down Expand Up @@ -113,7 +113,7 @@ fi

export gridspec_dir=${GESROOT}/grid_spec

export ${OB_TYPE}
export OB_TYPE=${OB_TYPE}

#-----------------------------------------------------------------------
# Define COM directories
Expand Down
5 changes: 3 additions & 2 deletions jobs/JRRFS_ANALYSIS_GSIDIAG
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ fi

export jobid=${RUN}_analysis_conv_dbz_${workname}_${envir}_${cyc}
export DATA="${DATAROOT}/${jobid}"
rm -rf ${DATA}
mkdir -p ${DATA}
if [ ! -d "${DATA}" ]; then
echo "WARNING: ${DATA} does not exist"
fi

if [ ! -d "${SATBIAS_DIR}" ]; then
echo "making satbias_dir directory for cycling bias correction files"
Expand Down
2 changes: 1 addition & 1 deletion jobs/JRRFS_ANALYSIS_NONVARCLD
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ if [ ${CYCLE_TYPE} = "spinup" ]; then
if [ "${MEM_TYPE}" = "MEAN" ]; then
export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${rrfs_ver}/${RUN}.${PDY}/${cyc}_spinup/ensmean)}
else
export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${rrfs_ver}/${RUN}.${PDY}/${cyc}_spinup/${mem_num})}
export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${rrfs_ver}/${RUN}.${PDY}/${cyc}_spinup)}
fi
export COMIN=${COMIN:-$(compath.py -o ${NET}/${rrfs_ver}/${RUN}.${PDY}/${cyc}_spinup)}
else
Expand Down
4 changes: 2 additions & 2 deletions jobs/JRRFS_CALC_ENSMEAN
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ RRFS for the specified cycle.
export pid=${pid:-$$}
export RUN=${RUN:-rrfs}

export mem_num=m$(echo "${ENSMEM_INDX}")
#export mem_num=m$(echo "${ENSMEM_INDX}")

export CYCLE_TYPE=${CYCLE_TYPE:-prod}
if [ "${CYCLE_TYPE}" = "spinup" ]; then
Expand Down Expand Up @@ -89,7 +89,7 @@ mkdir -p "${COMOUT}"
# Execute the script.
#-----------------------------------------------------------------------

export pgmout="${ensmeandir}/OUTPUT.$$"
export pgmout="${DATA}/OUTPUT.$$"
env

$HOMErrfs/scripts/exrrfs_calc_ensmean.sh
Expand Down
18 changes: 1 addition & 17 deletions jobs/JRRFS_FORECAST
Original file line number Diff line number Diff line change
Expand Up @@ -64,29 +64,13 @@ the specified cycle.

export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
export jobid=${taskid}

export mem_num=m$(echo "${ENSMEM_INDX}")

export CYCLE_TYPE=${CYCLE_TYPE:-prod}
export CYCLE_SUBTYPE=${CYCLE_SUBTYPE:-empty}

if [ ${CYCLE_TYPE} == "spinup" ]; then
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then # EnKF has spinup forecasts
export jobid=${RUN}_forecast_spinup_${mem_num}_${envir}_${cyc}
if [ ${CYCLE_SUBTYPE} == "ensinit" ]; then
export jobid=${RUN}_forecast_ensinit_${mem_num}_${envir}_${cyc}
fi
else
export jobid=${RUN}_forecast_spinup_${envir}_${cyc}
fi
else
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
export jobid=${RUN}_forecast_${mem_num}_${envir}_${cyc}
else
export jobid=${RUN}_forecast_${envir}_${cyc}
fi
fi

export DATA=${DATAROOT}/${jobid}
mkdir -p ${DATA}

Expand Down
2 changes: 1 addition & 1 deletion jobs/JRRFS_MAKE_GRID
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This is the J-job script for the task that generates grid files.

export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
export jobid=${RUN}_make_grid_${envir}_${cyc}
export jobid=${taskid}

export DATA=${DATAROOT}/${jobid}
mkdir -p ${DATA}
Expand Down
5 changes: 2 additions & 3 deletions jobs/JRRFS_MAKE_ICS
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export USHrrfs=${USHrrfs:-${HOMErrfs}/ush}

export FIXam=${FIXam:-${FIXrrfs}/am}
export FIXLAM=${FIXLAM:-${FIXrrfs}/lam/${PREDEF_GRID_NAME}}
export FIXGSI=${FIXrrfs}/gsi
export FIX_GSI=${FIXrrfs}/gsi

#-----------------------------------------------------------------------
# Source the variable definitions file and the bash utility functions.
Expand Down Expand Up @@ -134,13 +134,12 @@ extrn_mdl_fns_on_disk_str="( "$( printf "\"%s\" " "${fns_on_disk[@]}" )")"

export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
export jobid=${taskid}

export mem_num=m$(echo "${ENSMEM_INDX}")
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
export jobid=${RUN}_make_ics_${mem_num}_${envir}_${cyc}
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/${mem_num}/ics"
else
export jobid=${RUN}_make_ics_${envir}_${cyc}
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/ics"
fi

Expand Down
3 changes: 1 addition & 2 deletions jobs/JRRFS_MAKE_LBCS
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,12 @@ extrn_mdl_fns_on_disk_str2="( "$( printf "\"%s\" " "${fns_on_disk2[@]}" )")"

export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
export jobid=${taskid}

export mem_num=m$(echo "${ENSMEM_INDX}")
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
export jobid=${RUN}_make_lbcs_${mem_num}_${envir}_${cyc}
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/${mem_num}/lbcs"
else
export jobid=${RUN}_make_lbcs_${envir}_${cyc}
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/lbcs"
fi

Expand Down
2 changes: 1 addition & 1 deletion jobs/JRRFS_MAKE_OROG
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This is the J-job script for the task that generates orography files.

export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
export jobid=${RUN}_make_orog_${envir}_${cyc}
export jobid=${taskid}

export DATA=${DATAROOT}/${jobid}
mkdir -p ${DATA}
Expand Down
2 changes: 1 addition & 1 deletion jobs/JRRFS_MAKE_SFC_CLIMO
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ climatology.

export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
export jobid=${RUN}_make_sfc_climo_${envir}_${cyc}
export jobid=${taskid}

export DATA=${DATAROOT}/${jobid}
mkdir -p ${DATA}
Expand Down
4 changes: 1 addition & 3 deletions jobs/JRRFS_POST
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,18 @@ on the output files corresponding to a specified forecast hour.

export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
export jobid=${taskid}

export mem_num=m$(echo "${ENSMEM_INDX}")

export CYCLE_TYPE=${CYCLE_TYPE:-prod}
if [ ${CYCLE_TYPE} == "spinup" ]; then
export INPUT_DATA="${DATAROOT}/${RUN}_forecast_spinup_${envir}_${cyc}"
jobid=${RUN}_post_spinup_${envir}_${cyc}_f${fhr}
else
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
export INPUT_DATA="${DATAROOT}/${RUN}_forecast_${mem_num}_${envir}_${cyc}"
jobid=${RUN}_post_${mem_num}_${envir}_${cyc}_f${fhr}
else
export INPUT_DATA="${DATAROOT}/${RUN}_forecast_${envir}_${cyc}"
jobid=${RUN}_post_${envir}_${cyc}_f${fhr}
fi
fi

Expand Down
13 changes: 2 additions & 11 deletions jobs/JRRFS_PRDGEN
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,10 @@ files corresponding to a specified forecast hour.

export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
export jobid=${taskid}

export mem_num=m$(echo "${ENSMEM_INDX}")

CYCLE_TYPE=${CYCLE_TYPE:-prod}
if [ "${CYCLE_TYPE}" = "spinup" ]; then
jobid=${RUN}_post_spinup_${envir}_${cyc}_f${fhr}
else
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
jobid=${RUN}_post_${mem_num}_${envir}_${cyc}_f${fhr}
else
jobid=${RUN}_post_${envir}_${cyc}_f${fhr}
fi
fi
export CYCLE_TYPE=${CYCLE_TYPE:-prod}

export DATA=${DATAROOT}/${jobid}
mkdir -p ${DATA}
Expand Down
20 changes: 12 additions & 8 deletions jobs/JRRFS_PREP_CYC
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,19 @@ export mem_num=m$(echo "${ENSMEM_INDX}")

export CYCLE_TYPE=${CYCLE_TYPE:-prod}
export CYCLE_SUBTYPE=${CYCLE_SUBTYPE:-empty}
export ctrlpath=""
#export ctrlpath=""
if [ "${CYCLE_TYPE}" = "spinup" ]; then
export INPUT_DATA=${DATAROOT}/${RUN}_forecast_spinup_${envir}_${cyc}/INPUT
if [ "${DO_ENSINIT}" = "TRUE" ] && [ "${CYCLE_SUBTYPE}" = "ensinit" ]; then
export INPUT_DATA=${DATAROOT}/${RUN}_forecast_ensinit_${envir}_${cyc}/INPUT
fi
if [ "${DO_ENSINIT}" = "TRUE" ] && [ "${CYCLE_SUBTYPE}" = "spinup" ]; then
ctrlpath=${ENSCTRL_DATAROOT}
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then # EnKF has spinup forecasts
export INPUT_DATA=${DATAROOT}/${RUN}_forecast_spinup_${mem_num}_${envir}_${cyc}/INPUT
if [ "${DO_ENSINIT}" = "TRUE" ] && [ "${CYCLE_SUBTYPE}" = "ensinit" ]; then
export INPUT_DATA=${DATAROOT}/${RUN}_forecast_ensinit_${mem_num}_${envir}_${cyc}/INPUT
fi
# if [ "${DO_ENSINIT}" = "TRUE" ] && [ "${CYCLE_SUBTYPE}" = "spinup" ]; then
# ctrlpath=${ENSCTRL_DATAROOT}
# fi
else
export INPUT_DATA=${DATAROOT}/${RUN}_forecast_spinup_${envir}_${cyc}/INPUT
# ctrlpath=${ENSCTRL_DATAROOT}
fi
else
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
Expand All @@ -84,7 +89,6 @@ else
fi
fi

rm -fr ${INPUT_DATA}
mkdir -p ${INPUT_DATA}
cd ${INPUT_DATA}

Expand Down
6 changes: 3 additions & 3 deletions jobs/JRRFS_RECENTER
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ with RRFS for the specified cycle.
export pid=${pid:-$$}
export RUN=${RUN:-rrfs}

export mem_num=m$(echo "${ENSMEM_INDX}")
#export mem_num=m$(echo "${ENSMEM_INDX}")

export CYCLE_TYPE=${CYCLE_TYPE:-prod}
if [ "${CYCLE_TYPE}" = "spinup" ]; then
export jobid=${RUN}_recenter_spinup_${mem_num}_${envir}_${cyc}
export jobid=${RUN}_recenter_spinup_${envir}_${cyc}
else
export jobid=${RUN}_recenter_${mem_num}_${envir}_${cyc}
export jobid=${RUN}_recenter_${envir}_${cyc}
fi

export DATA=${DATAROOT}/${jobid}
Expand Down
13 changes: 7 additions & 6 deletions jobs/JRRFS_SAVE_RESTART
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,14 @@ mkdir -p "${NWGES_DIR}/RESTART"
mkdir -p "${NWGES_DIR}/INPUT"
if [ "${SURFACE_DIR}" != "empty" ]; then
mkdir -p "${SURFACE_DIR}"
cd ${SURFACE_DIR}
fi

len_ensmem=${#ENSMEM_INDX}
if [ ${len_ensmem} -le 3 ]; then
CYCLE_SUBTYPE="control"
fi
cd ${SURFACE_DIR}
# check this, why we need this????
#len_ensmem=${#ENSMEM_INDX}
#if [ ${len_ensmem} -le 3 ]; then
# CYCLE_SUBTYPE="control"
#fi

#-----------------------------------------------------------------------
# Make sure that fhr is a non-empty string consisting of only digits.
Expand All @@ -114,7 +115,7 @@ fi
# Execute the script.
#-----------------------------------------------------------------------

export pgmout="${SURFACE_DIR}/OUTPUT.$$"
export pgmout="${DATA}/OUTPUT.$$"
env

${HOMErrfs}/scripts/exrrfs_save_restart.sh
Expand Down
1 change: 0 additions & 1 deletion jobs/JRRFS_UPDATE_LBC_SOIL
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ else
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${rrfs_ver}/${RUN}.${PDY}/${cyc}/${mem_num})}
else
export COMOUT="${COMOUT_BASEDIR}/$RUN.$PDY/${cyc}"
export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${rrfs_ver}/${RUN}.${PDY}/${cyc})}
fi
fi
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss2/analysis_gsi.local.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ load(pathJoin("udunits", os.getenv("udunits_ver")))
load(pathJoin("gsl", os.getenv("gsl_ver")))
load(pathJoin("nco", os.getenv("nco_ver")))

load(pathJoin("prod_envir", os.getenv("prod_envir_ver")))
2 changes: 2 additions & 0 deletions modulefiles/tasks/wcoss2/bufrsnd.local.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ prepend_path("MODULEPATH", os.getenv("modulepath_mpi"))
load(pathJoin("hdf5", os.getenv("hdf5_ver")))
load(pathJoin("netcdf", os.getenv("netcdf_ver")))
load(pathJoin("gempak", os.getenv("gempak_ver")))

load(pathJoin("prod_envir", os.getenv("prod_envir_ver")))
2 changes: 2 additions & 0 deletions modulefiles/tasks/wcoss2/post.local.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ load(pathJoin("hdf5", os.getenv("hdf5_ver")))
load(pathJoin("netcdf", os.getenv("netcdf_ver")))
load(pathJoin("libjpeg", os.getenv("libjpeg_ver")))
load(pathJoin("wgrib2", os.getenv("wgrib2_ver")))

load(pathJoin("prod_envir", os.getenv("prod_envir_ver")))
2 changes: 2 additions & 0 deletions modulefiles/tasks/wcoss2/prdgen.local.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ load(pathJoin("wgrib2", os.getenv("wgrib2_ver")))
load(pathJoin("udunits", os.getenv("udunits_ver")))
load(pathJoin("gsl", os.getenv("gsl_ver")))
load(pathJoin("nco", os.getenv("nco_ver")))

load(pathJoin("prod_envir", os.getenv("prod_envir_ver")))
2 changes: 2 additions & 0 deletions modulefiles/tasks/wcoss2/prep_cyc.local.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ load(pathJoin("libjpeg", os.getenv("libjpeg_ver")))
load(pathJoin("udunits", os.getenv("udunits_ver")))
load(pathJoin("gsl", os.getenv("gsl_ver")))
load(pathJoin("nco", os.getenv("nco_ver")))

load(pathJoin("prod_envir", os.getenv("prod_envir_ver")))
2 changes: 2 additions & 0 deletions modulefiles/tasks/wcoss2/recenter.local.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ prepend_path("MODULEPATH", os.getenv("modulepath_mpi"))
load(pathJoin("hdf5", os.getenv("hdf5_ver")))
load(pathJoin("netcdf", os.getenv("netcdf_ver")))
load(pathJoin("libjpeg", os.getenv("libjpeg_ver")))

load(pathJoin("prod_envir", os.getenv("prod_envir_ver")))
Loading

0 comments on commit ae52034

Please sign in to comment.