Skip to content

Commit

Permalink
Sync with develop and resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Jul 25, 2024
2 parents 60dcb0d + 8486596 commit 8e28c91
Show file tree
Hide file tree
Showing 33 changed files with 643 additions and 193 deletions.
9 changes: 3 additions & 6 deletions ci/cases/gfsv17/ocnanal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ base:
DO_VERFRAD: "YES"
DO_VRFY_OCEANDA: "NO"
FHMAX_GFS: 240
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}

ocnanal:
SOCA_INPUT_FIX_DIR: /scratch2/NCEPDEV/ocean/Guillaume.Vernieres/data/static/1440x1080x75/soca
CASE_ANL: 'C24'
SOCA_INPUT_FIX_DIR: {{ FIXgfs }}/gdas/soca/1440x1080x75/soca
SOCA_OBS_LIST: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml
SOCA_NINNER: 100
SABER_BLOCKS_YAML: ''
NICAS_RESOL: 1
NICAS_GRID_SIZE: 15000

prepoceanobs:
SOCA_OBS_LIST: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml
SOCA_OBS_LIST: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml
OBSPREP_YAML: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obsprep/obsprep_config.yaml
DMPDIR: /scratch1/NCEPDEV/da/common/
8 changes: 6 additions & 2 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,15 @@ elif [[ "${step}" = "snowanl" ]]; then

export APRUN_APPLY_INCR="${launcher} -n 6"

elif [[ "${step}" = "ocnanalbmat" ]]; then
elif [[ "${step}" = "marinebmat" ]]; then

export APRUNCFP="${launcher} -n \$ncmd --multi-prog"
export APRUN_MARINEBMAT="${APRUN}"

export APRUN_OCNANAL="${APRUN}"
elif [[ "${step}" = "marinebmat" ]]; then

export APRUNCFP="${launcher} -n \$ncmd --multi-prog"
export APRUN_MARINEBMAT="${APRUN}"

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

Expand Down
10 changes: 3 additions & 7 deletions env/HERCULES.env
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,15 @@ case ${step} in

export APRUN_APPLY_INCR="${launcher} -n 6"
;;
"ocnanalbmat")
"marinebmat")

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}"
export APRUN_MARINEBMAT="${APRUN}"
;;
"ocnanalrun")

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}"
export APRUN_OCNANAL="${APRUN}"
;;
"ocnanalecen")

Expand Down
8 changes: 2 additions & 6 deletions env/JET.env
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,14 @@ elif [[ "${step}" = "atmanlfv3inc" ]]; then
export NTHREADS_ATMANLFV3INC=${NTHREADSmax}
export APRUN_ATMANLFV3INC="${APRUN}"

elif [[ "${step}" = "ocnanalbmat" ]]; then
elif [[ "${step}" = "marinebmat" ]]; then

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN}"
export APRUN_MARINEBMAT="${APRUN}"

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

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN}"

elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then
Expand Down
9 changes: 4 additions & 5 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,18 @@ elif [[ "${step}" = "atmanlfv3inc" ]]; then
export NTHREADS_ATMANLFV3INC=${NTHREADSmax}
export APRUN_ATMANLFV3INC="${APRUN} --cpus-per-task=${NTHREADS_ATMANLFV3INC}"

elif [[ "${step}" = "ocnanalbmat" ]]; then
elif [[ "${step}" = "marinebmat" ]]; then

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}"
export NTHREADS_MARINEBMAT=${NTHREADSmax}
export APRUN_MARINEBMAT="${APRUN}"

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

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}"
export APRUN_OCNANAL="${APRUN}"

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

Expand Down
4 changes: 2 additions & 2 deletions env/S4.env
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ elif [[ "${step}" = "atmanlfv3inc" ]]; then
export NTHREADS_ATMANLFV3INC=${NTHREADSmax}
export APRUN_ATMANLFV3INC="${APRUN}"

elif [[ "${step}" = "ocnanalbmat" ]]; then
elif [[ "${step}" = "marinebmat" ]]; then
echo "WARNING: ${step} is not enabled on S4!"

elif [[ "${step}" = "ocnanalrun" ]]; then
elif [[ "${step}" = "marinerun" ]]; then
echo "WARNING: ${step} is not enabled on S4!"

elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then
Expand Down
48 changes: 0 additions & 48 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT

This file was deleted.

47 changes: 0 additions & 47 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT_VRFY

This file was deleted.

4 changes: 4 additions & 0 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
COM_ICE_HISTORY_PREV:COM_ICE_HISTORY_TMPL \
COM_ICE_RESTART_PREV:COM_ICE_RESTART_TMPL

YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_OCEAN_BMATRIX:COM_OCEAN_BMATRIX_TMPL \
COMIN_ICE_BMATRIX:COM_ICE_BMATRIX_TMPL

##############################################
# Begin JOB SPECIFIC work
##############################################
Expand Down
2 changes: 2 additions & 0 deletions jobs/JGLOBAL_ARCHIVE
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_OCEAN_GRIB:COM_OCEAN_GRIB_TMPL \
COMIN_OCEAN_NETCDF:COM_OCEAN_NETCDF_TMPL \
COMIN_OCEAN_ANALYSIS:COM_OCEAN_ANALYSIS_TMPL \
COMIN_OCEAN_BMATRIX:COM_OCEAN_BMATRIX_TMPL \
COMIN_ICE_BMATRIX:COM_ICE_BMATRIX_TMPL \
COMIN_WAVE_GRID:COM_WAVE_GRID_TMPL \
COMIN_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL \
COMIN_WAVE_STATION:COM_WAVE_STATION_TMPL \
Expand Down
66 changes: 66 additions & 0 deletions jobs/JGLOBAL_MARINE_BMAT
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash

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

if (( 10#${ENSMEM:-0} > 0 )); then
export DATAjob="${DATAROOT}/${RUN}marinebmat.${PDY:-}${cyc}"
export DATA="${DATAjob}/${jobid}"
# Create the directory to hold ensemble perturbations
export DATAenspert="${DATAjob}/enspert"
if [[ ! -d "${DATAenspert}" ]]; then mkdir -p "${DATAenspert}"; fi
fi

# source config.base, config.ocnanal and config.marinebmat
# and pass marinebmat to ${machine}.env
source "${HOMEgfs}/ush/jjob_header.sh" -e "marinebmat" -c "base ocnanal marinebmat"

##############################################
# Set variables used in the script
##############################################
# shellcheck disable=SC2153
GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours")
gPDY=${GDATE:0:8}
gcyc=${GDATE:8:2}
export GDUMP="gdas"
export GDUMP_ENS="enkf${GDUMP}"

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

# Generate COM variables from templates
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
COMIN_OCEAN_HISTORY_PREV:COM_OCEAN_HISTORY_TMPL \
COMIN_ICE_HISTORY_PREV:COM_ICE_HISTORY_TMPL

RUN=${GDUMP_ENS} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
COMIN_OCEAN_HISTORY_ENS_PREV:COM_OCEAN_HISTORY_TMPL \
COMIN_ICE_HISTORY_ENS_PREV:COM_ICE_HISTORY_TMPL

YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMOUT_OCEAN_BMATRIX:COM_OCEAN_BMATRIX_TMPL \
COMOUT_ICE_BMATRIX:COM_ICE_BMATRIX_TMPL

mkdir -p "${COMOUT_OCEAN_BMATRIX}"
mkdir -p "${COMOUT_ICE_BMATRIX}"

###############################################################
# Run relevant script

EXSCRIPT=${GDASMARINEBMATRUNPY:-${SCRgfs}/exglobal_marinebmat.py}
${EXSCRIPT}
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"

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

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

exit 0
5 changes: 2 additions & 3 deletions jobs/rocoto/ocnanalbmat.sh → jobs/rocoto/marinebmat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ source "${HOMEgfs}/ush/preamble.sh"
status=$?
[[ "${status}" -ne 0 ]] && exit "${status}"

export job="ocnanalbmat"
export job="marinebmat"
export jobid="${job}.$$"

###############################################################
# Execute the JJOB
"${HOMEgfs}"/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT
echo "BMAT gets run here"
"${HOMEgfs}"/jobs/JGLOBAL_MARINE_BMAT
status=$?
exit "${status}"
2 changes: 1 addition & 1 deletion parm/archive/gdas.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gdas:
{% if DO_JEDIOCNVAR %}
- "logs/{{ cycle_YMDH }}/{{ RUN }}prepoceanobs.log"
- "logs/{{ cycle_YMDH }}/{{ RUN }}ocnanalprep.log"
- "logs/{{ cycle_YMDH }}/{{ RUN }}ocnanalbmat.log"
- "logs/{{ cycle_YMDH }}/{{ RUN }}marinebmat.log"
- "logs/{{ cycle_YMDH }}/{{ RUN }}ocnanalrun.log"
- "logs/{{ cycle_YMDH }}/{{ RUN }}ocnanalpost.log"
- "logs/{{ cycle_YMDH }}/{{ RUN }}ocnanalchkpt.log"
Expand Down
27 changes: 17 additions & 10 deletions parm/archive/gdasocean_analysis.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,30 @@ gdasocean_analysis:
name: "GDASOCEAN_ANALYSIS"
target: "{{ ATARDIR }}/{{ cycle_YMDH }}/gdasocean_analysis.tar"
required:
# analysis and analysis increments
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/{{ head }}ocninc.nc'
{% set ocngrid_cycle = '%02d' % (((cycle_HH | int) - 3) % 24) %}
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/gdas.t{{ ocngrid_cycle }}z.ocngrid.nc'
{% for domain in ["ocn", "ice"] %}
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/{{ head }}{{domain}}.bkgerr_stddev.nc'
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/{{ head }}{{domain}}.incr.nc'
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/{{ head }}{{domain}}ana.nc'
{% if NMEM_ENS > 2 %}
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/{{ head }}{{domain}}.recentering_error.nc'
{% endif %}
{% endfor %}

# static background error
- '{{ COMIN_OCEAN_BMATRIX | relpath(ROTDIR) }}/{{ head }}ocean.bkgerr_stddev.nc'
- '{{ COMIN_ICE_BMATRIX | relpath(ROTDIR) }}/{{ head }}ice.bkgerr_stddev.nc'

# ensemble background error
{% if NMEM_ENS > 2 %}
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/{{ head }}ocn.ssh_steric_stddev.nc'
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/{{ head }}ocn.ssh_unbal_stddev.nc'
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/{{ head }}ocn.ssh_total_stddev.nc'
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/{{ head }}ocn.steric_explained_variance.nc'
- '{{ COMIN_ICE_BMATRIX | relpath(ROTDIR) }}/{{ head }}ice.ens_weights.nc'
- '{{ COMIN_OCEAN_BMATRIX | relpath(ROTDIR) }}/{{ head }}ocean.ens_weights.nc'
- '{{ COMIN_OCEAN_BMATRIX | relpath(ROTDIR) }}/{{ head }}ocean.recentering_error.nc'
{% for diag_type in ["ssh_steric_stddev", "ssh_unbal_stddev", "ssh_total_stddev", "steric_explained_variance"] %}
- '{{ COMIN_OCEAN_BMATRIX | relpath(ROTDIR) }}/{{ head }}ocean.{{ diag_type }}.nc'
{% endfor %}
{% endif %}

# obs space diags
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/{{ head }}ocn.*.stats.csv'
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/diags/*.nc4'

# runtime configs
- '{{ COMIN_OCEAN_ANALYSIS | relpath(ROTDIR) }}/yaml/*.yaml'
2 changes: 2 additions & 0 deletions parm/config/gfs/config.com
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ declare -rx COM_OCEAN_HISTORY_TMPL=${COM_BASE}'/model_data/ocean/history'
declare -rx COM_OCEAN_RESTART_TMPL=${COM_BASE}'/model_data/ocean/restart'
declare -rx COM_OCEAN_INPUT_TMPL=${COM_BASE}'/model_data/ocean/input'
declare -rx COM_OCEAN_ANALYSIS_TMPL=${COM_BASE}'/analysis/ocean'
declare -rx COM_OCEAN_BMATRIX_TMPL=${COM_BASE}'/bmatrix/ocean'
declare -rx COM_OCEAN_NETCDF_TMPL=${COM_BASE}'/products/ocean/netcdf'
declare -rx COM_OCEAN_GRIB_TMPL=${COM_BASE}'/products/ocean/grib2'
declare -rx COM_OCEAN_GRIB_GRID_TMPL=${COM_OCEAN_GRIB_TMPL}'/${GRID}'

declare -rx COM_ICE_ANALYSIS_TMPL=${COM_BASE}'/analysis/ice'
declare -rx COM_ICE_BMATRIX_TMPL=${COM_BASE}'/bmatrix/ice'
declare -rx COM_ICE_INPUT_TMPL=${COM_BASE}'/model_data/ice/input'
declare -rx COM_ICE_HISTORY_TMPL=${COM_BASE}'/model_data/ice/history'
declare -rx COM_ICE_RESTART_TMPL=${COM_BASE}'/model_data/ice/restart'
Expand Down
11 changes: 11 additions & 0 deletions parm/config/gfs/config.marinebmat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

########## config.marinebmat ##########
# configuration for the marine B-matrix

echo "BEGIN: config.marinebmat"

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

echo "END: config.marinebmat"
Loading

0 comments on commit 8e28c91

Please sign in to comment.