From 79dbe8c7b58020df61fe45db6c2830dc11149756 Mon Sep 17 00:00:00 2001 From: Samuel Degelia Date: Tue, 10 Feb 2026 16:13:36 +0000 Subject: [PATCH 1/9] update all submodules except for mpas and crtm --- parm/jcb-algorithms | 2 +- sorc/bufr-query | 2 +- sorc/fv3-jedi | 2 +- sorc/gsibec | 2 +- sorc/ioda | 2 +- sorc/iodaconv | 2 +- sorc/jcb | 2 +- sorc/mpas-jedi | 2 +- sorc/oops | 2 +- sorc/saber | 2 +- sorc/ufo | 2 +- sorc/vader | 2 +- sorc/wxflow | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/parm/jcb-algorithms b/parm/jcb-algorithms index b01c18de..7d51ab64 160000 --- a/parm/jcb-algorithms +++ b/parm/jcb-algorithms @@ -1 +1 @@ -Subproject commit b01c18de275741040ba3430a5eb64d51cff40cd6 +Subproject commit 7d51ab64b07821d414d3129a86316e52dcf0921c diff --git a/sorc/bufr-query b/sorc/bufr-query index 6935d708..f850b031 160000 --- a/sorc/bufr-query +++ b/sorc/bufr-query @@ -1 +1 @@ -Subproject commit 6935d7083ca3f249c7acc67ca38e3ef864ed4c62 +Subproject commit f850b031e6e6592b7ec3ad947ba10f51a010a85c diff --git a/sorc/fv3-jedi b/sorc/fv3-jedi index 689dbd88..fc4f48c7 160000 --- a/sorc/fv3-jedi +++ b/sorc/fv3-jedi @@ -1 +1 @@ -Subproject commit 689dbd88331d85201228aac3a4930ad41e70a202 +Subproject commit fc4f48c78ded1f829af9043281f72942f4c1d315 diff --git a/sorc/gsibec b/sorc/gsibec index c70049c3..a754e95f 160000 --- a/sorc/gsibec +++ b/sorc/gsibec @@ -1 +1 @@ -Subproject commit c70049c33af093a3182c5e1b62947609703ff638 +Subproject commit a754e95f8a93916cd57ac4760e650ee9755d1eac diff --git a/sorc/ioda b/sorc/ioda index df1e3c96..fead60c6 160000 --- a/sorc/ioda +++ b/sorc/ioda @@ -1 +1 @@ -Subproject commit df1e3c9602e6406a1295245a2c12c091e8edeb3d +Subproject commit fead60c6206794405bc1328656af1d4232a223ea diff --git a/sorc/iodaconv b/sorc/iodaconv index e2203185..84c73b0c 160000 --- a/sorc/iodaconv +++ b/sorc/iodaconv @@ -1 +1 @@ -Subproject commit e2203185527b7b634a709ccbdf3967d70c9a541c +Subproject commit 84c73b0ce1b11fd2d41df9cf84cd8a4973d7463f diff --git a/sorc/jcb b/sorc/jcb index ebd10ea3..72ccf27d 160000 --- a/sorc/jcb +++ b/sorc/jcb @@ -1 +1 @@ -Subproject commit ebd10ea393da8d36517aa5606c90937809dd571e +Subproject commit 72ccf27d2f145fde1b69ff079675b4aef8d048b3 diff --git a/sorc/mpas-jedi b/sorc/mpas-jedi index b2784241..5d6d005c 160000 --- a/sorc/mpas-jedi +++ b/sorc/mpas-jedi @@ -1 +1 @@ -Subproject commit b27842419499cd704def9a87592ff9d427c6a100 +Subproject commit 5d6d005c438ecc258a63237c8e1fbb7b06fc3a43 diff --git a/sorc/oops b/sorc/oops index 711f5c8e..4cb58e18 160000 --- a/sorc/oops +++ b/sorc/oops @@ -1 +1 @@ -Subproject commit 711f5c8eafeaa22d5891f11b318b2fb70d8ec963 +Subproject commit 4cb58e18701d009f2465bff153735aed834a45ed diff --git a/sorc/saber b/sorc/saber index db5d6243..3fee34df 160000 --- a/sorc/saber +++ b/sorc/saber @@ -1 +1 @@ -Subproject commit db5d624304c9d0cdce956556a98e5dc4d5f11002 +Subproject commit 3fee34df705b9b4962e99fc94ce8103dc1d73cd7 diff --git a/sorc/ufo b/sorc/ufo index 612a1ecb..6379f4e5 160000 --- a/sorc/ufo +++ b/sorc/ufo @@ -1 +1 @@ -Subproject commit 612a1ecb46c3de14b838e46f1811522d24e02349 +Subproject commit 6379f4e573c15818f610364cba060583e7713e9d diff --git a/sorc/vader b/sorc/vader index 5c5970db..b6dab37d 160000 --- a/sorc/vader +++ b/sorc/vader @@ -1 +1 @@ -Subproject commit 5c5970db95d7ad1191737e84c0b0f16e1f704110 +Subproject commit b6dab37d5de091472291ba05cc4c3a81b50f48c4 diff --git a/sorc/wxflow b/sorc/wxflow index afbbf2da..e952a8a2 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit afbbf2da25ed8f8e539fc379dff96b7956448f95 +Subproject commit e952a8a2c5b46960ab32ad0d9cb40cd080557f0f From 41a4cf7f443492b5d5b16c0424ac7b3f75f3c1fc Mon Sep 17 00:00:00 2001 From: Samuel Degelia Date: Tue, 10 Feb 2026 18:21:53 +0000 Subject: [PATCH 2/9] cleanup jcb section of build script --- build.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 21569980..0bfee78a 100755 --- a/build.sh +++ b/build.sh @@ -194,14 +194,9 @@ fi if [[ $BUILD_JCB == 'YES' ]]; then cd $dir_root/sorc/jcb python jcb_client_init.py - # Build an example jedi.yaml - #PYTHONPATH="${PYTHONPATH}:$dir_root/sorc/jcb/src/:$dir_root/build/lib/python3.*:${dir_root}/sorc/wxflow/src" - #cd $dir_root/sorc/jcb/src/jcb/configuration/apps/rdas/test/client_integration - #python run.py # Link the RDASApp/parm/jcb-rdas regular folder instead of submodule cd $dir_root/sorc/jcb/src/jcb/configuration/apps/ - mv rdas rdas.bak - ln -sf $dir_root/parm/jcb-rdas rdas + ln -snf $dir_root/parm/jcb-rdas rdas cd ${BUILD_DIR} fi From ff437ad867cb2233a9c56a45f5a4ca47026e97a5 Mon Sep 17 00:00:00 2001 From: Samuel Degelia Date: Tue, 10 Feb 2026 20:09:49 +0000 Subject: [PATCH 3/9] sync workaround codes --- sorc/_workaround_/gsibec/gsimod.F90 | 6 ++--- sorc/_workaround_/saber/mgbf/CMakeLists.txt | 9 ++++--- sorc/_workaround_/saber/mgbf/Localization.h | 25 +++++-------------- .../mgbf_src/covariance/MGBF_Covariance.h | 2 +- 4 files changed, 16 insertions(+), 26 deletions(-) diff --git a/sorc/_workaround_/gsibec/gsimod.F90 b/sorc/_workaround_/gsibec/gsimod.F90 index 43a0c48f..375deb1a 100644 --- a/sorc/_workaround_/gsibec/gsimod.F90 +++ b/sorc/_workaround_/gsibec/gsimod.F90 @@ -703,9 +703,9 @@ subroutine gsimain_initialize_(nfldsig,nmlfile) if (mype==0) write(6,*)'GSIMOD: tendencies and derivatives are on' endif - if (regional) then - call convert_fv3_regional - endif +! if (regional) then +! call convert_fv3_regional +! endif ! Initialize variables, create/initialize arrays lendian_in = -1 diff --git a/sorc/_workaround_/saber/mgbf/CMakeLists.txt b/sorc/_workaround_/saber/mgbf/CMakeLists.txt index ed7836b4..dcc0a409 100644 --- a/sorc/_workaround_/saber/mgbf/CMakeLists.txt +++ b/sorc/_workaround_/saber/mgbf/CMakeLists.txt @@ -31,6 +31,12 @@ target_link_libraries( ${PROJECT_NAME} PUBLIC atlas_f ) target_link_libraries( ${PROJECT_NAME} PUBLIC ${oops_LIBRARIES} ) target_link_libraries( ${PROJECT_NAME} PUBLIC vader ) +if( ECTRANS_FOUND AND ectrans_HAVE_ETRANS AND ectrans_HAVE_TRANSI ) + target_link_libraries( ${PROJECT_NAME} PUBLIC transi ) +endif() +if( FFTW_FOUND ) + target_link_libraries( ${PROJECT_NAME} PUBLIC FFTW::fftw3 ) +endif() if( gsibec_FOUND ) target_link_libraries( ${PROJECT_NAME} PUBLIC gsibec ) target_compile_definitions( ${PROJECT_NAME} PUBLIC GSIBEC_FOUND ) @@ -42,9 +48,6 @@ if( MGBFLIB_FOUND EQUAL 9999 ) target_link_libraries( ${PROJECT_NAME} PUBLIC mgbf_lib ) target_compile_definitions( ${PROJECT_NAME} PUBLIC MGBF_FOUND) endif() -if( FFTW_FOUND ) - target_link_libraries( ${PROJECT_NAME} PUBLIC FFTW::fftw3 ) -endif() if ( ENABLE_OFFLINE_CODECOV ) target_link_libraries( ${PROJECT_NAME} PUBLIC gcov ) endif() diff --git a/sorc/_workaround_/saber/mgbf/Localization.h b/sorc/_workaround_/saber/mgbf/Localization.h index 0639b09f..efff3796 100644 --- a/sorc/_workaround_/saber/mgbf/Localization.h +++ b/sorc/_workaround_/saber/mgbf/Localization.h @@ -17,7 +17,7 @@ #include "eckit/config/Configuration.h" #include "oops/base/FieldSets.h" -#include "oops/base/State4D.h" +#include "oops/base/State.h" #include "oops/base/Variables.h" #include "oops/generic/LocalizationBase.h" #include "oops/util/Duration.h" @@ -83,27 +83,14 @@ Localization::Localization(const Geometry_ & geom, fg.shallowCopy(fg_state.fieldSet()); oops::FieldSet4D fg4d(fg); - oops::FieldSets emptyFsetEns({}, oops::mpi::myself(), {}, oops::mpi::myself()); - // TODO(AS): revisit what configuration needs to be passed to SaberParametricBlockChain. - eckit::LocalConfiguration covarConf; - eckit::LocalConfiguration ensembleConf; - ensembleConf.set("ensemble size", 0); - covarConf.set("ensemble configuration", ensembleConf); - covarConf.set("adjoint test", conf.getBool("adjoint test", false)); - covarConf.set("adjoint tolerance", conf.getDouble("adjoint tolerance", 1.0e-12)); - covarConf.set("inverse test", conf.getBool("inverse test", false)); - covarConf.set("inverse tolerance", conf.getDouble("inverse tolerance", 1.0e-12)); - covarConf.set("square-root test", conf.getBool("square-root test", false)); - covarConf.set("square-root tolerance", conf.getDouble("square-root tolerance", 1.0e-12)); - covarConf.set("iterative ensemble loading", false); - // 3D localization always used here (4D aspects handled in oops::Localization), // so this parameter can be anything. - covarConf.set("time covariance", "univariate"); + eckit::LocalConfiguration confUpdated(conf); + confUpdated.set("time covariance", "univariate"); + // Initialize localization blockchain - loc_ = std::make_unique(geom, geom, - incVars, xb4d, fg4d, - emptyFsetEns, emptyFsetEns, covarConf, conf); + loc_ = std::make_unique(geom, + incVars, xb4d, fg4d, conf); oops::Log::trace() << "Localization:Localization done" << std::endl; } diff --git a/sorc/_workaround_/saber/mgbf/mgbf_src/covariance/MGBF_Covariance.h b/sorc/_workaround_/saber/mgbf/mgbf_src/covariance/MGBF_Covariance.h index cb49e5df..8e4a7a43 100755 --- a/sorc/_workaround_/saber/mgbf/mgbf_src/covariance/MGBF_Covariance.h +++ b/sorc/_workaround_/saber/mgbf/mgbf_src/covariance/MGBF_Covariance.h @@ -83,7 +83,7 @@ MGBF_Covariance(const oops::GeometryData & geometryData, void iterativeCalibrationUpdate(const oops::FieldSet3D &) override{}; void iterativeCalibrationFinal() override{}; - void dualResolutionSetup(const oops::GeometryData &) override{}; +// void dualResolutionSetup(const oops::GeometryData &) override{}; void write() const override {}; std::vector> fieldsToWrite() const From 3fcc90982b98dec9cf2501a87c5846a8aaa7c0be Mon Sep 17 00:00:00 2001 From: Samuel Degelia Date: Wed, 11 Feb 2026 14:00:15 +0000 Subject: [PATCH 4/9] restructure how getkf localization is handled in jcb --- .../observations/atmosphere/abi_g16.yaml.j2 | 3 -- .../observations/atmosphere/abi_g18.yaml.j2 | 3 -- .../adpsfc_airTemperature_181.yaml.j2 | 7 ----- .../adpsfc_airTemperature_183.yaml.j2 | 7 ----- .../adpsfc_airTemperature_187.yaml.j2 | 7 ----- .../adpsfc_specificHumidity_181.yaml.j2 | 7 ----- .../adpsfc_specificHumidity_183.yaml.j2 | 7 ----- .../adpsfc_specificHumidity_187.yaml.j2 | 7 ----- .../adpsfc_stationPressure_181.yaml.j2 | 7 ----- .../adpsfc_stationPressure_187.yaml.j2 | 7 ----- .../atmosphere/adpsfc_winds_281.yaml.j2 | 7 ----- .../atmosphere/adpsfc_winds_284.yaml.j2 | 7 ----- .../atmosphere/adpsfc_winds_287.yaml.j2 | 7 ----- .../adpupa_airTemperature_120.yaml.j2 | 7 ----- .../adpupa_airTemperature_132.yaml.j2 | 7 ----- .../adpupa_specificHumidity_120.yaml.j2 | 7 ----- .../adpupa_specificHumidity_132.yaml.j2 | 7 ----- .../adpupa_stationPressure_120.yaml.j2 | 7 ----- .../atmosphere/adpupa_winds_220.yaml.j2 | 7 ----- .../atmosphere/adpupa_winds_232.yaml.j2 | 7 ----- .../aircar_airTemperature_133.yaml.j2 | 7 ----- .../aircar_specificHumidity_133.yaml.j2 | 7 ----- .../atmosphere/aircar_winds_233.yaml.j2 | 7 ----- .../aircft_airTemperature_130.yaml.j2 | 7 ----- .../aircft_airTemperature_131.yaml.j2 | 7 ----- .../aircft_airTemperature_134.yaml.j2 | 7 ----- .../aircft_airTemperature_135.yaml.j2 | 7 ----- .../aircft_specificHumidity_134.yaml.j2 | 7 ----- .../atmosphere/aircft_winds_230.yaml.j2 | 7 ----- .../atmosphere/aircft_winds_231.yaml.j2 | 7 ----- .../atmosphere/aircft_winds_234.yaml.j2 | 7 ----- .../atmosphere/aircft_winds_235.yaml.j2 | 7 ----- .../atmosphere/amsua_metop-b.yaml.j2 | 3 -- .../atmosphere/amsua_metop-c.yaml.j2 | 3 -- .../observations/atmosphere/amsua_n19.yaml.j2 | 3 -- .../observations/atmosphere/atms_n20.yaml.j2 | 3 -- .../observations/atmosphere/atms_n21.yaml.j2 | 3 -- .../observations/atmosphere/atms_npp.yaml.j2 | 3 -- .../atmosphere/cris-fsr_n20.yaml.j2 | 3 -- .../atmosphere/cris-fsr_n21.yaml.j2 | 3 -- .../atmosphere/gnss_zenithTotalDelay.yaml.j2 | 7 ----- .../observations/atmosphere/mrms_refl.yaml.j2 | 7 ----- .../msonet_airTemperature_188.yaml.j2 | 7 ----- .../msonet_specificHumidity_188.yaml.j2 | 7 ----- .../msonet_stationPressure_188.yaml.j2 | 7 ----- .../atmosphere/msonet_winds_288.yaml.j2 | 7 ----- .../atmosphere/proflr_winds_227.yaml.j2 | 7 ----- .../rassda_airTemperature_126.yaml.j2 | 7 ----- .../atmosphere/satwnd_winds_245_270.yaml.j2 | 7 ----- .../atmosphere/satwnd_winds_245_272.yaml.j2 | 7 ----- .../atmosphere/satwnd_winds_246_270.yaml.j2 | 7 ----- .../atmosphere/satwnd_winds_246_272.yaml.j2 | 7 ----- .../atmosphere/satwnd_winds_247_270.yaml.j2 | 7 ----- .../atmosphere/satwnd_winds_247_272.yaml.j2 | 7 ----- .../sfcshp_airTemperature_180.yaml.j2 | 7 ----- .../sfcshp_airTemperature_182.yaml.j2 | 7 ----- .../sfcshp_airTemperature_183.yaml.j2 | 7 ----- .../sfcshp_specificHumidity_180.yaml.j2 | 7 ----- .../sfcshp_specificHumidity_182.yaml.j2 | 7 ----- .../sfcshp_specificHumidity_183.yaml.j2 | 7 ----- .../sfcshp_stationPressure_180.yaml.j2 | 7 ----- .../sfcshp_stationPressure_182.yaml.j2 | 7 ----- .../atmosphere/sfcshp_winds_280.yaml.j2 | 7 ----- .../atmosphere/sfcshp_winds_282.yaml.j2 | 7 ----- .../atmosphere/sfcshp_winds_284.yaml.j2 | 7 ----- .../atmosphere/vadwnd_winds_224.yaml.j2 | 7 ----- ...rfs_fv3jedi_2024052700_getkf_observer.yaml | 10 +++++- ...-rrfs_fv3jedi_2024052700_getkf_solver.yaml | 10 +++++- parm/jcb-rdas/test/ci/run_jcb_ctest.py | 31 ++++++++++++++++++- 69 files changed, 48 insertions(+), 425 deletions(-) diff --git a/parm/jcb-rdas/observations/atmosphere/abi_g16.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/abi_g16.yaml.j2 index 3927c04a..298f0aa7 100644 --- a/parm/jcb-rdas/observations/atmosphere/abi_g16.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/abi_g16.yaml.j2 @@ -2,9 +2,6 @@ # ----------------------- - obs space: name: abi_g16 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File diff --git a/parm/jcb-rdas/observations/atmosphere/abi_g18.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/abi_g18.yaml.j2 index 948f2db0..488770cb 100644 --- a/parm/jcb-rdas/observations/atmosphere/abi_g18.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/abi_g18.yaml.j2 @@ -2,9 +2,6 @@ # ----------------------- - obs space: name: abi_g18 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_181.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_181.yaml.j2 index 23202e36..8566d43f 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_181.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_181.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_airTemperature_181 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (181) diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_183.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_183.yaml.j2 index b9a636bf..b186ce87 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_183.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_183.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_airTemperature_183 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (183) diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_187.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_187.yaml.j2 index 4668a677..b255008e 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_187.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_airTemperature_187.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_airTemperature_187 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (187) diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_181.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_181.yaml.j2 index 5f937571..b7defa4d 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_181.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_181.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_specificHumidity_181 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (181) diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_183.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_183.yaml.j2 index bc5e34f3..9affaa5c 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_183.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_183.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_specificHumidity_183 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (183) diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_187.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_187.yaml.j2 index 932b0586..dfa9c9ce 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_187.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_specificHumidity_187.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_specificHumidity_187 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (187) diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_stationPressure_181.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_stationPressure_181.yaml.j2 index 1c0dbba9..47d35752 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_stationPressure_181.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_stationPressure_181.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_stationPressure_181 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -35,10 +32,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # stationPressure (181) diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_stationPressure_187.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_stationPressure_187.yaml.j2 index 09fa6f00..cdc611f5 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_stationPressure_187.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_stationPressure_187.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_stationPressure_187 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -35,10 +32,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # stationPressure (187) diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_281.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_281.yaml.j2 index ace1e8a1..4e57f245 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_281.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_281.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_winds_281 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (281) diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_284.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_284.yaml.j2 index 2794e47a..1a5beb3d 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_284.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_284.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_winds_284 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (284) diff --git a/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_287.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_287.yaml.j2 index 9da74826..75c2f966 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_287.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpsfc_winds_287.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpsfc_winds_287 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (287) diff --git a/parm/jcb-rdas/observations/atmosphere/adpupa_airTemperature_120.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpupa_airTemperature_120.yaml.j2 index 1cf5d8ea..3fba3786 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpupa_airTemperature_120.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpupa_airTemperature_120.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpupa_airTemperature_120 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (120) diff --git a/parm/jcb-rdas/observations/atmosphere/adpupa_airTemperature_132.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpupa_airTemperature_132.yaml.j2 index a08f5837..cc075d84 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpupa_airTemperature_132.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpupa_airTemperature_132.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpupa_airTemperature_132 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (132) diff --git a/parm/jcb-rdas/observations/atmosphere/adpupa_specificHumidity_120.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpupa_specificHumidity_120.yaml.j2 index a6f34d40..940625de 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpupa_specificHumidity_120.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpupa_specificHumidity_120.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpupa_specificHumidity_120 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (120) diff --git a/parm/jcb-rdas/observations/atmosphere/adpupa_specificHumidity_132.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpupa_specificHumidity_132.yaml.j2 index fe5da885..47f2dccd 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpupa_specificHumidity_132.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpupa_specificHumidity_132.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpupa_specificHumidity_132 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (132) diff --git a/parm/jcb-rdas/observations/atmosphere/adpupa_stationPressure_120.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpupa_stationPressure_120.yaml.j2 index 676dfee5..f9a3b8bc 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpupa_stationPressure_120.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpupa_stationPressure_120.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpupa_stationPressure_120 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -35,10 +32,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # stationPressure (120) diff --git a/parm/jcb-rdas/observations/atmosphere/adpupa_winds_220.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpupa_winds_220.yaml.j2 index d8770ca9..a8123803 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpupa_winds_220.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpupa_winds_220.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpupa_winds_220 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (220) diff --git a/parm/jcb-rdas/observations/atmosphere/adpupa_winds_232.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/adpupa_winds_232.yaml.j2 index 1f110ef3..1ce3b75d 100644 --- a/parm/jcb-rdas/observations/atmosphere/adpupa_winds_232.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/adpupa_winds_232.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: adpupa_winds_232 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (232) diff --git a/parm/jcb-rdas/observations/atmosphere/aircar_airTemperature_133.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircar_airTemperature_133.yaml.j2 index f3da1dcd..9243080f 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircar_airTemperature_133.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircar_airTemperature_133.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircar_airTemperature_133 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (133) diff --git a/parm/jcb-rdas/observations/atmosphere/aircar_specificHumidity_133.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircar_specificHumidity_133.yaml.j2 index 4c5437bf..e9ebd0f9 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircar_specificHumidity_133.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircar_specificHumidity_133.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircar_specificHumidity_133 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (133) diff --git a/parm/jcb-rdas/observations/atmosphere/aircar_winds_233.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircar_winds_233.yaml.j2 index 88b15daa..a203fa66 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircar_winds_233.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircar_winds_233.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircar_winds_233 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (233) diff --git a/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_130.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_130.yaml.j2 index 7cc83f55..9f8dac95 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_130.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_130.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircft_airTemperature_130 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (130) diff --git a/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_131.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_131.yaml.j2 index d41231ed..2652d966 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_131.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_131.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircft_airTemperature_131 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (131) diff --git a/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_134.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_134.yaml.j2 index f7bc3772..a3096fb2 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_134.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_134.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircft_airTemperature_134 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (134) diff --git a/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_135.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_135.yaml.j2 index b5b85ee2..91c59f92 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_135.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircft_airTemperature_135.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircft_airTemperature_135 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (135) diff --git a/parm/jcb-rdas/observations/atmosphere/aircft_specificHumidity_134.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircft_specificHumidity_134.yaml.j2 index f90c792d..86d3eb2d 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircft_specificHumidity_134.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircft_specificHumidity_134.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircft_specificHumidity_134 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (134) diff --git a/parm/jcb-rdas/observations/atmosphere/aircft_winds_230.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircft_winds_230.yaml.j2 index 4070acc0..0ec079fa 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircft_winds_230.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircft_winds_230.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircft_winds_230 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (230) diff --git a/parm/jcb-rdas/observations/atmosphere/aircft_winds_231.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircft_winds_231.yaml.j2 index e25ba8b7..c37457ae 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircft_winds_231.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircft_winds_231.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircft_winds_231 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (231) diff --git a/parm/jcb-rdas/observations/atmosphere/aircft_winds_234.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircft_winds_234.yaml.j2 index d30153b0..553d745f 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircft_winds_234.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircft_winds_234.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircft_winds_234 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (234) diff --git a/parm/jcb-rdas/observations/atmosphere/aircft_winds_235.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/aircft_winds_235.yaml.j2 index 32164a7d..d36e4cce 100644 --- a/parm/jcb-rdas/observations/atmosphere/aircft_winds_235.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/aircft_winds_235.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: aircft_winds_235 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (235) diff --git a/parm/jcb-rdas/observations/atmosphere/amsua_metop-b.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/amsua_metop-b.yaml.j2 index 2766c9c9..79237cbf 100644 --- a/parm/jcb-rdas/observations/atmosphere/amsua_metop-b.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/amsua_metop-b.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: amsua_metop-b - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File diff --git a/parm/jcb-rdas/observations/atmosphere/amsua_metop-c.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/amsua_metop-c.yaml.j2 index ed65492e..af334051 100644 --- a/parm/jcb-rdas/observations/atmosphere/amsua_metop-c.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/amsua_metop-c.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: amsua_metop-c - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File diff --git a/parm/jcb-rdas/observations/atmosphere/amsua_n19.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/amsua_n19.yaml.j2 index afadb587..500a6e10 100644 --- a/parm/jcb-rdas/observations/atmosphere/amsua_n19.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/amsua_n19.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: amsua_n19 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File diff --git a/parm/jcb-rdas/observations/atmosphere/atms_n20.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/atms_n20.yaml.j2 index 34c0b02b..14704086 100644 --- a/parm/jcb-rdas/observations/atmosphere/atms_n20.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/atms_n20.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: atms_n20 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File diff --git a/parm/jcb-rdas/observations/atmosphere/atms_n21.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/atms_n21.yaml.j2 index a24caa99..6d96a93f 100644 --- a/parm/jcb-rdas/observations/atmosphere/atms_n21.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/atms_n21.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: atms_n21 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File diff --git a/parm/jcb-rdas/observations/atmosphere/atms_npp.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/atms_npp.yaml.j2 index 7711e595..f1f67635 100644 --- a/parm/jcb-rdas/observations/atmosphere/atms_npp.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/atms_npp.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: atms_npp - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File diff --git a/parm/jcb-rdas/observations/atmosphere/cris-fsr_n20.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/cris-fsr_n20.yaml.j2 index 44890b58..814d8b3e 100644 --- a/parm/jcb-rdas/observations/atmosphere/cris-fsr_n20.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/cris-fsr_n20.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: cris-fsr_n20 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File diff --git a/parm/jcb-rdas/observations/atmosphere/cris-fsr_n21.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/cris-fsr_n21.yaml.j2 index d64fff63..165e243e 100644 --- a/parm/jcb-rdas/observations/atmosphere/cris-fsr_n21.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/cris-fsr_n21.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: cris-fsr_n21 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File diff --git a/parm/jcb-rdas/observations/atmosphere/gnss_zenithTotalDelay.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/gnss_zenithTotalDelay.yaml.j2 index 658c82de..e8fb8798 100644 --- a/parm/jcb-rdas/observations/atmosphere/gnss_zenithTotalDelay.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/gnss_zenithTotalDelay.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: gnss_ztd_zenithTotalDelay - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -29,10 +26,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # zenithTotalDelay diff --git a/parm/jcb-rdas/observations/atmosphere/mrms_refl.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/mrms_refl.yaml.j2 index 1ff149e4..ac8dbcc6 100644 --- a/parm/jcb-rdas/observations/atmosphere/mrms_refl.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/mrms_refl.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: refl10cm - distribution: - name: "{{distribution}}" - halo size: {{ halo_size_radardbz | default(500e3) }} obsdatain: engine: type: H5File @@ -29,10 +26,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale_radardbz | default (200e3) }} - obs filters: # ------------------ # MRMS Reflectivity diff --git a/parm/jcb-rdas/observations/atmosphere/msonet_airTemperature_188.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/msonet_airTemperature_188.yaml.j2 index 0240d13f..b0760fe5 100644 --- a/parm/jcb-rdas/observations/atmosphere/msonet_airTemperature_188.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/msonet_airTemperature_188.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: msonet_airTemperature_188 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (188) diff --git a/parm/jcb-rdas/observations/atmosphere/msonet_specificHumidity_188.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/msonet_specificHumidity_188.yaml.j2 index 633e4964..19d50582 100644 --- a/parm/jcb-rdas/observations/atmosphere/msonet_specificHumidity_188.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/msonet_specificHumidity_188.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: msonet_specificHumidity_188 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (188) diff --git a/parm/jcb-rdas/observations/atmosphere/msonet_stationPressure_188.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/msonet_stationPressure_188.yaml.j2 index 1c241b1b..4a101f43 100644 --- a/parm/jcb-rdas/observations/atmosphere/msonet_stationPressure_188.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/msonet_stationPressure_188.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: msonet_stationPressure_188 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -35,10 +32,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # stationPressure (188) diff --git a/parm/jcb-rdas/observations/atmosphere/msonet_winds_288.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/msonet_winds_288.yaml.j2 index e3d9d588..241cf149 100644 --- a/parm/jcb-rdas/observations/atmosphere/msonet_winds_288.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/msonet_winds_288.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: msonet_winds_288 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (288) diff --git a/parm/jcb-rdas/observations/atmosphere/proflr_winds_227.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/proflr_winds_227.yaml.j2 index 922fb62e..95a5fb56 100644 --- a/parm/jcb-rdas/observations/atmosphere/proflr_winds_227.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/proflr_winds_227.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: proflr_winds_227 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (227) diff --git a/parm/jcb-rdas/observations/atmosphere/rassda_airTemperature_126.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/rassda_airTemperature_126.yaml.j2 index 79950360..9c975d07 100644 --- a/parm/jcb-rdas/observations/atmosphere/rassda_airTemperature_126.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/rassda_airTemperature_126.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: rassda_airTemperature_126 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (126) diff --git a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_245_270.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_245_270.yaml.j2 index a20f1739..6186932b 100644 --- a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_245_270.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_245_270.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: satwnd_winds_245_270 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -36,10 +33,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (245) diff --git a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_245_272.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_245_272.yaml.j2 index 3b81e18f..cf69401b 100644 --- a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_245_272.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_245_272.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: satwnd_winds_245_272 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -36,10 +33,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (245) diff --git a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_246_270.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_246_270.yaml.j2 index ec7f3cae..9e5f3d95 100644 --- a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_246_270.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_246_270.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: satwnd_winds_246_270 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -36,10 +33,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (246) diff --git a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_246_272.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_246_272.yaml.j2 index 7fa0c8d2..f60a2278 100644 --- a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_246_272.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_246_272.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: satwnd_winds_246_272 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -36,10 +33,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (246) diff --git a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_247_270.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_247_270.yaml.j2 index aedb8f2d..2b4cb882 100644 --- a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_247_270.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_247_270.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: satwnd_winds_247_270 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -36,10 +33,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (247) diff --git a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_247_272.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_247_272.yaml.j2 index cd125a30..3362ddd7 100644 --- a/parm/jcb-rdas/observations/atmosphere/satwnd_winds_247_272.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/satwnd_winds_247_272.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: satwnd_winds_247_272 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -36,10 +33,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (247) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_180.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_180.yaml.j2 index 3f8092e9..a379dc8c 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_180.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_180.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_airTemperature_180 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (180) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_182.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_182.yaml.j2 index 5e0a1144..5b1b460d 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_182.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_182.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_airTemperature_182 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (182) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_183.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_183.yaml.j2 index 155b23eb..e6f17172 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_183.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_airTemperature_183.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_airTemperature_183 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # airTemperature (183) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_180.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_180.yaml.j2 index 4b2679f6..0879af16 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_180.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_180.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_specificHumidity_180 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (180) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_182.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_182.yaml.j2 index 3fe5884b..fa4ef18d 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_182.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_182.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_specificHumidity_182 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (182) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_183.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_183.yaml.j2 index bc4f88cc..4a741512 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_183.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_specificHumidity_183.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_specificHumidity_183 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -39,10 +36,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # specificHumidity (183) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_stationPressure_180.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_stationPressure_180.yaml.j2 index d5d5b570..12f59eb0 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_stationPressure_180.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_stationPressure_180.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_stationPressure_180 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -35,10 +32,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # stationPressure (180) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_stationPressure_182.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_stationPressure_182.yaml.j2 index 62c9e247..f50ddb15 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_stationPressure_182.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_stationPressure_182.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_stationPressure_182 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -35,10 +32,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # stationPressure (182) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_280.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_280.yaml.j2 index ff9891ed..e39f56b3 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_280.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_280.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_winds_280 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (280) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_282.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_282.yaml.j2 index a36b4fb7..e9ff7afc 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_282.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_282.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_winds_282 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (282) diff --git a/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_284.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_284.yaml.j2 index 2d2bcd53..9ba293e4 100644 --- a/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_284.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/sfcshp_winds_284.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: sfcshp_winds_284 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (284) diff --git a/parm/jcb-rdas/observations/atmosphere/vadwnd_winds_224.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/vadwnd_winds_224.yaml.j2 index 127bdaa1..75483358 100644 --- a/parm/jcb-rdas/observations/atmosphere/vadwnd_winds_224.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/vadwnd_winds_224.yaml.j2 @@ -1,8 +1,5 @@ - obs space: name: vadwnd_winds_224 - distribution: - name: "{{distribution}}" - halo size: {{ halo_size | default(500e3) }} obsdatain: engine: type: H5File @@ -40,10 +37,6 @@ obs error: covariance model: diagonal - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} - obs filters: # ------------------ # wind (224) diff --git a/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_observer.yaml b/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_observer.yaml index 5174c2e9..88c8908e 100644 --- a/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_observer.yaml +++ b/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_observer.yaml @@ -27,7 +27,6 @@ bound_to_include: begin minimizer: DRPCG final_diagnostics_departures: oman number_of_outer_loops: 2 -distribution: RoundRobin empty_obs_space_action: create output analysis_variables: @@ -372,6 +371,15 @@ inflation_rtps: 0.95 inflation_rtpp: 0.0 inflation_mult: 1.0 +# Horizontal localization for GETKF +obs_distribution_localizations: + obs_distribution: + name: RoundRobin + halo size: 500e3 + obs_localizations: + - localization method: Horizontal Gaspari-Cohn + lengthscale: 200e3 + # Driver driver_update_obs_config_with_geometry_info: false driver_run_as_observer_only: true diff --git a/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_solver.yaml b/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_solver.yaml index 90dca5b0..1d2fef37 100644 --- a/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_solver.yaml +++ b/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_solver.yaml @@ -27,7 +27,6 @@ bound_to_include: begin minimizer: DRPCG final_diagnostics_departures: oman number_of_outer_loops: 2 -distribution: Halo empty_obs_space_action: create output analysis_variables: @@ -372,6 +371,15 @@ inflation_rtps: 0.95 inflation_rtpp: 0.0 inflation_mult: 1.0 +# Horizontal localization for GETKF +obs_distribution_localizations: + obs_distribution: + name: Halo + halo size: 500e3 + obs_localizations: + - localization method: Horizontal Gaspari-Cohn + lengthscale: 200e3 + # Driver driver_update_obs_config_with_geometry_info: false driver_run_as_observer_only: false diff --git a/parm/jcb-rdas/test/ci/run_jcb_ctest.py b/parm/jcb-rdas/test/ci/run_jcb_ctest.py index 095125a3..4a25179e 100755 --- a/parm/jcb-rdas/test/ci/run_jcb_ctest.py +++ b/parm/jcb-rdas/test/ci/run_jcb_ctest.py @@ -5,6 +5,8 @@ from datetime import datetime, timedelta from jcb import render from wxflow import parse_j2yaml +from collections.abc import Mapping, Sequence +from pathlib import Path def update_cycle_times(config, cycle_str): cycle_time = datetime.strptime(cycle_str, "%Y%m%d%H") @@ -83,6 +85,32 @@ def patch_solver_struct(cfg_plain, ctest_yaml): return cfg_plain +def to_plain(obj): + # Common pattern in wxflow/JCB style objects + for attr in ("to_dict", "as_dict", "dict"): + if hasattr(obj, attr) and callable(getattr(obj, attr)): + return to_plain(getattr(obj, attr)()) + + # dict-like + if isinstance(obj, Mapping): + return {str(k): to_plain(v) for k, v in obj.items()} + + # list-like (but not strings/bytes) + if isinstance(obj, Sequence) and not isinstance(obj, (str, bytes, bytearray)): + return [to_plain(v) for v in obj] + + # pathlib, numpy scalars, etc. + if isinstance(obj, Path): + return str(obj) + try: + import numpy as np + if isinstance(obj, np.generic): + return obj.item() + except Exception: + pass + + return obj + if __name__ == "__main__": if len(sys.argv) != 4: print("Usage: run.py YYYYMMDDHH jcb_config jedi_yaml") @@ -104,9 +132,10 @@ def patch_solver_struct(cfg_plain, ctest_yaml): # Render (returns wxflow/JCB wrapper objects) rendered = render(cycle_config) + rendered_plain = to_plain(rendered) # Dump to plain YAML text, then load back to plain dicts/lists - yaml_text = yaml.safe_dump(rendered, default_flow_style=False, sort_keys=False) + yaml_text = yaml.safe_dump(rendered_plain, default_flow_style=False, sort_keys=False) cfg_plain = yaml.safe_load(yaml_text) # If solver, structurally patch obsfiles to observer rundir jdiag From a0feb4c5677d07f679edf9734f6395ca50a177fa Mon Sep 17 00:00:00 2001 From: Samuel Degelia Date: Wed, 11 Feb 2026 14:04:18 +0000 Subject: [PATCH 5/9] missed removing a few localization settings --- parm/jcb-rdas/observations/atmosphere/abi_g16.yaml.j2 | 3 --- parm/jcb-rdas/observations/atmosphere/abi_g18.yaml.j2 | 3 --- parm/jcb-rdas/observations/atmosphere/amsua_metop-b.yaml.j2 | 3 --- parm/jcb-rdas/observations/atmosphere/amsua_metop-c.yaml.j2 | 3 --- parm/jcb-rdas/observations/atmosphere/amsua_n19.yaml.j2 | 3 --- parm/jcb-rdas/observations/atmosphere/atms_n20.yaml.j2 | 3 --- parm/jcb-rdas/observations/atmosphere/atms_n21.yaml.j2 | 3 --- parm/jcb-rdas/observations/atmosphere/atms_npp.yaml.j2 | 3 --- parm/jcb-rdas/observations/atmosphere/cris-fsr_n20.yaml.j2 | 3 --- parm/jcb-rdas/observations/atmosphere/cris-fsr_n21.yaml.j2 | 3 --- 10 files changed, 30 deletions(-) diff --git a/parm/jcb-rdas/observations/atmosphere/abi_g16.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/abi_g16.yaml.j2 index 298f0aa7..63308d40 100644 --- a/parm/jcb-rdas/observations/atmosphere/abi_g16.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/abi_g16.yaml.j2 @@ -34,9 +34,6 @@ #IRVISlandCoeff: IGBP linear obs operator: Absorbers: [H2O, O3] - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} # Observation Bias Correction (VarBC) # ----------------------------------- diff --git a/parm/jcb-rdas/observations/atmosphere/abi_g18.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/abi_g18.yaml.j2 index 488770cb..0483487a 100644 --- a/parm/jcb-rdas/observations/atmosphere/abi_g18.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/abi_g18.yaml.j2 @@ -34,9 +34,6 @@ #IRVISlandCoeff: IGBP linear obs operator: Absorbers: [H2O, O3] - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} # Observation Bias Correction (VarBC) # ----------------------------------- diff --git a/parm/jcb-rdas/observations/atmosphere/amsua_metop-b.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/amsua_metop-b.yaml.j2 index 79237cbf..25c881fa 100644 --- a/parm/jcb-rdas/observations/atmosphere/amsua_metop-b.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/amsua_metop-b.yaml.j2 @@ -30,9 +30,6 @@ #IRVISlandCoeff: IGBP linear obs operator: Absorbers: [H2O, O3] - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} obs bias: input file: data/satbias_in/amsua_metop-b.satbias.nc output file: data/satbias_out/amsua_metop-b.satbias.nc diff --git a/parm/jcb-rdas/observations/atmosphere/amsua_metop-c.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/amsua_metop-c.yaml.j2 index af334051..9030dfee 100644 --- a/parm/jcb-rdas/observations/atmosphere/amsua_metop-c.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/amsua_metop-c.yaml.j2 @@ -30,9 +30,6 @@ #IRVISlandCoeff: IGBP linear obs operator: Absorbers: [H2O, O3] - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} obs bias: input file: data/satbias_in/amsua_metop-c.satbias.nc output file: data/satbias_out/amsua_metop-c.satbias.nc diff --git a/parm/jcb-rdas/observations/atmosphere/amsua_n19.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/amsua_n19.yaml.j2 index 500a6e10..57f97040 100644 --- a/parm/jcb-rdas/observations/atmosphere/amsua_n19.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/amsua_n19.yaml.j2 @@ -30,9 +30,6 @@ #IRVISlandCoeff: IGBP linear obs operator: Absorbers: [H2O, O3] - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} obs bias: input file: data/satbias_in/amsua_n19.satbias.nc output file: data/satbias_out/amsua_n19.satbias.nc diff --git a/parm/jcb-rdas/observations/atmosphere/atms_n20.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/atms_n20.yaml.j2 index 14704086..7e6cb25d 100644 --- a/parm/jcb-rdas/observations/atmosphere/atms_n20.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/atms_n20.yaml.j2 @@ -30,9 +30,6 @@ #IRVISlandCoeff: IGBP linear obs operator: Absorbers: [H2O, O3] - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} obs bias: input file: data/satbias_in/atms_n20.satbias.nc diff --git a/parm/jcb-rdas/observations/atmosphere/atms_n21.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/atms_n21.yaml.j2 index 6d96a93f..1f7a471d 100644 --- a/parm/jcb-rdas/observations/atmosphere/atms_n21.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/atms_n21.yaml.j2 @@ -30,9 +30,6 @@ #IRVISlandCoeff: IGBP linear obs operator: Absorbers: [H2O, O3] - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} obs bias: input file: data/satbias_in/atms_n21.satbias.nc diff --git a/parm/jcb-rdas/observations/atmosphere/atms_npp.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/atms_npp.yaml.j2 index f1f67635..618be851 100644 --- a/parm/jcb-rdas/observations/atmosphere/atms_npp.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/atms_npp.yaml.j2 @@ -30,9 +30,6 @@ #IRVISlandCoeff: IGBP linear obs operator: Absorbers: [H2O, O3] - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} obs bias: input file: data/satbias_in/atms_npp.satbias.nc diff --git a/parm/jcb-rdas/observations/atmosphere/cris-fsr_n20.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/cris-fsr_n20.yaml.j2 index 814d8b3e..8da30633 100644 --- a/parm/jcb-rdas/observations/atmosphere/cris-fsr_n20.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/cris-fsr_n20.yaml.j2 @@ -35,9 +35,6 @@ #IRVISiceCoeff: NPOESS linear obs operator: Absorbers: [H2O, O3] - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} # ------------------------------------ # Observation Bias Correction (VarBC) diff --git a/parm/jcb-rdas/observations/atmosphere/cris-fsr_n21.yaml.j2 b/parm/jcb-rdas/observations/atmosphere/cris-fsr_n21.yaml.j2 index 165e243e..c63bfe06 100644 --- a/parm/jcb-rdas/observations/atmosphere/cris-fsr_n21.yaml.j2 +++ b/parm/jcb-rdas/observations/atmosphere/cris-fsr_n21.yaml.j2 @@ -35,9 +35,6 @@ #IRVISiceCoeff: NPOESS linear obs operator: Absorbers: [H2O, O3] - obs localizations: - - localization method: Horizontal Gaspari-Cohn - lengthscale: {{ lengthscale | default (200e3) }} # ------------------------------------ # Observation Bias Correction (VarBC) From 68e906e64f443ca4e9ad89608d35d1bc8e36c5fa Mon Sep 17 00:00:00 2001 From: Samuel Degelia Date: Wed, 11 Feb 2026 14:14:59 +0000 Subject: [PATCH 6/9] add override localization for dbz example --- .../ci/jcb-rrfs_fv3jedi_2024052700_getkf_observer.yaml | 9 +++++++++ .../ci/jcb-rrfs_fv3jedi_2024052700_getkf_solver.yaml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_observer.yaml b/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_observer.yaml index 88c8908e..68cf8424 100644 --- a/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_observer.yaml +++ b/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_observer.yaml @@ -379,6 +379,15 @@ obs_distribution_localizations: obs_localizations: - localization method: Horizontal Gaspari-Cohn lengthscale: 200e3 +override_obs_distribution_localizations: + override: true + refl10cm: # not used in getkf ctests, but leaving as an example + obs_distribution: + name: RoundRobin + halo size: 100e3 + obs_localizations: + - localization method: Horizontal Gaspari-Cohn + lengthscale: 15e3 # Driver driver_update_obs_config_with_geometry_info: false diff --git a/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_solver.yaml b/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_solver.yaml index 1d2fef37..8c4d71ce 100644 --- a/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_solver.yaml +++ b/parm/jcb-rdas/test/ci/jcb-rrfs_fv3jedi_2024052700_getkf_solver.yaml @@ -379,6 +379,15 @@ obs_distribution_localizations: obs_localizations: - localization method: Horizontal Gaspari-Cohn lengthscale: 200e3 +override_obs_distribution_localizations: + override: true + refl10cm: # not used in getkf ctests, but leaving as an example + obs_distribution: + name: Halo + halo size: 100e3 + obs_localizations: + - localization method: Horizontal Gaspari-Cohn + lengthscale: 15e3 # Driver driver_update_obs_config_with_geometry_info: false From 8ca9eaa92eff16df0e3c003edf417116b5900ad6 Mon Sep 17 00:00:00 2001 From: SamuelDegelia-NOAA Date: Wed, 11 Feb 2026 21:21:58 +0000 Subject: [PATCH 7/9] update jcsda test data --- fix/jcsda/ioda-data | 2 +- fix/jcsda/ufo-data | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fix/jcsda/ioda-data b/fix/jcsda/ioda-data index 1191eac6..ecb4d443 120000 --- a/fix/jcsda/ioda-data +++ b/fix/jcsda/ioda-data @@ -1 +1 @@ -../.agent/jcsda/ioda-data_2fdc67a_20251203 \ No newline at end of file +../.agent/jcsda/ioda-data_c652e6a_20260211 \ No newline at end of file diff --git a/fix/jcsda/ufo-data b/fix/jcsda/ufo-data index c1fb5ff6..b06d7785 120000 --- a/fix/jcsda/ufo-data +++ b/fix/jcsda/ufo-data @@ -1 +1 @@ -../.agent/jcsda/ufo-data_5fa0b1e_20251203 \ No newline at end of file +../.agent/jcsda/ufo-data_7f295bd_20260211 \ No newline at end of file From 21b57e0977e4612000286cb2adb43c7b4d3a0674 Mon Sep 17 00:00:00 2001 From: SamuelDegelia-NOAA Date: Wed, 11 Feb 2026 21:28:39 +0000 Subject: [PATCH 8/9] remove some workarounds that have been merged --- sorc/_workaround_/gsibec/balmod.F90 | 1190 ------------ sorc/_workaround_/gsibec/compute_derived.F90 | 742 -------- sorc/_workaround_/gsibec/genqsat.F90 | 239 --- sorc/_workaround_/gsibec/mod_fv3_lola.f90 | 1738 ------------------ 4 files changed, 3909 deletions(-) delete mode 100644 sorc/_workaround_/gsibec/balmod.F90 delete mode 100644 sorc/_workaround_/gsibec/compute_derived.F90 delete mode 100644 sorc/_workaround_/gsibec/genqsat.F90 delete mode 100644 sorc/_workaround_/gsibec/mod_fv3_lola.f90 diff --git a/sorc/_workaround_/gsibec/balmod.F90 b/sorc/_workaround_/gsibec/balmod.F90 deleted file mode 100644 index 024f36e7..00000000 --- a/sorc/_workaround_/gsibec/balmod.F90 +++ /dev/null @@ -1,1190 +0,0 @@ -module balmod -!$$$ module documentation block -! . . . . -! module: balmod contains balance related stuff -! prgmmr: parrish org: np22 date: 2005-01-22 -! -! abstract: contains routines for loading and using balance parameters -! which define "slow" part of control variable, -! specifically the stream function dependent part of -! temperature, surface pressure, and velocity potential. -! -! program history log: -! 2005-01-22 parrish -! 2005-05-24 pondeca - accommodate 2dvar only surface analysis option -! 2005-07-15 wu - include fstat, f1 and fix l2 -! 2008-10-08 derber include routines strong_bk and strong_bk_ad -! 2009-06-15 parrish - add logical l_hyb_ens to balance, tbalance so strong constraint -! can be turned off in these routines when running in hybrid ensemble mode -! (strong constraint gets moved to control2state and control2state_ad routines -! when l_hyb_ens=.true.) -! 2010-03-04 zhu - add horizontally interpolated agvk,wgvk,bvk for regional -! 2011-09-07 todling - note that implementation of hybrid in sqrt-B case -! does not follow Dave''s statement above (2009-06-15) -! 2012-02-08 kleist - remove ref to l_hyb_ens in subroutines balance, tbalance, strong_bk, -! and strong_bk_ad. add new parameter tlnmc_option. -! 2012-02-08 parrish - replace nn_i_kind with nn, for nn any integer. -! 2012-10-09 Gu - add fut2ps to project unbalanced temp to surface pressure in static B modeling -! 2016-08-24 lippi - Add namelist variable lnobalance to run univariate -! analysis and init_balmod to initialize the variable. -! -! subroutines included: -! sub create_balance_vars - create arrays for balance vars -! sub destroy_balance_vars - remove arrays for balance vars -! sub create_balance_vars_reg - create arrays for regional balance vars -! sub destroy_balance_vars_reg - remove arrays for regional balance vars -! sub prebal - load balance vars -! sub prebal_reg - load regional balance vars -! sub balance - balance routine -! sub tbalance - adjoint of balance -! sub locatelat_reg - get interp vars for lat var --> regional grid -! sub strong_bk - apply strong balance constraint in background error matrix -! sub strong_bk_ad - apply adjoint of strong balance constraint in background error matrix -! -! Variable Definitions: -! def agvz - projection of streamfunction onto balanced temperature -! def wgvz - projection of streamfunction onto balanced ln(ps) -! def bvz - projection of streamfunction onto velocity potential -! def ke_vp - index of level above which to not let stream function -! influence velocity potential -! def rllat - lat of each regional grid point in lat grid units -! def rllat1 - same as rllat, but for subdomains -! def f1 - sin(lat)/sin(mid lat) for subdomains -! def llmin - min lat index for lat dependent background error, balance vars -! def llmax - max lat index for lat dependent background error, balance vars -! def fstat - .true. to seperate f from bal projection in regional mode -! -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -! -!$$$ end documentation block - - use m_kinds, only: r_kind,i_kind - implicit none - -! set default to private - private -! set subroutines to public - public :: init_balmod - public :: create_balance_vars - public :: destroy_balance_vars - public :: create_balance_vars_reg - public :: destroy_balance_vars_reg - public :: prebal_reg - public :: locatelat_reg -#ifdef TLNMC - public :: strong_bk - public :: strong_bk_ad -#endif /* TLNMC */ - public :: prebal - public :: balance - public :: tbalance -! set passed variables to public - public :: fstat,llmax,llmin,rllat,rllat1,ke_vp,f1,bvz,agvz,wgvz,bvk,agvk,wgvk,agvk_lm - public :: pput - public :: lnobalance - - real(r_kind),allocatable,dimension(:,:,:):: agvz - real(r_kind),allocatable,dimension(:,:):: wgvz - real(r_kind),allocatable,dimension(:,:):: pput - real(r_kind),allocatable,dimension(:,:):: bvz - real(r_kind),allocatable,dimension(:,:,:,:):: agvk - real(r_kind),allocatable,dimension(:,:):: agvk_lm - real(r_kind),allocatable,dimension(:,:,:):: wgvk - real(r_kind),allocatable,dimension(:,:,:):: bvk - real(r_kind),allocatable :: rllat(:,:),rllat1(:,:),f1(:,:) - - integer(i_kind) ke_vp - integer(i_kind) llmin,llmax - logical fstat,lnobalance - -contains - - subroutine init_balmod - implicit none - lnobalance=.false. - end subroutine init_balmod - - - subroutine create_balance_vars -!$$$ subprogram documentation block -! . . . . -! subprogram: create_balance_vars create arrays for balance vars -! prgmmr: parrish org: np22 date: 2005-01-22 -! -! abstract: creates arrays for balance variables -! -! program history log: -! 2005-01-22 parrish -! -! input argument list: -! -! output argument list: -! -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -! -!$$$ - use gridmod, only: lat2,nsig - implicit none - - if(.not.allocated(agvz)) allocate(agvz(lat2,nsig,nsig)) - if(.not.allocated(wgvz)) allocate(wgvz(lat2,nsig)) - if(.not.allocated(bvz)) allocate(bvz(lat2,nsig)) - if(.not.allocated(pput)) allocate(pput(lat2,nsig)) - - return - end subroutine create_balance_vars - - subroutine destroy_balance_vars -!$$$ subprogram documentation block -! . . . . -! subprogram: destroy_balance_vars deallocates balance var arrays -! prgmmr: parrish org: np22 date: 2005-01-22 -! -! abstract: deallocates balance var arrays -! -! program history log: -! 2005-01-22 parrish -! 2005-03-03 treadon - add implicit none -! -! input argument list: -! -! output argument list: -! -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -! -!$$$ - implicit none - - if(allocated(pput)) deallocate(pput) - if(allocated(bvz)) deallocate(bvz) - if(allocated(wgvz)) deallocate(wgvz) - if(allocated(agvz)) deallocate(agvz) - - return - end subroutine destroy_balance_vars - - subroutine create_balance_vars_reg(mype) -!$$$ subprogram documentation block -! . . . . -! subprogram: create_balance_vars_reg create arrays for reg balance vars -! prgmmr: parrish org: np22 date: 2005-01-22 -! -! abstract: create arrays for regional balance vars -! -! program history log: -! 2005-01-22 parrish -! 2008-11-13 zhu - replace agvz,wgvz and bvz by interpolated agvk,wgvk,bvk -! -! input argument list: -! mype -! -! output argument list: -! -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -! -!$$$ - use gridmod, only: nlat,nlon,nsig,lat2,lon2 - implicit none - - integer(i_kind),intent(in ) :: mype - -! compute rllat, rllat1, llmin, llmax - allocate(rllat(nlat,nlon)) - allocate(rllat1(lat2,lon2)) - allocate(f1(lat2,lon2)) - call locatelat_reg(mype) - - allocate(agvk(lat2,lon2,nsig,nsig),agvk_lm(nsig,nsig), & - wgvk(lat2,lon2,nsig),bvk(lat2,lon2,nsig)) - - return - end subroutine create_balance_vars_reg - - subroutine destroy_balance_vars_reg -!$$$ subprogram documentation block -! . . . . -! subprogram: destroy_balance_vars_reg deallocate reg balance var arrays -! prgmmr: parrish org: np22 date: 2005-01-22 -! -! abstract: deallocate regional balance variable arrays -! -! program history log: -! 2005-01-22 parrish -! 2005-03-03 treadon - add implicit none -! 2010-03-04 zhu - change agvz,wgvz and bvz to agvk,wgvk,bvk -! -! input argument list: -! -! output argument list: -! -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -! -!$$$ - implicit none - - deallocate(rllat,rllat1,f1,agvk,agvk_lm,wgvk,bvk) - - return - end subroutine destroy_balance_vars_reg - - subroutine prebal(fut2ps,cwcoveqqcov) -!$$$ subprogram documentation block -! . . . . -! subprogram: prebal -! prgmmr: wu org: np22 date: 2000-03-15 -! -! abstract: load balance variables agvz, bvz, wgvz, and ke_vp -! -! program history log: -! 2000-03-15 wu -! 2004-02-03 kleist, updated to load background stats according -! to updated mpi distribution on horizontal slabs -! 2004-03-15 derber, kleist, incorporate variances into this routine -! stats from single file, additional clean up -! 2004-05-17 kleist, documentation and clean up -! 2004-08-03 treadon - add only to module use, add intent in/out -! 2004-10-26 wu - include factors hzscl in the range of RF table -! 2004-11-02 treadon - add horizontal resolution error check on berror_stats -! 2004-11-16 treadon - add longitude dimension to variance array dssv -! 2004-11-20 derber - modify to make horizontal table more reproducable and -! move most of table calculations to berror -! 2005-01-22 parrish - split off from old prewgt -! 2005-03-28 wu - replace mlath with mlat -! 2005-04-14 treadon - add corq2 to global berror_stats read -! 2005-04-22 treadon - change berror file to 4-byte reals -! 2006-04-17 treadon - remove calculation of ke_vp -! 2007-05-30 h.liu - add coroz -! 2008-07-10 jguo - place read of bkgerr fields in m_berror_stats -! 2008-12-29 todling - get mlat from dims in m_berror_stats; mype from mpimod -! 2009-02-25 zhu - remove the error message -! 2014-02-05 todling - add parameter to control overwrite of cw w/ q cov -! -! input argument list: -! -! output argument list: -! -! -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -! -!$$$ - use m_kinds, only: r_single - use m_mpimod, only: mype - use gridmod, only: istart,lat2,nlat,nsig - use constants, only: zero - use m_berror_stats,only: berror_set,berror_read_bal - implicit none - - logical ,intent(in ) :: fut2ps - logical ,intent(in ) :: cwcoveqqcov - -! Declare local variables - integer(i_kind) i,j,k - integer(i_kind) mm1 - integer(i_kind) jx - - real(r_single),dimension(nlat,nsig,nsig):: agvin - real(r_single),dimension(nlat,nsig) :: wgvin,bvin - real(r_single),dimension(nlat,nsig) :: pputin - -! Initialize local variables - mm1=mype+1 - -! Set internal parameters to m_berror_stats - call berror_set('cwcoveqqcov',cwcoveqqcov) - -! Read in balance variables - call berror_read_bal(agvin,bvin,wgvin,pputin,fut2ps,mype) - -! Set ke_vp=nsig (note: not used in global) - ke_vp=nsig - -! load balance projections - agvz=zero - bvz=zero - wgvz=zero - pput=zero - do k=1,nsig - do j=1,nsig - do i=1,lat2 - jx=istart(mm1)+i-2 - jx=max(jx,2) - jx=min(nlat-1,jx) - agvz(i,j,k)=agvin(jx,j,k) - end do - end do - do i=1,lat2 - jx=istart(mm1)+i-2 - jx=max(jx,2) - jx=min(nlat-1,jx) - wgvz(i,k)=wgvin(jx,k) - bvz(i,k)=bvin(jx,k) - pput(i,k)=pputin(jx,k) - end do - enddo - - return - end subroutine prebal - - subroutine prebal_reg(cwcoveqqcov) -!$$$ subprogram documentation block -! . . . . -! subprogram: prebal_reg setup balance vars -! prgmmr: wu org: np22 date: 2000-03-15 -! -! abstract: load balance variables agvz, bvz, wgvz, and ke_vp -! -! program history log: -! 2000-03-15 wu -! 2004-08-03 treadon - add only to module use; add intent in/out; -! fix bug in which rdgstat_reg inadvertently -! recomputed sigl (s/b done in gridmod) -! 2004-10-26 wu - include factors hzscl in the range of RF table -! 2004-11-16 treadon - add longitude dimension to variance array dssv -! 2004-11-20 derber - modify to make horizontal table more reproducable and -! move most of table calculations to berror -! 2005-01-23 parrish - split off from old prewgt_reg -! 2005-02-07 treadon - add deallocate(corz,corp,hwll,hwllp,vz,agvi,bvi,wgvi) -! 2005-03-28 wu - replace mlath with mlat and modify dim of corz, corp -! 2006-04-17 treadon - replace sigl with ges_prslavg/ges_psfcavg -! 2008-11-13 zhu - add changes for generalized control variables -! - change the structure of covariance error file -! - move horizontal interpolation into this subroutine -! 2014-10-08 zhu - add cwcoveqqco in the interface -! 2017-10-26 CAPS(G. Zhao) -! - add option to clear balance coefficients when -! - assimilating radar radial wind to avoid impact of -! - wind observations on mass fields -! -! input argument list: -! -! output argument list: -! -! other important variables -! nsig - number of sigma levels -! agv,wgv,bv - balance correlation matrix for t,p,div - -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -!$$$ - use gridmod, only: lat2,lon2,nsig,twodvar_regional - use guess_grids, only: ges_prslavg,ges_psfcavg - use m_mpimod, only: mype - use m_berror_stats_reg, only: berror_set_reg,berror_get_dims_reg,berror_read_bal_reg - use constants, only: zero,half,one - use directDA_radaruse_mod, only: l_decouple_sf_tps, l_decouple_sf_vp - - implicit none - -! Declare passed variables - logical,intent(in ) :: cwcoveqqcov - -! Declare local parameters - real(r_kind),parameter:: r08 = 0.8_r_kind - -! Declare local variables - integer(i_kind) k,i,mlat - integer(i_kind) j,m,lm,l,l2 - integer(i_kind) ke,inerr - integer(i_kind) msig ! stats dimensions - - real(r_kind):: psfc08 - real(r_kind):: dl1,dl2 - real(r_kind),allocatable,dimension(:,:):: wgvi ,bvi - real(r_kind),allocatable,dimension(:,:,:):: agvi - -! Set internal parameters to m_berror_stats - call berror_set_reg('cwcoveqqcov',cwcoveqqcov) - -! ke_vp used to project SF to balanced VP -! below sigma level 0.8 - - psfc08=r08*ges_psfcavg - ke=nsig - j_loop: do j=1,nsig - if (ges_prslavg(j)t) when fstat=.true. -! 2005-07-14 wu - add max bound to l2 -! 2005-11-21 derber modify to make qoption =1 work same as =2 -! 2006-01-11 kleist - add full nsig projection for surface pressure -! 2006-10-15 gu - add back vp projection onto surface pressure -! 2006-11-30 todling - add fpsproj to control diff projection contributions to ps -! 2008-06-05 safford - rm unused vars -! 2008-12-29 todling - remove q from arg list -! 2010-03-09 zhu - move the interpolation for regional to prebal_reg -! 2011-09-07 todling - in sqrt-b case, always apply balance (even in hyb mode) -! 2012-02-08 kleist - replace "use hybrid_ensemble_parameters, only: l_hyb_ens" -! with "use mod_strong, only: tlnmc_option". -! then trigger call to strong_bk at end of subroutine balance with -! new parameter tlnmc_option and add uvflag=.false. to call strong_bk. -! -! input argument list: -! t - t grid values -! p - p surface grid values -! st - streamfunction grid values -! vp - velocity potential grid values -! fpsproj -! -! output argument list: -! t - t grid values -! p - p surface grid values -! st - streamfunction grid values -! vp - velocity potential grid values -! -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -! -!$$$ - use constants, only: one,half - use gridmod, only: regional,lat2,nsig,lon2 -#ifdef TLNMC - use gsi_4dvar, only: lsqrtb - use mod_strong, only: tlnmc_option -#endif /* TLNMC */ - implicit none - -! Declare passed variables - real(r_kind),dimension(lat2,lon2) ,intent(inout) :: p - real(r_kind),dimension(lat2,lon2,nsig),intent(inout) :: t,vp,st - logical ,intent(in ) :: fpsproj - logical ,intent(in ) :: fut2ps - -! Declare local variables - integer(i_kind) i,j,k,l,m - -! REGIONAL BRANCH - if (regional) then - -! Add contribution from streamfunction to unbalanced velocity potential. - do k=1,ke_vp - do j=1,lon2 - do i=1,lat2 - vp(i,j,k)=vp(i,j,k)+bvk(i,j,k)*st(i,j,k) - end do - end do - end do - - - if (fstat) then -! Add contribution from streamfunction to unbalanced temperature. - do k=1,nsig - do m=1,nsig - do j=1,lon2 - do i=1,lat2 - t(i,j,k)=t(i,j,k)+agvk_lm(k,m)*f1(i,j)*st(i,j,m) - end do - end do - end do - end do - - else ! not fstat - -! Add contribution from streamfunction to unbalanced temperature. - do k=1,nsig - do m=1,nsig - do j=1,lon2 - do i=1,lat2 - t(i,j,k)=t(i,j,k)+agvk(i,j,k,m)*st(i,j,m) - end do - end do - end do - end do - endif ! fstat - -! Add contribution from streamfunction to surface pressure. - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - p(i,j)=p(i,j)+wgvk(i,j,k)*st(i,j,k) - end do - end do - end do - -! GLOBAL BRANCH - else - -! Add contribution from streamfunction and unbalanced vp -! to surface pressure. - if ( fpsproj ) then - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - p(i,j)=p(i,j)+wgvz(i,k)*st(i,j,k) - end do - end do - end do - if(fut2ps) then - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - p(i,j)=p(i,j)+pput(i,k)*t(i,j,k) - end do - end do - end do - endif - else - do k=1,nsig-1 - do j=1,lon2 - do i=1,lat2 - p(i,j)=p(i,j)+wgvz(i,k)*st(i,j,k) - end do - end do - end do - do j=1,lon2 - do i=1,lat2 - p(i,j)=p(i,j)+wgvz(i,nsig)*vp(i,j,1) - end do - end do - endif - -!$omp parallel do schedule(dynamic,1) private(k,l,j,i) - do k=1,nsig -! Add contribution from streamfunction to veloc. potential - do j=1,lon2 - do i=1,lat2 - vp(i,j,k)=vp(i,j,k)+bvz(i,k)*st(i,j,k) - end do - end do - -! Add contribution from streamfunction to unbalanced temperature. - do l=1,nsig - do j=1,lon2 - do i=1,lat2 - t(i,j,k)=t(i,j,k)+agvz(i,k,l)*st(i,j,l) - end do - end do - end do - end do - -! End of REGIONAL/GLOBAL if-then block - endif - -!! Strong balance constraint -!! Pass uvflag=.false. -#ifdef TLNMC - if(lsqrtb) then - call strong_bk(st,vp,p,t,.false.) - else - if(tlnmc_option==1 .or. tlnmc_option==4) call strong_bk(st,vp,p,t,.false.) - endif -#endif /* TLNMC */ - - - - return - end subroutine balance - - subroutine tbalance(t,p,st,vp,fpsproj,fut2ps) -!$$$ subprogram documentation block -! . . . . -! subprogram: tbalance adjoint of balance -! prgmmr: parrish org: np22 date: 1994-02-12 -! -! abstract: adjoint of balance equation -! -! program history log: -! 1994-02-12 parrish -! 1998-01-22 weiyu yang -! 1999-06-28 yang w., second structure mpp version -! 1999-08-24 derber, j., treadon, r., yang, w., first frozen mpp version -! 1999-12-07 wu grid version -! 2003-12-22 derber -! 2004-02-03 kleist, new mpi strategy -! 2004-05-06 derber separate out balance from vertical covariance -! 2004-07-09 treadon - use qsatg_fix instead of qsatg in normalization of q (bug fix) -! 2004-10-26 kleist - remove u,v -- st,vp conversion oustide of bkerror, modified ps -! balance -! 2005-02-23 wu - add adjoint of variable conversion for normalized relative humidity -! 2005-03-05 parrish - for qoption=2, leave q unchanged, so in/out is normalized rh -! 2005-07-15 wu - use f1 in adjoint of balance projection (st->t) when fstat=.true. Add max bound to l2 -! 2005-11-21 derber modify to make qoption =1 work same as =2 -! 2006-01-11 kleist - add full nsig projection for surface pressure -! 2006-10-15 gu - add back vp projection onto surface pressure -! 2006-11-30 todling - add fpsproj to control diff projection contributions to ps -! 2008-06-05 safford - rm unused vars -! 2008-12-29 todling - remove q from arg list -! 2009-06-15 parrish - add logical l_hyb_ens to balance, t_balance so strong constraint -! can be turned off in these routines when running in hybrid ensemble mode -! (strong constraint gets moved to control2state and control2state_ad routines -! when l_hyb_ens=.true.) -! 2010-03-09 zhu - move the interpolation for regional to prebal_reg -! 2011-09-07 todling - in sqrt-b case, always apply balance (even in hyb mode) -! 2012-02-08 kleist - replace "use hybrid_ensemble_parameters, only: l_hyb_ens" -! with "use mod_strong, only: tlnmc_option". -! then trigger call to strong_bk_ad at beginning of subroutine tbalance with -! new parameter tlnmc_option and add uvflag=.false. to call strong_bk_ad. -! -! input argument list: -! t - t grid values from int routines -! p - p surface grid values from int routines -! st - streamfunction grid values from int routines -! vp - velocity potential grid values from int routines -! fpsproj -! -! output argument list: -! t -! p -! st - streamfunction grid vals with adjoint of balance added -! vp - velocity potential grid values with adjoint of balance added -! -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -! -!$$$ - use constants, only: one,half - use gridmod, only: regional,lon2,lat2,nsig -#ifdef TLNMC - use gsi_4dvar, only: lsqrtb - use mod_strong, only: tlnmc_option -#endif /* TLNMC */ - implicit none - -! Declare passed variables - real(r_kind),dimension(lat2,lon2) ,intent(inout) :: p - real(r_kind),dimension(lat2,lon2,nsig),intent(inout) :: t - real(r_kind),dimension(lat2,lon2,nsig),intent(inout) :: st,vp - logical ,intent(in ) :: fpsproj - logical ,intent(in ) :: fut2ps - -! Declare local variables - integer(i_kind) l,m,i,j,k - - -! Adjoint of strong balance constraint -! pass uvflag=.false. -#ifdef TLNMC - if(lsqrtb) then - call strong_bk_ad(st,vp,p,t,.false.) - else - if(tlnmc_option==1 .or. tlnmc_option==4) call strong_bk_ad(st,vp,p,t,.false.) - endif -#endif /* TLNMC */ - -! REGIONAL BRANCH - if (regional) then - - if(fstat) then -! Adjoint of contribution to temperature from streamfunction. - do m=1,nsig - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - st(i,j,m)=st(i,j,m)+agvk_lm(k,m)*f1(i,j)*t(i,j,k) - end do - end do - end do - end do - - else ! not fstat - -! Adjoint of contribution to temperature from streamfunction. - do m=1,nsig - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - st(i,j,m)=st(i,j,m)+agvk(i,j,k,m)*t(i,j,k) - end do - end do - end do - end do - endif ! fstat - -! Adjoint of streamfunction contribution to surface pressure. -! Add contributions from u and v to streamfunction and velocity potential - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - st(i,j,k)=st(i,j,k)+wgvk(i,j,k)*p(i,j) - end do - end do - end do - -! Adjoint of contribution to velocity potential from streamfunction. - do k=1,ke_vp - do j=1,lon2 - do i=1,lat2 - st(i,j,k)=st(i,j,k)+bvk(i,j,k)*vp(i,j,k) - end do - end do - end do - -! GLOBAL BRANCH - else - -!$omp parallel do schedule(dynamic,1) private(k,l,j,i) - do k=1,nsig -! Adjoint of contribution to temperature from streamfunction. - do l=1,nsig - do j=1,lon2 - do i=1,lat2 - st(i,j,k)=st(i,j,k)+agvz(i,l,k)*t(i,j,l) - end do - end do - end do - -! Adjoint of contribution to velocity potential from streamfunction. - do j=1,lon2 - do i=1,lat2 - st(i,j,k)=st(i,j,k)+bvz(i,k)*vp(i,j,k) - end do - end do - -! Adjoint of streamfunction and unbalanced velocity potential -! contribution to surface pressure. - if ( fpsproj ) then - if ( fut2ps ) then - do j=1,lon2 - do i=1,lat2 - t(i,j,k)=t(i,j,k)+pput(i,k)*p(i,j) - end do - end do - endif - do j=1,lon2 - do i=1,lat2 - st(i,j,k)=st(i,j,k)+wgvz(i,k)*p(i,j) - end do - end do - else - if(k < nsig)then - do j=1,lon2 - do i=1,lat2 - st(i,j,k)=st(i,j,k)+wgvz(i,k)*p(i,j) - end do - end do - end if - if(k == 1)then - do j=1,lon2 - do i=1,lat2 - vp(i,j,1)=vp(i,j,1)+wgvz(i,nsig)*p(i,j) - end do - end do - end if - - endif - end do -! End of REGIONAL/GLOBAL if-then block - endif - - return - end subroutine tbalance - - subroutine locatelat_reg(mype) -!$$$ subprogram documentation block -! . . . . -! subprogram: locatelat_reg calc interp coeffs for background stats -! prgmmr: wu org: np22 date: 2004-03-15 -! -! abstract: calculates interpolation indexes and weights between -! the background error statistics and the analysis grids -! -! program history log: -! 2004-03-15 wu -! 2004-06-14 wu, documentation and clean up -! 2004-07-28 treadon - simplify subroutine call list -! 2005-03-28 wu - replace mlath with mlat -! 2005-04-22 treadon - change berror file to 4-byte reals -! 2005-06-06 wu - setup f1 for balance projection (st->t) when fstat=.true. -! 2022-04-20 x.zhang - add switch (usenewgfsberror)for no need to convert -! the unit of clat for using global 127-L BE in regional DA -! -! input argument list: -! mype - mpi task id -! -! output argument list -! -! remarks: see modules used -! -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -! -!$$$ - use m_kinds, only: r_single - use gridmod, only: nlon,nlat,lat2,lon2,istart,jstart,region_lat - use constants, only: deg2rad,one - use m_berror_stats, only: usenewgfsberror - implicit none - -! Declare passed variables - integer(i_kind),intent(in ) :: mype - -! Declare local variables - integer(i_kind) i,j,msig,mlat,lunin,m,m1,mm1,jl,il - real(r_kind) fmid - real(r_kind),allocatable,dimension(:):: clat_avn - real(r_single),allocatable,dimension(:):: clat_avn4 - - -! Read in dim of stats file - lunin=22 - open(lunin,file='berror_stats',form='unformatted') - rewind lunin - read(lunin)msig,mlat - - -! Allocate and read in lat array in stats file - allocate( clat_avn(mlat), clat_avn4(mlat) ) - read(lunin)clat_avn4 - close(lunin) - if (usenewgfsberror) then -! 'The unit of clat from global BE is radian, do not need to convert' - do i=1,mlat - clat_avn(i)=clat_avn4(i) - end do - else - do i=1,mlat - clat_avn(i)=clat_avn4(i)*deg2rad - end do - end if - deallocate(clat_avn4) - - -! Decide and output rllat,rllat1,llmax,llmin (through module berror ) -! rllat: location of analysis grid in stats grid unit (whole domain) -! llmax,llmin: max,min stats grid needed in analysis domain -! rllat1: location of analysis grid in stats grid unit (MPP local domain) - - llmax=-999 - llmin=999 - do j=1,nlon - do i=1,nlat - if(region_lat(i,j)>=clat_avn(mlat))then - rllat(i,j)=float(mlat) - llmax=max0(mlat,llmax) - llmin=min0(mlat,llmin) - else if(region_lat(i,j)=clat_avn(m)).and. & - (region_lat(i,j)NULL() - real(r_kind),pointer,dimension(:,:,:):: ges_q =>NULL() - real(r_kind),pointer,dimension(:,:,:):: ges_ql =>NULL() - real(r_kind),pointer,dimension(:,:,:):: ges_qi =>NULL() - real(r_kind),pointer,dimension(:,:,:):: ges_cwmr=>NULL() - -! for anisotropic mode - integer(i_kind):: k1,ivar,kvar,igauss,iq_loc - real(r_kind):: factor,factk,hswgtsum - logical print_verbose - - print_verbose=.false. - if(verbose)print_verbose=.true. - - if(init_pass .and. (ntguessig<1 .or. ntguessig>nfldsig)) & - call die(myname,'invalid init_pass, ntguessig =',ntguessig) - - -! Get required indexes from control vector names - nrf3_q=getindex(cvars3d,'q') - iq_loc=getindex(nrf_var,'q') - -! Compute qsat regardless of presence of q in guess - iderivative=0 - ice=.true. - do ii=1,nfldsig - call genqsat(ges_qsat(:,:,:,ii),ges_tsen(:,:,:,ii),ges_prsl(:,:,:,ii),lat2,lon2, & - nsig,ice,iderivative) - enddo - -! If q in guess, check/fix q limits - do ii=1,nfldsig - call gsi_bundlegetpointer (gsi_metguess_bundle(ii),'q',ges_q,ier) - if (ier/=0) exit -#ifdef USE_ALL_ORIGINAL - if(ii == ntguessig) call q_diag(ii,mype) -#endif - do k=1,nsig - do j=1,lon2 - do i=1,lat2 -! Limit q to be >= qmin - ges_q(i,j,k)=max(ges_q(i,j,k),qmin) -! limit q to be <= ges_qsat - if(clip_supersaturation) ges_q(i,j,k) = min(ges_q(i,j,k),ges_qsat(i,j,k,ii)) - end do - end do - end do - end do - -! Load guess cw for use in inner loop -! Get pointer to cloud water mixing ratio - it=ntguessig - call gsi_metguess_get('clouds::3d',n_actual_clouds,ier) - if (n_actual_clouds>0) then - call gsi_bundlegetpointer (gsi_metguess_bundle(it),'ql',ges_ql,istatus);ier=istatus - call gsi_bundlegetpointer (gsi_metguess_bundle(it),'qi',ges_qi,istatus);ier=ier+istatus - if (ier==0) then - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - cwgues(i,j,k)=ges_ql(i,j,k)+ges_qi(i,j,k) - end do - end do - end do - else - call gsi_bundlegetpointer (gsi_metguess_bundle(it),'cw',ges_cwmr,istatus) - if (istatus==0) then - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - cwgues(i,j,k)=ges_cwmr(i,j,k) - end do - end do - end do - endif - end if ! end of ier==0 - -#ifdef USE_ALL_ORIGINAL -! update efr_ql - if(regional .and. (.not. wrf_mass_regional) .and. jiter>jiterstart) then - do ii=1,nfldsig - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - tem4=max(zero,(t0c-ges_tsen(i,j,k,ii))*r0_05) - indexw=five + five * min(one, tem4) - efr_ql(i,j,k,ii)=1.5_r_kind*indexw - end do - end do - end do - end do - end if ! jiter -#endif - else - if(associated(ges_cwmr)) ges_cwmr => cwgues - end if ! end of n_actual_clouds - -! RTodling: The following call is in a completely undesirable place -! ----------------------------------------------------------------- -! Initialize atmospheric AD and TL model trajectory -#ifdef USE_ALL_ORIGINAL - if(l4dvar.and.jiter==jiterstart) then - call gsi_4dcoupler_init_traj(idmodel,rc=istatus) - if(istatus/=0) call die(myname,'gsi_4dcoupler_init_traj(), rc =',istatus) - endif -#endif - - call init_vars_('guess') - -!----------------------------------------------------------------------------------- -! Compute derivatives for .not. twodvar_regional case -#ifdef USE_ALL_ORIGINAL - if (.not. twodvar_regional)then -#endif - - if (switch_on_derivatives) then - if(.not.drv_initialized) & - call die(myname,'unexpected drv_initialized =',drv_initialized) - -! Instead, update gradients of all guess fields. these will -! be used for forward models that need gradient of background field, -! and for getting time derivatives of prognostic variables for -! time extrapolation and non-linear balance constraints. - - if(.not. regional) then - do nt=1,nfldsig - call get_derivatives(gsi_metguess_bundle(nt),& - gsi_xderivative_bundle(nt), & - gsi_yderivative_bundle(nt)) - enddo - endif -#ifdef USE_ALL_ORIGINAL - if(.not. wrf_mass_regional .and. tendsflag)then -#else - if(tendsflag)then -#endif - if(.not.tnd_initialized) & - call die(myname,'unexpected tnd_initialized =',tnd_initialized) - - -! now that we have derivs, get time tendencies if necessary - if(init_pass) then - - if(allocated(ges_ps)) call getprs(ges_ps,ges_3dp) - - call calctends(mype,ges_teta(1,1,1,it),ges_3dp,gsi_metguess_bundle(it), & - gsi_xderivative_bundle(it),gsi_yderivative_bundle(it),& - gsi_tendency_bundle) - -#ifdef TLNMC - if(l_tlnmc .and. baldiag_full) then - fullfield=.true. - - call init_vars_('tendency') - - call strong_bal_correction(ges_u_ten,ges_v_ten,ges_tv_ten,ges_prs_ten(:,:,1),mype, & - ges_u,ges_v,ges_tv,& - ges_ps,print_verbose,fullfield,.false.,.true.) - - call final_vars_('tendency') - end if -#endif /* TLNMC */ - end if ! (init_pass) - end if ! tendsflag - end if ! switch_on_derivatives - - if(init_pass) then - -! Compute tropopause level (in pressure, hPa). The 'pvoz' -! string means compute tropopause using potential vorticity -! and ozone. The 'temp' string means compute tropopause -! using WMO temperature lapse rate method. - -! NOTE: tropopause pressure is not needed for 2dvar option - - if(regional)then - call tpause(mype,'temp') - else ! (regional) - call tpause(mype,'pvoz') - end if ! (regional) - - endif ! (init_pass) - -#ifdef USE_ALL_ORIGINAL - endif ! (!twodvar_regional) -#endif - - if(.not. init_pass) return - -! Load guess q for use in limq. Initialize saturation array to guess. - call gsi_bundlegetpointer (gsi_metguess_bundle(ntguessig),'q',ges_q,istatus) - if (istatus==0) then - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - qgues(i,j,k)=ges_q(i,j,k) ! q guess - fact_tv(i,j,k)=one/(one+fv*qgues(i,j,k)) ! factor for tv to tsen conversion - end do - end do - end do - end if - -! Load guess gust, vis, pblh, lcbas, & cldch for use in limg, limv, limp, & liml. - call gsi_bundlegetpointer (gsi_metguess_bundle(ntguessig),'gust',ptr2d,istatus) - if (istatus==0) then - do j=1,lon2 - do i=1,lat2 - ggues(i,j)=max(one,ptr2d(i,j)) - end do - end do - end if - call gsi_bundlegetpointer (gsi_metguess_bundle(ntguessig),'vis',ptr2d,istatus) - if (istatus==0) then - do j=1,lon2 - do i=1,lat2 - vgues(i,j)=max(100.0_r_kind,ptr2d(i,j)) - dvisdlog(i,j)=log(ten)*ptr2d(i,j) !d(vis)/d(log(vis)) - end do - end do - end if - call gsi_bundlegetpointer (gsi_metguess_bundle(ntguessig),'pblh',ptr2d,istatus) - if (istatus==0) then - do j=1,lon2 - do i=1,lat2 - pgues(i,j)=max(100.0_r_kind,ptr2d(i,j)) - end do - end do - end if - call gsi_bundlegetpointer (gsi_metguess_bundle(ntguessig),'wspd10m',ptr2d,istatus) - if (istatus==0) then - do j=1,lon2 - do i=1,lat2 - w10mgues(i,j)=max(one,ptr2d(i,j)) - end do - end do - end if - call gsi_bundlegetpointer (gsi_metguess_bundle(ntguessig),'howv',ptr2d,istatus) - if (istatus==0) then - do j=1,lon2 - do i=1,lat2 - howvgues(i,j)=max(one,ptr2d(i,j)) - end do - end do - end if - call gsi_bundlegetpointer (gsi_metguess_bundle(ntguessig),'lcbas',ptr2d,istatus) - if (istatus==0) then - do j=1,lon2 - do i=1,lat2 - lgues(i,j)=max(100.0_r_kind,ptr2d(i,j)) - dlcbasdlog(i,j)=log(ten)*ptr2d(i,j) !d(lcbas)/d(log(lcbas)) - end do - end do - end if - call gsi_bundlegetpointer (gsi_metguess_bundle(ntguessig),'cldch',ptr2d,istatus) - if (istatus==0) then - do j=1,lon2 - do i=1,lat2 - cldchgues(i,j)=max(100.0_r_kind,ptr2d(i,j)) - dcldchdlog(i,j)=log(ten)*ptr2d(i,j) !d(cldch)/d(log(cldch)) - end do - end do - end if - - if(allocated(ges_tv).and.allocated(ges_ps)) then - -! Compute saturation specific humidity. - iderivative = 0 - if(qoption == 1)then - if(jiter == jiterstart)iderivative = 1 - else - iderivative = 2 - end if - - ice=.true. - call genqsat(qsatg,ges_tsen(:,:,:,ntguessig),ges_prsl(:,:,:,ntguessig),lat2,lon2, & - nsig,ice,iderivative) - -! Now load over nfldsig bins for limq (when nobs_bins /= zero) - iderivative = 0 - do ii=1,nfldsig - call genqsat(ges_qsat(:,:,:,ii),ges_tsen(:,:,:,ii),ges_prsl(:,:,:,ii),lat2,lon2, & - nsig,ice,iderivative) - end do - endif - - call final_vars_('guess') - -#ifdef USE_ALL_ORIGINAL -!?????????????????????????? need any of this???? -!! qoption 1: use psuedo-RH -! if(qoption==1)then -! -! -!! qoption 2: use normalized RH -! else - if(qoption == 2) then - - -! Load arrays based on option for moisture background error - -! variance update for anisotropic mode - if( anisotropic .and. .not.rtma_subdomain_option ) then - hswgtsum=sum(hswgt(1:ngauss)) - call setup_sub2fslab - do k=1,nsig - do j=1,lon2 - do i=1,lat2 - rhgues(i,j,k)=qgues(i,j,k)/qsatg(i,j,k) - end do - end do - end do - if( regional ) then - allocate(rh0f(pf2aP1%nlatf,pf2aP1%nlonf,nsig1o)) - call sub2fslab(rhgues,rh0f) - do k=indices%kps,indices%kpe - ivar=idvar(k) - if(ivar==iq_loc) then - kvar=k-kvar_start(ivar)+1 - do k1=1,nsig1o - if(levs_id(k1)==kvar) exit - end do - do j=indices%jps,indices%jpe - do i=indices%ips,indices%ipe - l =max(min(int(rllatf(i,j)),mlat),1) - l2=min((l+1),mlat) - dl2=rllatf(i,j)-float(l) - dl1=one-dl2 - - factk=dl1*corz(l,kvar,nrf3_q)+dl2*corz(l2,kvar,nrf3_q) - call fact_qopt2(factk,rh0f(i,j,k1),kvar) - - do igauss=1,ngauss - factor=hswgt(igauss)*factk*an_amp0(ivar)/sqrt(hswgtsum) - filter_all(1)%amp(igauss,i,j,k)=factor*filter_all(2)%amp(igauss,i,j,k) - if (allocated(ensamp)) then - filter_all(1)%amp(igauss,i,j,k)=filter_all(1)%amp(igauss,i,j,k)*ensamp(i,j,k1) - end if - end do - end do - end do - end if - end do - deallocate(rh0f) - else - allocate(rh0f(pf2aP1%nlatf,pf2aP1%nlonf,nsig1o)) - allocate(rh2f(pf2aP2%nlatf,pf2aP2%nlonf,nsig1o)) - allocate(rh3f(pf2aP3%nlatf,pf2aP3%nlonf,nsig1o)) - - call sub2fslab_glb (rhgues,rh0f,rh2f,rh3f) - do k=indices%kps,indices%kpe - ivar=idvar(k) - if(ivar==iq_loc) then - kvar=k-kvar_start(ivar)+1 - do k1=1,nsig1o - if(levs_id(k1)==kvar) exit - end do - ! zonal patch - do j=indices%jps,indices%jpe - do i=indices%ips,indices%ipe - call get_stat_factk(p0ilatf(i),ivar,kvar,factk, & - rh0f(i,j,k1),one) - do igauss=1,ngauss - factor=hswgt(igauss)*factk*an_amp0(ivar)/sqrt(hswgtsum) - filter_all(1)%amp(igauss,i,j,k)=factor*filter_all(2)%amp(igauss,i,j,k) - if (allocated(ensamp0f)) then - filter_all(1)%amp(igauss,i,j,k)=filter_all(1)%amp(igauss,i,j,k)*ensamp0f(i,j,k1) - end if - end do - - end do - end do - ! polar patches - do j=indices_p%jps,indices_p%jpe - do i=indices_p%ips,indices_p%ipe - ! north polar - if(p2ilatf(i,j)/=zero) then - call get_stat_factk(p2ilatf(i,j),ivar,kvar,factk, & - rh2f(i,j,k1),one) - else - call get_stat_factk(p2ilatfm ,ivar,kvar,factk, & - rh2f(i,j,k1),one) - end if - do igauss=1,ngauss - factor=hswgt(igauss)*factk*an_amp0(ivar)/sqrt(hswgtsum) - filter_p2(1)%amp(igauss,i,j,k)=factor*filter_p2(2)%amp(igauss,i,j,k) - if(allocated(ensamp2f)) then - filter_p2(1)%amp(igauss,i,j,k)=filter_p2(1)%amp(igauss,i,j,k)*sqrt(ensamp2f(i,j,k)) - end if - end do - ! south polar - if(p3ilatf(i,j)/=zero) then - call get_stat_factk(p3ilatf(i,j),ivar,kvar,factk, & - rh3f(i,j,k1),one) - else - call get_stat_factk(p3ilatfm ,ivar,kvar,factk, & - rh3f(i,j,k1),one) - end if - do igauss=1,ngauss - factor=factk*an_amp0(ivar)/sqrt(real(ngauss,r_kind)) - filter_p3(1)%amp(igauss,i,j,k)=factor*filter_p3(2)%amp(igauss,i,j,k) - if(allocated(ensamp3f)) then - filter_p3(1)%amp(igauss,i,j,k)=filter_p3(1)%amp(igauss,i,j,k)*sqrt(ensamp3f(i,j,k)) - end if - end do - - end do - end do - - end if - end do - deallocate(rh3f) - deallocate(rh2f) - deallocate(rh0f) - end if - call destroy_sub2fslab - end if - -! End of qoption block - endif -#endif - -! End of routine - return - contains - subroutine init_vars_(thiscase) - implicit none - character(len=*) thiscase - - real(r_kind),dimension(:,: ),pointer:: rank2=>NULL() - real(r_kind),dimension(:,:,:),pointer:: rank3=>NULL() - character(len=5) :: varname - integer(i_kind) istatus - -! If require guess vars available, extract from bundle ... - if(trim(thiscase)=='guess') then -! get ps ... - varname='ps' - call gsi_bundlegetpointer(gsi_metguess_bundle(it),trim(varname),rank2,istatus) - if (istatus==0) then - if(allocated(ges_ps))then - write(6,*) trim(myname), ': ', trim(varname), ' already incorrectly alloc ' - call stop2(999) - endif - allocate(ges_ps(size(rank2,1),size(rank2,2))) - ges_ps(:,:)=rank2 - else - if(mype==0) & - write(6,*) trim(myname),': ', trim(varname), ' not found in met bundle' - endif -! get u ... - varname='u' - call gsi_bundlegetpointer(gsi_metguess_bundle(it),trim(varname),rank3,istatus) - if (istatus==0) then - if(allocated(ges_u))then - write(6,*) trim(myname), ': ', trim(varname), ' already incorrectly alloc ' - call stop2(999) - endif - allocate(ges_u(size(rank3,1),size(rank3,2),size(rank3,3))) - ges_u(:,:,:)=rank3 - else - if(mype==0) & - write(6,*) trim(myname),': ', trim(varname), ' not found in met bundle' - endif -! get v ... - varname='v' - call gsi_bundlegetpointer(gsi_metguess_bundle(it),trim(varname),rank3,istatus) - if (istatus==0) then - if(allocated(ges_v))then - write(6,*) trim(myname), ': ', trim(varname), ' already incorrectly alloc ' - call stop2(999) - endif - allocate(ges_v(size(rank3,1),size(rank3,2),size(rank3,3))) - ges_v(:,:,:)=rank3 - else - if(mype==0) & - write(6,*) trim(myname),': ', trim(varname), ' not found in met bundle' - endif -! get tv ... - varname='tv' - call gsi_bundlegetpointer(gsi_metguess_bundle(it),trim(varname),rank3,istatus) - if (istatus==0) then - if(allocated(ges_tv))then - write(6,*) trim(myname), ': ', trim(varname), ' already incorrectly alloc ' - call stop2(999) - endif - allocate(ges_tv(size(rank3,1),size(rank3,2),size(rank3,3))) - ges_tv(:,:,:)=rank3 - else - if(mype==0) & - write(6,*) trim(myname),': ', trim(varname), ' not found in met bundle' - endif - endif -! extract tendencies from tendency bundle - if(trim(thiscase)=='tendency'.and.tnd_initialized) then -! get u ... - varname='u' - call gsi_bundlegetpointer(gsi_tendency_bundle,trim(varname),rank3,istatus) - if (istatus==0) then - if(allocated(ges_u_ten))then - write(6,*) trim(myname), ': ', trim(varname), ' already incorrectly alloc ' - call stop2(999) - endif - allocate(ges_u_ten(size(rank3,1),size(rank3,2),size(rank3,3))) - ges_u_ten(:,:,:)=rank3 - else - if(mype==0) & - write(6,*) trim(myname),': ', trim(varname), ' not found in met bundle' - endif -! get v ... - varname='v' - call gsi_bundlegetpointer(gsi_tendency_bundle,trim(varname),rank3,istatus) - if (istatus==0) then - if(allocated(ges_v_ten))then - write(6,*) trim(myname), ': ', trim(varname), ' already incorrectly alloc ' - call stop2(999) - endif - allocate(ges_v_ten(size(rank3,1),size(rank3,2),size(rank3,3))) - ges_v_ten(:,:,:)=rank3 - else - if(mype==0) & - write(6,*) trim(myname),': ', trim(varname), ' not found in met bundle' - endif -! get tv ... - varname='tv' - call gsi_bundlegetpointer(gsi_tendency_bundle,trim(varname),rank3,istatus) - if (istatus==0) then - if(allocated(ges_tv_ten))then - write(6,*) trim(myname), ': ', trim(varname), ' already incorrectly alloc ' - call stop2(999) - endif - allocate(ges_tv_ten(size(rank3,1),size(rank3,2),size(rank3,3))) - ges_tv_ten(:,:,:)=rank3 - else - if(mype==0) & - write(6,*) trim(myname),': ', trim(varname), ' not found in met bundle' - endif -! get prs ... - varname='prse' - call gsi_bundlegetpointer(gsi_tendency_bundle,trim(varname),rank3,istatus) - if (istatus==0) then - if(allocated(ges_prs_ten))then - write(6,*) trim(myname), ': ', trim(varname), ' already incorrectly alloc ' - call stop2(999) - endif - allocate(ges_prs_ten(size(rank3,1),size(rank3,2),size(rank3,3))) - ges_prs_ten(:,:,:)=rank3 - else - if(mype==0) & - write(6,*) trim(myname),': ', trim(varname), ' not found in met bundle' - endif - endif - - end subroutine init_vars_ - - subroutine final_vars_(thiscase) - implicit none - character(len=*) thiscase - if (trim(thiscase)=='guess') then - if(allocated(ges_tv)) deallocate(ges_tv) - if(allocated(ges_v)) deallocate(ges_v) - if(allocated(ges_u)) deallocate(ges_u) - if(allocated(ges_ps)) deallocate(ges_ps) - endif - - if (trim(thiscase)=='tendency') then - if(allocated(ges_prs_ten)) deallocate(ges_prs_ten) - if(allocated(ges_tv_ten)) deallocate(ges_tv_ten) - if(allocated(ges_v_ten)) deallocate(ges_v_ten) - if(allocated(ges_u_ten)) deallocate(ges_u_ten) - endif - end subroutine final_vars_ - -end subroutine compute_derived diff --git a/sorc/_workaround_/gsibec/genqsat.F90 b/sorc/_workaround_/gsibec/genqsat.F90 deleted file mode 100644 index 0d181d4e..00000000 --- a/sorc/_workaround_/gsibec/genqsat.F90 +++ /dev/null @@ -1,239 +0,0 @@ -module gen_qsat -contains -subroutine genqsat(qsat,tsen,prsl,lat2,lon2,nsig,ice,iderivative) -!$$$ subprogram documentation block -! . . . . -! subprogram: genqsat -! prgmmr: derber org: np23 date: 1998-01-14 -! -! abstract: obtain saturation specific humidity for given temperature. -! -! program history log: -! 1998-01-14 derber -! 1998-04-05 weiyu yang -! 1999-08-24 derber, j., treadon, r., yang, w., first frozen mpp version -! 1903-10-07 Wei Gu, bug fixes,if qs<0,then set qs=0; merge w/ GSI by R Todling -! 2003-12-23 kleist, use guess pressure, adapt module framework -! 2004-05-13 kleist, documentation -! 2004-06-03 treadon, replace ggrid_g3 array with ges_* arrays -! 2005-02-23 wu, output dlnesdtv -! 2005-11-21 kleist, derber add dmax array to decouple moisture from temp and -! pressure for questionable qsat -! 2006-02-02 treadon - rename prsl as ges_prsl -! 2006-09-18 derber - modify to limit saturated values near top -! 2006-11-22 derber - correct bug: es 0 update derivatives in jfunc -! - if == 1 only update dqdrh -! - if == 2 update dqdrh, dqdt and dqdp -! -! output argument list: -! qsat - saturation specific humidity (output) -! -! remarks: see modules used -! -! attributes: -! language: f90 -! machine: ibm RS/6000 SP -! -!$$$ - use m_kinds, only: r_kind,i_kind - use constants, only: xai,tmix,xb,omeps,eps,xbi,one,zero,& - xa,psat,ttp,half,one_tenth,qmin - use derivsmod, only: qgues,dqdt,dqdrh,dqdp - use jfunc, only: pseudo_q2 - use gridmod, only: wrf_nmm_regional,wrf_mass_regional,nems_nmmb_regional,aeta2_ll,regional,cmaq_regional - use gridmod, only: fv3_regional - use guess_grids, only: tropprs,ges_prslavg,ges_psfcavg - implicit none - - logical ,intent(in ) :: ice - real(r_kind),dimension(:,:,:),intent( out) :: qsat - real(r_kind),dimension(:,:,:),intent(in ) :: tsen,prsl - integer(i_kind) ,intent(in ) :: lat2,lon2,nsig,iderivative - - - integer(i_kind) k,j,i,kpres,k150 - real(r_kind) pw,tdry,tr,es,es2 - real(r_kind) w,onep3,esmax - real(r_kind) desidt,deswdt,dwdt,desdt,esi,esw - real(r_kind),dimension(lat2):: mint,estmax - integer(i_kind),dimension(lat2):: lmint - logical:: idtupdate,idpupdate - -! Declare local parameters - real(r_kind),parameter:: r015 = 0.15_r_kind - - onep3 = 1.e3_r_kind - - if(iderivative > 0)then - if (regional) then - k150 = nsig - do k=1,nsig - if (ges_prslavg(k) 2._r_kind) .and. & - tsen(i,j,k) < mint(i))then - lmint(i)=k - mint(i)=tsen(i,j,k) - end if - end do - end do - do i=1,lat2 - tdry = mint(i) - tr = ttp/tdry - if (tdry >= ttp .or. .not. ice) then - estmax(i) = psat * (tr**xa) * exp(xb*(one-tr)) - elseif (tdry < tmix) then - estmax(i) = psat * (tr**xai) * exp(xbi*(one-tr)) - else - w = (tdry - tmix) / (ttp - tmix) - estmax(i) = w * psat * (tr**xa) * exp(xb*(one-tr)) & - + (one-w) * psat * (tr**xai) * exp(xbi*(one-tr)) - endif - end do - - do k = 1,nsig - do i = 1,lat2 - tdry = tsen(i,j,k) - tr = ttp/tdry - if (tdry >= ttp .or. .not. ice) then - es = psat * (tr**xa) * exp(xb*(one-tr)) - elseif (tdry < tmix) then - es = psat * (tr**xai) * exp(xbi*(one-tr)) - else - esw = psat * (tr**xa) * exp(xb*(one-tr)) - esi = psat * (tr**xai) * exp(xbi*(one-tr)) - w = (tdry - tmix) / (ttp - tmix) - es = w * esw + (one-w) * esi -! es = w * psat * (tr**xa) * exp(xb*(one-tr)) & -! + (one-w) * psat * (tr**xai) * exp(xbi*(one-tr)) - - endif - - pw = onep3*prsl(i,j,k) - esmax = es - if(lmint(i) < k)then - esmax=0.1_r_kind*pw - esmax=min(esmax,estmax(i)) - end if - es2=min(es,esmax) - qsat(i,j,k) = eps * es2 / (pw - omeps * es2) - qsat(i,j,k) = max(qmin,qsat(i,j,k)) - - if(iderivative > 0)then -! if(es <= esmax .and. iderivative == 2 .and. qsat(i,j,k) > qmin )then - if(es <= esmax .and. iderivative == 2)then - idpupdate=.true. - idtupdate=.true. - - if(regional)then - -! Special block to decouple temperature and pressure from moisture -! above specified levels. For mass core decouple T and p above -! same level (approximately 150 hPa). For nmm core decouple T -! above ~150 hPa and p above level where aeta2_ll goes to zero - - if(wrf_mass_regional .and. k >= k150)then -! For mass core, decouple T and p above 150 hPa - idpupdate=.false. - idtupdate=.false. - end if - if(wrf_nmm_regional .or. nems_nmmb_regional.or.& - cmaq_regional .or. fv3_regional) then -! Decouple T and p at different levels for nmm core - if(k >= kpres)idpupdate = .false. - if(k >= k150 )idtupdate = .false. - end if - - else -! Decouple Q from T above the tropopause for global - if(prsl(i,j,k) < (one_tenth*tropprs(i,j)))then - idpupdate=.false. - idtupdate=.false. - end if - end if - - if(idtupdate)then - if (tdry >= ttp .or. .not. ice) then - desdt = es * (-xa/tdry + xb*ttp/(tdry*tdry)) - elseif (tdry < tmix) then - desdt = es * (-xai/tdry + xbi*ttp/(tdry*tdry)) - else - dwdt = one/(ttp-tmix) - deswdt = esw * (-xa/tdry + xb*ttp/(tdry*tdry)) - desidt = esi * (-xai/tdry + xbi*ttp/(tdry*tdry)) - desdt = dwdt*esw + w*deswdt - dwdt*esi + (one-w)*desidt - endif - if(pseudo_q2)then - dqdt(i,j,k)=zero - else - dqdt(i,j,k)=(desdt/es)*qgues(i,j,k) - endif - else - dqdt(i,j,k)=zero - end if - if(idpupdate)then - if(pseudo_q2)then - dqdp(i,j,k)=zero - else - dqdp(i,j,k)=half*qgues(i,j,k)/prsl(i,j,k) - endif - else - dqdp(i,j,k)=zero - end if - else - dqdt(i,j,k)=zero - dqdp(i,j,k)=zero - end if - dqdrh(i,j,k) = qsat(i,j,k) - end if - - end do - end do - end do - return -end subroutine genqsat -end module gen_qsat diff --git a/sorc/_workaround_/gsibec/mod_fv3_lola.f90 b/sorc/_workaround_/gsibec/mod_fv3_lola.f90 deleted file mode 100644 index ec13cf3c..00000000 --- a/sorc/_workaround_/gsibec/mod_fv3_lola.f90 +++ /dev/null @@ -1,1738 +0,0 @@ -module mod_fv3_lola -!$$$ module documentation block -! . . . . -! module: mod_fv3_lola -! prgmmr: parrish -! -! abstract: This module contains routines to interpolate from a single -! fv3 D grid tile to a rotated lat-lon analysis grid which completely -! covers the fv3 tile. Points beyond the fv3 tile are -! filled with nearest fv3 edge values, but have no actual -! impact on the analysis. -! -! program history log: -! 2017-02-24 parrish--initial documentation (patterned after -! mod_fv3_to_a.f90) -! 2017-10-10 wu w - setup interpolation and trnsform coeff in generate_anl_grid -! add routines earthuv2fv3, fv3uv2earth, fv3_h_to_ll -! fv3_ll_to_h -! 2019-11-01 wu - add checks in generate_anl_grid to present the mean -! longitude correctly to fix problem near lon=0 -! 2022-03-01 X.Lu & X.Wang - add functions for HAFS dual ens capability. POC: -! xuguang.wang@ou.edu -! -! subroutines included: -! sub generate_anl_grid -! sub definecoef_regular_grids -! sub earthuv2fv3 -! sub fv3uv2earth -! sub fv3uv2earthens -! sub fv3_h_to_ll -! sub fv3_h_to_ll_ens -! sub fv3_ll_to_h -! sub rotate2deg -! sub unrotate2deg -! -! attributes: -! language: f90 -! machine: -! -!$$$ end documentation block - -! DIAGRAM: D-Grid layout: -! -! 1 nx -! . . (U,H) -! -! 1 nx +1 -! . . (V) - -! U U U U U U + ny +1 (for U) -! V H V H V H V H V H V H V + ny (for V,H) -! U U U U U U xh(i) = i dx=1 -! V H V H V H V H V H V H V xu(i) = i -! U U U U U U xv(i) = i-0.5 -! V H V H V H V H V H V H V -! U U U U U U yh(j) = j dy=1 -! V H V H V H V H V H V H V yu(j) = j-0.5 -! U U U U U U yv(j) = j -! V H V H V H V H V H V H V -! U U U U U U -! V H V H V H V H V H V H V + 1 (for V,H) -! U U U U U U + 1 (for U) - -! U(nx ,ny +1),V(nx +1,ny ),H(nx ,ny ) - - use m_kinds, only: r_kind,i_kind - implicit none -! - private - public :: generate_anl_grid,m_generate_anl_grid,fv3_h_to_ll,fv3_ll_to_h,fv3uv2earth,earthuv2fv3 - public :: fv3dx,fv3dx1,fv3dy,fv3dy1,fv3ix,fv3ixp,fv3jy,fv3jyp,a3dx,a3dx1,a3dy,a3dy1,a3ix,a3ixp,a3jy,a3jyp - public :: nxa,nya,cangu,sangu,cangv,sangv,nx,ny,bilinear - public :: definecoef_regular_grids,fv3_h_to_ll_ens,fv3uv2earthens - public :: fv3dxens,fv3dx1ens,fv3dyens,fv3dy1ens,fv3ixens,fv3ixpens,fv3jyens,fv3jypens,a3dxens,a3dx1ens,a3dyens,a3dy1ens,a3ixens,a3ixpens,a3jyens,a3jypens - public :: nxe,nye,canguens,sanguens,cangvens,sangvens - - logical bilinear - integer(i_kind) nxa,nya,nx,ny - real(r_kind) ,allocatable,dimension(:,:):: fv3dx,fv3dx1,fv3dy,fv3dy1 - integer(i_kind),allocatable,dimension(:,:):: fv3ix,fv3ixp,fv3jy,fv3jyp - real(r_kind) ,allocatable,dimension(:,:):: a3dx,a3dx1,a3dy,a3dy1 - real(r_kind) ,allocatable,dimension(:,:):: cangu,sangu,cangv,sangv - integer(i_kind),allocatable,dimension(:,:):: a3ix,a3ixp,a3jy,a3jyp - integer(i_kind) nxe,nye - real(r_kind) ,allocatable,dimension(:,:):: fv3dxens,fv3dx1ens,fv3dyens,fv3dy1ens - integer(i_kind),allocatable,dimension(:,:):: fv3ixens,fv3ixpens,fv3jyens,fv3jypens - real(r_kind) ,allocatable,dimension(:,:):: a3dxens,a3dx1ens,a3dyens,a3dy1ens - real(r_kind) ,allocatable,dimension(:,:):: canguens,sanguens,cangvens,sangvens - integer(i_kind),allocatable,dimension(:,:):: a3ixens,a3ixpens,a3jyens,a3jypens - - -contains - -subroutine generate_anl_grid(nx,ny,grid_lon,grid_lont,grid_lat,grid_latt) -!$$$ subprogram documentation block -! . . . . -! subprogram: generate_anl_grid -! prgmmr: parrish -! -! abstract: define rotated lat-lon analysis grid which is centered on fv3 tile -! and oriented to completely cover the tile. -! -! program history log: -! 2017-05-02 parrish -! 2017-10-10 wu - 1. setup analysis A-grid, -! 2. compute/setup FV3 to A grid interpolation parameters -! 3. compute/setup A to FV3 grid interpolation parameters -! 4. setup weightings for wind conversion from FV3 to earth -! 2019-11-01 wu - add checks to present the mean longitude correctly to fix -! problem near lon=0 -! -! 2021-08-11 lei - a fix for an upper bound of the dimnsion of a3jyp -! input argument list: -! nx, ny - number of cells = nx*ny -! grid_lon ,grid_lat - longitudes and latitudes of fv3 grid cell corners -! grid_lont,grid_latt - longitudes and latitudes of fv3 grid cell centers -! -! output argument list: -! -! attributes: -! language: f90 -! machine: -! -!$$$ end documentation block - - use m_kinds, only: r_kind,i_kind - use constants, only: quarter,one,two,half,zero,deg2rad,rearth,rad2deg - use gridmod, only:grid_ratio_fv3_regional, region_lat,region_lon,nlat,nlon - use gridmod, only: region_dy,region_dx,region_dyi,region_dxi,coeffy,coeffx - use gridmod, only:init_general_transform,region_dy,region_dx - use m_mpimod, only: mype - use egrid2agrid_mod, only: egrid2agrid_parm - implicit none - - real(r_kind),allocatable,dimension(:)::xbh_a,xa_a,xa_b - real(r_kind),allocatable,dimension(:)::ybh_a,ya_a,ya_b,yy - real(r_kind),allocatable,dimension(:,:)::xbh_b,ybh_b - real(r_kind) dlat,dlon,dyy,dxx,dyyi,dxxi - real(r_kind) dyyh,dxxh - - - integer(i_kind), intent(in ) :: nx,ny ! fv3 tile x- and y-dimensions - real(r_kind) , intent(inout) :: grid_lon(nx+1,ny+1) ! fv3 cell corner longitudes - real(r_kind) , intent(inout) :: grid_lont(nx,ny) ! fv3 cell center longitudes - real(r_kind) , intent(inout) :: grid_lat(nx+1,ny+1) ! fv3 cell corner latitudes - real(r_kind) , intent(inout) :: grid_latt(nx,ny) ! fv3 cell center latitudes - - integer(i_kind) i,j,ir,jr,n - real(r_kind),allocatable,dimension(:,:) :: xc,yc,zc,gclat,gclon,gcrlat,gcrlon,rlon_in,rlat_in - real(r_kind),allocatable,dimension(:,:) :: glon_an,glat_an - real(r_kind) xcent,ycent,zcent,rnorm,centlat,centlon - real(r_kind) adlon,adlat,alon,clat,clon - integer(i_kind) nlonh,nlath,nxh,nyh - integer(i_kind) ib1,ib2,jb1,jb2,jj - - integer(i_kind) nord_e2a - real(r_kind)gxa,gya - - real(r_kind) x(nx+1,ny+1),y(nx+1,ny+1),z(nx+1,ny+1), xr,yr,zr,xu,yu,zu,rlat,rlon - real(r_kind) xv,yv,zv,vval - real(r_kind) cx,cy - real(r_kind) uval,ewval,nsval - real(r_kind) diff,sq180 - real(r_kind) d(4),ds - integer(i_kind) kk,k - - - nord_e2a=4 - bilinear=.false. - - -! create xc,yc,zc for the cell centers. - allocate(xc(nx,ny)) - allocate(yc(nx,ny)) - allocate(zc(nx,ny)) - allocate(gclat(nx,ny)) - allocate(gclon(nx,ny)) - allocate(gcrlat(nx,ny)) - allocate(gcrlon(nx,ny)) - do j=1,ny - do i=1,nx - xc(i,j)=cos(grid_latt(i,j)*deg2rad)*cos(grid_lont(i,j)*deg2rad) - yc(i,j)=cos(grid_latt(i,j)*deg2rad)*sin(grid_lont(i,j)*deg2rad) - zc(i,j)=sin(grid_latt(i,j)*deg2rad) - enddo - enddo - -! compute center as average x,y,z coordinates of corners of domain -- - - xcent=quarter*(xc(1,1)+xc(1,ny)+xc(nx,1)+xc(nx,ny)) - ycent=quarter*(yc(1,1)+yc(1,ny)+yc(nx,1)+yc(nx,ny)) - zcent=quarter*(zc(1,1)+zc(1,ny)+zc(nx,1)+zc(nx,ny)) - - rnorm=one/sqrt(xcent**2+ycent**2+zcent**2) - xcent=rnorm*xcent - ycent=rnorm*ycent - zcent=rnorm*zcent - centlat=asin(zcent)*rad2deg - centlon=atan2(ycent,xcent)*rad2deg - -!! compute new lats, lons - call rotate2deg(grid_lont,grid_latt,gcrlon,gcrlat, & - centlon,centlat,nx,ny) - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! compute analysis A-grid lats, lons -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -!--------------------------obtain analysis grid dimensions nxa,nya - nxa=1+nint((nx-one)/grid_ratio_fv3_regional) - nya=1+nint((ny-one)/grid_ratio_fv3_regional) - nlat=nya - nlon=nxa - !nlat=ny - !nlon=nx - if(mype==0) print *,'nlat,nlon=nya,nxa= ',nlat,nlon - -!--------------------------obtain analysis grid spacing - dlat=(maxval(gcrlat)-minval(gcrlat))/(ny-1) - dlon=(maxval(gcrlon)-minval(gcrlon))/(nx-1) - adlat=dlat*grid_ratio_fv3_regional - adlon=dlon*grid_ratio_fv3_regional - -!-------setup analysis A-grid; find center of the domain - nlonh=nlon/2 - nlath=nlat/2 - - if(nlonh*2==nlon)then - clon=adlon/two - cx=half - else - clon=adlon - cx=one - endif - - if(nlath*2==nlat)then - clat=adlat/two - cy=half - else - clat=adlat - cy=one - endif - -! -!-----setup analysis A-grid from center of the domain -! - allocate(rlat_in(nlat,nlon),rlon_in(nlat,nlon)) - do j=1,nlon - alon=(j-nlonh)*adlon-clon - do i=1,nlat - rlon_in(i,j)=alon - enddo - enddo - - - do j=1,nlon - do i=1,nlat - rlat_in(i,j)=(i-nlath)*adlat-clat - enddo - enddo - - if (allocated(region_dx )) deallocate(region_dx ) - if (allocated(region_dy )) deallocate(region_dy ) - if (allocated(coeffx )) deallocate(coeffx ) - if (allocated(coeffy )) deallocate(coeffy ) - allocate(region_dx(nlat,nlon),region_dy(nlat,nlon)) - allocate(region_dxi(nlat,nlon),region_dyi(nlat,nlon)) - allocate(coeffx(nlat,nlon),coeffy(nlat,nlon)) - dyy=rearth*adlat*deg2rad - dyyi=one/dyy - dyyh=half/dyy - do j=1,nlon - do i=1,nlat - region_dy(i,j)=dyy - region_dyi(i,j)=dyyi - coeffy(i,j)=dyyh - enddo - enddo - - do i=1,nlat - dxx=rearth*cos(rlat_in(i,1)*deg2rad)*adlon*deg2rad - dxxi=one/dxx - dxxh=half/dxx - do j=1,nlon - region_dx(i,j)=dxx - region_dxi(i,j)=dxxi - coeffx(i,j)=dxxh - enddo - enddo - -! -!---------- setup region_lat,region_lon in earth coord -! - if (allocated(region_lat)) deallocate(region_lat) - if (allocated(region_lon)) deallocate(region_lon) - allocate(region_lat(nlat,nlon),region_lon(nlat,nlon)) - allocate(glat_an(nlon,nlat),glon_an(nlon,nlat)) - - call unrotate2deg(region_lon,region_lat,rlon_in,rlat_in, & - centlon,centlat,nlat,nlon) - - region_lat=region_lat*deg2rad - region_lon=region_lon*deg2rad - - do j=1,nlat - do i=1,nlon - glat_an(i,j)=region_lat(j,i) - glon_an(i,j)=region_lon(j,i) - enddo - enddo - - call init_general_transform(glat_an,glon_an) - - deallocate(glat_an,glon_an) - -!--------------------compute all combinations of relative coordinates - - allocate(xbh_a(nx),xbh_b(nx,ny),xa_a(nxa),xa_b(nxa)) - allocate(ybh_a(ny),ybh_b(nx,ny),ya_a(nya),ya_b(nya)) - - nxh=nx/2 - nyh=ny/2 - -!!!!!! fv3 rotated grid; not equal spacing, non_orthogonal !!!!!! - do j=1,ny - jr=ny+1-j - do i=1,nx - ir=nx+1-i - xbh_b(ir,jr)=gcrlon(i,j)/dlon - end do - end do - do j=1,ny - jr=ny+1-j - do i=1,nx - ir=nx+1-i - ybh_b(ir,jr)=gcrlat(i,j)/dlat - end do - end do - -!!!! define analysis A grid !!!!!!!!!!!!! - do j=1,nxa - xa_a(j)=(real(j-nlonh,r_kind)-cx)*grid_ratio_fv3_regional - end do - do i=1,nya - ya_a(i)=(real(i-nlath,r_kind)-cy)*grid_ratio_fv3_regional - end do - -!!!!!compute fv3 to A grid interpolation parameters !!!!!!!!! - allocate ( fv3dx(nxa,nya),fv3dx1(nxa,nya),fv3dy(nxa,nya),fv3dy1(nxa,nya) ) - allocate ( fv3ix(nxa,nya),fv3ixp(nxa,nya),fv3jy(nxa,nya),fv3jyp(nxa,nya) ) - allocate(yy(ny)) - -! iteration to find the fv3 grid cell - jb1=1 - ib1=1 - do j=1,nya - do i=1,nxa - do n=1,3 - gxa=xa_a(i) - if(gxa < xbh_b(1,jb1))then - gxa= 1 - else if(gxa > xbh_b(nx,jb1))then - gxa= nx - else - call grdcrd1(gxa,xbh_b(1,jb1),nx,1) - endif - ib2=ib1 - ib1=gxa - do jj=1,ny - yy(jj)=ybh_b(ib1,jj) - enddo - gya=ya_a(j) - if(gya < yy(1))then - gya= 1 - else if(gya > yy(ny))then - gya= ny - else - call grdcrd1(gya,yy,ny,1) - endif - jb2=jb1 - jb1=gya - if(ib1+1 > nx)then !this block( 6 lines) is copied from GSL gsi repository - ib1=ib1-1 - endif - if(jb1+1 > ny)then - jb1=jb1-1 - endif - - - if((ib1 == ib2) .and. (jb1 == jb2)) exit - if(n==3 ) then -!!!!!!! if not converge, find the nearest corner point - d(1)=(xa_a(i)-xbh_b(ib1,jb1))**2+(ya_a(j)-ybh_b(ib1,jb1))**2 - d(2)=(xa_a(i)-xbh_b(ib1+1,jb1))**2+(ya_a(j)-ybh_b(ib1+1,jb1))**2 - d(3)=(xa_a(i)-xbh_b(ib1,jb1+1))**2+(ya_a(j)-ybh_b(ib1,jb1+1))**2 - d(4)=(xa_a(i)-xbh_b(ib1+1,jb1+1))**2+(ya_a(j)-ybh_b(ib1+1,jb1+1))**2 - kk=1 - do k=2,4 - if(d(k) xa_a(nxa))then - gxa= nxa - else - call grdcrd1(gxa,xa_a,nxa,1) - endif - a3ix(j,i)=int(gxa) - a3ix(j,i)=min(max(1,a3ix(j,i)),nxa) - a3dx(j,i)=max(zero,min(one,gxa-a3ix(j,i))) - a3dx1(j,i)=one-a3dx(j,i) - a3ixp(j,i)=min(nxa,a3ix(j,i)+1) - end do - end do - - do i=1,nx - do j=1,ny - gya=ybh_b(i,j) - if(gya < ya_a(1))then - gya= 1 - else if(gya > ya_a(nya))then - gya= nya - else - call grdcrd1(gya,ya_a,nya,1) - endif - a3jy(j,i)=int(gya) - a3jy(j,i)=min(max(1,a3jy(j,i)),nya) - a3dy(j,i)=max(zero,min(one,gya-a3jy(j,i))) - a3dy1(j,i)=one-a3dy(j,i) - a3jyp(j,i)=min(nya,a3jy(j,i)+1) - end do - end do - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!! find coefficients for wind conversion btw FV3 & earth -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - allocate ( cangu(nx,ny+1),sangu(nx,ny+1),cangv(nx+1,ny),sangv(nx+1,ny) ) - -! 1. compute x,y,z at cell cornor from grid_lon, grid_lat - - do j=1,ny+1 - do i=1,nx+1 - x(i,j)=cos(grid_lat(i,j)*deg2rad)*cos(grid_lon(i,j)*deg2rad) - y(i,j)=cos(grid_lat(i,j)*deg2rad)*sin(grid_lon(i,j)*deg2rad) - z(i,j)=sin(grid_lat(i,j)*deg2rad) - enddo - enddo - -! 2 find angles to E-W and N-S for U edges - sq180=180._r_kind**2 - do j=1,ny+1 - do i=1,nx -! center lat/lon of the edge - rlat=half*(grid_lat(i,j)+grid_lat(i+1,j)) - diff=(grid_lon(i,j)-grid_lon(i+1,j))**2 - if(diff < sq180)then - rlon=half*(grid_lon(i,j)+grid_lon(i+1,j)) - else - rlon=half*(grid_lon(i,j)+grid_lon(i+1,j)-360._r_kind) - endif -! vector to center of the edge - xr=cos(rlat*deg2rad)*cos(rlon*deg2rad) - yr=cos(rlat*deg2rad)*sin(rlon*deg2rad) - zr=sin(rlat*deg2rad) -! vector of the edge - xu= x(i+1,j)-x(i,j) - yu= y(i+1,j)-y(i,j) - zu= z(i+1,j)-z(i,j) -! find angle with cross product - uval=sqrt((xu**2+yu**2+zu**2)) - ewval=sqrt((xr**2+yr**2)) - nsval=sqrt((xr*zr)**2+(zr*yr)**2+(xr*xr+yr*yr)**2) - cangu(i,j)=(-yr*xu+xr*yu)/ewval/uval - sangu(i,j)=(-xr*zr*xu-zr*yr*yu+(xr*xr+yr*yr)*zu) / nsval/uval - enddo - enddo - -! 3 find angles to E-W and N-S for V edges - do j=1,ny - do i=1,nx+1 - rlat=half*(grid_lat(i,j)+grid_lat(i,j+1)) - diff=(grid_lon(i,j)-grid_lon(i,j+1))**2 - if(diff < sq180)then - rlon=half*(grid_lon(i,j)+grid_lon(i,j+1)) - else - rlon=half*(grid_lon(i,j)+grid_lon(i,j+1)-360._r_kind) - endif - xr=cos(rlat*deg2rad)*cos(rlon*deg2rad) - yr=cos(rlat*deg2rad)*sin(rlon*deg2rad) - zr=sin(rlat*deg2rad) - xv= x(i,j+1)-x(i,j) - yv= y(i,j+1)-y(i,j) - zv= z(i,j+1)-z(i,j) - vval=sqrt((xv**2+yv**2+zv**2)) - ewval=sqrt((xr**2+yr**2)) - nsval=sqrt((xr*zr)**2+(zr*yr)**2+(xr*xr+yr*yr)**2) - cangv(i,j)=(-yr*xv+xr*yv)/ewval/vval - sangv(i,j)=(-xr*zr*xv-zr*yr*yv+(xr*xr+yr*yr)*zv) / nsval/vval - enddo - enddo - deallocate( xc,yc,zc,gclat,gclon,gcrlat,gcrlon) - deallocate(rlat_in,rlon_in) -end subroutine generate_anl_grid - -subroutine m_generate_anl_grid(nx,ny,grid_lon,grid_lont,grid_lat,grid_latt,gsi_lats,gsi_lons) -!$$$ subprogram documentation block -! . . . . -! subprogram: generate_anl_grid -! prgmmr: parrish -! -! abstract: define rotated lat-lon analysis grid which is centered on fv3 tile -! and oriented to completely cover the tile. -! -! program history log: -! 2017-05-02 parrish -! 2017-10-10 wu - 1. setup analysis A-grid, -! 2. compute/setup FV3 to A grid interpolation parameters -! 3. compute/setup A to FV3 grid interpolation parameters -! 4. setup weightings for wind conversion from FV3 to earth -! 2019-11-01 wu - add checks to present the mean longitude correctly to fix -! problem near lon=0 -! -! 2021-08-11 lei - a fix for an upper bound of the dimnsion of a3jyp -! input argument list: -! nx, ny - number of cells = nx*ny -! grid_lon ,grid_lat - longitudes and latitudes of fv3 grid cell corners -! grid_lont,grid_latt - longitudes and latitudes of fv3 grid cell centers -! -! output argument list: -! -! attributes: -! language: f90 -! machine: -! -!$$$ end documentation block - - use m_kinds, only: r_kind,i_kind - use constants, only: quarter,one,two,half,zero,deg2rad,rearth,rad2deg,pi - use gridmod, only:grid_ratio_fv3_regional, region_lat,region_lon,nlat,nlon - use gridmod, only: region_dy,region_dx,region_dyi,region_dxi,coeffy,coeffx - use gridmod, only:init_general_transform,region_dy,region_dx - use m_mpimod, only: mype - use egrid2agrid_mod, only: egrid2agrid_parm - implicit none - - real(r_kind),allocatable,dimension(:)::xbh_a,xa_a,xa_b - real(r_kind),allocatable,dimension(:)::ybh_a,ya_a,ya_b,yy - real(r_kind),allocatable,dimension(:,:)::xbh_b,ybh_b - real(r_kind) dlat,dlon,dyy,dxx,dyyi,dxxi - real(r_kind) dyyh,dxxh - - - integer(i_kind), intent(in ) :: nx,ny ! fv3 tile x- and y-dimensions - real(r_kind) , intent(inout) :: grid_lon(nx+1,ny+1) ! fv3 cell corner longitudes - real(r_kind) , intent(inout) :: grid_lont(nx,ny) ! fv3 cell center longitudes - real(r_kind) , intent(inout) :: grid_lat(nx+1,ny+1) ! fv3 cell corner latitudes - real(r_kind) , intent(inout) :: grid_latt(nx,ny) ! fv3 cell center latitudes - real(r_kind),intent(inout) :: gsi_lats(:,:),gsi_lons(:,:) - - integer(i_kind) i,j,ir,jr,n - real(r_kind),allocatable,dimension(:,:) :: xc,yc,zc,gclat,gclon,gcrlat,gcrlon,rlon_in,rlat_in - real(r_kind),allocatable,dimension(:,:) :: glon_an,glat_an - real(r_kind) xcent,ycent,zcent,rnorm,centlat,centlon - real(r_kind) adlon,adlat,alon,clat,clon - integer(i_kind) nlonh,nlath,nxh,nyh - integer(i_kind) ib1,ib2,jb1,jb2,jj - - integer(i_kind) nord_e2a - real(r_kind)gxa,gya - - real(r_kind) x(nx+1,ny+1),y(nx+1,ny+1),z(nx+1,ny+1), xr,yr,zr,xu,yu,zu,rlat,rlon - real(r_kind) xv,yv,zv,vval - real(r_kind) cx,cy - real(r_kind) uval,ewval,nsval - real(r_kind) diff,sq180 - real(r_kind) d(4),ds - integer(i_kind) kk,k - - - nord_e2a=4 - bilinear=.false. - - -! create xc,yc,zc for the cell centers. - allocate(xc(nx,ny)) - allocate(yc(nx,ny)) - allocate(zc(nx,ny)) - allocate(gclat(nx,ny)) - allocate(gclon(nx,ny)) - allocate(gcrlat(nx,ny)) - allocate(gcrlon(nx,ny)) - do j=1,ny - do i=1,nx - xc(i,j)=cos(grid_latt(i,j)*deg2rad)*cos(grid_lont(i,j)*deg2rad) - yc(i,j)=cos(grid_latt(i,j)*deg2rad)*sin(grid_lont(i,j)*deg2rad) - zc(i,j)=sin(grid_latt(i,j)*deg2rad) - enddo - enddo - -! compute center as average x,y,z coordinates of corners of domain -- - - xcent=quarter*(xc(1,1)+xc(1,ny)+xc(nx,1)+xc(nx,ny)) - ycent=quarter*(yc(1,1)+yc(1,ny)+yc(nx,1)+yc(nx,ny)) - zcent=quarter*(zc(1,1)+zc(1,ny)+zc(nx,1)+zc(nx,ny)) - - rnorm=one/sqrt(xcent**2+ycent**2+zcent**2) - xcent=rnorm*xcent - ycent=rnorm*ycent - zcent=rnorm*zcent - centlat=asin(zcent)*rad2deg - centlon=atan2(ycent,xcent)*rad2deg - -!! compute new lats, lons - call rotate2deg(grid_lont,grid_latt,gcrlon,gcrlat, & - centlon,centlat,nx,ny) - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! compute analysis A-grid lats, lons -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -!--------------------------obtain analysis grid dimensions nxa,nya - nxa=1+nint((nx-one)/grid_ratio_fv3_regional) - nya=1+nint((ny-one)/grid_ratio_fv3_regional) - nlat=nya - nlon=nxa - !nlat=ny - !nlon=nx - if(mype==0) print *,'nlat,nlon=nya,nxa= ',nlat,nlon - -!--------------------------obtain analysis grid spacing - dlat=(maxval(gcrlat)-minval(gcrlat))/(ny-1) - dlon=(maxval(gcrlon)-minval(gcrlon))/(nx-1) - adlat=dlat*grid_ratio_fv3_regional - adlon=dlon*grid_ratio_fv3_regional - -!-------setup analysis A-grid; find center of the domain - nlonh=nlon/2 - nlath=nlat/2 - - if(nlonh*2==nlon)then - clon=adlon/two - cx=half - else - clon=adlon - cx=one - endif - - if(nlath*2==nlat)then - clat=adlat/two - cy=half - else - clat=adlat - cy=one - endif - -! -!-----setup analysis A-grid from center of the domain -! - if (allocated(rlat_in)) deallocate(rlat_in) - if (allocated(rlon_in)) deallocate(rlon_in) - allocate(rlat_in(nlat,nlon)) - allocate(rlon_in(nlat,nlon)) - do j=1,nlon - alon=(j-nlonh)*adlon-clon - do i=1,nlat - rlon_in(i,j)=alon - enddo - enddo - - - do j=1,nlon - do i=1,nlat - rlat_in(i,j)=(i-nlath)*adlat-clat - enddo - enddo - - if (allocated(region_dx )) deallocate(region_dx ) - if (allocated(region_dy )) deallocate(region_dy ) - if (allocated(region_dxi )) deallocate(region_dxi ) - if (allocated(region_dyi )) deallocate(region_dyi ) - if (allocated(coeffx )) deallocate(coeffx ) - if (allocated(coeffy )) deallocate(coeffy ) - allocate(region_dx(nlat,nlon),region_dy(nlat,nlon)) - allocate(region_dxi(nlat,nlon),region_dyi(nlat,nlon)) - allocate(coeffx(nlat,nlon),coeffy(nlat,nlon)) - dyy=rearth*adlat*deg2rad - dyyi=one/dyy - dyyh=half/dyy - do j=1,nlon - do i=1,nlat - region_dy(i,j)=dyy - region_dyi(i,j)=dyyi - coeffy(i,j)=dyyh - enddo - enddo - - do i=1,nlat - dxx=rearth*cos(rlat_in(i,1)*deg2rad)*adlon*deg2rad - dxxi=one/dxx - dxxh=half/dxx - do j=1,nlon - region_dx(i,j)=dxx - region_dxi(i,j)=dxxi - coeffx(i,j)=dxxh - enddo - enddo - -! -!---------- setup region_lat,region_lon in earth coord -! - if (allocated(region_lat)) deallocate(region_lat) - if (allocated(region_lon)) deallocate(region_lon) - allocate(region_lat(nlat,nlon),region_lon(nlat,nlon)) - !allocate(glat_an(nlon,nlat),glon_an(nlon,nlat)) - - call unrotate2deg(region_lon,region_lat,rlon_in,rlat_in, & - centlon,centlat,nlat,nlon) - - region_lat=region_lat*deg2rad - region_lon=region_lon*deg2rad - - do j=1,nlat - do i=1,nlon - gsi_lats(i,j)=region_lat(j,i) - gsi_lons(i,j)=region_lon(j,i) - if(gsi_lons(i,j)<0.) gsi_lons(i,j)= gsi_lons(i,j) + 2.*pi - enddo - enddo - - !call init_general_transform(glat_an,glon_an) - - !deallocate(glat_an,glon_an) - - deallocate( xc,yc,zc,gclat,gclon,gcrlat,gcrlon) - deallocate(rlat_in,rlon_in) - - deallocate(region_dxi,region_dyi) - !deallocate(coeffx,coeffy) - -end subroutine m_generate_anl_grid - -subroutine definecoef_regular_grids(nxen,nyen,grid_lon,grid_lont,grid_lat,grid_latt) -!$$$ subprogram documentation block -! . . . . -! subprogram: generate_??ens_grid -!clt modified from generate_regular_grid -! prgmmr: parrish -! -! abstract: define rotated lat-lon analysis grid which is centered on fv3 tile -! and oriented to completely cover the tile. -! -! program history log: -! 2017-05-02 parrish -! 2017-10-10 wu - 1. setup analysis A-grid, -! 2. compute/setup FV3 to A grid interpolation parameters -! 3. compute/setup A to FV3 grid interpolation parameters -! 4. setup weightings for wind conversion from FV3 to earth -! 2021-02-01 Lu & Wang - modify variable intent for HAFS dual ens. POC: -! xuguang.wang@ou.edu -! -! input argument list: -! nxen, nyen - number of cells = nxen*nyen -! grid_lon ,grid_lat - longitudes and latitudes of fv3 grid cell corners -! grid_lont,grid_latt - longitudes and latitudes of fv3 grid cell centers -! -! output argument list: -! -! attributes: -! language: f90 -! machine: -! -!$$$ end documentation block - use m_kinds, only: r_kind,i_kind - use constants, only: quarter,one,two,half,zero,deg2rad,rearth,rad2deg - use gridmod, only:grid_ratio_fv3_regional - use m_mpimod, only: mype - use hybrid_ensemble_parameters, only: nlon_ens,nlat_ens,region_lon_ens,region_lat_ens - implicit none - real(r_kind),allocatable,dimension(:)::xbh_a,xa_a,xa_b - real(r_kind),allocatable,dimension(:)::ybh_a,ya_a,ya_b,yy - real(r_kind),allocatable,dimension(:,:)::xbh_b,ybh_b - real(r_kind) dlat,dlon - - real(r_kind),allocatable:: region_lat_tmp(:,:),region_lon_tmp(:,:) - integer(i_kind), intent(in ) :: nxen,nyen ! fv3 tile x- and y-dimensions - real(r_kind) , intent(inout) :: grid_lon(nxen+1,nyen+1) ! fv3 cell corner longitudes - real(r_kind) , intent(inout) :: grid_lont(nxen,nyen) ! fv3 cell center longitudes - real(r_kind) , intent(inout) :: grid_lat(nxen+1,nyen+1) ! fv3 cell corner latitudes - real(r_kind) , intent(inout) :: grid_latt(nxen,nyen) ! fv3 cell center latitudes - integer(i_kind) i,j,ir,jr,n - real(r_kind),allocatable,dimension(:,:) :: xc,yc,zc,gclat,gclon,gcrlat,gcrlon,rlon_in,rlat_in - real(r_kind) xcent,ycent,zcent,rnorm,centlat,centlon - integer(i_kind) nxh,nyh - integer(i_kind) ib1,ib2,jb1,jb2,jj - integer (i_kind):: index0 - integer(i_kind) nord_e2a - real(r_kind)gxa,gya - - real(r_kind) x(nxen+1,nyen+1),y(nxen+1,nyen+1),z(nxen+1,nyen+1),xr,yr,zr,xu,yu,zu,rlat,rlon - real(r_kind) xv,yv,zv,vval - real(r_kind) uval,ewval,nsval - - real(r_kind) d(4),ds - integer(i_kind) kk,k - real(r_kind) diff,sq180 - - nord_e2a=4 - bilinear=.false. - -! create xc,yc,zc for the cell centers. - allocate(xc(nxen,nyen)) - allocate(yc(nxen,nyen)) - allocate(zc(nxen,nyen)) - allocate(gclat(nxen,nyen)) - allocate(gclon(nxen,nyen)) - allocate(gcrlat(nxen,nyen)) - allocate(gcrlon(nxen,nyen)) - do j=1,nyen - do i=1,nxen - xc(i,j)=cos(grid_latt(i,j)*deg2rad)*cos(grid_lont(i,j)*deg2rad) - yc(i,j)=cos(grid_latt(i,j)*deg2rad)*sin(grid_lont(i,j)*deg2rad) - zc(i,j)=sin(grid_latt(i,j)*deg2rad) - enddo - enddo - -! compute center as average x,y,z coordinates of corners of domain -- - - xcent=quarter*(xc(1,1)+xc(1,nyen)+xc(nxen,1)+xc(nxen,nyen)) - ycent=quarter*(yc(1,1)+yc(1,nyen)+yc(nxen,1)+yc(nxen,nyen)) - zcent=quarter*(zc(1,1)+zc(1,nyen)+zc(nxen,1)+zc(nxen,nyen)) - - rnorm=one/sqrt(xcent**2+ycent**2+zcent**2) - xcent=rnorm*xcent - ycent=rnorm*ycent - zcent=rnorm*zcent - centlat=asin(zcent)*rad2deg - centlon=atan2(ycent,xcent)*rad2deg - -!! compute new lats, lons - call rotate2deg(grid_lont,grid_latt,gcrlon,gcrlat, & - centlon,centlat,nxen,nyen) - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! compute analysis A-grid lats, lons -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -!--------------------------obtain analysis grid dimensions nxe,nye - nxe=nlon_ens - nye=nlat_ens - if(mype==0) print *,'nlat,nlon=nye,nxe= ',nlat_ens,nlon_ens - - allocate(rlat_in(nlat_ens,nlon_ens),rlon_in(nlat_ens,nlon_ens)) - allocate(region_lon_tmp(nlat_ens,nlon_ens),region_lat_tmp(nlat_ens,nlon_ens)) - region_lon_tmp=region_lon_ens*rad2deg - region_lat_tmp=region_lat_ens*rad2deg - call rotate2deg(region_lon_tmp,region_lat_tmp,rlon_in,rlat_in, & - centlon,centlat,nlat_ens,nlon_ens) - -!--------------------------obtain analysis grid spacing - dlat=(maxval(gcrlat)-minval(gcrlat))/(nyen-1) - dlon=(maxval(gcrlon)-minval(gcrlon))/(nxen-1) - - -!-----setup analysis A-grid from center of the domain -!--------------------compute all combinations of relative coordinates - - allocate(xbh_a(nxen),xbh_b(nxen,nyen),xa_a(nxe),xa_b(nxe)) - allocate(ybh_a(nyen),ybh_b(nxen,nyen),ya_a(nye),ya_b(nye)) - - nxh=nxen/2 - nyh=nyen/2 - - -!!!!!! fv3 rotated grid; not equal spacing, non_orthogonal !!!!!! - do j=1,nyen - jr=nyen+1-j - do i=1,nxen - ir=nxen+1-i - xbh_b(ir,jr)=gcrlon(i,j)/dlon - end do - end do - do j=1,nyen - jr=nyen+1-j - do i=1,nxen - ir=nxen+1-i - ybh_b(ir,jr)=gcrlat(i,j)/dlat - end do - end do - -!!!! define analysis A grid !!!!!!!!!!!!! - - index0=1 - do j=1,nxe - xa_a(j)= rlon_in(index0,j)/dlon - end do - do i=1,nye - ya_a(i)= rlat_in(i,index0)/dlat - end do - -!!!!!compute fv3 to A grid interpolation parameters !!!!!!!!! - allocate (fv3dxens(nxe,nye),fv3dx1ens(nxe,nye),fv3dyens(nxe,nye),fv3dy1ens(nxe,nye)) - allocate (fv3ixens(nxe,nye),fv3ixpens(nxe,nye),fv3jyens(nxe,nye),fv3jypens(nxe,nye)) - allocate(yy(nyen)) - -! iteration to find the fv3 grid cell - jb1=1 - ib1=1 - do j=1,nye - do i=1,nxe - do n=1,3 - gxa=xa_a(i) - if(gxa < xbh_b(1,jb1))then - gxa= 1 - else if(gxa > xbh_b(nxen,jb1))then - gxa= nxen - else - call grdcrd1(gxa,xbh_b(1,jb1),nxen,1) - endif - ib2=ib1 - ib1=gxa - do jj=1,nyen - yy(jj)=ybh_b(ib1,jj) - enddo - gya=ya_a(j) - if(gya < yy(1))then - gya= 1 - else if(gya > yy(nyen))then - gya= nyen - else - call grdcrd1(gya,yy,nyen,1) - endif - jb2=jb1 - jb1=gya - if(ib1+1 > nxen)then !this block( 6 lines) is copied from GSL gsi repository - ib1=ib1-1 - endif - if(jb1+1 > nyen)then - jb1=jb1-1 - endif - - if((ib1 == ib2) .and. (jb1 == jb2)) exit - if(n==3 ) then -!!!!!!! if not converge, find the nearest corner point - d(1)=(xa_a(i)-xbh_b(ib1,jb1))**2+(ya_a(j)-ybh_b(ib1,jb1))**2 - d(2)=(xa_a(i)-xbh_b(ib1+1,jb1))**2+(ya_a(j)-ybh_b(ib1+1,jb1))**2 - d(3)=(xa_a(i)-xbh_b(ib1,jb1+1))**2+(ya_a(j)-ybh_b(ib1,jb1+1))**2 - d(4)=(xa_a(i)-xbh_b(ib1+1,jb1+1))**2+(ya_a(j)-ybh_b(ib1+1,jb1+1))**2 - kk=1 - do k=2,4 - if(d(k) xa_a(nxe))then - gxa= nxe - else - call grdcrd1(gxa,xa_a,nxe,1) - endif - a3ixens(j,i)=int(gxa) - a3ixens(j,i)=min(max(1,a3ixens(j,i)),nxe) - a3dxens(j,i)=max(zero,min(one,gxa-a3ixens(j,i))) - a3dx1ens(j,i)=one-a3dxens(j,i) - a3ixpens(j,i)=min(nxe,a3ixens(j,i)+1) - end do - end do - - do i=1,nxen - do j=1,nyen - gya=ybh_b(i,j) - if(gya < ya_a(1))then - gya= 1 - else if(gya > ya_a(nye))then - gya= nye - else - call grdcrd1(gya,ya_a,nye,1) - endif - a3jyens(j,i)=int(gya) - a3jyens(j,i)=min(max(1,a3jyens(j,i)),nye) - a3dyens(j,i)=max(zero,min(one,gya-a3jyens(j,i))) - a3dy1ens(j,i)=one-a3dyens(j,i) - a3jypens(j,i)=min(nye,a3jyens(j,i)+1) - end do - end do - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!! find coefficients for wind conversion btw FV3 & earth -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - allocate (canguens(nxen,nyen+1),sanguens(nxen,nyen+1),cangvens(nxen+1,nyen),sangvens(nxen+1,nyen)) - -! 1. compute x,y,z at cell cornor from grid_lon, grid_lat - - do j=1,nyen+1 - do i=1,nxen+1 - x(i,j)=cos(grid_lat(i,j)*deg2rad)*cos(grid_lon(i,j)*deg2rad) - y(i,j)=cos(grid_lat(i,j)*deg2rad)*sin(grid_lon(i,j)*deg2rad) - z(i,j)=sin(grid_lat(i,j)*deg2rad) - enddo - enddo - -! 2 find angles to E-W and N-S for U edges - - sq180=180._r_kind**2 - do j=1,nyen+1 - do i=1,nxen -! center lat/lon of the edge - rlat=half*(grid_lat(i,j)+grid_lat(i+1,j)) - diff=(grid_lon(i,j)-grid_lon(i+1,j))**2 - if(diff < sq180)then - rlon=half*(grid_lon(i,j)+grid_lon(i+1,j)) - else - rlon=half*(grid_lon(i,j)+grid_lon(i+1,j)-360._r_kind) - endif -! vector to center of the edge - xr=cos(rlat*deg2rad)*cos(rlon*deg2rad) - yr=cos(rlat*deg2rad)*sin(rlon*deg2rad) - zr=sin(rlat*deg2rad) -! vector of the edge - xu= x(i+1,j)-x(i,j) - yu= y(i+1,j)-y(i,j) - zu= z(i+1,j)-z(i,j) -! find angle with cross product - uval=sqrt((xu**2+yu**2+zu**2)) - ewval=sqrt((xr**2+yr**2)) - nsval=sqrt((xr*zr)**2+(zr*yr)**2+(xr*xr+yr*yr)**2) - canguens(i,j)=(-yr*xu+xr*yu)/ewval/uval - sanguens(i,j)=(-xr*zr*xu-zr*yr*yu+(xr*xr+yr*yr)*zu) / nsval/uval - enddo - enddo - -! 3 find angles to E-W and N-S for V edges - do j=1,nyen - do i=1,nxen+1 - rlat=half*(grid_lat(i,j)+grid_lat(i,j+1)) - diff=(grid_lon(i,j)-grid_lon(i,j+1))**2 - if(diff < sq180)then - rlon=half*(grid_lon(i,j)+grid_lon(i,j+1)) - else - rlon=half*(grid_lon(i,j)+grid_lon(i,j+1)-360._r_kind) - endif - xr=cos(rlat*deg2rad)*cos(rlon*deg2rad) - yr=cos(rlat*deg2rad)*sin(rlon*deg2rad) - zr=sin(rlat*deg2rad) - xv= x(i,j+1)-x(i,j) - yv= y(i,j+1)-y(i,j) - zv= z(i,j+1)-z(i,j) - vval=sqrt((xv**2+yv**2+zv**2)) - ewval=sqrt((xr**2+yr**2)) - nsval=sqrt((xr*zr)**2+(zr*yr)**2+(xr*xr+yr*yr)**2) - cangvens(i,j)=(-yr*xv+xr*yv)/ewval/vval - sangvens(i,j)=(-xr*zr*xv-zr*yr*yv+(xr*xr+yr*yr)*zv) / nsval/vval - enddo - enddo - deallocate( xc,yc,zc,gclat,gclon,gcrlat,gcrlon) - deallocate(rlat_in,rlon_in) -end subroutine definecoef_regular_grids - -subroutine earthuv2fv3(u,v,nx,ny,u_out,v_out) -!$$$ subprogram documentation block -! . . . . -! subprogram: earthuv2fv3 -! prgmmr: wu 2017-06-15 -! -! abstract: project earth UV to fv3 UV and interpolate to edge of the cell -! -! program history log: -! -! -! input argument list: -! u,v - earth wind components at center of the cell -! nx,ny - dimensions -! -! output argument list: -! u_out,v_out - output fv3 winds on the cell boundaries -! -! attributes: -! language: f90 -! machine: -! -!$$$ end documentation block - - use m_kinds, only: r_kind,i_kind - use constants, only: half - implicit none - - integer(i_kind), intent(in ) :: nx,ny ! fv3 tile x- and y-dimensions - real(r_kind),intent(in ) :: u(nx,ny),v(nx,ny) - real(r_kind),intent( out) :: u_out(nx,ny+1),v_out(nx+1,ny) - integer(i_kind) i,j - - -!!!!!!! earth u/v to covariant u/v - j=1 - do i=1,nx - u_out(i,j)= u(i,j)*cangu(i,j)+v(i,j)*sangu(i,j) - end do - - do j=2,ny - do i=1,nx - u_out(i,j)=half *( (u(i,j)+u(i,j-1))*cangu(i,j)+(v(i,j)+v(i,j-1))*sangu(i,j) ) - end do - end do - j=ny - do i=1,nx - u_out(i,j+1)= u(i,j)*cangu(i,j+1)+v(i,j)*sangu(i,j+1) - end do - - do j=1,ny - v_out(1,j)=u(1,j)*cangv(1,j)+v(1,j)*sangv(1,j) - do i=2,nx - v_out(i,j)=half *( (u(i,j)+u(i-1,j))*cangv(i,j)+(v(i,j)+v(i-1,j))*sangv(i,j) ) - end do - v_out(nx+1,j)=u(nx,j)*cangv(nx+1,j)+v(nx,j)*sangv(nx+1,j) - end do -end subroutine earthuv2fv3 - -subroutine fv3uv2earth(u,v,nx,ny,u_out,v_out) -!$$$ subprogram documentation block -! . . . . -! subprogram: fv3uv2earth -! prgmmr: wu 2017-06-15 -! -! abstract: project fv3 UV to earth UV and interpolate to the center of the cells -! -! program history log: -! -! -! input argument list: -! u,v - fv3 winds on the cell boundaries -! nx,ny - dimensions -! -! output argument list: -! u_out,v_out - output earth wind components at center of the cell -! -! attributes: -! language: f90 -! machine: -! -!$$$ end documentation block - - use m_kinds, only: r_kind,i_kind - use constants, only: half - implicit none - - integer(i_kind), intent(in ) :: nx,ny ! fv3 tile x- and y-dimensions - real(r_kind),intent(in ) :: u(nx,ny+1),v(nx+1,ny) - real(r_kind),intent( out) :: u_out(nx,ny),v_out(nx,ny) - integer(i_kind) i,j - - do j=1,ny - do i=1,nx - u_out(i,j)=half *( (u(i,j)*sangv(i,j)-v(i,j)*sangu(i,j))/(cangu(i,j)*sangv(i,j)-sangu(i,j)*cangv(i,j)) & - +(u(i,j+1)*sangv(i+1,j)-v(i+1,j)*sangu(i,j+1))/(cangu(i,j+1)*sangv(i+1,j)-sangu(i,j+1)*cangv(i+1,j))) - v_out(i,j)=half *( (u(i,j)*cangv(i,j)-v(i,j)*cangu(i,j))/(sangu(i,j)*cangv(i,j)-cangu(i,j)*sangv(i,j)) & - +(u(i,j+1)*cangv(i+1,j)-v(i+1,j)*cangu(i,j+1))/(sangu(i,j+1)*cangv(i+1,j)-cangu(i,j+1)*sangv(i+1,j))) - end do - end do - return -end subroutine fv3uv2earth - -subroutine fv3uv2earthens(u,v,nxen,nyen,u_out,v_out) -!$$$ subprogram documentation block -! . . . . -! subprogram: fv3uv2earthens -! prgmmr: wu 2017-06-15 -! -! abstract: project fv3 UV to earth UV and interpolate to the center of the -! cells -! -! program history log: -! -! -! input argument list: -! u,v - fv3 winds on the cell boundaries -! nx,ny - dimensions -! -! output argument list: -! u_out,v_out - output earth wind components at center of the cell -! -! attributes: -! language: f90 -! machine: -! -!$$$ end documentation block - - use m_kinds, only: r_kind,i_kind - use constants, only: half - implicit none - - integer(i_kind), intent(in ) :: nxen,nyen ! fv3 tile x- and y-dimensions - real(r_kind),intent(in ) :: u(nxen,nyen+1),v(nxen+1,nyen) - real(r_kind),intent( out) :: u_out(nxen,nyen),v_out(nxen,nyen) - integer(i_kind) i,j - - do j=1,nyen - do i=1,nxen - u_out(i,j)=half *((u(i,j)*sangvens(i,j)-v(i,j)*sanguens(i,j))/(canguens(i,j)*sangvens(i,j)-sanguens(i,j)*cangvens(i,j)) & - +(u(i,j+1)*sangvens(i+1,j)-v(i+1,j)*sanguens(i,j+1))/(canguens(i,j+1)*sangvens(i+1,j)-sanguens(i,j+1)*cangvens(i+1,j))) - v_out(i,j)=half *((u(i,j)*cangvens(i,j)-v(i,j)*canguens(i,j))/(sanguens(i,j)*cangvens(i,j)-canguens(i,j)*sangvens(i,j)) & - +(u(i,j+1)*cangvens(i+1,j)-v(i+1,j)*canguens(i,j+1))/(sanguens(i,j+1)*cangvens(i+1,j)-canguens(i,j+1)*sangvens(i+1,j))) - end do - end do - return -end subroutine fv3uv2earthens - -subroutine fv3_h_to_ll(b_in,a,nb,mb,na,ma,rev_flg) -!$$$ subprogram documentation block -! . . . . -! subprogram: fv3_h_to_ll -! prgmmr: wu 2017-05-30 -! -! abstract: interpolate from rotated fv3 grid to A grid. -! Interpolation choices 1)bilinear both ways -! 2)inverse-distance weighting average -! reverse E-W and N-S directions & reverse i,j for output array a(nlat,nlon) -! -! program history log: -! -! -! input argument list: -! mb,nb - fv3 dimensions -! ma,na - a dimensions -! b - input variable b -! xb,yb - b array x and y coordinates -! xa,ya - a array coordinates (xa in xb units, ya in yb units) -! -! output argument list: -! a - output interpolated array -! -! attributes: -! language: f90 -! machine: -! -!$$$ end documentation block - - use constants, only: zero,one - implicit none - - integer(i_kind),intent(in ) :: mb,nb,ma,na - real(r_kind) ,intent(in ) :: b_in(nb,mb) - logical ,intent(in ) :: rev_flg - real(r_kind) ,intent( out) :: a(ma,na) - - integer(i_kind) i,j,ir,jr,mbp,nbp - real(r_kind) b(nb,mb) - - mbp=mb+1 - nbp=nb+1 - if(rev_flg) then -!!!!!!!!! reverse E-W and N-S - do j=1,mb - jr=mbp-j - do i=1,nb - ir=nbp-i - b(ir,jr)=b_in(i,j) - end do - end do - else - b(:,:)=b_in(:,:) - endif -!!!!!!!!! interpolate to A grid & reverse ij for array a(lat,lon) - if(bilinear)then ! bilinear interpolation - do j=1,ma - do i=1,na - a(j,i)=fv3dx1(i,j)*(fv3dy1(i,j)*b(fv3ix (i,j),fv3jy(i,j))+fv3dy(i,j)*b(fv3ix (i,j),fv3jyp(i,j))) & - +fv3dx (i,j)*(fv3dy1(i,j)*b(fv3ixp(i,j),fv3jy(i,j))+fv3dy(i,j)*b(fv3ixp(i,j),fv3jyp(i,j))) - end do - end do - else ! inverse-distance weighting average - do j=1,ma - do i=1,na - a(j,i)=fv3dx(i,j)*b(fv3ix (i,j),fv3jy(i,j))+fv3dy(i,j)*b(fv3ix (i,j),fv3jyp(i,j)) & - +fv3dx1(i,j)*b(fv3ixp(i,j),fv3jy(i,j))+fv3dy1(i,j)*b(fv3ixp(i,j),fv3jyp(i,j)) - end do - end do - endif - return -end subroutine fv3_h_to_ll - -subroutine fv3_h_to_ll_ens(b_in,a,nb,mb,na,ma,rev_flg) -!$$$ subprogram documentation block -! . . . . -! subprogram: fv3_h_to_ll -! prgmmr: wu 2017-05-30 -! -! abstract: interpolate from rotated fv3 grid to A grid. -! Interpolation choices 1)bilinear both ways -! 2)inverse-distance weighting average -! reverse E-W and N-S directions & reverse i,j for output array a(nlat,nlon) -! -! program history log: -! -! -! input argument list: -! mb,nb - fv3 dimensions -! ma,na - a dimensions -! b - input variable b -! xb,yb - b array x and y coordinates -! xa,ya - a array coordinates (xa in xb units, ya in yb units) -! -! output argument list: -! a - output interpolated array -! -! attributes: -! language: f90 -! machine: -! -!$$$ end documentation block - use constants, only: zero,one - implicit none - - integer(i_kind),intent(in ) :: mb,nb,ma,na - real(r_kind) ,intent(in ) :: b_in(nb,mb) - logical ,intent(in ) :: rev_flg - real(r_kind) ,intent( out) :: a(ma,na) - - integer(i_kind) i,j,ir,jr,mbp,nbp - real(r_kind) b(nb,mb) - - mbp=mb+1 - nbp=nb+1 - bilinear=.false. - if(rev_flg) then -!!!!!!!!! reverse E-W and N-S - do j=1,mb - jr=mbp-j - do i=1,nb - ir=nbp-i - b(ir,jr)=b_in(i,j) - end do - end do - else - b(:,:)=b_in(:,:) - endif -!!!!!!!!! interpolate to A grid & reverse ij for array a(lat,lon) - if(bilinear)then ! bilinear interpolation - do j=1,ma - do i=1,na - a(j,i)=fv3dx1ens(i,j)*(fv3dy1ens(i,j)*b(fv3ixens(i,j),fv3jyens(i,j)) & - +fv3dyens(i,j)*b(fv3ixens(i,j),fv3jypens(i,j))) & - +fv3dxens(i,j)*(fv3dy1ens(i,j)*b(fv3ixpens(i,j),fv3jyens(i,j)) & - +fv3dyens(i,j)*b(fv3ixpens(i,j),fv3jypens(i,j))) - end do - end do - else ! inverse-distance weighting average - do j=1,ma - do i=1,na - a(j,i)=fv3dxens(i,j)*b(fv3ixens(i,j),fv3jyens(i,j)) & - +fv3dyens(i,j)*b(fv3ixens(i,j),fv3jypens(i,j)) & - +fv3dx1ens(i,j)*b(fv3ixpens(i,j),fv3jyens(i,j)) & - +fv3dy1ens(i,j)*b(fv3ixpens(i,j),fv3jypens(i,j)) - end do - end do - endif - - return -end subroutine fv3_h_to_ll_ens - -subroutine fv3_ll_to_h(a,b,nxa,nya,nxb,nyb,rev_flg) -!$$$ subprogram documentation block -! . . . . -! subprogram: fv3_ll_to_h -! prgmmr: wu 2017-05-30 -! -! abstract: interpolate from analysis A grid to rotated fv3 grid. -! Interpolation is bilinear both ways. Reverse E-W and N-S and -! reverse i,j for output array b(nxb,nyb) -! -! program history log: -! -! -! input argument list: -! nxa,nya - a array dimensions -! nxb,nyb - b array dimensions -! -! b - input variable b -! rev_flg - flag for reverse i,j order -! output argument list: -! a - output interpolated array -! -! attributes: -! language: f90 -! machine: -! -!$$$ end documentation block - - use m_kinds, only: r_kind,i_kind - use constants, only: zero,one - implicit none - - integer(i_kind),intent(in ) :: nyb,nxb,nya,nxa - real(r_kind) ,intent(in ) :: a(nya,nxa) - logical ,intent(in ) :: rev_flg - real(r_kind) ,intent( out) :: b(nxb*nyb) - - integer(i_kind) i,j,ir,jr,nybp,nxbp,ijr - - if(rev_flg)then -!!!!!!!!!! output in reverse E-W, N-S and reversed i,j !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - nybp=nyb+1 - nxbp=nxb+1 - do i=1,nyb - ir=nybp-i - ijr=(ir-1)*nxb - do j=1,nxb - jr=nxbp-j - b(jr+ijr)=a3dy1(i,j)*(a3dx1(i,j)*a(a3jy (i,j),a3ix(i,j))+a3dx(i,j)*a(a3jy (i,j),a3ixp(i,j))) & - +a3dy (i,j)*(a3dx1(i,j)*a(a3jyp(i,j),a3ix(i,j))+a3dx(i,j)*a(a3jyp(i,j),a3ixp(i,j))) - end do - end do - else -!!!!!!!!!! output order as input W-E S-N and (i:lat,j:lon) !!!!!!!!!!! - do i=1,nyb - ijr=(i-1)*nxb - do j=1,nxb - b(j+ijr)=a3dy1(i,j)*(a3dx1(i,j)*a(a3jy (i,j),a3ix(i,j))+a3dx(i,j)*a(a3jy (i,j),a3ixp(i,j))) & - +a3dy (i,j)*(a3dx1(i,j)*a(a3jyp(i,j),a3ix(i,j))+a3dx(i,j)*a(a3jyp(i,j),a3ixp(i,j))) - end do - end do - endif -end subroutine fv3_ll_to_h - -end module mod_fv3_lola - -subroutine rotate2deg(rlon_in,rlat_in,rlon_out,rlat_out,rlon0,rlat0,nx,ny) -!$$$ subprogram documentation block -! . . . . -! subprogram: rotate2deg -! -! prgmmr: parrish -! -! Rotate right-handed spherical coordinate to new right-handed spherical -! coordinate. The coordinates are latitude (-90 to 90) and longitude. -! Output for longitude is principle range of atan2d function ( -180 < rlon_out <= 180 ) -! -! program history log: -! 2017-05-02 parrish -! -! Method is as follows: -! 1. define x,y,z coordinate system with origin at center of sphere, -! x intersecting sphere at 0 deg N, 0 deg E, -! y intersecting sphere at 0 deg N, 90 deg E, -! z intersecting sphere at 90 deg N (north pole). - -! 4 steps: - -! 1. compute x,y,z from rlon_in, rlat_in - -! 2. rotate (x,y,z) about z axis by amount rlon0 -- (x,y,z) --> (xt,yt,zt) - -! 3. rotate (xt,yt,zt) about yt axis by amount rlat0 --- (xt,yt,zt) --> (xtt,ytt,ztt) - -! 4. compute rlon_out, rlat_out from xtt,ytt,ztt - -! This is the desired new orientation, where (0N, 0E) maps to point -! (rlon0,rlat0) in original coordinate and the new equator is tangent to -! the original latitude circle rlat0 at original longitude rlon0. -! attributes: -! langauge: f90 -! machine: -! -!$$$ end documentation block - - - use m_kinds, only: r_kind,i_kind - use constants, only: deg2rad,rad2deg - implicit none - - integer(i_kind), intent(in ) :: nx,ny ! fv3 tile x- and y-dimensions - real(r_kind),intent(in ) :: rlon_in(nx,ny),rlat_in(nx,ny),rlon0,rlat0 - real(r_kind),intent( out) :: rlon_out(nx,ny),rlat_out(nx,ny) - - real(r_kind) x,y,z, xt,yt,zt, xtt,ytt,ztt - integer(i_kind) i,j - - do j=1,ny - do i=1,nx -! 1. compute x,y,z from rlon_in, rlat_in - - x=cos(rlat_in(i,j)*deg2rad)*cos(rlon_in(i,j)*deg2rad) - y=cos(rlat_in(i,j)*deg2rad)*sin(rlon_in(i,j)*deg2rad) - z=sin(rlat_in(i,j)*deg2rad) - -! 2. rotate (x,y,z) about z axis by amount rlon0 -- (x,y,z) --> (xt,yt,zt) - - xt= x*cos(rlon0*deg2rad)+y*sin(rlon0*deg2rad) - yt=-x*sin(rlon0*deg2rad)+y*cos(rlon0*deg2rad) - zt=z - -! 3. rotate (xt,yt,zt) about yt axis by amount rlat0 --- (xt,yt,zt) --> (xtt,ytt,ztt) - - xtt= xt*cos(rlat0*deg2rad)+zt*sin(rlat0*deg2rad) - ytt= yt - ztt=-xt*sin(rlat0*deg2rad)+zt*cos(rlat0*deg2rad) - -! 4. compute rlon_out, rlat_out from xtt,ytt,ztt - - rlat_out(i,j)=asin(ztt)*rad2deg - rlon_out(i,j)=atan2(ytt,xtt)*rad2deg - enddo - enddo -end subroutine rotate2deg - -subroutine unrotate2deg(rlon_in,rlat_in,rlon_out,rlat_out,rlon0,rlat0,nx,ny) -!$$$ subprogram documentation block -! . . . . -! subprogram: unrotate2deg -! -! prgmmr: parrish -! -! abstract: inverse of rotate2deg. -! -! program history log: -! 2017-05-02 parrish - -! attributes: -! langauge: f90 -! machine: -! -!$$$ end documentation block - - use m_kinds, only: r_kind,i_kind - use constants, only: deg2rad,rad2deg - implicit none - - real(r_kind),intent(in ) :: rlon_out(nx,ny),rlat_out(nx,ny),rlon0,rlat0 - integer(i_kind),intent(in ) :: nx,ny - real(r_kind),intent( out) :: rlon_in(nx,ny),rlat_in(nx,ny) - - real(r_kind) x,y,z, xt,yt,zt, xtt,ytt,ztt - integer(i_kind) i,j - do j=1,ny - do i=1,nx - xtt=cos(rlat_out(i,j)*deg2rad)*cos(rlon_out(i,j)*deg2rad) - ytt=cos(rlat_out(i,j)*deg2rad)*sin(rlon_out(i,j)*deg2rad) - ztt=sin(rlat_out(i,j)*deg2rad) - - xt= xtt*cos(rlat0*deg2rad)-ztt*sin(rlat0*deg2rad) - yt= ytt - zt= xtt*sin(rlat0*deg2rad)+ztt*cos(rlat0*deg2rad) - - x= xt*cos(rlon0*deg2rad)-yt*sin(rlon0*deg2rad) - y= xt*sin(rlon0*deg2rad)+yt*cos(rlon0*deg2rad) - z= zt - - rlat_in(i,j)=asin(z)*rad2deg - rlon_in(i,j)=atan2(y,x)*rad2deg - enddo - enddo - -end subroutine unrotate2deg From 159fc6e6ded7d492a996f96c2833142eab6bfbc1 Mon Sep 17 00:00:00 2001 From: Samuel Degelia Date: Thu, 12 Feb 2026 16:05:43 +0000 Subject: [PATCH 9/9] update ufo --- sorc/ufo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/ufo b/sorc/ufo index 6379f4e5..6b5e3e42 160000 --- a/sorc/ufo +++ b/sorc/ufo @@ -1 +1 @@ -Subproject commit 6379f4e573c15818f610364cba060583e7713e9d +Subproject commit 6b5e3e42e61d5bddf3c0c55079a865742bb3aefc