-
Notifications
You must be signed in to change notification settings - Fork 205
Enable EnKF-only for atmosphere #4345
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
base: develop
Are you sure you want to change the base?
Changes from all commits
6db4fe9
e694072
86ccf0d
bed26ea
f32d59c
b04c54a
fc6005c
db790b1
22c0c53
9b2eaa6
85ed17b
e8806e4
4f5806d
be8c479
fa9ff54
7b8065c
8fd40d6
2c15560
84731f3
6a70bc2
49c8139
e52d039
d2f7005
6d09219
7a75ad8
b7df0e5
ce5ff04
59755de
aa45fe9
cf2b82b
95ae053
26a993d
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,18 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| ############################################################### | ||
| # Source UFSDA workflow modules | ||
| source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda | ||
| status=$? | ||
| if [[ ${status} -ne 0 ]]; then | ||
| exit "${status}" | ||
| fi | ||
|
|
||
| export job="prepatmanlbias" | ||
| export jobid="${job}.$$" | ||
|
|
||
| ############################################################### | ||
| # Execute the JJOB | ||
| "${HOMEgfs}/dev/jobs/JGLOBAL_ATM_PREP_ANL_BIAS" | ||
| status=$? | ||
| exit "${status}" |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,129 @@ | ||||||||||||
| #! /usr/bin/env bash | ||||||||||||
| export WIPE_DATA="NO" | ||||||||||||
| export DATA=${DATA:-${DATAROOT}/${RUN}fetch_${cyc}} | ||||||||||||
| source "${HOMEgfs}/ush/jjob_header.sh" -e "prepatmanlbias" -c "base prepatmanlbias" | ||||||||||||
|
|
||||||||||||
| ############################################## | ||||||||||||
| # Set variables used in the script | ||||||||||||
| ############################################## | ||||||||||||
|
|
||||||||||||
| ############################################## | ||||||||||||
| # Begin JOB SPECIFIC work | ||||||||||||
| ############################################## | ||||||||||||
| # Ignore possible spelling error (nothing is misspelled) | ||||||||||||
| # shellcheck disable=SC2153 | ||||||||||||
| GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") | ||||||||||||
| export gPDY=${GDATE:0:8} | ||||||||||||
| export gcyc=${GDATE:8:2} | ||||||||||||
| export gyy=${GDATE:0:4} | ||||||||||||
| export gmm=${GDATE:4:2} | ||||||||||||
| export gdd=${GDATE:6:2} | ||||||||||||
| export GDUMP="gdas" | ||||||||||||
|
|
||||||||||||
| # Generate COM variables from templates | ||||||||||||
| MEMDIR="ensstat" RUN="enkf${GDUMP}" YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ | ||||||||||||
| COMOUT_ATMOS_ANALYSIS_PREV:COM_ATMOS_ANALYSIS_TMPL | ||||||||||||
|
|
||||||||||||
| # Process bias corrections files grabbed from HPSS in task gdas_fetchatmanlbias | ||||||||||||
| BIASDIR=${DATA}/${GDUMP}.${gPDY}/${gcyc}/atmos | ||||||||||||
| BIASFILES="${GDUMP}.t${gcyc}z.abias ${GDUMP}.t${gcyc}z.abias_air ${GDUMP}.t${gcyc}z.abias_int ${GDUMP}.t${gcyc}z.abias_pc ${GDUMP}.t${gcyc}z.radstat" | ||||||||||||
|
|
||||||||||||
| ABIAS_SAT=${BIASDIR}/${GDUMP}.t${gcyc}z.abias | ||||||||||||
| ABIASPC_SAT=${BIASDIR}/${GDUMP}.t${gcyc}z.abias_pc | ||||||||||||
| ABIAS_SAT_JEDI_TAR=${COMOUT_ATMOS_ANALYSIS_PREV}/${GDUMP}.t${gcyc}z.rad_varbc_params.tar | ||||||||||||
| ABIAS_AIR_JEDI_TAR=${COMOUT_ATMOS_ANALYSIS_PREV}/${GDUMP}.t${gcyc}z.air_varbc_params.tar | ||||||||||||
|
|
||||||||||||
| SATBIAS2IODAX=${SATBIAS2IODAX:-${EXECgfs}/satbias2ioda.x} | ||||||||||||
| SATBIAS2IODAY=${HOMEgfs}/sorc/gdas.cd/ush/satbias_converter.yaml.tmpl | ||||||||||||
| OUTPUT=${DATA}/output | ||||||||||||
|
|
||||||||||||
| if [[ ! -d "${COMOUT_ATMOS_ANALYSIS_PREV}" ]]; then mkdir -p "${COMOUT_ATMOS_ANALYSIS_PREV}"; fi | ||||||||||||
| if [[ ! -d "${OUTPUT}" ]]; then mkdir -p "${OUTPUT}"; fi | ||||||||||||
|
|
||||||||||||
| if [[ ${DO_JEDIATMENS} == "YES" ]]; then | ||||||||||||
| # JEDI run | ||||||||||||
| cd "${DATA}" || exit | ||||||||||||
|
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.
Suggested change
|
||||||||||||
| if [[ ! -d "testrun/varbc" ]]; then mkdir -p "testrun/varbc"; fi | ||||||||||||
|
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.
Suggested change
|
||||||||||||
| /bin/ln -sf "${ABIAS_SAT}" "./satbias_in" | ||||||||||||
| /bin/ln -sf "${ABIASPC_SAT}" "./satbias_pc" | ||||||||||||
| grep -i "NaN" satbias_in && echo "Stop. There are NaN in ${ABIAS}." && exit 1 | ||||||||||||
|
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. Prefer this as an if-block and
Suggested change
|
||||||||||||
|
|
||||||||||||
| # Get instruments from satbias_in | ||||||||||||
| obsclass=$(grep "_" satbias_in | awk '{print $2}' | uniq) | ||||||||||||
|
|
||||||||||||
| # Loop over instruments. Covert GSI abias to JEDI format | ||||||||||||
| for instrument in ${obsclass}; do | ||||||||||||
| echo "${instrument}" | ||||||||||||
| /bin/cp -f "${SATBIAS2IODAY}" satbias_converter.yaml | ||||||||||||
| sed -i -e "s/INSTRUMENT/${instrument}/g" satbias_converter.yaml | ||||||||||||
|
|
||||||||||||
| ${SATBIAS2IODAX} satbias_converter.yaml | ||||||||||||
|
|
||||||||||||
| export err=$? | ||||||||||||
| if [[ ${err} -ne 0 ]]; then | ||||||||||||
| err_exit "satbias2iodas.x failed for ${instrument}, ABORT!" | ||||||||||||
|
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. Fatal errors should be labeled:
Suggested change
|
||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| /bin/rm -f testrun/varbc/*nc | ||||||||||||
| /bin/rm -f testrun/varbc/*txt | ||||||||||||
|
|
||||||||||||
| cd ./testrun/varbc/ | ||||||||||||
| grep "${instrument}" ../../satbias_in | awk '{print $2" "$3" "$4}' > \ | ||||||||||||
| "${OUTPUT}"/gdas.t"${gcyc}"z."${instrument}".tlapse.txt | ||||||||||||
| /bin/cp -p satbias_"${instrument}".nc4 "${OUTPUT}"/gdas.t"${gcyc}"z."${instrument}".satbias.nc | ||||||||||||
|
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. We try to use
Suggested change
|
||||||||||||
| /bin/mv satbias_"${instrument}".nc4 "${OUTPUT}"/gdas.t"${gcyc}"z."${instrument}".satbias_cov.nc | ||||||||||||
|
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. It's probably fine to use
Suggested change
|
||||||||||||
| cd "${DATA}" | ||||||||||||
| /bin/rm -rf satbias_converter.yaml | ||||||||||||
|
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.
Suggested change
|
||||||||||||
| done | ||||||||||||
|
|
||||||||||||
| if [[ ${err} -eq 0 ]]; then | ||||||||||||
| cd "${OUTPUT}" || exit | ||||||||||||
| for file in ${BIASFILES}; do | ||||||||||||
| cpreq "${BIASDIR}/${file}" "./enkf${file}.txt" | ||||||||||||
| err=$? | ||||||||||||
| if [[ ${err} -ne 0 ]]; then | ||||||||||||
| err_exit "Error copying operational anl bias correction files" | ||||||||||||
| fi | ||||||||||||
| done | ||||||||||||
| # TODO: Temporary solution and need to process abias_air for JEDI when ready | ||||||||||||
| tar -cvf "${ABIAS_AIR_JEDI_TAR}" "./enkf${GDUMP}.t${gcyc}z.abias_air.txt" | ||||||||||||
| rm -rf "./enkf${GDUMP}.t${gcyc}z.abias_air.txt" | ||||||||||||
| tar -cvf "${ABIAS_SAT_JEDI_TAR}" ./*.nc ./*.txt | ||||||||||||
| err=$? | ||||||||||||
|
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.
Suggested change
|
||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| else | ||||||||||||
| # GSI run | ||||||||||||
| for file in ${BIASFILES}; do | ||||||||||||
| cpreq "${BIASDIR}/${file}" "${COMOUT_ATMOS_ANALYSIS_PREV}/enkf${file}.txt" | ||||||||||||
| err=$? | ||||||||||||
|
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.
Suggested change
|
||||||||||||
| if [[ ${err} -ne 0 ]]; then | ||||||||||||
| err_exit "Error copying operational anl bias correction files" | ||||||||||||
|
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.
Suggested change
|
||||||||||||
| fi | ||||||||||||
| done | ||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| if [[ ${err} -ne 0 ]]; then | ||||||||||||
| err_exit "Error executing ${EXSCRIPT}" | ||||||||||||
|
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.
Suggested change
|
||||||||||||
| fi | ||||||||||||
| set_trace | ||||||||||||
|
|
||||||||||||
| ############################################## | ||||||||||||
| # End JOB SPECIFIC work | ||||||||||||
| ############################################## | ||||||||||||
|
|
||||||||||||
| ############################################## | ||||||||||||
| # Final processing | ||||||||||||
| ############################################## | ||||||||||||
| if [[ -e "${pgmout}" ]]; then | ||||||||||||
| cat "${pgmout}" | ||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| ################################### | ||||||||||||
| # Remove temp directories | ||||||||||||
| ################################### | ||||||||||||
| if [[ "${KEEPDATA}" != "YES" ]]; then | ||||||||||||
| rm -rf "${DATA}" | ||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| exit 0 | ||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -398,6 +398,7 @@ export BUILD_GSINFO_DIR="${PARMgfs}/gsinfo" | |
| export NMEM_ENS_GFS="{{ NMEM_ENS_GFS }}" | ||
| export NMEM_ENS_GFS_OFFSET="{{ NMEM_ENS_GFS_OFFSET }}" | ||
| export DO_CALC_INCREMENT_ENKF_GFS="NO" | ||
| export DOENKFONLY_ATM="{{ DOENKFONLY_ATM }}" | ||
|
|
||
| # EnKF output frequency | ||
| if [[ "${DOHYBVAR}" = "YES" ]]; then | ||
|
|
@@ -521,6 +522,17 @@ if [[ "${machine}" == "URSA" || "${machine}" == "GAEAC6" || "${machine}" == "ORI | |
| export DO_METP=NO | ||
| fi | ||
|
|
||
| if [[ "${DOENKFONLY_ATM:-NO}" == "YES" ]] ; then | ||
| export RECENTER_ENKF="NO" # Turn off recentering ensemble analysis | ||
| export DO_VERFOZN="NO" # Ozone data assimilation monitoring | ||
| export DO_VERFRAD="NO" # Radiance data assimilation monitoring | ||
| export DO_VMINMON="NO" # GSI minimization monitoring | ||
| export DO_METP="NO" # Run METPLUS jobs - set METPLUS settings in config.metp | ||
| export DO_FIT2OBS="NO" # Run fit to observations package | ||
| export DO_TRACKER="NO" # Hurricane track verification | ||
| export DO_GENESIS="NO" # Cyclone genesis verification | ||
| fi | ||
|
Comment on lines
+525
to
+534
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. @aerorahul I wonder if this would be better to have in |
||
|
|
||
| # If starting ICs that are not at cycle hour | ||
| export OFFSET_START_HOUR=0 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,11 @@ export PROCESS_TROPCY=${PROCESS_TROPCY:-NO} | |
| export TROPCYQCRELOSH="${SCRgfs}/exglobal_atmos_tropcy_qc_reloc.sh" | ||
| export COMINsyn=${COMINsyn:-$(compath.py "${envir}/com/gfs/${gfs_ver}")/syndat} | ||
|
|
||
| # If DOENKFONLY_ATM="YES", skip PROCESS_TROPCY | ||
| if [[ "${DOENKFONLY_ATM:-NO}" == "YES" ]] ; then | ||
| export PROCESS_TROPCY="NO" | ||
| fi | ||
|
Comment on lines
+18
to
+21
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. Is this block actually needed? I haven't run with this enkf setting yet, but in default testing
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. @TravisElless-NOAA I remember I added this block because |
||
|
|
||
| # Allow users to control the generation or use of either operational or | ||
| # their processed prepbufr, prepbufr.acft_profiles, nsstbufr files | ||
| export MAKE_PREPBUFR="YES" # Generate prepbufr, etc. files by executing obsproc | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| ########## config.prepatmiodaobs ########## | ||
| # Atm Operational Anl Bias Correction specific | ||
|
|
||
| echo "BEGIN: config.prepatmanlbias" | ||
|
|
||
| # Get task specific resources | ||
| . "${EXPDIR}/config.resources" prepatmanlbias | ||
|
|
||
| echo "END: config.prepatmanlbias" |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -28,7 +28,8 @@ def main(): | |||||||||
| 'DOHYBVAR', 'DOIAU_ENKF', 'IAU_OFFSET', 'DOIAU', 'DO_CA', | ||||||||||
| 'DO_CALC_INCREMENT', 'assim_freq', 'ARCH_CYC', 'DO_JEDISNOWDA', | ||||||||||
| 'ARCH_WARMICFREQ', 'ARCH_FCSTICFREQ', 'DOHYBVAR_OCN', | ||||||||||
| 'DOLETKF_OCN', 'IAUFHRS_ENKF', 'NET', 'NMEM_ENS_GFS', 'DO_GSISOILDA', 'DO_LAND_IAU'] | ||||||||||
| 'DOLETKF_OCN', 'IAUFHRS_ENKF', 'NET', 'NMEM_ENS_GFS', 'DO_GSISOILDA', 'DO_LAND_IAU', | ||||||||||
| 'DOENKFONLY_ATM'] | ||||||||||
|
Comment on lines
+31
to
+32
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. Cleans up the format of this block better
Suggested change
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. @TravisElless-NOAA Will modify as suggested in the updated PR. Thanks. |
||||||||||
|
|
||||||||||
| archive_dict = AttrDict() | ||||||||||
| for key in keys: | ||||||||||
|
|
||||||||||
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.
You can safely reduce this to just
mkdir -pdoes not raise an error or touch directories if they already exist. If you prefer to keep this in if-blocks, we prefer them in multi-line blocks.