Skip to content

Commit

Permalink
Adapt the marine DA to the new COM structure (#1554)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumevernieres authored May 1, 2023
1 parent 6c48e94 commit 6d3ed8a
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 26 deletions.
2 changes: 1 addition & 1 deletion jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
export STRICT="NO"
source "${HOMEgfs}/ush/preamble.sh"
WIPE_DATA="NO"
export WIPE_DATA="NO"

export DATA="${DATAROOT}/${RUN}ocnanal_${cyc}"
source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalrun" -c "base ocnanal ocnanalrun"
Expand Down
2 changes: 1 addition & 1 deletion jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT_VRFY
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
export STRICT="NO"
source "${HOMEgfs}/ush/preamble.sh"
WIPE_DATA="NO"
export WIPE_DATA="NO"
export DATA="${DATAROOT}/${RUN}ocnanal_${cyc}"
source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalrun" -c "base ocnanal ocnanalrun"

Expand Down
12 changes: 9 additions & 3 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalchkpt" -c "base ocnanal ocnana


##############################################
# Begin JOB SPECIFIC work
# Set variables used in the script
##############################################

# Ignore possible spelling error (nothing is misspelled)
# shellcheck disable=SC2153
GDATE=$(date +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours")
Expand All @@ -23,7 +22,14 @@ export GPREFIX="${GDUMP}.t${gcyc}z."
# shellcheck disable=SC2153
export APREFIX="${CDUMP}.t${cyc}z."

export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ocean}
# Generate COM variables from templates
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx COM_ATMOS_HISTORY:COM_ATMOS_HISTORY_TMPL
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx COM_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL


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

###############################################################
# Run relevant script
Expand Down
21 changes: 14 additions & 7 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
#!/bin/bash
export STRICT="NO"
source "${HOMEgfs}/ush/preamble.sh"
WIPE_DATA="NO"
export WIPE_DATA="NO"
DATA="${DATAROOT}/${RUN}ocnanal_${cyc}"
source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalpost" -c "base ocnanalpost"


##############################################
# Begin JOB SPECIFIC work
# Set variables used in the script
##############################################

export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ocean}
export COMOUTice=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ice
export CDUMP=${CDUMP:-${RUN:-"gfs"}}
export CDATE=${CDATE:-${PDY}${cyc}}
export GDUMP=${GDUMP:-"gdas"}

# Generate COM variables from templates
RUN=${GDUMP} YMD=${PDY} HH=${cyc} generate_com -rx COM_OCEAN_ANALYSIS:COM_OCEAN_ANALYSIS_TMPL
RUN=${GDUMP} YMD=${PDY} HH=${cyc} generate_com -rx COM_ICE_RESTART

mkdir -p "${COM_OCEAN_ANALYSIS}"
mkdir -p "${COM_ICE_RESTART}"

mkdir -p "${COMOUT}"
mkdir -p "${COMOUTice}/RESTART"
##############################################
# Begin JOB SPECIFIC work
##############################################

# Add UFSDA to PYTHONPATH
ufsdaPATH="${HOMEgfs}/sorc/gdas.cd/ush/"
Expand Down
22 changes: 11 additions & 11 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
#!/bin/bash
export STRICT="NO"
source "${HOMEgfs}/ush/preamble.sh"
DATA="${DATAROOT}/${RUN}ocnanal_${cyc}"
export DATA="${DATAROOT}/${RUN}ocnanal_${cyc}"
source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalprep" -c "base ocnanal ocnanalprep"


##############################################
# Set variables used in the script
##############################################
export CDUMP=${CDUMP:-${RUN:-"gfs"}}
export COMPONENT="ocean"

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

# Ignore possible spelling error (nothing is misspelled)
# shellcheck disable=SC2153
GDATE=$(date +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours")
export GDATE
export gPDY=${GDATE:0:8}
Expand All @@ -25,12 +21,16 @@ export OPREFIX="${CDUMP}.t${cyc}z."
export GPREFIX="${GDUMP}.t${gcyc}z."
export APREFIX="${CDUMP}.t${cyc}z."

export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ocean}
# Generate COM variables from templates
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx COM_OCEAN_HISTORY:COM_OCEAN_HISTORY_TMPL
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx COM_ICE_HISTORY:COM_ICE_HISTORY_TMPL
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx COM_ICE_RESTART:COM_ICE_RESTART_TMPL

mkdir -p "${COMOUT}"

# COMIN_GES and COMIN_GES_ENS are used in script
export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/ocean"

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

# Add UFSDA to PYTHONPATH
ufsdaPATH="${HOMEgfs}/sorc/gdas.cd/ush/"
Expand Down
2 changes: 1 addition & 1 deletion jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_RUN
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
export STRICT="NO"
source "${HOMEgfs}/ush/preamble.sh"
WIPE_DATA="NO"
export WIPE_DATA="NO"
export DATA="${DATAROOT}/${RUN}ocnanal_${cyc}"
source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalrun" -c "base ocnanal ocnanalrun"

Expand Down
12 changes: 10 additions & 2 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_VRFY
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalprep" -c "base ocnanal ocnanal
##############################################
# Set variables used in the script
##############################################
export CDUMP=${CDUMP:-${RUN:-"gfs"}}
export GDUMP=${GDUMP:-"gdas"}
# Ignore possible spelling error (nothing is misspelled)
# shellcheck disable=SC2153
GDATE=$(date +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours")
export gPDY=${GDATE:0:8}
export gcyc=${GDATE:8:2}

RUN=${GDUMP} YMD=${PDY} HH=${cyc} generate_com -rx COM_OCEAN_ANALYSIS
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx COM_OCEAN_HISTORY:COM_OCEAN_HISTORY_TMPL
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx COM_ICE_HISTORY:COM_ICE_HISTORY_TMPL

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

export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ocean}

# Add UFSDA to PYTHONPATH
export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${HOMEgfs}/sorc/gdas.cd/ush/eva:${PYTHONPATH}

Expand Down

0 comments on commit 6d3ed8a

Please sign in to comment.