From 427efa5917abe946cd8a208acb520c3cf00ca18f Mon Sep 17 00:00:00 2001 From: Meta Sienkiewicz Date: Mon, 29 Nov 2021 16:41:53 -0500 Subject: [PATCH 1/5] Adding 'cleanup_tails=.true.' to aircraft bias correction substitution string for VarBC type aircraft temperature bias correction. The GSI will delete coefficients for tails that have not been updated for more than one year. --- src/Applications/GEOSdas_App/GEOSdas.csm | 4 ++-- src/Applications/GSI_App/fvssi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Applications/GEOSdas_App/GEOSdas.csm b/src/Applications/GEOSdas_App/GEOSdas.csm index a908d734..21a32d27 100755 --- a/src/Applications/GEOSdas_App/GEOSdas.csm +++ b/src/Applications/GEOSdas_App/GEOSdas.csm @@ -913,11 +913,11 @@ exit 1 echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: diff --git a/src/Applications/GSI_App/fvssi b/src/Applications/GSI_App/fvssi index 05793097..91fedd4b 100755 --- a/src/Applications/GSI_App/fvssi +++ b/src/Applications/GSI_App/fvssi @@ -742,11 +742,11 @@ echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: From caa9f102bbba7e20059cfd5bbc5a01b4c3933062 Mon Sep 17 00:00:00 2001 From: Meta Sienkiewicz Date: Mon, 29 Nov 2021 17:10:32 -0500 Subject: [PATCH 2/5] Added forgotten comma at the end of the modified substitution string --- src/Applications/GEOSdas_App/GEOSdas.csm | 4 ++-- src/Applications/GSI_App/fvssi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Applications/GEOSdas_App/GEOSdas.csm b/src/Applications/GEOSdas_App/GEOSdas.csm index 21a32d27..21da8ec0 100755 --- a/src/Applications/GEOSdas_App/GEOSdas.csm +++ b/src/Applications/GEOSdas_App/GEOSdas.csm @@ -913,11 +913,11 @@ exit 1 echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: diff --git a/src/Applications/GSI_App/fvssi b/src/Applications/GSI_App/fvssi index 91fedd4b..65ed9bc7 100755 --- a/src/Applications/GSI_App/fvssi +++ b/src/Applications/GSI_App/fvssi @@ -742,11 +742,11 @@ echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: From 85c05540d8b104a94af23fffceaa1068912f1d26 Mon Sep 17 00:00:00 2001 From: Meta Sienkiewicz Date: Fri, 3 Dec 2021 15:32:51 -0500 Subject: [PATCH 3/5] Corrected spelling - the variable is cleanup_tail (without an 's') Added to the second instance of this substitution code in GEOSdas.csm --- src/Applications/GEOSdas_App/GEOSdas.csm | 8 ++++---- src/Applications/GSI_App/fvssi | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Applications/GEOSdas_App/GEOSdas.csm b/src/Applications/GEOSdas_App/GEOSdas.csm index 21da8ec0..62d49748 100755 --- a/src/Applications/GEOSdas_App/GEOSdas.csm +++ b/src/Applications/GEOSdas_App/GEOSdas.csm @@ -913,11 +913,11 @@ exit 1 echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: @@ -1128,11 +1128,11 @@ exit 1 echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: diff --git a/src/Applications/GSI_App/fvssi b/src/Applications/GSI_App/fvssi index 65ed9bc7..d7638d06 100755 --- a/src/Applications/GSI_App/fvssi +++ b/src/Applications/GSI_App/fvssi @@ -742,11 +742,11 @@ echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: From d61fc589d1a810651d223239da303516c9d5296b Mon Sep 17 00:00:00 2001 From: Meta Sienkiewicz Date: Fri, 3 Dec 2021 18:34:47 -0500 Subject: [PATCH 4/5] Oops, I did it again - forgot to modify BOTH places where the aircraft bias substitution is done. --- src/Applications/GSI_App/fvssi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Applications/GSI_App/fvssi b/src/Applications/GSI_App/fvssi index d7638d06..8f78299b 100755 --- a/src/Applications/GSI_App/fvssi +++ b/src/Applications/GSI_App/fvssi @@ -842,11 +842,11 @@ echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: From a9e715b53a868e31ac162f9760bc48e7514ef357 Mon Sep 17 00:00:00 2001 From: Meta Sienkiewicz Date: Wed, 8 Dec 2021 17:02:22 -0500 Subject: [PATCH 5/5] Modify to allow selecting cleanup_tail option via environment variable --- src/Applications/GEOSdas_App/GEOSdas.csm | 18 ++++++++++++++---- src/Applications/GSI_App/fvssi | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/Applications/GEOSdas_App/GEOSdas.csm b/src/Applications/GEOSdas_App/GEOSdas.csm index 62d49748..145e9373 100755 --- a/src/Applications/GEOSdas_App/GEOSdas.csm +++ b/src/Applications/GEOSdas_App/GEOSdas.csm @@ -78,6 +78,7 @@ # - Revise multi-incremental approach for 4d-analysis # (cost goes down with successive updates) # - Temporarily leaving test lines commented out +# 8Dec2021 Sienkiewicz - add option for 'cleanup_tail' for aircraft bias correction #----------------------------------------------------------------------------- # @@ -115,6 +116,7 @@ if ( !($?BOOTSTRAP) ) setenv BOOTSTRAP 0 if ( !($?CENTRAL_AGCM_PARALLEL) ) setenv CENTRAL_AGCM_PARALLEL 0 if ( !($?CHECK_DMF) ) setenv CHECK_DMF 1 + if ( !($?CLEANUP_TAIL) ) setenv CLEANUP_TAIL 0 if ( !($?CONVPROG) ) setenv CONVPROG 0 if ( !($?CONVSFC) ) setenv CONVSFC 0 if ( !($?CONVUPA) ) setenv CONVUPA 0 @@ -913,11 +915,15 @@ exit 1 echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + set cftstring = "aircraft_t_bc=.true.," + if ( $CLEANUP_TAIL ) set cftstring = "$cftstring cleanup_tail=.true.," + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + set cftstring = "aircraft_t_bc_pof=.true.," + if ( $CLEANUP_TAIL ) set cftstring = "$cftstring cleanup_tail=.true.," + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: @@ -1128,11 +1134,15 @@ exit 1 echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + set cftstring = "aircraft_t_bc=.true.," + if ( $CLEANUP_TAIL ) set cftstring = "$cftstring cleanup_tail=.true.," + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + set cftstring = "aircraft_t_bc_pof.true.," + if ( $CLEANUP_TAIL ) set cftstring = "$cftstring cleanup_tail=.true.," + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: diff --git a/src/Applications/GSI_App/fvssi b/src/Applications/GSI_App/fvssi index 8f78299b..7afdbc05 100755 --- a/src/Applications/GSI_App/fvssi +++ b/src/Applications/GSI_App/fvssi @@ -53,6 +53,7 @@ if ( !($?ANA4DUPD_IAU0_ONLY) ) setenv ANA4DUPD_IAU0_ONLY 0 # assume 4d increment if ( !($?ANGLEBC) ) setenv ANGLEBC 0 if ( !($?BATCH_SUBCMD) ) setenv BATCH_SUBCMD "sbatch" + if ( !($?CLEANUP_TAIL) ) setenv CLEANUP_TAIL 0 if ( !($?DATAMOVE_CONSTRAINT) ) setenv DATAMOVE_CONSTRAINT NULL if ( !($?INCSENS) ) setenv INCSENS 0 if ( !($?GSI_NETCDF_DIAG) ) setenv GSI_NETCDF_DIAG 0 @@ -742,11 +743,15 @@ echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + set cftstring = "aircraft_t_bc=.true.," + if ( $CLEANUP_TAIL ) set cftstring = "$cftstring cleanup_tail=.true.," + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + set cftstring = "aircraft_t_bc_pof=.true.," + if ( $CLEANUP_TAIL ) set cftstring = "$cftstring cleanup_tail=.true.," + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: @@ -842,11 +847,15 @@ echo 'Setting aircraft_t_bc_ext to true, using external bias correction' breaksw case 2: - echo "s/>>>AIRCFT_BIAS<<> sed_file + set cftstring = "aircraft_t_bc=.true.," + if ( $CLEANUP_TAIL ) set cftstring = "$cftstring cleanup_tail=.true.," + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc to true, using VV.VV^2 bias correction' breaksw case 3: - echo "s/>>>AIRCFT_BIAS<<> sed_file + set cftstring = "aircraft_t_bc_pof=.true.," + if ( $CLEANUP_TAIL ) set cftstring = "$cftstring cleanup_tail=.true.," + echo "s/>>>AIRCFT_BIAS<<> sed_file echo 'Setting aircraft_t_bc_pof to true, using POF bias correction' breaksw default: @@ -984,6 +993,7 @@ ENVIRONMENT VARIABLES ENVIRONMENT VARIABLES (optional) ACFTBIAS sets aircraft bias correction + CLEANUP_TAIL triggers cleanup of aircraft coefficient file ANASENS trigger for analysis sensitivity (obs impact) INCSENS allows running adjoint GSI with analysis increment for input DO4DVAR trigger for 4DVAR-related features