-
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
Open
bhuang95
wants to merge
32
commits into
NOAA-EMC:develop
Choose a base branch
from
bhuang95:feature/enkf_only_dev
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+451
−64
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
6db4fe9
Copy from feature/enkf_only
bhuang95 e694072
GSI and JEDI test passed after EE name change. csg in JEDI file names…
bhuang95 86ccf0d
Merge branch 'develop' into feature/enkf_only_dev
bhuang95 bed26ea
add fetch and prepatmopeanlbc tasks and need to test them
bhuang95 f32d59c
Pass JEDI and GSI test
bhuang95 b04c54a
Cleanup but gsi eobs fauled due to recent create_gsi_info.sh change
bhuang95 fc6005c
Minor change with failure of gsi jobs (create_gsi_info.sh) and UFS mo…
bhuang95 db790b1
Merge branch 'develop' into feature/enkf_only_dev
bhuang95 22c0c53
Update submodules
bhuang95 9b2eaa6
Fix model and gsi oeobs failure and rename satbias to bias
bhuang95 85ed17b
Fix python coding norm error
bhuang95 e8806e4
1st clean/ready version that pass JEDI and GSI test
bhuang95 4f5806d
Git shellcheck change to 1st clean version
bhuang95 be8c479
Git shellcheck change 2 to 1st clean version
bhuang95 fa9ff54
Address David's comments and need to update to recent NOAA EMC develop
bhuang95 7b8065c
define letkf obs_distribution_localizations in jcb
bhuang95 8fd40d6
remove temporary files
bhuang95 2c15560
Issue #4339: Enable EnKF-only for atmosphere (1st try)
bhuang95 84731f3
Issue #4339: Enable EnKF-only for atmosphere (2nd try): remove tempor…
bhuang95 6a70bc2
Issue #4339: Enable EnKF-only for atmosphere (3rd try): remove tempor…
bhuang95 49c8139
Merge develop and fix code norm failure
bhuang95 e52d039
Fix shfmt failure (try 1)
bhuang95 d2f7005
Fix shfmt failure (try 2)
bhuang95 6d09219
Fix shfmt failure (try 3)
bhuang95 7a75ad8
Merge branch 'develop' into feature/enkf_only_dev
CoryMartin-NOAA b7df0e5
Merge branch 'develop' into feature/enkf_only_dev
aerorahul ce5ff04
Merge branch 'develop' into feature/enkf_only_dev
aerorahul 59755de
Fix shfmt failure (try 4)
bhuang95 aa45fe9
Fix shellcheck failure (try 1)
bhuang95 cf2b82b
Merge branch 'develop' into feature/enkf_only_dev
bhuang95 95ae053
Update sorc/gdas.cd
bhuang95 26a993d
use parm/jcb-gdas develop in sorc/gdas.cd
bhuang95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| if [[ ! -d "testrun/varbc" ]]; then mkdir -p "testrun/varbc"; fi | ||
| /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 | ||
|
|
||
| # 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!" | ||
| 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 | ||
| /bin/mv satbias_"${instrument}".nc4 "${OUTPUT}"/gdas.t"${gcyc}"z."${instrument}".satbias_cov.nc | ||
| cd "${DATA}" | ||
| /bin/rm -rf satbias_converter.yaml | ||
| 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=$? | ||
| fi | ||
|
|
||
| else | ||
| # GSI run | ||
| for file in ${BIASFILES}; do | ||
| cpreq "${BIASDIR}/${file}" "${COMOUT_ATMOS_ANALYSIS_PREV}/enkf${file}.txt" | ||
| err=$? | ||
| if [[ ${err} -ne 0 ]]; then | ||
| err_exit "Error copying operational anl bias correction files" | ||
| fi | ||
| done | ||
| fi | ||
|
|
||
| if [[ ${err} -ne 0 ]]; then | ||
| err_exit "Error executing ${EXSCRIPT}" | ||
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | ||||||||||
|
|
||||||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this block actually needed? I haven't run with this enkf setting yet, but in default testing
PROCESS_TROPCY=NOgets set 3 lines earlier. Does this default change for enkf only?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.
@TravisElless-NOAA I remember I added this block because
PROCESS_TROPCYwas set to "YES" somewhere and it failed the task whenDOENKFONLY_ATM= "YES". Looks like this block is not needed any more here. I will remove this block and test it in the updated PR.