Skip to content

Commit

Permalink
Add stage ic version file, update versions
Browse files Browse the repository at this point in the history
Adds a new vesion file for IC directories. Unlike other version
files, this one uses an associative array instead of different
variables.

With the version file in place, the versions are updated on most
of the directories to switch to the relocated wave restarts.

Refs: NOAA-EMC#3109
  • Loading branch information
WalterKolczynski-NOAA committed Nov 20, 2024
1 parent 215a218 commit ae93389
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
10 changes: 6 additions & 4 deletions parm/config/gefs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ export BASE_IC="@BASE_IC@" # Platform home for staged ICs

export STAGE_IC_YAML_TMPL="${PARMgfs}/stage/master_gefs.yaml.j2"

# Set ICSDIR
source "${HOMEgfs}/versions/ic.ver"

# Set ICSDIR (if not defined)
if [[ -z "${ICSDIR}" ]] ; then

ic_ver="20240610"

if (( NMEM_ENS > 0 )) ; then
ensic="${CASE_ENS}"
fi
Expand All @@ -26,7 +25,10 @@ if [[ -z "${ICSDIR}" ]] ; then
ocnic="mx${OCNRES}"
fi

export ICSDIR="${BASE_IC}/${CASE}${ensic:-}${ocnic:-}/${ic_ver}"
dir_name="${CASE}${ensic:-}${ocnic:-}"
ic_ver="${ic_versions[${dir_name}]}"

export ICSDIR="${BASE_IC}/${dir_name}/${ic_ver}"

fi

Expand Down
9 changes: 6 additions & 3 deletions parm/config/gfs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export BASE_IC="@BASE_IC@" # Platform home for staged ICs

export STAGE_IC_YAML_TMPL="${PARMgfs}/stage/master_gfs.yaml.j2"

source "${HOMEgfs}/versions/ic.ver"

# Set ICSDIR (if not defined)
if [[ -z "${ICSDIR}" ]] ; then

ic_ver="20240610"

if (( NMEM_ENS > 0 )) ; then
ensic="${CASE_ENS}"
fi
Expand All @@ -25,7 +25,10 @@ if [[ -z "${ICSDIR}" ]] ; then
ocnic="mx${OCNRES}"
fi

export ICSDIR="${BASE_IC}/${CASE}${ensic:-}${ocnic:-}/${ic_ver}"
dir_name="${CASE}${ensic:-}${ocnic:-}"
ic_ver="${ic_versions[${dir_name}]}"

export ICSDIR="${BASE_IC}/${dir_name}/${ic_ver}"

fi

Expand Down
22 changes: 22 additions & 0 deletions versions/ic.ver
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
# Initial condition subfolder versions

#shellcheck disable=SC2034
declare -A ic_versions

ic_versions['C48']=20241120
ic_versions['C48mx500']=20241120
ic_versions['C48C48mx500']=20241120

ic_versions['C96']=20241120
ic_versions['C96C48']=20241120
ic_versions['C96mx100']=20240610

ic_versions['C384C192']=20240610
ic_versions['C384mx025']=20241120

ic_versions['C768']=20241120
ic_versions['C768mx025']=20241120

ic_versions['C1152']=20241120
ic_versions['C1152mx025']=20241120

0 comments on commit ae93389

Please sign in to comment.