-
Notifications
You must be signed in to change notification settings - Fork 217
JEDI based Marine DA tasks #1134
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 5 commits
30a115f
79abe63
6e0a88f
56a6a70
6094916
dc01e4f
8458a39
07edfd6
95adc6e
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 |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/bash | ||
| export STRICT="NO" | ||
| source "${HOMEgfs}/ush/preamble.sh" | ||
|
|
||
| ############################# | ||
| # Source relevant config files | ||
| ############################# | ||
| export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} | ||
| configs="base ocnanalpost" | ||
| config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} | ||
| for config in ${configs}; do | ||
| . "${config_path}"/config."${config}" | ||
| status=$? | ||
| [[ "${status}" -ne 0 ]] && exit "${status}" | ||
| done | ||
|
|
||
| ########################################## | ||
| # Remove the Temporary working directory | ||
| ########################################## | ||
| cd "${DATAROOT}" || exit 1 | ||
| [[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}" | ||
|
aerorahul marked this conversation as resolved.
|
||
|
|
||
| exit 0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| #!/bin/bash | ||
| export STRICT="NO" | ||
| source "${HOMEgfs}/ush/preamble.sh" | ||
|
|
||
| ############################# | ||
| # Source relevant config files | ||
| ############################# | ||
| export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} | ||
| configs="base ocnanal ocnanalprep" | ||
| config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} | ||
| for config in ${configs}; do | ||
| . "${config_path}"/config."${config}" | ||
| status=$? | ||
| [[ ${status} -ne 0 ]] && exit "${status}" | ||
| done | ||
|
|
||
|
|
||
| ########################################## | ||
| # Source machine runtime environment | ||
| ########################################## | ||
| . "${HOMEgfs}"/env/"${machine}".env ocnanalprep | ||
| status=$? | ||
| [[ ${status} -ne 0 ]] && exit "${status}" | ||
|
|
||
|
|
||
| ############################################## | ||
| # Obtain unique process id (pid) and make temp directory | ||
| ############################################## | ||
| export pid=${pid:-$$} | ||
| export outid=${outid:-"LL${job}"} | ||
|
|
||
| export DATA=${DATA:-${DATAROOT}/${jobid:?}} | ||
| mkdir -p "${DATA}" | ||
| cd "${DATA}" || (echo "${DATA} does not exist. ABORT!"; exit 1) | ||
|
|
||
|
|
||
| ############################################## | ||
| # Run setpdy and initialize PDY variables | ||
| ############################################## | ||
| export cycle="t${cyc}z" | ||
| setpdy.sh | ||
| . ./PDY | ||
|
|
||
|
|
||
| ############################################## | ||
| # Determine Job Output Name on System | ||
| ############################################## | ||
| export pgmout="OUTPUT.${pid}" | ||
| export pgmerr=errfile | ||
|
|
||
|
|
||
| ############################################## | ||
| # Set variables used in the script | ||
| ############################################## | ||
| export CDATE=${CDATE:-${PDY}${cyc}} | ||
| export CDUMP=${CDUMP:-${RUN:-"gfs"}} | ||
| export COMPONENT=${COMPONENT:-ocean} | ||
|
|
||
| ############################################## | ||
| # Begin JOB SPECIFIC work | ||
| ############################################## | ||
|
|
||
| GDATE=$(date +%Y%m%d%H -d "${CDATE:0:8} ${CDATE:8:2} - ${assim_freq} hours") | ||
| export GDATE | ||
| gPDY=${GDATE:0:8} | ||
| export gcyc=${GDATE:8:2} | ||
| export GDUMP=${GDUMP:-"gdas"} | ||
|
|
||
| export OPREFIX="${CDUMP}.t${cyc}z." | ||
| export GPREFIX="${GDUMP}.t${gcyc}z." | ||
| export APREFIX="${CDUMP}.t${cyc}z." | ||
| export GSUFFIX=${GSUFFIX:-${SUFFIX}} | ||
| export ASUFFIX=${ASUFFIX:-${SUFFIX}} | ||
|
|
||
| export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} | ||
|
|
||
| mkdir -p "${COMOUT}" | ||
|
|
||
| # COMIN_GES and COMIN_GES_ENS are used in script | ||
| export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" | ||
|
|
||
| ############################################################### | ||
| # Run relevant script | ||
|
|
||
| EXSCRIPT=${GDASPREPPY:-${HOMEgfs}/sorc/gdas.cd/scripts/exgdas_global_marine_analysis_prep.py} | ||
| ${EXSCRIPT} | ||
| status=$? | ||
| [[ ${status} -ne 0 ]] && exit "${status}" | ||
|
|
||
| ############################################## | ||
| # End JOB SPECIFIC work | ||
| ############################################## | ||
|
|
||
| ############################################## | ||
| # Final processing | ||
| ############################################## | ||
| if [[ -e "${pgmout}" ]] ; then | ||
| cat "${pgmout}" | ||
| fi | ||
|
|
||
| ########################################## | ||
| # Remove the Temporary working directory | ||
| ########################################## | ||
| cd "${DATAROOT}" || exit 1 | ||
| [[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}" | ||
|
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. if you remove this here, you won't be able to use it in the
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. Oops, thanks ... I just removed these lines. |
||
|
|
||
| exit 0 | ||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,94 @@ | ||||||||
| #!/bin/bash | ||||||||
| export STRICT="NO" | ||||||||
| source "${HOMEgfs}/ush/preamble.sh" | ||||||||
|
|
||||||||
| ############################# | ||||||||
| # Source relevant config files | ||||||||
| ############################# | ||||||||
| export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} | ||||||||
| configs="base ocnanal ocnanalrun" | ||||||||
| config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} | ||||||||
| for config in ${configs}; do | ||||||||
| . "${config_path}"/config."${config}" | ||||||||
| status=$? | ||||||||
| [[ ${status} -ne 0 ]] && exit "${status}" | ||||||||
| done | ||||||||
|
|
||||||||
|
|
||||||||
| ########################################## | ||||||||
| # Source machine runtime environment | ||||||||
| ########################################## | ||||||||
| . "${HOMEgfs}"/env/"${machine}".env ocnanalrun | ||||||||
| status=$? | ||||||||
| [[ ${status} -ne 0 ]] && exit "${status}" | ||||||||
|
|
||||||||
|
|
||||||||
| ############################################## | ||||||||
| # Obtain unique process id (pid) and make temp directory | ||||||||
| ############################################## | ||||||||
| export pid=${pid:-$$} | ||||||||
| export outid=${outid:-"LL${job}"} | ||||||||
|
|
||||||||
| export DATA=${DATA:-${DATAROOT}/${jobid:?}} | ||||||||
| mkdir -p "${DATA}" | ||||||||
| cd "${DATA}" || (echo "${DATA} does not exist. ABORT!"; exit 1) | ||||||||
|
|
||||||||
|
|
||||||||
| ############################################## | ||||||||
| # Run setpdy and initialize PDY variables | ||||||||
| ############################################## | ||||||||
| export cycle="t${cyc}z" | ||||||||
| setpdy.sh | ||||||||
| . ./PDY | ||||||||
|
|
||||||||
|
|
||||||||
| ############################################## | ||||||||
| # Determine Job Output Name on System | ||||||||
| ############################################## | ||||||||
| export pgmout="OUTPUT.${pid}" | ||||||||
| export pgmerr=errfile | ||||||||
|
|
||||||||
|
|
||||||||
| ############################################## | ||||||||
| # Set variables used in the script | ||||||||
| ############################################## | ||||||||
|
|
||||||||
| export CDUMP=${CDUMP:-${RUN:-"gfs"}} | ||||||||
| export COMPONENT=${COMPONENT:-ocean} | ||||||||
|
|
||||||||
| ############################################## | ||||||||
| # Begin JOB SPECIFIC work | ||||||||
| ############################################## | ||||||||
|
|
||||||||
| export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} | ||||||||
|
|
||||||||
| # Prepare soca static dir | ||||||||
|
|
||||||||
| ln -s "${COMOUT}"/analysis/* . | ||||||||
|
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. Why is this in a j-job? @CoryMartin-NOAA
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. Thanks for putting the burden of explaining what I did on @CoryMartin-NOAA ! So, Cory, what's up with that?
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. @aerorahul I remember what the issue was. All the yaml's , static files, backgrounds, obs, etc ... are created/linked/copied in the "prep" step under
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. @guillaumevernieres follow what I have here for the aero case: global-workflow/jobs/JGDAS_GLOBAL_AERO_ANALYSIS_FINALIZE Lines 48 to 50 in 1536029
|
||||||||
|
|
||||||||
| ############################################################### | ||||||||
| # Run relevant script | ||||||||
|
|
||||||||
| EXSCRIPT=${GDASPREPPY:-${HOMEgfs}/sorc/gdas.cd/scripts/exgdas_global_marine_analysis_run.sh} | ||||||||
| ${EXSCRIPT} | ||||||||
| status=$? | ||||||||
| [[ ${status} -ne 0 ]] && exit "${status}" | ||||||||
|
|
||||||||
| ############################################## | ||||||||
| # End JOB SPECIFIC work | ||||||||
| ############################################## | ||||||||
|
|
||||||||
| ############################################## | ||||||||
| # Final processing | ||||||||
| ############################################## | ||||||||
| if [[ -e "${pgmout}" ]] ; then | ||||||||
| cat "${pgmout}" | ||||||||
| fi | ||||||||
|
|
||||||||
| ########################################## | ||||||||
| # Remove the Temporary working directory | ||||||||
| ########################################## | ||||||||
| cd "${DATAROOT}" || exit 1 | ||||||||
| [[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}" | ||||||||
|
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. Don't want this one either I don't think unless you have nothing to archive/save from this job back to the ROTDIR.
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. @CoryMartin-NOAA , unless I messed up (very likely), the analysis and increment are dumped in
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. for now it is, but 'eventually' it is not. NCO wants no symlinks, and it makes sense from a solid state drive for run / spinning disk for storage perspective. What my plan is/was for the aerosol tasks (see PR#1106) is to copy everything I want to save from $DATA to $COMOUT as part of the finalize job after the run job.
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. Sounds good @CoryMartin-NOAA , I'll do this in a subsequent PR if that's OK with you (I'm just being polite and respectful in exchange for a green check). My next step is to reconcile my cycling branch with the changes here and make it work again, which I'm pretty sure will require some adjustment/bug fixes in the GDASApp and the g-w. Looking forward to it! |
||||||||
|
|
||||||||
| exit 0 | ||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| source "${HOMEgfs}"/ush/preamble.sh | ||
|
WalterKolczynski-NOAA marked this conversation as resolved.
Outdated
|
||
|
|
||
| ############################################################### | ||
| # Source GDASApp modules | ||
| declare -l hpc=${machine} | ||
|
WalterKolczynski-NOAA marked this conversation as resolved.
Outdated
|
||
| module purge | ||
| module use "${HOMEgfs}"/sorc/gdas.cd/modulefiles | ||
| module load GDAS/"${hpc}" | ||
|
|
||
| ############################################################### | ||
| # Execute the JJOB | ||
| "${HOMEgfs}"/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST | ||
| status=$? | ||
| exit "${status}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #! /usr/bin/env bash | ||
|
WalterKolczynski-NOAA marked this conversation as resolved.
|
||
|
|
||
| source "${HOMEgfs}"/ush/preamble.sh | ||
|
|
||
| ############################################################### | ||
| # Source GDASApp modules | ||
| declare -l hpc=${machine} | ||
| module purge | ||
| module use "${HOMEgfs}"/sorc/gdas.cd/modulefiles | ||
| module load GDAS/"${hpc}" | ||
|
|
||
| ############################################################### | ||
| # Execute the JJOB | ||
| "${HOMEgfs}"/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP | ||
| status=$? | ||
| exit "${status}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #! /usr/bin/env bash | ||
|
WalterKolczynski-NOAA marked this conversation as resolved.
|
||
|
|
||
| source "${HOMEgfs}"/ush/preamble.sh | ||
|
|
||
| ############################################################### | ||
| # Source GDASApp modules | ||
| declare -l hpc=${machine} | ||
| module purge | ||
| module use "${HOMEgfs}"/sorc/gdas.cd/modulefiles | ||
| module load GDAS/"${hpc}" | ||
|
|
||
| ############################################################### | ||
| # Execute the JJOB | ||
| "${HOMEgfs}"/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_RUN | ||
| status=$? | ||
| exit "${status}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #!/bin/bash | ||
|
|
||
| ########## config.ocnanal ########## | ||
| # configuration common to all atm analysis tasks | ||
|
|
||
| echo "BEGIN: config.ocnanal" | ||
|
|
||
| export OBS_YAML_DIR=${HOMEgfs}/sorc/gdas.cd/parm/soca/obs/config | ||
| export OBS_YAML=${HOMEgfs}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml | ||
| export OBS_LIST=${OBS_YAML_DIR}/obs_list.yaml | ||
| export FV3JEDI_STAGE_YAML=${HOMEgfs}/sorc/gdas.cd/test/soca/testinput/dumy.yaml | ||
| export SOCA_INPUT_FIX_DIR=/scratch2/NCEPDEV/ocean/Guillaume.Vernieres/data/static/72x35x25/soca # TODO: Should be moved somewhere else | ||
| export SOCA_VARS=tocn,socn,ssh | ||
| export SOCA_NINNER=50 | ||
| export CASE_ANL="C48" | ||
| export DOMAIN_STACK_SIZE=2000000 | ||
| export JEDI_BIN=${HOMEgfs}/sorc/gdas.cd/build/bin | ||
|
|
||
| # TODO: Move the R2D2 configuration to a common space | ||
| export R2D2_OBS_DB=shared | ||
| export R2D2_OBS_DUMP=s2s_v1 | ||
| export R2D2_OBS_SRC=gdas_marine | ||
| export R2D2_OBS_WINDOW=24 # TODO: Check if the R2D2 sampling DB window is still needed | ||
| export COMIN_OBS=/scratch2/NCEPDEV/marineda/r2d2 | ||
|
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. Perhaps add 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. @aerorahul : A common space for R2D2 stuff or for the entirety of config.ocnanal?
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. for R2D2 |
||
| echo "END: config.ocnanal" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash -x | ||
|
WalterKolczynski-NOAA marked this conversation as resolved.
Outdated
|
||
|
|
||
| ########## config.ocnanalpost ########## | ||
| # Post Ocn Analysis specific | ||
|
|
||
| echo "BEGIN: config.ocnanalpost" | ||
|
|
||
| # Get task specific resources | ||
| . "${EXPDIR}"/config.resources ocnanalpost | ||
| echo "END: config.ocnanalpost" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash -x | ||
|
WalterKolczynski-NOAA marked this conversation as resolved.
Outdated
|
||
|
|
||
| ########## config.ocnanalprep ########## | ||
| # Pre Ocn Analysis specific | ||
|
|
||
| echo "BEGIN: config.ocnanalprep" | ||
|
|
||
| # Get task specific resources | ||
| . "${EXPDIR}"/config.resources ocnanalprep | ||
| echo "END: config.ocnanalprep" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/bin/bash -x | ||
|
WalterKolczynski-NOAA marked this conversation as resolved.
Outdated
|
||
|
|
||
| ########## config.ocnanalrun ########## | ||
| # Ocn Analysis specific | ||
|
|
||
| echo "BEGIN: config.ocnanalrun" | ||
|
|
||
| # Get task specific resources | ||
| . "${EXPDIR}"/config.resources ocnanalrun | ||
|
|
||
| echo "END: config.ocnanalrun" | ||
Uh oh!
There was an error while loading. Please reload this page.