-
Notifications
You must be signed in to change notification settings - Fork 212
Prepare observations for the updates to the ensemble members. #2416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1745619
5fef5ad
b63a0e3
fa05e5a
146e861
8ef5104
6cc76e4
a0f6ed2
15bbd45
009767b
fc7cc84
2557cb7
8b986b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,53 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| source "${HOMEgfs}/ush/preamble.sh" | ||
| export DATA=${DATA:-${DATAROOT}/${RUN}snowanl_${cyc}} | ||
| source "${HOMEgfs}/ush/jjob_header.sh" -e "prepsnowobs" -c "base prepsnowobs" | ||
| if (( 10#${ENSMEM:-0} > 0 )); then | ||
| source "${HOMEgfs}/ush/jjob_header.sh" -e "epsn" -c "base prepsnowobs epsn" | ||
| export CASE=${CASE_ENS} | ||
| else | ||
| source "${HOMEgfs}/ush/jjob_header.sh" -e "prepsnowobs" -c "base prepsnowobs" | ||
| fi | ||
|
|
||
| ############################################## | ||
| # Begin JOB SPECIFIC work | ||
| ############################################## | ||
|
|
||
| # Restart conditions for GFS cycle come from GDAS | ||
| rCDUMP=${RUN} | ||
| export rCDUMP="${RUN/gfs/gdas}" | ||
|
|
||
| # Get OBS for ENKFGDAS run from GDAS | ||
| oCDUMP=${RUN} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so we don't export oCDUMP if the run if gdas?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need export
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry I misread this line, but if they are only used internally then why export rCDUMP above on line 13?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I reused this by following the old version Do I need to make the corresponding changes? |
||
| export oCDUMP="${RUN/enkfgdas/gdas}" | ||
|
|
||
| ############################################## | ||
| # Set variables used in the script | ||
| ############################################## | ||
| # Ignore possible spelling error (nothing is misspelled) | ||
| # shellcheck disable=SC2153 | ||
| GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") | ||
| gPDY=${GDATE:0:8} | ||
| gcyc=${GDATE:8:2} | ||
| GDUMP="gdas" | ||
| GDATE=$(date --utc -d "${PDY} ${cyc} - ${assim_freq} hours" +%Y%m%d%H) | ||
| declare -rx GDATE | ||
| # shellcheck disable= | ||
| declare -rx gPDY="${GDATE:0:8}" | ||
| declare -rx gcyc="${GDATE:8:2}" | ||
|
|
||
|
|
||
| ############################################## | ||
| # Begin JOB SPECIFIC work | ||
| ############################################## | ||
| # Generate COM variables from templates | ||
| YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS | ||
| RUN=${oCDUMP} MEMDIR="" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMIN_OBS:COM_OBS_TMPL | ||
| RUN=${RUN} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMOUT_OBS:COM_OBS_TMPL | ||
|
|
||
| RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ | ||
| RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ | ||
| COM_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL | ||
|
|
||
| mkdir -m 775 -p "${COMOUT_OBS}" | ||
|
|
||
| ############################################################### | ||
| # Run relevant script | ||
| EXSCRIPT=${GDASSNOWPREPPY:-${SCRgfs}/exglobal_prep_snow_obs.py} | ||
| ${EXSCRIPT} | ||
| ############################################################### | ||
| ${GDASSNOWPREPPY:-${SCRgfs}/exglobal_prep_snow_obs.py} | ||
| status=$? | ||
| [[ ${status} -ne 0 ]] && (echo "FATAL ERROR: Error executing ${EXSCRIPT}, ABORT!"; exit "${status}") | ||
|
|
||
|
|
@@ -41,4 +62,10 @@ if [[ -e "${pgmout}" ]] ; then | |
| cat "${pgmout}" | ||
| fi | ||
|
|
||
| ########################################## | ||
| # Remove the Temporary working directory | ||
| ########################################## | ||
| cd "${DATAROOT}" || true | ||
| [[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}" | ||
|
|
||
| exit 0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,7 @@ if [[ "${RUN_ENVIR:-emc}" == "nco" ]]; then | |
| COM_OBS_TMPL=$(compath.py "${envir}/obsproc/${obsproc_ver}")'/${RUN}.${YMD}/${HH}/atmos' | ||
| COM_RTOFS_TMPL=$(compath.py "${envir}/${WAVECUR_DID}/${rtofs_ver}") | ||
| else | ||
| COM_OBS_TMPL='${ROTDIR}/${RUN}.${YMD}/${HH}/obs' | ||
| COM_OBS_TMPL='${ROTDIR}/${RUN}.${YMD}/${HH}/obs/${MEMDIR}' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is going to do this for all ob types, isn't it, is this okay @aerorahul ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pinging @aerorahul again. Are we okay with creating a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we want that the
|
||
| COM_RTOFS_TMPL='${DMPDIR}' | ||
| fi | ||
| declare -rx COM_OBS_TMPL COM_RTOFS_TMPL | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| ########## config.epsn ########## | ||
| # Snow Obs Prep specific | ||
|
|
||
| echo "BEGIN: config.epsn" | ||
|
|
||
| source "${EXPDIR}/config.prepsnowobs" | ||
|
|
||
| # Get task specific resources | ||
| . "${EXPDIR}/config.resources" epsn | ||
|
|
||
| echo "END: config.epsn" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about
enkfgfs?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea about
enkfgfs.