Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocean/ice product generation for GFS and GEFS #2286

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a8e12f6
wip
aerorahul Dec 29, 2023
b862705
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Jan 8, 2024
9f62533
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Jan 8, 2024
9f4533a
work cice output and ice filenames
aerorahul Jan 10, 2024
d7e00b2
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Jan 10, 2024
90fab15
wip
aerorahul Jan 12, 2024
e9de66f
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Jan 17, 2024
3b54968
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Jan 18, 2024
b89f539
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Jan 22, 2024
43232fc
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Jan 22, 2024
76d09bc
Write mediator restarts to CMEPS_RESTART/ instead of RESTART/
aerorahul Jan 22, 2024
f116a32
link ocean/ice post-processing stuff from gfs-utils
aerorahul Jan 22, 2024
33dae8f
add a rocoto job, jjob, config file and resources for ocean/ice produ…
aerorahul Jan 22, 2024
cd7b7be
add oceanice_products.yaml and declare ocean/ice grib2 directory name…
aerorahul Jan 23, 2024
c922dea
working ocean products
aerorahul Jan 31, 2024
fa610ed
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Jan 31, 2024
552bb7b
updates to workflow generation scripts
aerorahul Feb 1, 2024
e7d8468
clean-up
aerorahul Feb 1, 2024
a4d850c
fixes
aerorahul Feb 2, 2024
c619784
update hash of gfs-utils submodule
aerorahul Feb 2, 2024
d1d415f
fix shellnorm and update CMEPS_out to only copy the last mediator res…
aerorahul Feb 2, 2024
6525773
remove ocnpost from workflow
aerorahul Feb 2, 2024
3a27424
update archive script to archive ocean/ice output and products
aerorahul Feb 2, 2024
82494f0
increase UPP memory for C768
aerorahul Feb 2, 2024
e387208
update env files for other machines
aerorahul Feb 2, 2024
c5f84aa
Apply suggestions from code review - batch 1
aerorahul Feb 5, 2024
5da925d
remove unnecessary redefinitions in predet
aerorahul Feb 5, 2024
d232b4d
fix shellcheck errors
aerorahul Feb 5, 2024
4abdd40
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Feb 5, 2024
8eb84e7
adapt for ocean/ice output frequency
aerorahul Feb 5, 2024
2a71a27
consolidate CICE output links to COM for gfs/gdas
aerorahul Feb 5, 2024
8f2bb7c
rename {component}{prod} to {component}_{prod}. add ocean/ice produc…
aerorahul Feb 5, 2024
4a5ded9
add ocean ice prodgen for gefs
aerorahul Feb 5, 2024
f0c76f5
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Feb 5, 2024
1aa7197
fix missing level from copy/paste in the oceanice_products.yaml
aerorahul Feb 5, 2024
26b0a9a
update metadata for date and forecast hour in the grib2 product file
aerorahul Feb 5, 2024
ce20bee
add missing key in the local task dict
aerorahul Feb 5, 2024
1b336e2
remove xsect ocean vars and add COM_OCEAN_NETCDF for netcdf products.
aerorahul Feb 7, 2024
de32912
placeholder for ocean netcdf products
aerorahul Feb 7, 2024
fdb9007
apply comments from review to replace SALTY with SALIN and remove sca…
aerorahul Feb 8, 2024
a7822c2
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Feb 8, 2024
c54a4fa
add COM_ICE_NETCDF_TMPL for any ice netcdf products that we may have …
aerorahul Feb 9, 2024
97f99fc
perform subsetting of model native output for products
aerorahul Feb 9, 2024
7de1739
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Feb 12, 2024
abea49d
remove not required variables from ocean native product files
aerorahul Feb 12, 2024
30fc5f7
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Feb 12, 2024
16fd4ee
remove sst_h from ice native netcdf products. fix gefs dependency for…
aerorahul Feb 12, 2024
2f4e17b
missed a couple dependencies for gefs products
aerorahul Feb 12, 2024
0579eb6
fix undefined variable in forecast_postdet.sh that impacted RUN=gdas
aerorahul Feb 12, 2024
c9fde0e
update the dependency for prepoceanobs for updated filename
aerorahul Feb 12, 2024
9930d05
Merge branch 'develop' into feature/ocean_ice_output
aerorahul Feb 13, 2024
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
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ fix/gsi
fix/lut
fix/mom6
fix/orog
fix/reg2grb2
fix/sfc_climo
fix/ugwd
fix/verif
Expand Down Expand Up @@ -99,6 +98,9 @@ parm/post/postxconfig-NT-GFS-WAFS.txt
parm/post/postxconfig-NT-GFS.txt
parm/post/postxconfig-NT-gefs-aerosol.txt
parm/post/postxconfig-NT-gefs-chem.txt
parm/post/ocean.csv
parm/post/ice.csv
parm/post/ocnicepost.nml.jinja2
parm/ufs/noahmptable.tbl
parm/ufs/model_configure.IN
parm/ufs/MOM_input_*.IN
Expand Down Expand Up @@ -137,7 +139,6 @@ sorc/radmon_bcor.fd
sorc/radmon_time.fd
sorc/rdbfmsua.fd
sorc/recentersigp.fd
sorc/reg2grb2.fd
sorc/supvit.fd
sorc/syndat_getjtbul.fd
sorc/syndat_maksynrc.fd
Expand All @@ -147,6 +148,7 @@ sorc/tocsbufr.fd
sorc/upp.fd
sorc/vint.fd
sorc/webtitle.fd
sorc/ocnicepost.fd

# Ignore scripts from externals
#------------------------------
Expand Down
7 changes: 7 additions & 0 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ elif [[ "${step}" = "atmos_products" ]]; then

export USE_CFP="YES" # Use MPMD for downstream product generation on Hera

elif [[ "${step}" = "oceanice_products" ]]; then

nth_max=$((npe_node_max / npe_node_oceanice_products))

export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1}
export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}"

elif [[ "${step}" = "ecen" ]]; then

nth_max=$((npe_node_max / npe_node_ecen))
Expand Down
10 changes: 10 additions & 0 deletions env/HERCULES.env
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,20 @@ case ${step} in
[[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max}
export APRUN_UPP="${launcher} -n ${npe_upp} --cpus-per-task=${NTHREADS_UPP}"
;;

"atmos_products")

export USE_CFP="YES" # Use MPMD for downstream product generation
;;

"oceanice_products")

nth_max=$((npe_node_max / npe_node_oceanice_products))

export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1}
export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}"
;;

"ecen")

nth_max=$((npe_node_max / npe_node_ecen))
Expand Down
7 changes: 7 additions & 0 deletions env/JET.env
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ elif [[ "${step}" = "atmos_products" ]]; then

export USE_CFP="YES" # Use MPMD for downstream product generation

elif [[ "${step}" = "oceanice_products" ]]; then

nth_max=$((npe_node_max / npe_node_oceanice_products))

export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1}
export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}"

elif [[ "${step}" = "ecen" ]]; then

nth_max=$((npe_node_max / npe_node_ecen))
Expand Down
7 changes: 7 additions & 0 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ elif [[ "${step}" = "atmos_products" ]]; then

export USE_CFP="YES" # Use MPMD for downstream product generation

elif [[ "${step}" = "oceanice_products" ]]; then

nth_max=$((npe_node_max / npe_node_oceanice_products))

export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1}
export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}"

elif [[ "${step}" = "ecen" ]]; then

nth_max=$((npe_node_max / npe_node_ecen))
Expand Down
7 changes: 7 additions & 0 deletions env/S4.env
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ elif [[ "${step}" = "atmos_products" ]]; then

export USE_CFP="YES" # Use MPMD for downstream product generation

elif [[ "${step}" = "oceanice_products" ]]; then

nth_max=$((npe_node_max / npe_node_oceanice_products))

export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1}
export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}"

elif [[ "${step}" = "ecen" ]]; then

nth_max=$((npe_node_max / npe_node_ecen))
Expand Down
7 changes: 7 additions & 0 deletions env/WCOSS2.env
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ elif [[ "${step}" = "atmos_products" ]]; then

export USE_CFP="YES" # Use MPMD for downstream product generation

elif [[ "${step}" = "oceanice_products" ]]; then

nth_max=$((npe_node_max / npe_node_oceanice_products))

export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1}
export APRUN_OCNICEPOST="${launcher} -n 1 -ppn ${npe_node_oceanice_products} --cpu-bind depth --depth ${NTHREADS_OCNICEPOST}"

elif [[ "${step}" = "ecen" ]]; then

nth_max=$((npe_node_max / npe_node_ecen))
Expand Down
5 changes: 2 additions & 3 deletions jobs/JGLOBAL_ARCHIVE
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_ANALYSIS COM_ATMOS_BUFR COM_ATMO
COM_ATMOS_TRACK COM_ATMOS_WMO \
COM_CHEM_HISTORY COM_CHEM_ANALYSIS\
COM_MED_RESTART \
COM_ICE_HISTORY COM_ICE_INPUT COM_ICE_RESTART \
COM_ICE_HISTORY COM_ICE_INPUT COM_ICE_RESTART COM_ICE_GRIB \
aerorahul marked this conversation as resolved.
Show resolved Hide resolved
COM_OBS COM_TOP \
COM_OCEAN_HISTORY COM_OCEAN_INPUT COM_OCEAN_RESTART COM_OCEAN_XSECT COM_OCEAN_2D COM_OCEAN_3D \
COM_OCEAN_HISTORY COM_OCEAN_INPUT COM_OCEAN_RESTART COM_OCEAN_GRIB COM_OCEAN_NETCDF \
COM_OCEAN_ANALYSIS \
COM_WAVE_GRID COM_WAVE_HISTORY COM_WAVE_STATION \
COM_ATMOS_OZNMON COM_ATMOS_RADMON COM_ATMOS_MINMON COM_CONF

for grid in "0p25" "0p50" "1p00"; do
YMD=${PDY} HH=${cyc} GRID=${grid} generate_com -rx "COM_ATMOS_GRIB_${grid}:COM_ATMOS_GRIB_GRID_TMPL"
YMD=${PDY} HH=${cyc} GRID=${grid} generate_com -rx "COM_OCEAN_GRIB_${grid}:COM_OCEAN_GRIB_GRID_TMPL"
done

###############################################################
Expand Down
40 changes: 40 additions & 0 deletions jobs/JGLOBAL_OCEANICE_PRODUCTS
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "oceanice_products" -c "base oceanice_products"


##############################################
# Begin JOB SPECIFIC work
##############################################

# Construct COM variables from templates
YMD="${PDY}" HH="${cyc}" generate_com -rx "COM_${COMPONENT^^}_HISTORY"
YMD="${PDY}" HH="${cyc}" generate_com -rx "COM_${COMPONENT^^}_GRIB"
YMD="${PDY}" HH="${cyc}" generate_com -rx "COM_${COMPONENT^^}_NETCDF"

###############################################################
# Run exglobal script
"${HOMEgfs}/scripts/exglobal_oceanice_products.py"
status=$?
(( status != 0 )) && exit "${status}"

##############################################
# End JOB SPECIFIC work
##############################################

##############################################
# Final processing
##############################################
if [[ -e "${pgmout}" ]]; then
cat "${pgmout}"
fi

##########################################
# Remove the Temporary working directory
##########################################
cd "${DATAROOT}" || exit 1
[[ "${KEEPDATA:-NO}" == "NO" ]] && rm -rf "${DATA}"


exit 0
37 changes: 37 additions & 0 deletions jobs/rocoto/oceanice_products.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"

###############################################################
## ocean ice products driver script
## FHRLST : forecast hour list to post-process (e.g. f000, f000_f001_f002, ...)
###############################################################

# Source FV3GFS workflow modules
. "${HOMEgfs}/ush/load_fv3gfs_modules.sh"
status=$?
if (( status != 0 )); then exit "${status}"; fi

###############################################################
# setup python path for workflow utilities and tasks
wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src"
PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}"
export PYTHONPATH

export job="oceanice_products"
export jobid="${job}.$$"

###############################################################
# shellcheck disable=SC2153,SC2001
IFS='_' read -ra fhrs <<< "${FHRLST//f}" # strip off the 'f's and convert to array

#---------------------------------------------------------------
# Execute the JJOB
for fhr in "${fhrs[@]}"; do
export FORECAST_HOUR=$(( 10#${fhr} ))
"${HOMEgfs}/jobs/JGLOBAL_OCEANICE_PRODUCTS"
status=$?
if (( status != 0 )); then exit "${status}"; fi
done

exit 0
119 changes: 0 additions & 119 deletions jobs/rocoto/ocnpost.sh

This file was deleted.

1 change: 1 addition & 0 deletions modulefiles/module_base.hera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ load(pathJoin("wgrib2", (os.getenv("wgrib2_ver") or "None")))
load(pathJoin("py-netcdf4", (os.getenv("py_netcdf4_ver") or "None")))
load(pathJoin("py-pyyaml", (os.getenv("py_pyyaml_ver") or "None")))
load(pathJoin("py-jinja2", (os.getenv("py_jinja2_ver") or "None")))
load(pathJoin("py-xarray", (os.getenv("py_xarray_ver") or "None")))

-- MET/METplus are not available for use with spack-stack, yet
--load(pathJoin("met", (os.getenv("met_ver") or "None")))
Expand Down
1 change: 1 addition & 0 deletions modulefiles/module_base.hercules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ load(pathJoin("wgrib2", (os.getenv("wgrib2_ver") or "None")))
load(pathJoin("py-netcdf4", (os.getenv("py_netcdf4_ver") or "None")))
load(pathJoin("py-pyyaml", (os.getenv("py_pyyaml_ver") or "None")))
load(pathJoin("py-jinja2", (os.getenv("py_jinja2_ver") or "None")))
load(pathJoin("py-xarray", (os.getenv("py_xarray_ver") or "None")))

setenv("WGRIB2","wgrib2")
setenv("UTILROOT",(os.getenv("prod_util_ROOT") or "None"))
Expand Down
1 change: 1 addition & 0 deletions modulefiles/module_base.jet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ load(pathJoin("wgrib2", (os.getenv("wgrib2_ver") or "None")))
load(pathJoin("py-netcdf4", (os.getenv("py_netcdf4_ver") or "None")))
load(pathJoin("py-pyyaml", (os.getenv("py_pyyaml_ver") or "None")))
load(pathJoin("py-jinja2", (os.getenv("py_jinja2_ver") or "None")))
load(pathJoin("py-xarray", (os.getenv("py_xarray_ver") or "None")))

setenv("WGRIB2","wgrib2")
setenv("UTILROOT",(os.getenv("prod_util_ROOT") or "None"))
Expand Down
1 change: 1 addition & 0 deletions modulefiles/module_base.orion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ load(pathJoin("wgrib2", (os.getenv("wgrib2_ver") or "None")))
load(pathJoin("py-netcdf4", (os.getenv("py_netcdf4_ver") or "None")))
load(pathJoin("py-pyyaml", (os.getenv("py_pyyaml_ver") or "None")))
load(pathJoin("py-jinja2", (os.getenv("py_jinja2_ver") or "None")))
load(pathJoin("py-xarray", (os.getenv("py_xarray_ver") or "None")))

-- MET/METplus are not yet supported with spack-stack
--load(pathJoin("met", (os.getenv("met_ver") or "None")))
Expand Down
1 change: 1 addition & 0 deletions modulefiles/module_base.s4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ load(pathJoin("wgrib2", (os.getenv("wgrib2_ver") or "None")))
load(pathJoin("py-netcdf4", (os.getenv("py_netcdf4_ver") or "None")))
load(pathJoin("py-pyyaml", (os.getenv("py_pyyaml_ver") or "None")))
load(pathJoin("py-jinja2", (os.getenv("py_jinja2_ver") or "None")))
load(pathJoin("py-xarray", (os.getenv("py_xarray_ver") or "None")))

setenv("WGRIB2","wgrib2")
setenv("UTILROOT",(os.getenv("prod_util_ROOT") or "None"))
Expand Down
1 change: 1 addition & 0 deletions parm/config/gefs/config.oceanice_products
Loading
Loading