Skip to content

Commit

Permalink
ocnanalletkf to marineanalletkf and moving setup yamls
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewEichmann-NOAA committed Jul 5, 2024
1 parent 3914eef commit 2a4dd70
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 30 deletions.
10 changes: 5 additions & 5 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ elif [[ "${step}" = "ocnanalecen" ]]; then
[[ ${NTHREADS_OCNANALECEN} -gt ${nth_max} ]] && export NTHREADS_OCNANALECEN=${nth_max}
export APRUN_OCNANALECEN="${launcher} -n ${npe_ocnanalecen} --cpus-per-task=${NTHREADS_OCNANALECEN}"

elif [[ "${step}" = "ocnanalletkf" ]]; then
elif [[ "${step}" = "marineanalletkf" ]]; then

nth_max=$((npe_node_max / npe_node_ocnanalletkf))
nth_max=$((npe_node_max / npe_node_marineanalletkf))

export NTHREADS_OCNANALLETKF=${nth_ocnanalletkf:-${nth_max}}
[[ ${NTHREADS_OCNANALLETKF} -gt ${nth_max} ]] && export NTHREADS_OCNANALLETKF=${nth_max}
export APRUN_OCNANALLETKF="${launcher} -n ${npe_ocnanalletkf} --cpus-per-task=${NTHREADS_OCNANALLETKF}"
export NTHREADS_MARINEANALLETKF=${nth_marineanalletkf:-${nth_max}}
[[ ${NTHREADS_MARINEANALLETKF} -gt ${nth_max} ]] && export NTHREADS_MARINEANALLETKF=${nth_max}
export APRUN_MARINEANALLETKF="${launcher} -n ${npe_marineanalletkf} --cpus-per-task=${NTHREADS_MARINEANALLETKF}"

elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then

Expand Down
10 changes: 5 additions & 5 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ elif [[ "${step}" = "ocnanalecen" ]]; then
[[ ${NTHREADS_OCNANALECEN} -gt ${nth_max} ]] && export NTHREADS_OCNANALECEN=${nth_max}
export APRUN_OCNANALECEN="${launcher} -n ${npe_ocnanalecen} --cpus-per-task=${NTHREADS_OCNANALECEN}"

elif [[ "${step}" = "ocnanalletkf" ]]; then
elif [[ "${step}" = "marineanalletkf" ]]; then

nth_max=$((npe_node_max / npe_node_ocnanalletkf))
nth_max=$((npe_node_max / npe_node_marineanalletkf))

export NTHREADS_OCNANALLETKF=${nth_ocnanalletkf:-${nth_max}}
[[ ${NTHREADS_OCNANALLETKF} -gt ${nth_max} ]] && export NTHREADS_OCNANALLETKF=${nth_max}
export APRUN_OCNANALLETKF="${launcher} -n ${npe_ocnanalletkf} --cpus-per-task=${NTHREADS_OCNANALLETKF}"
export NTHREADS_MARINEANALLETKF=${nth_marineanalletkf:-${nth_max}}
[[ ${NTHREADS_MARINEANALLETKF} -gt ${nth_max} ]] && export NTHREADS_MARINEANALLETKF=${nth_max}
export APRUN_MARINEANALLETKF="${launcher} -n ${npe_marineanalletkf} --cpus-per-task=${NTHREADS_MARINEANALLETKF}"

elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then

Expand Down
2 changes: 1 addition & 1 deletion jobs/JGLOBAL_MARINE_ANALYSIS_LETKF
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalletkf" -c "base ocnanal ocnanalletkf"
source "${HOMEgfs}/ush/jjob_header.sh" -e "marineanalletkf" -c "base ocnanal marineanalletkf"

##############################################
# Set variables used in the script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source "${HOMEgfs}/ush/preamble.sh"
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"

export job="ocnanalletkf"
export job="marineanalletkf"
export jobid="${job}.$$"

###############################################################
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

########## config.ocnanalletkf ##########
########## config.marineanalletkf ##########
# Ocn Analysis specific

echo "BEGIN: config.ocnanalletkf"
echo "BEGIN: config.marineanalletkf"

# Get task specific resources
. "${EXPDIR}/config.resources" ocnanalletkf
. "${EXPDIR}/config.resources" marineanalletkf

export MARINE_LETKF_EXEC="${JEDI_BIN}/gdas.x"
export MARINE_LETKF_YAML_TMPL="${PARMgfs}/gdas/soca/letkf/letkf.yaml.j2"
Expand All @@ -15,4 +15,4 @@ export MARINE_LETKF_STAGE_YAML_TMPL="${PARMgfs}/gdas/soca/letkf/letkf_stage.yaml
export GRIDGEN_EXEC="${JEDI_BIN}/gdas_soca_gridgen.x"
export GRIDGEN_YAML="${PARMgfs}/gdas/soca/gridgen/gridgen.yaml"

echo "END: config.ocnanalletkf"
echo "END: config.marineanalletkf"
3 changes: 2 additions & 1 deletion parm/config/gfs/config.ocnanal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export SOCA_NINNER=@SOCA_NINNER@
export CASE_ANL=@CASE_ANL@
export DOMAIN_STACK_SIZE=116640000 #TODO: Make the stack size resolution dependent
export JEDI_BIN=${HOMEgfs}/sorc/gdas.cd/build/bin
export SOCA_FIX_STAGE_YAML_TMPL="${PARMgfs}/gdas/soca/letkf/soca_fix_stage.yaml.j2"
export SOCA_FIX_STAGE_YAML_TMPL="${PARMgfs}/gdas/soca/soca_fix_stage.yaml.j2"
export SOCA_ENS_BKG_STAGE_YAML_TMPL="${PARMgfs}/gdas/soca/soca_ens_bkg_stage.yaml.j2"

# NICAS
export NICAS_RESOL=@NICAS_RESOL@
Expand Down
20 changes: 10 additions & 10 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (( $# != 1 )); then
echo "waveinit waveprep wavepostsbs wavepostbndpnt wavepostbndpntbll wavepostpnt"
echo "wavegempak waveawipsbulls waveawipsgridded"
echo "postsnd awips gempak npoess"
echo "ocnanalprep prepoceanobs ocnanalbmat ocnanalrun ocnanalecen ocnanalletkf ocnanalchkpt ocnanalpost ocnanalvrfy"
echo "ocnanalprep prepoceanobs ocnanalbmat ocnanalrun ocnanalecen marineanalletkf ocnanalchkpt ocnanalpost ocnanalvrfy"
exit 1

fi
Expand Down Expand Up @@ -557,32 +557,32 @@ case ${step} in
export memory_ocnanalecen
;;

"ocnanalletkf")
"marineanalletkf")
npes=16
case ${OCNRES} in
"025")
npes=480
memory_ocnanalletkf="96GB"
memory_marineanalletkf="96GB"
;;
"050")
npes=16
memory_ocnanalletkf="96GB"
memory_marineanalletkf="96GB"
;;
"500")
npes=16
memory_ocnanalletkf="24GB"
memory_marineanalletkf="24GB"
;;
*)
echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${OCNRES}"
exit 4
esac

export wtime_ocnanalletkf="00:10:00"
export npe_ocnanalletkf=${npes}
export nth_ocnanalletkf=1
export wtime_marineanalletkf="00:10:00"
export npe_marineanalletkf=${npes}
export nth_marineanalletkf=1
export is_exclusive=True
export npe_node_ocnanalletkf=$(( npe_node_max / nth_ocnanalletkf ))
export memory_ocnanalletkf
export npe_node_marineanalletkf=$(( npe_node_max / nth_marineanalletkf ))
export memory_marineanalletkf
;;


Expand Down
8 changes: 5 additions & 3 deletions ush/python/pygfs/task/marine_letkf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ def initialize(self):
for key in keys:
ensbkgconf[key] = self.task_config[key]
ensbkgconf.RUN = 'enkfgdas'
letkf_stage_list = parse_j2yaml(self.task_config.MARINE_LETKF_STAGE_YAML_TMPL, ensbkgconf)
soca_ens_bkg_stage_list = parse_j2yaml(self.task_config.SOCA_ENS_BKG_STAGE_YAML_TMPL, ensbkgconf)
FileHandler(soca_ens_bkg_stage_list).sync()
soca_fix_stage_list = parse_j2yaml(self.task_config.SOCA_FIX_STAGE_YAML_TMPL, self.task_config)
FileHandler(soca_fix_stage_list).sync()
letkf_stage_list = parse_j2yaml(self.task_config.MARINE_LETKF_STAGE_YAML_TMPL, self.task_config)
FileHandler(letkf_stage_list).sync()
letkf_stage_fix_list = parse_j2yaml(self.task_config.SOCA_FIX_STAGE_YAML_TMPL, self.task_config)
FileHandler(letkf_stage_fix_list).sync()

obs_list = parse_j2yaml(self.task_config.OBS_YAML, self.task_config)

Expand Down

0 comments on commit 2a4dd70

Please sign in to comment.