Skip to content

Commit

Permalink
Reorganize COM and refactor to use templates (#1421)
Browse files Browse the repository at this point in the history
Reorganizes the entire COM directory into a more hierarchical structure and uses centrally-defined templates to define COM paths.

## Hierarchical Structure
To organize output a lot better and not have 30000+ files in a single directory, all of the component COM directories are divided into a number of subdirectories for each type of output.

Sample directory trees

### Cycled atmosphere only
```
gdas.20211222/00
├── analysis
│   └── atmos
│       └── gsidiags
│           ├── dir.0000
│           ├── dir.0001
│           ├── (Additional dir.* directories omitted for brevity)
│           └── dir.0083
├── model_data
│   └── atmos
│       ├── history
│       ├── master
│       └── restart
├── obs
└── products
    └── atmos
        ├── cyclone
        │   └── tracks
        └── grib2
            ├── 0p25
            ├── 0p50
            └── 1p00

101 directories
```
```
enkfgdas.20211222/00
├── earc00
├── ensstat
│   ├── analysis
│   │   └── atmos
│   │       └── gsidiags
│   │           ├── dir.0000
│   │           ├── dir.0001
│   │           ├── (Additional dir.* omitted for brevity)
│   │           └── dir.0039
│   └── model_data
│       └── atmos
│           └── history
├── mem001
│   ├── analysis
│   │   └── atmos
│   └── model_data
│       └── atmos
│           ├── history
│           ├── master
│           └── restart
└── mem002
    ├── analysis
    │   └── atmos
    └── model_data
        └── atmos
            ├── history
            ├── master
            └── restart

64 directories
```
```
gfs.20211222/00
├── analysis
│   └── atmos
├── model_data
│   └── atmos
│       ├── history
│       ├── master
│       └── restart
├── obs
└── products
    └── atmos
        ├── bufr
        ├── cyclone
        │   ├── genesis_vital
        │   └── tracks
        ├── gempak
        │   ├── 0p25
        │   ├── 0p50
        │   ├── 1p00
        │   ├── 35km_atl
        │   ├── 35km_pac
        │   └── 40km
        ├── grib2
        │   ├── 0p25
        │   ├── 0p50
        │   └── 1p00
        └── wmo

26 directories
```
```
enkfgfs.20211222/00
├── earc00
├── ensstat
│   ├── analysis
│   │   └── atmos
│   │       └── gsidiags
│   │           ├── dir.0000
│   │           ├── dir.0001
│   │           ├── (Additional dir.* directories removed for brevity)
│   │           └── dir.0039
│   └── model_data
│       └── atmos
│           └── history
├── mem001
│   ├── analysis
│   │   └── atmos
│   └── model_data
│       └── atmos
│           ├── history
│           ├── master
│           └── restart
└── mem002
    ├── analysis
    │   └── atmos
    └── model_data
        └── atmos
            ├── history
            ├── master
            └── restart

64 directories
```

### S2SWA coupled
prototype (forecast-only):
```
gfs.20130401/00/
├── model_data
│   ├── atmos
│   │   ├── history
│   │   ├── input
│   │   ├── master
│   │   └── restart
│   ├── chem
│   │   └── history
│   ├── ice
│   │   ├── history
│   │   ├── input
│   │   └── restart
│   ├── med
│   │   └── restart
│   ├── ocean
│   │   ├── history
│   │   ├── input
│   │   └── restart
│   └── wave
│       ├── history
│       ├── prep
│       └── restart
└── products
    ├── atmos
    │   ├── cyclone
    │   │   ├── genesis_vital
    │   │   └── tracks
    │   ├── gempak
    │   │   ├── 0p25
    │   │   ├── 0p50
    │   │   ├── 1p00
    │   │   ├── 35km_atl
    │   │   ├── 35km_pac
    │   │   └── 40km
    │   ├── grib2
    │   │   ├── 0p25
    │   │   ├── 0p50
    │   │   └── 1p00
    │   └── wmo
    ├── ocean
    │   ├── 2D
    │   ├── 3D
    │   ├── grib
    │   │   ├── 0p25
    │   │   └── 0p50
    │   └── xsect
    └── wave
        ├── gempak
        ├── gridded
        ├── station
        └── wmo

51 directories
```

### Trees with files
gdas: https://gist.github.com/WalterKolczynski-NOAA/f1de04901e2703fd24d38146d2669789
gfs: https://gist.github.com/WalterKolczynski-NOAA/5d1b7c0a0f4b8cfff0be1ae54082316a
enkfgdas: https://gist.github.com/WalterKolczynski-NOAA/860aaa804e3e70e191e7cae2ebb1055b
enkfgfs: https://gist.github.com/WalterKolczynski-NOAA/130bfff4650ed8b07cf395079b65d318
S2SWA P8: https://gist.github.com/WalterKolczynski-NOAA/6ae90c6eafb573878f60682ce47179db

## Templating
All of the COM paths have been replaced with new variables that are derived from a set of templates centrally defined in `config.com`. Variables in the templates are then substituted at runtime to generate the COM paths via the use of `envsubst`. To facilitate this, there is a new function, `generate_com` (see below), provided to automatically generate the COM paths.

Where possible, COM paths are defined at the j-job level and made read-only. However, many of the EnKF scripts loop over the ensemble members, forcing the definitions to be made at the exscript level instead (and be mutable).

The arguments to `generate_com()` are the list of COM variables to generate, optionally accompanied by a template to use using a colon to separate them. When no template is specified, the variable will be generated using the ${varname}_TMPL template. Two options are accepted, `-r` and `-x`, which will mark the variable as read-only and for export, respectively (the same as with the `declare` builtin). It is best practice to define any additional variables needed by the template on the same line to avoid adding them to the calling script’s scope. Here are some examples used in the code:

Generate the path to the atmos analysis directory for the current cycle and `$RUN` (implicitly from the `$COM_ATMOS_ANALYSIS_TMPL` template) and mark as read-only and export:
```
YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_ANALYSIS
```

Generate the path to the atmos history directory for the previous cycle's gdas from the `$COM_ATMOS_HISTORY_TMPL` template and mark as read-only and export:
```
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx \
    COM_ATMOS_HISTORY_PREV:COM_ATMOS_HISTORY_TMPL
```

Generate the path to the first ensemble member's history directory of the current cycle and `$RUN` and mark for export:
```
MEMDIR=’mem001’ YMD=${PDY} HH=${cyc} generate_com -x COM_ATMOS_HISTORY
```

## Additional information
The staging of initial conditions in `setup_expy.py` has been updated to stage in the new locations. The source of the initial conditions can **either** be in the new hierarchical structure or in the old flat structure and the script will stage the files in the new structure. The destination paths are hard-coded here, so if any changes are made to the analysis, input, or restart templates, they will need to be mirrored in `setup_expy.py`.

### Stipulations
All changes in this PR are subject to approval by several stakeholders, including NCO. Sample COM trees above are subject to revision based on feedback (for instance, file X isn't really an obs file).

File name updates are not included in this PR. File names (primarily for coupled components) will be updated to comply with NCO standards in a future PR.

AWIPS jobs are now almost working (they do not in current develop), but one last program is still ending with an error.

Work on fit2obs is deferred, so that portion of the verify job does not work.

WAFS scripts are all external and have not yet been updated. WAFS is expected to be packaged separately going forward, so will need to be updated like any other downstream package.

Some scripts that are not part of our normal development workflow have not yet been updated. I may be able to knock a few more off this list, but some just aren’t available in development mode currently:
- All UFSDA app jobs (to be handled separately)
- With associated dev jobs (may still modify and test)
  - JGDAS_ATMOS_GLDAS
  - ~~JGLOBAL_WAVE_GEMPAK~~
  - ~~JGLOBAL_WAVE_POST_BNDPNT~~
  - ~~JGLOBAL_WAVE_POST_BNDPNTBLL~~
  - ~~JGLOBAL_WAVE_PRDGEN_BULLS~~
  - ~~JGLOBAL_WAVE_PRDGEN_GRIDDED~~
  - ~~JGLOBAL_WAVE_PREP~~
- With no associated dev job
  - JGDAS_ATMOS_GEMPAK_META_NCDCJGFS_ATMOS_FBWIND
  - JGFS_ATMOS_FSU_GENESIS
  - JGFS_ATMOS_GEMPAK_META
  - JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF
  - JGLOBAL_ATMOS_EMCSFC_SFC_PREP
  - JGLOBAL_ATMOS_POST_MANAGER
  - JGLOBAL_ATMOS_TROPCY_QC_RELOC
+ All downstream scripts for the above

There are also a few scripts that are not available to the development workflow that I have already made a good-faith effort at updating:
- JGDAS_ATMOS_GEMPAK
- JGFS_ATMOS_PGRB2_SPEC_NPOESS

## Related Issues
Closes #761
Fixes #978
Fixes #999
Fixes #1207
Partially addresses #198
Partially addresses #289
Partially addresses #293
Partially addresses #1299
Partially addresses #1326
  • Loading branch information
WalterKolczynski-NOAA authored Apr 24, 2023
1 parent 408ef65 commit efa5180
Show file tree
Hide file tree
Showing 120 changed files with 3,390 additions and 3,300 deletions.
3 changes: 3 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ disable=SC1090

# Disable non-existent binary
disable=SC1091

# Disable -p -m only applies to deepest directory
disable=SC2174
3 changes: 2 additions & 1 deletion env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then
export sys_tp="ORION"
export launcher_PREP="srun"

elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || [[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostbndpntbll" ]]|| [[ "${step}" = "wavepostpnt" ]]; then
elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || \
[[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostpnt" ]] || [[ "${step}" == "wavepostbndpntbll" ]]; then

export CFP_MP="YES"
if [[ "${step}" = "waveprep" ]]; then export MP_PULSE=0 ; fi
Expand Down
51 changes: 12 additions & 39 deletions jobs/JGDAS_ATMOS_ANALYSIS_DIAG
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,29 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "anal" -c "base anal analdiag"
##############################################
# Set variables used in the script
##############################################
export CDATE=${CDATE:-${PDY}${cyc}}
export CDUMP=${CDUMP:-${RUN:-"gfs"}}
export CDUMP="${RUN/enkf}"
export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"}


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

GDATE=$(${NDATE} -${assim_freq} ${CDATE})
gPDY=$(echo ${GDATE} | cut -c1-8)
gcyc=$(echo ${GDATE} | cut -c9-10)
GDUMP=${GDUMP:-"gdas"}
# Ignore possible spelling error (nothing is misspelled)
# shellcheck disable=SC2153
GDATE=$(${NDATE} -${assim_freq} ${PDY}${cyc})
# shellcheck disable=
export gPDY=${GDATE:0:8}
export gcyc=${GDATE:8:2}
export GDUMP="gdas"
export GDUMP_ENS="enkf${GDUMP}"

export OPREFIX="${CDUMP}.t${cyc}z."
export GPREFIX="${GDUMP}.t${gcyc}z."
export APREFIX="${CDUMP}.t${cyc}z."
export GPREFIX_ENS="enkf${GDUMP}.t${gcyc}z."


if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then
export COMOUT=${COMOUT:-${ROTDIR}/${RUN}.${PDY}/${cyc}/atmos}
export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/atmos}
export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${GDUMP}.${gPDY}/${gcyc}/atmos}
else
export COMOUT="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos"
export COMIN_OBS="${COMIN_OBS:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/obs}"
export COMIN_GES_OBS="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/obs"
fi
mkdir -m 775 -p ${COMOUT}
# COMIN_GES and COMIN_GES_ENS are used in script
export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos"
export COMIN_GES_ENS="${ROTDIR}/enkfgdas.${gPDY}/${gcyc}"


export ATMGES="${COMIN_GES}/${GPREFIX}atmf006.nc"
if [ ! -f ${ATMGES} ]; then
echo "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}"
exit 1
fi


if [ ${DOHYBVAR} = "YES" ]; then
export ATMGES_ENSMEAN="${COMIN_GES_ENS}/${GPREFIX_ENS}atmf006.ensmean.nc"
if [ ! -f ${ATMGES_ENSMEAN} ]; then
echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}"
exit 2
fi
fi
export APREFIX="${RUN}.t${cyc}z."

YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_ANALYSIS
mkdir -m 775 -p "${COM_ATMOS_ANALYSIS}"

###############################################################
# Run relevant script
Expand Down
20 changes: 5 additions & 15 deletions jobs/JGDAS_ATMOS_CHGRES_FORENKF
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,19 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "anal" -c "base anal echgres"
##############################################
# Set variables used in the script
##############################################
export CDATE=${CDATE:-${PDY}${cyc}}
export CDUMP=${CDUMP:-${RUN:-"gfs"}}
export COMPONENT="atmos"
export CDUMP=${RUN/enkf}
export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"}


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

export APREFIX="${CDUMP/enkf}.t${cyc}z."
export APREFIX_ENS="${CDUMP}.t${cyc}z."
export APREFIX="${CDUMP}.t${cyc}z."
export APREFIX_ENS="${RUN}.t${cyc}z."

if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then
export COMOUT=${COMOUT:-${ROTDIR}/${RUN/enkf}.${PDY}/${cyc}/atmos}
export COMOUT_ENS=${COMOUT_ENS:-${ROTDIR}/${RUN}.${PDY}/${cyc}}
else
export COMOUT="${ROTDIR}/${RUN/enkf}.${PDY}/${cyc}/atmos"
export COMOUT_ENS="${ROTDIR}/${RUN}.${PDY}/${cyc}"
fi
mkdir -m 775 -p ${COMOUT}

export ATMFCST_ENSRES="${COMOUT_ENS}/mem001/atmos/${APREFIX_ENS}atmf006.nc"
RUN=${CDUMP} YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_HISTORY
MEMDIR="mem001" YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_HISTORY_MEM:COM_ATMOS_HISTORY_TMPL

###############################################################
# Run relevant script
Expand Down
30 changes: 17 additions & 13 deletions jobs/JGDAS_ATMOS_GEMPAK
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,37 @@ export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn}
# Specify NET and RUN Name and model
####################################
export model=${model:-gdas}
export COMPONENT="atmos"

##############################################
# Define COM directories
##############################################
export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}}
export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}/gempak}
for grid in 0p25 0p50 1p00; do
GRID=${grid} YMD=${PDY} HH=${cyc} generate_com -rx "COM_ATMOS_GRIB_${grid}:COM_ATMOS_GRIB_TMPL"
done

if [ ${SENDCOM} = YES ] ; then
mkdir -m 775 -p ${COMOUT}
fi
for grid in 1p00 0p25; do
prod_dir="COM_ATMOS_GEMPAK_${grid}"
GRID=${grid} YMD=${PDY} HH=${cyc} generate_com -rx "COM_ATMOS_GEMPAK_${grid}:COM_ATMOS_GEMPAK_TMPL"

if [[ ${SENDCOM} == YES && ! -d "${!prod_dir}" ]] ; then
mkdir -m 775 -p "${!prod_dir}"
fi
done


# TODO: These actions belong in an ex-script not a j-job (#1219)
if [ -f ${DATA}/poescript ]; then
rm ${DATA}/poescript
# TODO: These actions belong in an ex-script not a j-job
if [[ -f poescript ]]; then
rm -f poescript
fi

########################################################
# Execute the script.
echo "${SRCgfs}/exgdas_atmos_nawips.sh gdas 009 GDAS_GEMPAK " >> poescript
echo "${SRCgfs}/exgdas_atmos_nawips.sh gdas 009 GDAS_GEMPAK ${COM_ATMOS_GEMPAK_1p00}" >> poescript
########################################################

########################################################
# Execute the script for quater-degree grib
echo "${SRCgfs}/exgdas_atmos_nawips.sh gdas_0p25 009 GDAS_GEMPAK " >>poescript
echo "${SRCgfs}/exgdas_atmos_nawips.sh gdas_0p25 009 GDAS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}" >> poescript
########################################################

cat poescript
Expand All @@ -76,9 +81,8 @@ export OMP_NUM_THREADS=${threads}
APRUN="mpiexec -l -np ${ntasks} --cpu-bind verbose,core cfp"

APRUN_GEMPAKCFP=${APRUN_GEMPAKCFP:-${APRUN}}
APRUNCFP=$(eval echo ${APRUN_GEMPAKCFP})

${APRUNCFP} ${DATA}/poescript
${APRUN_GEMPAKCFP} ${DATA}/poescript
export err=$?; err_chk

############################################
Expand Down
24 changes: 9 additions & 15 deletions jobs/JGDAS_ATMOS_VERFOZN
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "vrfy" -c "base vrfy"


###############################
# Specify NET, RUN, and COMPONENT name
##############################
export COMPONENT="atmos"

export OZNMON_SUFFIX=${OZNMON_SUFFIX:-${NET}}

#---------------------------------------------
Expand Down Expand Up @@ -39,20 +33,20 @@ export USHoznmon=${USHoznmon:-${HOMEoznmon}/ush}
# determine PDY and cyc for previous cycle
#############################################

cdate=$(${NDATE} -6 ${PDY}${cyc})
echo 'pdate = ${pdate}'
pdate=$(${NDATE} -6 ${PDY}${cyc})
echo "pdate = ${pdate}"

export P_PDY=$(echo ${cdate} | cut -c1-8)
export p_cyc=$(echo ${cdate} | cut -c9-10)
export P_PDY=${pdate:0:8}
export p_cyc=${pdate:8:2}

#---------------------------------------------
# OZN_TANKDIR - WHERE OUTPUT DATA WILL RESIDE
#
export OZN_TANKDIR=${OZN_TANKDIR:-$(compath.py ${envir}/${NET}/${gfs_ver})}
export TANKverf_ozn=${TANKverf_ozn:-${OZN_TANKDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}/oznmon}
export TANKverf_oznM1=${TANKverf_oznM1:-${OZN_TANKDIR}/${RUN}.${P_PDY}/${p_cyc}/${COMPONENT}/oznmon}
export COM_IN=${COM_IN:-$(compath.py ${envir}/${NET}/${gfs_ver})}
export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}}
export TANKverf_ozn=${TANKverf_ozn:-${OZN_TANKDIR}/${RUN}.${PDY}/${cyc}/atmos/oznmon}
export TANKverf_oznM1=${TANKverf_oznM1:-${OZN_TANKDIR}/${RUN}.${P_PDY}/${p_cyc}/atmos/oznmon}

YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_ANALYSIS

if [[ ! -d ${TANKverf_ozn} ]]; then
mkdir -p -m 775 ${TANKverf_ozn}
Expand All @@ -69,7 +63,7 @@ fi
# Set necessary environment variables
#
export OZN_AREA=${OZN_AREA:-glb}
export oznstat=${oznstat:-${COMIN}/gdas.t${cyc}z.oznstat}
export oznstat=${oznstat:-${COM_ATMOS_ANALYSIS}/gdas.t${cyc}z.oznstat}


#-------------------------------------------------------
Expand Down
28 changes: 9 additions & 19 deletions jobs/JGDAS_ATMOS_VERFRAD
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,21 @@ parm_file=${parm_file:-${PARMmon}/da_mon.parm}
# determine PDY and cyc for previous cycle
#############################################

cdate=$(${NDATE} -6 ${PDY}${cyc})
echo 'pdate = ${pdate}'
pdate=$(${NDATE} -6 ${PDY}${cyc})
echo "pdate = ${pdate}"

export P_PDY=$(echo ${cdate} | cut -c1-8)
export p_cyc=$(echo ${cdate} | cut -c9-10)
export P_PDY=${pdate:0:8}
export p_cyc=${pdate:8:2}

#############################################
# COMOUT - WHERE GSI OUTPUT RESIDES
# TANKverf - WHERE OUTPUT DATA WILL RESIDE
#############################################
export TANKverf=${TANKverf:-$(compath.py ${envir}/${NET}/${gfs_ver})}
export TANKverf_rad=${TANKverf_rad:-${TANKverf}/${RUN}.${PDY}/${cyc}/${COMPONENT}/radmon}
export TANKverf_radM1=${TANKverf_radM1:-${TANKverf}/${RUN}.${P_PDY}/${p_cyc}/${COMPONENT}/radmon}
export COM_IN=${COM_IN:-$(compath.py ${envir}/${NET}/${gfs_ver})}
export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}}

################################
# backwards compatibility for
# gfs v15 which doesn't have
# a $COMPONENT in output path
################################
if [[ ! -d ${COMIN} ]]; then
export COMIN=${COM_IN}/${RUN}.${PDY}/${cyc}
fi
export TANKverf_rad=${TANKverf_rad:-${TANKverf}/${RUN}.${PDY}/${cyc}/atmos/radmon}
export TANKverf_radM1=${TANKverf_radM1:-${TANKverf}/${RUN}.${P_PDY}/${p_cyc}/atmos/radmon}

YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_ANALYSIS

mkdir -p -m 775 ${TANKverf_rad}

Expand All @@ -75,8 +65,8 @@ mkdir -p -m 775 ${TANKverf_rad}
########################################
export RAD_AREA=${RAD_AREA:-glb}

export biascr=${biascr:-${COMIN}/gdas.t${cyc}z.abias}
export radstat=${radstat:-${COMIN}/gdas.t${cyc}z.radstat}
export biascr=${biascr:-${COM_ATMOS_ANALYSIS}/gdas.t${cyc}z.abias}
export radstat=${radstat:-${COM_ATMOS_ANALYSIS}/gdas.t${cyc}z.radstat}

echo " "
echo "JOB HAS STARTED"
Expand Down
21 changes: 8 additions & 13 deletions jobs/JGDAS_ATMOS_VMINMON
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "vrfy" -c "base vrfy"

export COMPONENT="atmos"

###########################################################
# obtain unique process id (pid) and make temp directories
###########################################################
Expand All @@ -32,32 +30,29 @@ export USHminmon=${USHminmon:-${HOMEminmon}/ush}
# determine PDY and cyc for previous cycle
#############################################

cdate=$(${NDATE} -6 ${PDY}${cyc})
echo 'pdate = ${pdate}'
pdate=$(${NDATE} -6 ${PDY}${cyc})
echo "pdate = ${pdate}"

export P_PDY=$(echo ${cdate} | cut -c1-8)
export p_cyc=$(echo ${cdate} | cut -c9-10)
export P_PDY=${pdate:0:8}
export p_cyc=${pdate:8:2}


#############################################
# TANKverf - WHERE OUTPUT DATA WILL RESIDE
#############################################
export COM_IN=${COM_IN:-$(compath.py ${envir}/${NET}/${gfs_ver})}

export M_TANKverf=${M_TANKverf:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}/minmon}
export M_TANKverfM1=${M_TANKverfM1:-${COM_IN}/${RUN}.${P_PDY}/${p_cyc}/${COMPONENT}/minmon}
export M_TANKverf=${M_TANKverf:-${COM_IN}/${RUN}.${PDY}/${cyc}/atmos/minmon}
export M_TANKverfM1=${M_TANKverfM1:-${COM_IN}/${RUN}.${P_PDY}/${p_cyc}/atmos/minmon}

export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}}
YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_ANALYSIS

mkdir -p -m 775 ${M_TANKverf}



########################################
# Set necessary environment variables
########################################
export CYCLE_INTERVAL=6
export gsistat=${gsistat:-${COMIN}/gdas.t${cyc}z.gsistat}
export gsistat=${gsistat:-${COM_ATMOS_ANALYSIS}/gdas.t${cyc}z.gsistat}


########################################################
Expand Down
7 changes: 5 additions & 2 deletions jobs/JGDAS_ENKF_ARCHIVE
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "earc" -c "base earc"
##############################################
# Set variables used in the script
##############################################
export CDATE=${CDATE:-${PDY}${cyc}}
export CDUMP=${CDUMP:-${RUN:-"gdas"}}
export CDUMP=${RUN/enkf}

YMD=${PDY} HH=${cyc} generate_com -rx COM_TOP
MEMDIR="ensstat" YMD=${PDY} HH=${cyc} generate_com -rx \
COM_ATMOS_ANALYSIS_ENSSTAT:COM_ATMOS_ANALYSIS_TMPL

###############################################################
# Run archive script
Expand Down
Loading

0 comments on commit efa5180

Please sign in to comment.