From ca19008b521cccf07a84037cfece3847232025cc Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA <26926959+RussTreadon-NOAA@users.noreply.github.com> Date: Mon, 25 Sep 2023 16:12:33 -0400 Subject: [PATCH 01/13] Intel 2022 updates (#629) **Description** This PR fixes two types of bugs discovered when cycling `gsi.x` and `enkf.x` with intel/2022 in the global workflow 1. modify variables written to netcdf diagnostic files by `gsi.x` to be consistent with codes which read netcdf diagnostic files 2. modify `lrun_subdirs=.true.` option of `gsi.x` to properly handle the case in which sub-directories already exist in the run directory Fixes #623 **Type of change** - [x] Bug fix (non-breaking change which fixes an issue) **How Has This Been Tested?** Ctests have been on Hera, Orion, and WCOSS2 (Cactus) with acceptable behavior. A global parallel covering the period 2021073106 through 2021080118 has been run on Hera, Orion, and WCOSS2 (Cactus). All global workflow jobs ran as expected. **Checklist** - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] New and existing tests pass with my changes --- src/gsi/obsmod.F90 | 17 +++++++++++------ src/gsi/setupaod.f90 | 2 +- src/gsi/setupoz.f90 | 5 +++-- src/gsi/setuprad.f90 | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/gsi/obsmod.F90 b/src/gsi/obsmod.F90 index 26f8ff1bbf..633bde91ab 100644 --- a/src/gsi/obsmod.F90 +++ b/src/gsi/obsmod.F90 @@ -1022,12 +1022,12 @@ subroutine init_directories(in_pe,num_pe) integer(i_kind),intent(in ) :: in_pe integer(i_kind),intent(in ) :: num_pe - logical :: l_mkdir_stat + logical :: l_mkdir_stat, l_dir_exist character(len=144):: command character(len=8):: pe_name, loc_pe_name character(len=128):: loc_dirname - integer(i_kind) :: i + integer(i_kind) :: i, ierror if (lrun_subdirs) then write(pe_name,'(i4.4)') in_pe @@ -1038,10 +1038,15 @@ subroutine init_directories(in_pe,num_pe) write(loc_pe_name,'(i4.4)') i loc_dirname = 'dir.'//trim(loc_pe_name) #ifdef __INTEL_COMPILER - l_mkdir_stat = MAKEDIRQQ(trim(loc_dirname)) - if(.not. l_mkdir_stat) then - write(6, *) "Failed to create directory ", trim(loc_dirname), " for PE ", loc_pe_name - call stop2(678) + INQUIRE(directory=trim(loc_dirname), exist=l_dir_exist) + if (.not.l_dir_exist) then + l_mkdir_stat = MAKEDIRQQ(trim(loc_dirname)) + if(.not.l_mkdir_stat) then + ierror=GETLASTERRORQQ() + write(6, *) "INIT_DIRECTORIES: ***ERROR** Failed to create directory ", & + trim(loc_dirname)," for PE ", loc_pe_name, ' ierror= ', ierror + call stop2(678) + endif endif #else command = 'mkdir -p -m 755 ' // trim(loc_dirname) diff --git a/src/gsi/setupaod.f90 b/src/gsi/setupaod.f90 index 5fe4233ada..58707acd6a 100644 --- a/src/gsi/setupaod.f90 +++ b/src/gsi/setupaod.f90 @@ -844,7 +844,7 @@ subroutine contents_netcdf_diag_ call nc_diag_metadata("Observation_Class", obsclass) call nc_diag_metadata_to_single("Latitude",(cenlat)) ! observation latitude (degrees) call nc_diag_metadata_to_single("Longitude",(cenlon)) ! observation longitude (degrees) - call nc_diag_metadata_to_single("Obs_Time",(dtime))!-time_offset)) ! observation time (hours relative to analysis time) + call nc_diag_metadata_to_single("Time",(dtime))!-time_offset)) ! observation time (hours relative to analysis time) call nc_diag_metadata_to_single("Sol_Zenith_Angle",(pangs)) ! solar zenith angle (degrees) call nc_diag_metadata_to_single("Sol_Azimuth_Angle",(data_s(isazi_ang,n))) ! solar azimuth angle (degrees) call nc_diag_metadata("Surface_type", nint(data_s(istyp,n))) diff --git a/src/gsi/setupoz.f90 b/src/gsi/setupoz.f90 index d7a85de0b2..7112e967ba 100644 --- a/src/gsi/setupoz.f90 +++ b/src/gsi/setupoz.f90 @@ -1720,6 +1720,7 @@ subroutine contents_netcdf_diag_(odiag) type(obs_diag),pointer,intent(in):: odiag ! Observation class character(7),parameter :: obsclass = ' ozlev' + integer(i_kind),parameter :: ione = 1 real(r_kind),dimension(miter) :: obsdiag_iuse call nc_diag_metadata_to_single("Latitude", data(ilate,i) ) call nc_diag_metadata_to_single("Longitude", data(ilone,i) ) @@ -1731,9 +1732,9 @@ subroutine contents_netcdf_diag_(odiag) call nc_diag_metadata_to_single("Obs_Minus_Forecast_unadjusted",ozone_inv ) call nc_diag_metadata_to_single("Reference_Pressure", preso3l*r100 ) ! Pa if(luse(i)) then - call nc_diag_metadata_to_single("Analysis_Use_Flag", one ) + call nc_diag_metadata("Analysis_Use_Flag", ione ) else - call nc_diag_metadata_to_single("Analysis_Use_Flag", -one ) + call nc_diag_metadata("Analysis_Use_Flag", -ione ) endif call nc_diag_metadata_to_single("Input_Observation_Error",obserror ) diff --git a/src/gsi/setuprad.f90 b/src/gsi/setuprad.f90 index f686e19332..20ab63456e 100644 --- a/src/gsi/setuprad.f90 +++ b/src/gsi/setuprad.f90 @@ -2577,7 +2577,7 @@ subroutine contents_netcdf_diag_(odiags,idv,iob) call nc_diag_metadata_to_single("Elevation",zsges ) ! model (guess) elevation at observation location - call nc_diag_metadata_to_single("Time",dtime,time_offset,'-') + call nc_diag_metadata_to_single("Obs_Time",dtime,time_offset,'-') call nc_diag_metadata_to_single("Scan_Position",data_s(iscan_pos,n) ) ! sensor scan position call nc_diag_metadata_to_single("Sat_Zenith_Angle", zasat,rad2deg,'*') ! satellite zenith angle (degrees) From 728d006c36ae6b17f08b380ff23b3422b97624fe Mon Sep 17 00:00:00 2001 From: Gang <53267411+GangZhao-NOAA@users.noreply.github.com> Date: Fri, 29 Sep 2023 09:11:39 -0400 Subject: [PATCH 02/13] Adding code to analyze the siginificant wave heigh in GSI 3D Analysis (see issue #601) (#614) Adding code to analyze the siginificant wave heigh in GSI 3D Analysis, esp. for FV3-LAM model based DA, eg. RRFS-DA, RRFS-3DRTMA. (Also see the issue in EMC GSI github repository: #601 Adding I/O for Analysis of Significant Wave Height for 3DRTMA) **Description** Significant Wave Height (hereafter as SWH) is one of the standard products provided by the operational (2D)RTMA. To continuously provide the same products in 3DRTMA, the next-generation RTMA, some efforts in GSI code need to be made in order to analyze the SWH in 3D analysis of GSI. The kernel subroutines to assimilate SWH in GSI (such as stphowv.f90, setuphowv.f90, inthowv.f90, gsi_howvOper.f90 and m_howvNode.f90) already had been added for (2D)RTMA years ago by Manuel Pondeca, so for this issue, the code work mainly focus on adding the I/O of SWH in background and analysis fields for 3DRTMA (esp. RRFS-based 3DRTMA), and some necessary modifications in background error, options, variables related to analysis of SWH, etc. Modified code in GSI: 1. rapidrefresh_cldsurf_mod.f90: adding a few variables related to the analysis of howv in 3D analysis 2. gsimod.F90: adding namelist options used for analysis of howv in 3D analysis 3. m_berror_stats_reg.f90: added some code for the special treatment to the static background error (BE) of howv 4. read_prepbufr.f90: adding code to decode the observation of howv in prepbufr file when howv is available in firstguess 5. setuphowv.f90: adding code to use obs of howv when howv is available in firstguess 6. gsi_rfv3io_mod.f90: adding I/O code to read in howv from firstguess and write out howv into analysis. No dependencies are required for this change. This PR is addressing the issue [#601](https://github.com/NOAA-EMC/GSI/issues/601): Adding code to analyze the siginificant wave heigh in GSI 3D Analysis". Fixes #601 **Type of change** Please delete options that are not relevant. - [*] New feature (non-breaking change which adds functionality) **How Has This Been Tested?** - Brief results from ctest (regression test) with the modified code (on WCOSS2 - Cactus): [gang.zhao@clogin07:build] (feature/3drtma_howv)$ ctest -N Test project /lfs/h2/emc/da/save/gang.zhao/WorkDir/WaveHgt/develop/build Test #1: global_3dvar Test #2: global_4dvar Test #3: global_4denvar Test #4: hwrf_nmm_d2 Test #5: hwrf_nmm_d3 Test #6: rtma Test #7: rrfs_3denvar_glbens Test #8: netcdf_fv3_regional Test #9: global_enkf Total Tests: 9 Test #1: global_3dvar [gang.zhao@clogin04:build] (feature/3drtma_howv)$ ctest -R global_3dvar Test project /lfs/h2/emc/da/save/gang.zhao/WorkDir/WaveHgt/develop/build Start 1: global_3dvar 1/1 Test #1: global_3dvar ..................... Passed 1631.12 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 1631.14 sec Test #2: global_4dvar [gang.zhao@clogin09:build] (feature/3drtma_howv)$ ctest -R global_4dvar Test project /lfs/h2/emc/da/save/gang.zhao/WorkDir/WaveHgt/develop/build Start 2: global_4dvar 1/1 Test #2: global_4dvar ..................... Passed 2462.19 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 2462.23 sec Test #3: global_4denvar [gang.zhao@clogin04:build] (feature/3drtma_howv)$ ctest -R global_4denvar Test project /lfs/h2/emc/da/save/gang.zhao/WorkDir/WaveHgt/develop/build Start 3: global_4denvar 1/1 Test #3: global_4denvar ................... Passed 1922.43 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 1922.46 sec Test #4: hwrf_nmm_d2 [gang.zhao@clogin09:build] (feature/3drtma_howv)$ ctest -R hwrf_nmm_d2 Test project /lfs/h2/emc/da/save/gang.zhao/WorkDir/WaveHgt/develop/build Start 4: hwrf_nmm_d2 1/1 Test #4: hwrf_nmm_d2 ...................... Passed 1214.10 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 1214.20 sec Test #5: hwrf_nmm_d3 [gang.zhao@clogin09:build] (feature/3drtma_howv)$ ctest -R hwrf_nmm_d3 Test project /lfs/h2/emc/da/save/gang.zhao/WorkDir/WaveHgt/develop/build Start 5: hwrf_nmm_d3 1/1 Test #5: hwrf_nmm_d3 ...................... Passed 736.38 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 736.50 sec Test #6: rtma [gang.zhao@clogin05:build] (feature/3drtma_howv)$ ctest -R rtma Test project /lfs/h2/emc/da/save/gang.zhao/WorkDir/WaveHgt/develop/build Start 6: rtma 1/1 Test #6: rtma ............................. Passed 1027.01 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 1027.01 sec Test #7: rrfs_3denvar_glbens [gang.zhao@clogin06:build] (feature/3drtma_howv)$ ctest -R rrfs_3denvar_glbens Test project /lfs/h2/emc/da/save/gang.zhao/WorkDir/WaveHgt/develop/build Start 7: rrfs_3denvar_glbens 1/1 Test #7: rrfs_3denvar_glbens .............. Passed 484.69 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 484.70 sec Test #8: netcdf_fv3_regional [gang.zhao@clogin03:build] (feature/3drtma_howv)$ ctest -R netcdf_fv3_regional Test project /lfs/h2/emc/da/save/gang.zhao/WorkDir/WaveHgt/develop/build Start 8: netcdf_fv3_regional 1/1 Test #8: netcdf_fv3_regional .............. Passed 483.08 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 483.11 sec Test #9: global_enkf [gang.zhao@clogin03:build] (feature/3drtma_howv)$ ctest -R global_enkf Test project /lfs/h2/emc/da/save/gang.zhao/WorkDir/WaveHgt/develop/build Start 9: global_enkf 1/1 Test #9: global_enkf ...................... Passed 488.50 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 488.57 sec - The modified GSI code passed the regression tests (all 9 tasks) on Hera and WCOSS2 (Cactus). - adding the analysis of howv only has very trial influences on the analyses of other variables. Here is the statistics of the differences of other variables (u/v/t/ps/q/t2m/q2m) from the runs of GSI without howv vs. with howv (from a testing case 2023-07-12_14:00:00 UTC in 3km North-American domain): comparing two netcdf files: fcst_fv3lam_hyb_betas/INPUT/fv_core.res.tile1.nc fcst_fv3lam_nodata_noinfo/INPUT/fv_core.res.tile1.nc ... Variable Group Count Sum AbsSum Min Max Range Mean StdDev u / 602135550 3926.84 25760.8 -0.1026 0.485788 0.588388 6.52152e-06 0.00115817 v / 620166777 -4891.34 32582.5 -0.835774 0.268402 1.10418 -7.88714e-06 0.00197793 T / 155987083 178.048 6497.51 -0.0246582 0.0384064 0.0630646 1.14143e-06 0.000218737 delp / 19559676 -281.532 3008.29 -0.00292969 0.00219727 0.00512695 -1.43935e-05 0.000183727 comparing two netcdf files: fcst_fv3lam_hyb_betas/INPUT/fv_tracer.res.tile1.nc fcst_fv3lam_nodata_noinfo/INPUT/fv_tracer.res.tile1.nc ... Variable Group Count Sum AbsSum Min Max Range Mean StdDev sphum / 430707614 0.594287 2.77816 -2.6139e-05 3.1759e-05 5.7898e-05 1.37979e-09 8.03072e-08 comparing two netcdf files: fcst_fv3lam_hyb_betas/INPUT/sfc_data.nc fcst_fv3lam_nodata_noinfo/INPUT/sfc_data.nc ... Variable Group Count Sum AbsSum Min Max Range Mean StdDev t2m / 10665000 43.3899 135.095 -0.00152825 0.00686629 0.00839454 4.06844e-06 5.02866e-05 q2m / 10665000 0.0192553 0.124707 -3.1476e-06 1.77554e-05 2.0903e-05 1.80547e-09 5.89657e-08 It could be seen that the differences are trivial and ignorable. The regression tests were done by following the instructions of "[GSI Ctests (regression tests)](https://github.com/NOAA-EMC/GSI/wiki/GSI-Ctests-(regression-tests))" in [GSI Wiki](https://github.com/NOAA-EMC/GSI/wiki) The modified code had also been tested with a testing case 2023-07-12_14:00:00 UTC for 3km North-American domain Here is a brief summary of the test results: 1. Here is the analysis increment of Significant Wave Height (aka howv hereafter): pure 3dvar, static background error of howv is 0.42 meters, and the de-correlation length scale is 170km. ![HOWV_var_inc_maprll_datll_reg_ncf](https://github.com/NOAA-EMC/GSI/assets/53267411/4fdeeb82-7258-4344-be69-cce747474312) 2. The following figure shows the distribution of howv in the analysis (used obs is in green, rejected in red). Obviously the location of used obs of howv match the area of non-zero analysis increments of howv. ![var_obs_2023071214_howv_maprll_datll_reg_ncf](https://github.com/NOAA-EMC/GSI/assets/53267411/d4ed6013-cfc8-486e-8f47-db07ec0e4e53) 3. The following figure is the analysis increment of howv with hybrid envar analysis (using gdas ensemble 80 members and the ensemble weight is 84%), and the static BE of howv is tuned/inflated. The analysis increments are very similar to the results from pure 3dvar run (see the first figure) ![HOWV_hyb_betas016_inc_maprll_datll_reg_ncf](https://github.com/NOAA-EMC/GSI/assets/53267411/e6e696e8-932b-42ab-9001-3472e970b21c) 4. The last figure shows the analysis increments of howv with hybrid envar analysis (using gdas ensemble 80 members and the ensemble weight is 84%), but the static BE of howv is NOT tuned. It can be observed that the analysis increments is less than the results from the hybrid run with tuning the static BE of howv. That is because the weight of static BE (16%) reduced the background error of howv (ensemble of howv is not available yet), so the impact of obs is decreased. ![HOWV_hyb_betas016_noTune_inc_maprll_datll_reg_ncf](https://github.com/NOAA-EMC/GSI/assets/53267411/ca25d068-fc86-4d47-a9d2-46e02ac22dac) **Checklist** - [*] My code follows the style guidelines of this project - [*] I have performed a self-review of my own code - [*] I have commented my code, particularly in hard-to-understand areas - [*] New and existing tests pass with my changes - [*] Any dependent changes have been merged and published **DUE DATE for this PR is 10/5/2023.** If this PR is not merged into `develop` by this date, the PR will be closed and returned to the developer. --- src/gsi/gsi_rfv3io_mod.f90 | 78 +++++++++++++++++++++++++--- src/gsi/gsimod.F90 | 13 ++++- src/gsi/m_berror_stats_reg.f90 | 41 +++++++++++---- src/gsi/rapidrefresh_cldsurf_mod.f90 | 41 ++++++++++++++- src/gsi/read_prepbufr.f90 | 7 +++ 5 files changed, 160 insertions(+), 20 deletions(-) diff --git a/src/gsi/gsi_rfv3io_mod.f90 b/src/gsi/gsi_rfv3io_mod.f90 index 62b23ee713..6d16be7c13 100644 --- a/src/gsi/gsi_rfv3io_mod.f90 +++ b/src/gsi/gsi_rfv3io_mod.f90 @@ -22,6 +22,8 @@ module gsi_rfv3io_mod ! used as background for surface observation operator ! 2022-04-15 Wang - add IO for regional FV3-CMAQ (RRFS-CMAQ) model ! 2022-08-10 Wang - add IO for regional FV3-SMOKE (RRFS-SMOKE) model +! 2023-07-30 Zhao - add IO for the analysis of the significant wave height +! (SWH, aka howv in GSI) in fv3-lam based DA (eg., RRFS-3DRTMA) ! ! subroutines included: ! sub gsi_rfv3io_get_grid_specs @@ -56,6 +58,7 @@ module gsi_rfv3io_mod use rapidrefresh_cldsurf_mod, only: i_use_2mq4b,i_use_2mt4b use chemmod, only: naero_cmaq_fv3,aeronames_cmaq_fv3,imodes_cmaq_fv3,laeroana_fv3cmaq use chemmod, only: naero_smoke_fv3,aeronames_smoke_fv3,laeroana_fv3smoke + use rapidrefresh_cldsurf_mod, only: i_howv_3dda implicit none public type_fv3regfilenameg @@ -133,7 +136,7 @@ module gsi_rfv3io_mod public :: mype_u,mype_v,mype_t,mype_q,mype_p,mype_oz,mype_ql public :: mype_qi,mype_qr,mype_qs,mype_qg,mype_qnr,mype_w public :: k_slmsk,k_tsea,k_vfrac,k_vtype,k_stype,k_zorl,k_smc,k_stc - public :: k_snwdph,k_f10m,mype_2d,n2d,k_orog,k_psfc,k_t2m,k_q2m + public :: k_snwdph,k_f10m,mype_2d,n2d,k_orog,k_psfc,k_t2m,k_q2m,k_howv public :: ijns,ijns2d,displss,displss2d,ijnz,displsz_g public :: fv3lam_io_dynmetvars3d_nouv,fv3lam_io_tracermetvars3d_nouv public :: fv3lam_io_tracerchemvars3d_nouv,fv3lam_io_tracersmokevars3d_nouv @@ -144,7 +147,7 @@ module gsi_rfv3io_mod integer(i_kind) mype_qi,mype_qr,mype_qs,mype_qg,mype_qnr,mype_w integer(i_kind) k_slmsk,k_tsea,k_vfrac,k_vtype,k_stype,k_zorl,k_smc,k_stc - integer(i_kind) k_snwdph,k_f10m,mype_2d,n2d,k_orog,k_psfc,k_t2m,k_q2m + integer(i_kind) k_snwdph,k_f10m,mype_2d,n2d,k_orog,k_psfc,k_t2m,k_q2m,k_howv parameter( & k_f10m =1, & !fact10 k_stype=2, & !soil_type @@ -159,7 +162,8 @@ module gsi_rfv3io_mod k_t2m =11, & ! 2 m T k_q2m =12, & ! 2 m Q k_orog =13, & !terrain - n2d=13 ) + k_howv =14, & ! significant wave height (aka howv in GSI) + n2d=14 ) logical :: grid_reverse_flag character(len=max_varname_length),allocatable,dimension(:) :: fv3lam_io_dynmetvars3d_nouv ! copy of cvars3d excluding uv 3-d fields @@ -767,6 +771,8 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) ! 2022-04-01 Y. Wang and X. Wang - add capability to read reflectivity ! for direct radar EnVar DA using reflectivity as state ! variable, poc: xuguang.wang@ou.edu +! 2023-07-30 Zhao - added code to read significant wave height (howv) field +! from the 2D fv3-lam firstguess file (fv3_sfcdata). ! attributes: ! language: f90 ! machine: ibm RS/6000 SP @@ -816,6 +822,7 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) real(r_kind),pointer,dimension(:,:,:):: ges_delp =>NULL() real(r_kind),dimension(:,:),pointer::ges_t2m=>NULL() real(r_kind),dimension(:,:),pointer::ges_q2m=>NULL() + real(r_kind),dimension(:,:),pointer::ges_howv=>NULL() real(r_kind),dimension(:,:,:),pointer::ges_ql=>NULL() real(r_kind),dimension(:,:,:),pointer::ges_qi=>NULL() @@ -1093,6 +1100,7 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) if(mype == 0) write(6,*)'the metvarname ',trim(vartem),' will be dealt separately' else if(trim(vartem)=='t2m') then else if(trim(vartem)=='q2m') then + else if(trim(vartem)=='howv') then else write(6,*)'the metvarname2 ',trim(vartem),' has not been considered yet, stop' call stop2(333) @@ -1110,7 +1118,8 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) do i=1,size(name_metvars2d) vartem=trim(name_metvars2d(i)) if(.not.( (trim(vartem)=='ps'.and.fv3sar_bg_opt==0).or.(trim(vartem)=="z") & - .or.(trim(vartem)=="t2m").or.(trim(vartem)=="q2m"))) then !z is treated separately + .or.(trim(vartem)=="t2m").or.(trim(vartem)=="q2m") & + .or.(trim(vartem)=="howv"))) then ! z is treated separately if (ifindstrloc(vardynvars,trim(vartem)) > 0) then jdynvar=jdynvar+1 fv3lam_io_dynmetvars2d_nouv(jdynvar)=trim(vartem) @@ -1365,6 +1374,13 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it),'t2m',ges_t2m,istatus );ier=ier+istatus if (ier/=0) call die(trim(myname),'cannot get pointers for t2m,ier=',ier) endif + +!--- significant wave height (howv) + if ( i_howv_3dda == 1 ) then + call GSI_BundleGetPointer(GSI_MetGuess_Bundle(it),'howv',ges_howv,istatus ); ier=ier+istatus + if (ier/=0) call die(trim(myname),'cannot get pointers for howv, ier=',ier) + endif + if(mype == 0 ) then call check(nf90_open(fv3filenamegin(it)%dynvars,nf90_nowrite,loc_id)) call check(nf90_inquire(loc_id,formatNum=ncfmt)) @@ -1546,7 +1562,7 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) endif - call gsi_fv3ncdf2d_read(fv3filenamegin(it),it,ges_z,ges_t2m,ges_q2m) + call gsi_fv3ncdf2d_read(fv3filenamegin(it),it,ges_z,ges_t2m,ges_q2m,ges_howv) if(i_use_2mq4b > 0 .and. i_use_2mt4b > 0 ) then ! Convert 2m guess mixing ratio to specific humidity @@ -1782,7 +1798,7 @@ end subroutine gsi_bundlegetpointer_fv3lam_tracerchem_nouv end subroutine read_fv3_netcdf_guess -subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) +subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m,ges_howv) !$$$ subprogram documentation block ! . . . . ! subprogram: gsi_fv3ncdf2d_read @@ -1792,6 +1808,8 @@ subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) ! Scatter the field to each PE ! program history log: ! 2023-02-14 Hu - Bug fix for read in subdomain surface restart files +! 2023-07-30 Zhao - added IO to read significant wave height (howv) from 2D FV3-LAM +! firstguess file (fv3_sfcdata) ! ! input argument list: ! it - time index for 2d fields @@ -1805,7 +1823,8 @@ subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) ! !$$$ end documentation block use kinds, only: r_kind,i_kind - use mpimod, only: ierror,mpi_comm_world,npe,mpi_rtype,mype + use mpimod, only: ierror,mpi_comm_world,npe,mpi_rtype,mype,mpi_itype + use mpeu_util, only: die use guess_grids, only: fact10,soil_type,veg_frac,veg_type,sfc_rough, & sfct,sno,soil_temp,soil_moi,isli use gridmod, only: lat2,lon2,itotsub,ijn_s @@ -1813,8 +1832,11 @@ subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) use netcdf, only: nf90_open,nf90_close,nf90_get_var,nf90_noerr use netcdf, only: nf90_nowrite,nf90_inquire,nf90_inquire_dimension use netcdf, only: nf90_inquire_variable + use netcdf, only: nf90_inq_varid + use netcdf, only: nf90_noerr use mod_fv3_lola, only: fv3_h_to_ll,nxa,nya use constants, only: grav + use constants, only: zero implicit none @@ -1822,6 +1844,7 @@ subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) real(r_kind),intent(in),dimension(:,:),pointer::ges_z real(r_kind),intent(in),dimension(:,:),pointer::ges_t2m real(r_kind),intent(in),dimension(:,:),pointer::ges_q2m + real(r_kind),intent(in),dimension(:,:),pointer::ges_howv type (type_fv3regfilenameg),intent(in) :: fv3filenamegin character(len=max_varname_length) :: name integer(i_kind),allocatable,dimension(:):: dim @@ -1835,6 +1858,9 @@ subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) integer(i_kind) kk,n,ns,j,ii,jj,mm1 character(len=:),allocatable :: sfcdata !='fv3_sfcdata' character(len=:),allocatable :: dynvars !='fv3_dynvars' +! for checking the existence of howv in firstguess file + integer(i_kind) id_howv + integer(i_kind) iret_bcast ! for io_layout > 1 real(r_kind),allocatable,dimension(:,:):: sfc_fulldomain @@ -1850,6 +1876,9 @@ subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) allocate(work(itotsub*n2d)) allocate( sfcn2d(lat2,lon2,n2d)) +!-- initialisation of the array for howv + sfcn2d(:,:,k_howv) = zero + if(mype==mype_2d ) then allocate(sfc_fulldomain(nx,ny)) @@ -1877,6 +1906,24 @@ subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) iret=nf90_inquire_dimension(gfile_loc,k,name,len) dim(k)=len enddo + +!--- check the existence of significant wave height (howv) in 2D FV3-LAM firstguess file +! if howv is set in anavinfo (as i_howv_3dda=1), then check its existence in firstguess, +! but if it is not found in firstguess, then stop GSI run and set i_howv_3dda = 0. + if ( i_howv_3dda == 1 ) then + iret = nf90_inq_varid(gfile_loc,'howv',id_howv) + if ( iret /= nf90_noerr ) then + iret = nf90_inq_varid(gfile_loc,'HOWV',id_howv) ! double check with name in uppercase + end if + if ( iret /= nf90_noerr ) then + i_howv_3dda = 0 ! howv does not exist in firstguess, then stop GSI run. + call die('gsi_fv3ncdf2d_read','Warning: CANNOT find howv in firstguess, aborting..., iret = ', iret) + else + write(6,'(1x,A,1x,A,1x,A,1x,I4,1x,I4,1x,A,1x,I4.4,A)') 'gsi_fv3ncdf2d_read:: Found howv in firstguess ', & + trim(sfcdata), ', iret, varid = ',iret, id_howv,' (on pe: ', mype,').' + end if + end if + !!!!!!!!!!!! read in 2d variables !!!!!!!!!!!!!!!!!!!!!!!!!! do i=ndimensions+1,nvariables iret=nf90_inquire_variable(gfile_loc,i,name,len) @@ -1904,6 +1951,8 @@ subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) k=k_t2m else if( trim(name)=='Q2M'.or.trim(name)=='q2m' ) then k=k_q2m + else if( trim(name)=='HOWV'.or.trim(name)=='howv' ) then + k=k_howv else cycle endif @@ -2036,6 +2085,8 @@ subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) if(allocated(sfc_fulldomain)) deallocate (sfc_fulldomain) endif ! mype +!-- broadcast the updated i_howv_3dda to all tasks (!!!!) + call mpi_bcast(i_howv_3dda, 1, mpi_itype, mype_2d, mpi_comm_world, iret_bcast) !!!!!!! scatter !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! call mpi_scatterv(work,ijns2d,displss2d,mpi_rtype,& @@ -2058,6 +2109,9 @@ subroutine gsi_fv3ncdf2d_read(fv3filenamegin,it,ges_z,ges_t2m,ges_q2m) ges_t2m(:,:)=sfcn2d(:,:,k_t2m) ges_q2m(:,:)=sfcn2d(:,:,k_q2m) endif + if ( i_howv_3dda == 1 ) then + ges_howv(:,:)=sfcn2d(:,:,k_howv) + endif deallocate (sfcn2d,a) return end subroutine gsi_fv3ncdf2d_read @@ -3192,6 +3246,8 @@ subroutine wrfv3_netcdf(fv3filenamegin) ! 2019-11-22 CAPS(C. Tong) - modify "add_saved" to properly output analyses ! 2021-01-05 x.zhang/lei - add code for updating delz analysis in regional da ! 2022-04-01 Y. Wang and X. Wang - add code for updating reflectivity +! 2023-07-30 Zhao - added code for the output of the analysis of +! significant wave height (howv) ! ! input argument list: ! @@ -3234,6 +3290,7 @@ subroutine wrfv3_netcdf(fv3filenamegin) real(r_kind),pointer,dimension(:,:,:):: ges_q =>NULL() real(r_kind),pointer,dimension(:,: ):: ges_t2m =>NULL() real(r_kind),pointer,dimension(:,: ):: ges_q2m =>NULL() + real(r_kind),pointer,dimension(:,: ):: ges_howv =>NULL() integer(i_kind) i,k @@ -3350,6 +3407,9 @@ subroutine wrfv3_netcdf(fv3filenamegin) call GSI_BundleGetPointer (GSI_MetGuess_Bundle(it),'q2m',ges_q2m,istatus); ier=ier+istatus call GSI_BundleGetPointer (GSI_MetGuess_Bundle(it),'t2m',ges_t2m,istatus );ier=ier+istatus endif + if ( i_howv_3dda == 1 ) then + call GSI_BundleGetPointer (GSI_MetGuess_Bundle(it),'howv',ges_howv,istatus); ier=ier+istatus + endif if (ier/=0) call die('wrfv3_netcdf','cannot get pointers for fv3 met-fields, ier =',ier) if (laeroana_fv3cmaq) then @@ -3559,6 +3619,10 @@ subroutine wrfv3_netcdf(fv3filenamegin) call gsi_fv3ncdf_write_sfc(fv3filenamegin,'t2m',ges_t2m,add_saved) call gsi_fv3ncdf_write_sfc(fv3filenamegin,'q2m',ges_q2m,add_saved) endif +!-- output analysis of howv + if ( i_howv_3dda == 1 ) then + call gsi_fv3ncdf_write_sfc(fv3filenamegin,'howv',ges_howv,add_saved) + endif if(allocated(g_prsi)) deallocate(g_prsi) diff --git a/src/gsi/gsimod.F90 b/src/gsi/gsimod.F90 index 2656a2dce4..70618120d0 100644 --- a/src/gsi/gsimod.F90 +++ b/src/gsi/gsimod.F90 @@ -176,7 +176,8 @@ module gsimod i_coastline,i_gsdqc,qv_max_inc,ioption,l_precip_clear_only,l_fog_off,& cld_bld_coverage,cld_clr_coverage,& i_cloud_q_innovation,i_ens_mean,DTsTmax,& - i_T_Q_adjust,l_saturate_bkCloud,l_rtma3d,i_precip_vertical_check + i_T_Q_adjust,l_saturate_bkCloud,l_rtma3d,i_precip_vertical_check, & + corp_howv, hwllp_howv use gsi_metguess_mod, only: gsi_metguess_init,gsi_metguess_final use gsi_chemguess_mod, only: gsi_chemguess_init,gsi_chemguess_final use tcv_mod, only: init_tcps_errvals,tcp_refps,tcp_width,tcp_ermin,tcp_ermax @@ -503,6 +504,9 @@ module gsimod ! 3. fv3_cmaq_regional = .true. ! 4. berror_fv3_cmaq_regional = .true. ! 09-15-2022 yokota - add scale/variable/time-dependent localization +! 2023-07-30 Zhao - added namelist options for analysis of significant wave height +! (aka howv in GSI code): corp_howv, hwllp_howv +! (in namelist session rapidrefresh_cldsurf) ! !EOP !------------------------------------------------------------------------- @@ -1560,6 +1564,10 @@ module gsimod ! = 2(clean Qg as in 1, and adjustment to the retrieved Qr/Qs/Qnr throughout the whole profile) ! = 3(similar to 2, but adjustment to Qr/Qs/Qnr only below maximum reflectivity level ! and where the dbz_obs is missing); +! corp_howv - real, static background error of howv (stddev error) +! = 0.42 meters (default) +! hwllp_howv - real, background error de-correlation length scale of howv +! = 170,000.0 meters (default 170 km) ! namelist/rapidrefresh_cldsurf/dfi_radar_latent_heat_time_period, & metar_impact_radius,metar_impact_radius_lowcloud, & @@ -1580,7 +1588,8 @@ module gsimod i_coastline,i_gsdqc,qv_max_inc,ioption,l_precip_clear_only,l_fog_off,& cld_bld_coverage,cld_clr_coverage,& i_cloud_q_innovation,i_ens_mean,DTsTmax, & - i_T_Q_adjust,l_saturate_bkCloud,l_rtma3d,i_precip_vertical_check + i_T_Q_adjust,l_saturate_bkCloud,l_rtma3d,i_precip_vertical_check, & + corp_howv, hwllp_howv ! chem(options for gsi chem analysis) : ! berror_chem - .true. when background for chemical species that require diff --git a/src/gsi/m_berror_stats_reg.f90 b/src/gsi/m_berror_stats_reg.f90 index 2ff8a6aa94..601339e1ac 100644 --- a/src/gsi/m_berror_stats_reg.f90 +++ b/src/gsi/m_berror_stats_reg.f90 @@ -870,16 +870,17 @@ subroutine berror_read_wgt_reg(msig,mlat,corz,corp,hwll,hwllp,vz,rlsig,varq,qopt hwllp(i,n)=hwllp(i,nrf2_ps) end do else if (n==nrf2_howv) then - call read_howv_stats(mlat,1,2,cov_dum) + call read_howv_stats(mlat,1,2,cov_dum,mype) do i=1,mlat corp(i,n)=cov_dum(i,1,1) !#ww3 hwllp(i,n) = cov_dum(i,1,2) end do hwllp(0,n) = hwllp(1,n) hwllp(mlat+1,n) = hwllp(mlat,n) - - if (mype==0) print*, 'corp(i,n) = ', corp(:,n) - if (mype==0) print*, ' hwllp(i,n) = ', hwllp(:,n) + if (mype==0) then + print*, myname_, ' static BE corp( :,n) (for ', trim(adjustl(cvars2d(n))), ')= ', corp(:,n) + print*, myname_, ' static BE hwllp(:,n) (for ', trim(adjustl(cvars2d(n))), ')= ', hwllp(:,n) + end if ! corp(:,n)=cov_dum(:,1) !do i=1,mlat ! corp(i,n)=0.4_r_kind !#ww3 @@ -1055,7 +1056,7 @@ subroutine berror_read_wgt_reg(msig,mlat,corz,corp,hwll,hwllp,vz,rlsig,varq,qopt end subroutine berror_read_wgt_reg !++++ -subroutine read_howv_stats(nlat,nlon,npar,arrout) +subroutine read_howv_stats(nlat,nlon,npar,arrout,mype) !$$$ subprogram documentation block ! . . . . ! subprogram: read_howv_stats @@ -1090,6 +1091,9 @@ subroutine read_howv_stats(nlat,nlon,npar,arrout) ! program history log: ! 2016-08-03 stelios ! 2016-08-26 stelios : Compatible with GSI. +! 2023-07-30 Zhao - added code to set the background error +! standard deviation (corp_howv) and de-correlation +! length scale (hwllp_howv) for non-2DRTMA run ! input argument list: ! filename - The name of the file ! output argument list: @@ -1102,10 +1106,14 @@ subroutine read_howv_stats(nlat,nlon,npar,arrout) !$$$ end documentation block ! use kinds,only : r_kind, i_kind + use gridmod, only : twodvar_regional + use rapidrefresh_cldsurf_mod, only : corp_howv, hwllp_howv + use gsi_io, only : verbose ! implicit none ! Declare passed variables integer(i_kind), intent(in )::nlat,nlon,npar + integer(i_kind), intent(in ) :: mype ! "my" processor ID real(r_kind), dimension(nlat ,nlon, npar), intent( out)::arrout ! Declare local variables integer(i_kind) :: reclength,i,j,i_npar @@ -1117,12 +1125,18 @@ subroutine read_howv_stats(nlat,nlon,npar,arrout) ! filename(1) = 'howv_var_berr.bin' filename(2) = 'howv_lng_berr.bin' -! - arrout(:,:,1)=0.42_r_kind - arrout(:,:,2)=50000.0_r_kind +!-- first, assign the pre-defined values to corp and hwllp + if ( twodvar_regional ) then + arrout(:,:,1)=0.42_r_kind ! values were specified by Manuel and Stelio for 2DRTMA + arrout(:,:,2)=50000.0_r_kind ! values were specified by Manuel and Stelio for 2DRTMA + else + arrout(:,:,1) = corp_howv ! 0.42_r_kind used in 3dvar (default) if not set in namelist + arrout(:,:,2) = hwllp_howv ! 17000.0_r_kind used in 3dvar (default) if not set in namelist + end if reclength=nlat*r_kind -! +!-- secondly, if files for corp and hwllp are available, then read them in for +! corp and hwllp. If the files are not found, then use the pre-defined values. do i_npar = 1,npar inquire(file=trim(filename(i_npar)), exist=file_exists) if (file_exists)then @@ -1132,9 +1146,16 @@ subroutine read_howv_stats(nlat,nlon,npar,arrout) read(unit=lun34 ,rec=j) (arrout(i,j,i_npar), i=1,nlat) enddo close(unit=lun34) + if (verbose .and. mype .eq. 0) then + write(6,'(1x,A,1x,A2,1x,A)') trim(adjustl(myname)), '::', & + trim(filename(i_npar))//' is used for background error of howv.' + end if else - print*,myname, trim(filename(i_npar)) // ' does not exist' + if (verbose .and. mype .eq. 0) then + write(6,'(1x,A,1x,A2,1x,A)') trim(adjustl(myname)), '::', & + trim(filename(i_npar))//' does not exist for static BE of howv, using pre-defined values.' + end if end if end do end subroutine read_howv_stats diff --git a/src/gsi/rapidrefresh_cldsurf_mod.f90 b/src/gsi/rapidrefresh_cldsurf_mod.f90 index 1ee35fffba..122d2872d0 100644 --- a/src/gsi/rapidrefresh_cldsurf_mod.f90 +++ b/src/gsi/rapidrefresh_cldsurf_mod.f90 @@ -28,7 +28,11 @@ module rapidrefresh_cldsurf_mod ! option for checking and adjusting the profile of Qr/Qs/Qg/Qnr ! retrieved through cloud analysis to reduce the background ! reflectivity ghost in analysis. (default is 0) -! +! 2023-07-30 Zhao added options for analysis of significant wave height +! (SWH, aka howv in GSI code): +! corp_howv: to set the static background error of howv +! hwllp_howv: to set the de-correlation length scale +! i_howv_3dda: control the analysis of howv in 3D analysis (if howv is in anavinfo) ! ! Subroutines Included: ! sub init_rapidrefresh_cldsurf - initialize RR related variables to default values @@ -181,6 +185,18 @@ module rapidrefresh_cldsurf_mod ! = 2(clean Qg as in 1, and adjustment to the retrieved Qr/Qs/Qnr throughout the whole profile) ! = 3(similar to 2, but adjustment to Qr/Qs/Qnr only below maximum reflectivity level ! and where the dbz_obs is missing); +! corp_howv - namelist real, static BE of howv (standard error deviation) +! hwllp_howv - namelist real, static BE de-correlation length scale of howv +! i_howv_3dda - integer, control the analysis of howv in 3D analysis (either var or hybrid) +! = 0 (howv-off: default) : no analysis of howv in 3D analysis. +! = 1 (howv-on) : if variable name "howv" is found in anavinfo, +! set it to be 1 to turn on analysis of howv; +! note: in hybrid envar run, the static BE is redueced by beta_s (<1.0), +! since there is no ensemble of howv currently yet, then no ensemble +! contribution to the total BE of howv, so the total BE of howv is actually +! just the reduced static BE of howv. If to make the analysis of howv +! in hyrbid run is as similar as the analysis of howv in pure 3dvar run, +! the static BE of howv used in hybrid run needs to be tuned (inflated actually). ! ! attributes: ! language: f90 @@ -252,6 +268,8 @@ module rapidrefresh_cldsurf_mod public :: l_saturate_bkCloud public :: l_rtma3d public :: i_precip_vertical_check + public :: corp_howv, hwllp_howv + public :: i_howv_3dda logical l_hydrometeor_bkio real(r_kind) dfi_radar_latent_heat_time_period @@ -310,6 +328,8 @@ module rapidrefresh_cldsurf_mod logical l_saturate_bkCloud logical l_rtma3d integer(i_kind) i_precip_vertical_check + real(r_kind) :: corp_howv, hwllp_howv + integer(i_kind) :: i_howv_3dda contains @@ -325,6 +345,8 @@ subroutine init_rapidrefresh_cldsurf ! 2008-06-03 Hu initial build for cloud analysis ! 2010-03-29 Hu change names to init_rapidrefresh_cldsurf ! 2011--5-04 Todling inquire MetGuess for presence of hyrometeors & set default +! 2023-07-30 Zhao added code for initialization of some variables used +! in analysis of significant wave height ! ! input argument list: ! @@ -337,8 +359,12 @@ subroutine init_rapidrefresh_cldsurf !$$$ use kinds, only: i_kind use gsi_metguess_mod, only: gsi_metguess_get + use mpimod, only: mype + use state_vectors, only: ns2d,svars2d + implicit none integer(i_kind) ivar,i,ier + integer(i_kind) i2 logical have_hmeteor(5) character(len=2),parameter :: hydrometeors(5) = (/ 'qi', & 'ql', & @@ -418,6 +444,19 @@ subroutine init_rapidrefresh_cldsurf l_saturate_bkCloud= .true. l_rtma3d = .false. ! turn configuration for rtma3d off i_precip_vertical_check = 0 ! No check and adjustment to retrieved Qr/Qs/Qg (default) + corp_howv = 0.42_r_kind ! 0.42 meters (default) + hwllp_howv = 170000.0_r_kind ! 170,000.0 meters (170km as default for 3DRTMA, 50km is used in 2DRTMA) + i_howv_3dda = 0 ! no analysis of significant wave height (howv) in 3D analysis (default) + +!-- searching for specific variable in state variable list (reading from anavinfo) + do i2=1,ns2d + if ( trim(svars2d(i2))=='howv' .or. trim(svars2d(i2))=='HOWV' ) then + i_howv_3dda = 1 + if ( mype == 0 ) then + write(6,'(1x,A,1x,A8,1x,A,1x,I4)')"init_rapidrefresh_cldsurf: anavinfo svars2d (state variable): ",trim(adjustl(svars2d(i2))), " is found in anavinfo, set i_howv_3dda = ", i_howv_3dda + end if + end if + end do ! i2 : looping over 2-D anasv return end subroutine init_rapidrefresh_cldsurf diff --git a/src/gsi/read_prepbufr.f90 b/src/gsi/read_prepbufr.f90 index 9efd06418c..304fa62590 100644 --- a/src/gsi/read_prepbufr.f90 +++ b/src/gsi/read_prepbufr.f90 @@ -149,6 +149,8 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,& ! 2020-05-04 wu - no rotate_wind for fv3_regional ! 2020-09-05 CAPS(C. Tong) - add flag for new vadwind obs to assimilate around the analysis time only ! 2023-03-23 draper - add code for processing T2m and q2m for global system +! 2023-07-30 Zhao - added code to extract obs of significant wave height (howvob) from bufr record +! in prepbufr file for 3D analysis ! input argument list: ! infile - unit from which to read BUFR data @@ -1132,6 +1134,11 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,& if (howvob) call ufbint(lunin,owave,1,255,levs,owavestr) if (cldchob) call ufbint(lunin,cldceilh,1,255,levs,cldceilhstr) endif +! Extract obs of howv in 3D Analysis +! (if-block is to avoid potential issue if decoding the bufr record twice in 2DRTMA run) + if ( .not. twodvar_regional ) then + if (howvob) call ufbint(lunin,owave,1,255,levs,owavestr) + endif if(kx==224 .and. newvad) then call ufbint(lunin,fcstdat,3,255,levs,'UFC VFC TFC ') end if From ba5a2ca673cc54212dc1c3d1cb2a81f96b3ce075 Mon Sep 17 00:00:00 2001 From: hongli-wang <53354098+hongli-wang@users.noreply.github.com> Date: Fri, 29 Sep 2023 11:51:33 -0600 Subject: [PATCH 03/13] Refine PM2.5 DA for the RRFS_SD model (#609) **Description** Refine the PM2.5 DA for the RRFS_SD model by use of veg_type, which is used to decide whether the obs is in urban area or not. Different thresholds for innovations outside/inside urban areas will be used. Add new namelist parameters, such as threshold for innovations, anowbufr type Read in station terrain height, PM10 et al if extended BUFR format for anow air quality data is used Fixes #606 **Type of change** Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [X ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update **How Has This Been Tested?** **Checklist** - [X ] My code follows the style guidelines of this project - [X] I have performed a self-review of my own code - [X] I have commented my code, particularly in hard-to-understand areas - [ ] New and existing tests pass with my changes - [ ] Any dependent changes have been merged and published **DUE DATE for this PR is 9/22/2023.** If this PR is not merged into develop by this date, the PR will be closed and returned to the developer. --- src/gsi/chemmod.f90 | 40 ++++++++++++++++++------- src/gsi/gsimod.F90 | 15 ++++++++-- src/gsi/m_berror_stats_reg.f90 | 6 ++-- src/gsi/read_anowbufr.f90 | 50 +++++++++++++++++++++++++++----- src/gsi/satthin.F90 | 7 ++++- src/gsi/setuppm2_5.f90 | 53 ++++++++++++++++++++++------------ 6 files changed, 128 insertions(+), 43 deletions(-) diff --git a/src/gsi/chemmod.f90 b/src/gsi/chemmod.f90 index 14a90c818c..06bfe6dce6 100644 --- a/src/gsi/chemmod.f90 +++ b/src/gsi/chemmod.f90 @@ -40,21 +40,23 @@ module chemmod public :: naero_cmaq_fv3,aeronames_cmaq_fv3,imodes_cmaq_fv3 ! fv3smoke - public :: naero_smoke_fv3,aeronames_smoke_fv3,pm2_5_innov_threshold + public :: naero_smoke_fv3,aeronames_smoke_fv3 + public :: pm2_5_innov_threshold,pm2_5_urban_innov_threshold,pm2_5_bg_threshold + public :: pm10_innov_threshold,pm10_urban_innov_threshold,pm10_bg_threshold,pm10_obs_threshold public :: naero_gocart_wrf,aeronames_gocart_wrf public :: pm2_5_guess,init_pm2_5_guess,& aerotot_guess,init_aerotot_guess public :: init_chem - public :: berror_chem,berror_fv3_cmaq_regional,oneobtest_chem,maginnov_chem,magoberr_chem,oneob_type_chem,conconeobs + public :: berror_chem,berror_fv3_cmaq_regional,berror_fv3_sd_regional,oneobtest_chem,maginnov_chem,magoberr_chem,oneob_type_chem,conconeobs public :: oblat_chem,oblon_chem,obpres_chem,diag_incr,oneobschem public :: site_scale,nsites public :: tunable_error public :: in_fname,out_fname,incr_fname,maxstr public :: code_pm25_ncbufr,code_pm25_anowbufr public :: code_pm10_ncbufr,code_pm10_anowbufr - + public :: anowbufr_ext public :: l_aoderr_table public :: laeroana_gocart,laeroana_fv3cmaq,laeroana_fv3smoke,crtm_aerosol_model,crtm_aerosolcoeff_format,crtm_aerosolcoeff_file, & @@ -79,7 +81,8 @@ module chemmod integer(i_kind) :: icvt_cmaq_fv3 real(r_kind) :: raod_radius_mean_scale,raod_radius_std_scale real(r_kind) :: ppmv_conv = 96.06_r_kind/28.964_r_kind*1.0e+3_r_kind - real(r_kind) :: pm2_5_innov_threshold + real(r_kind) :: pm2_5_innov_threshold,pm2_5_urban_innov_threshold,pm2_5_bg_threshold + real(r_kind) :: pm10_innov_threshold,pm10_urban_innov_threshold,pm10_bg_threshold,pm10_obs_threshold logical :: wrf_pm2_5 @@ -90,7 +93,9 @@ module chemmod logical :: aero_ratios - logical :: oneobtest_chem,diag_incr,berror_chem,berror_fv3_cmaq_regional + logical :: oneobtest_chem,diag_incr,berror_chem + logical :: berror_fv3_cmaq_regional,berror_fv3_sd_regional + logical :: anowbufr_ext character(len=max_varname_length) :: oneob_type_chem integer(i_kind), parameter :: maxstr=256 real(r_kind) :: maginnov_chem,magoberr_chem,conconeobs,& @@ -103,7 +108,7 @@ module chemmod real(r_kind),parameter :: pm2_5_teom_max=900.0_r_kind !ug/m3 !some parameters need to be put here since convinfo file won't !accomodate, stands for maximum realistic value of surface pm2.5 - real(r_kind),parameter :: pm10_teom_max=150.0_r_kind !ug/m3 + real(r_kind),parameter :: pm10_teom_max=3000.0_r_kind !ug/m3 real(r_kind),parameter :: elev_missing=-9999.0_r_kind @@ -157,10 +162,10 @@ module chemmod 'AOLGAJ', 'AISO1J', 'AISO2J', 'AISO3J', 'ATRP1J', 'ATRP2J',& 'ASQTJ', 'AOLGBJ', 'AORGCJ'] ! fv3smoke - integer(i_kind), parameter :: naero_smoke_fv3=2 + integer(i_kind), parameter :: naero_smoke_fv3=3 character(len=max_varname_length), dimension(naero_smoke_fv3), parameter :: & - aeronames_smoke_fv3=[character(len=max_varname_length) :: 'smoke','dust' ] + aeronames_smoke_fv3=[character(len=max_varname_length) :: 'smoke','dust','coarsepm'] ! FV3CMAQ integer(i_kind), parameter :: naero_cmaq_fv3=70 ! !number of cmaq aerosol species aero6 @@ -286,8 +291,15 @@ subroutine init_chem !initialiazes default values to &CHEM namelist parameters berror_chem=.false. - berror_fv3_cmaq_regional=.false. ! Set .true. to use berror for fv3_cmaq_regional, whose cv has 10 characters + berror_fv3_cmaq_regional=.false. ! .False. : Dont perform aerosal DA for the online RRFS_CMAQ model so dont need to read in B for RRFS_CMAQ. + ! .true. : Use berror for fv3_cmaq_regional, whose cv has 10 characters + berror_fv3_sd_regional=.false. ! .False. : Dont perform aerosal DA for the RRFS_SD model so dont need to read in B for RRFS_SD. + ! .true. to use berror for rrfs_sd model, whose cv has 10 characters oneobtest_chem=.false. + anowbufr_ext=.false. ! .False. : use default anowbufr data + ! .True. : use the extented bufr data + ! that includes PM10, station elevation + ! etal in addition to pm2.5. maginnov_chem=30_r_kind magoberr_chem=2_r_kind oneob_type_chem='pm2_5' @@ -307,9 +319,15 @@ subroutine init_chem laeroana_gocart = .false. laeroana_fv3cmaq = .false. ! .true. for performing aerosol analysis for regional FV3-CMAQ model(Please other parameters requred in gsimod.F90) laeroana_fv3smoke = .false. - pm2_5_innov_threshold = 20.0_r_kind + pm2_5_innov_threshold = 15.0_r_kind + pm2_5_urban_innov_threshold = 30.0_r_kind + pm2_5_bg_threshold = 2.0_r_kind + pm10_innov_threshold = 15.0_r_kind + pm10_urban_innov_threshold = 30.0_r_kind + pm10_bg_threshold = 2.0_r_kind + pm10_obs_threshold = 140.0_r_kind ! Barry's manuscript l_aoderr_table = .false. - icvt_cmaq_fv3 = 1 ! 1. Control variable is individual aerosol specie; 2: CV is total mass per I,J,K mode + icvt_cmaq_fv3 = 1 ! 1: Control variable is individual aerosol specie; 2: CV is total mass per I,J,K mode raod_radius_mean_scale = 1.0_r_kind ! Tune radius of particles when calculating AOD using CRTM raod_radius_std_scale = 1.0_r_kind ! Tune standard deviation of particles when calculating AOD using CRTM with CMAQ LUTs. aod_qa_limit = 3 diff --git a/src/gsi/gsimod.F90 b/src/gsi/gsimod.F90 index 70618120d0..d0ca1c0fbf 100644 --- a/src/gsi/gsimod.F90 +++ b/src/gsi/gsimod.F90 @@ -182,12 +182,15 @@ module gsimod use gsi_chemguess_mod, only: gsi_chemguess_init,gsi_chemguess_final use tcv_mod, only: init_tcps_errvals,tcp_refps,tcp_width,tcp_ermin,tcp_ermax use chemmod, only : init_chem,berror_chem,berror_fv3_cmaq_regional,oneobtest_chem,& + berror_fv3_sd_regional,& maginnov_chem,magoberr_chem,& oneob_type_chem,oblat_chem,& + anowbufr_ext,& oblon_chem,obpres_chem,diag_incr,elev_tolerance,tunable_error,& in_fname,out_fname,incr_fname, & laeroana_gocart, l_aoderr_table, aod_qa_limit, luse_deepblue, lread_ext_aerosol, & - laeroana_fv3cmaq,laeroana_fv3smoke,pm2_5_innov_threshold,crtm_aerosol_model,crtm_aerosolcoeff_format,crtm_aerosolcoeff_file, & + laeroana_fv3cmaq,laeroana_fv3smoke,pm2_5_innov_threshold,pm2_5_urban_innov_threshold,pm2_5_bg_threshold,& + crtm_aerosol_model,crtm_aerosolcoeff_format,crtm_aerosolcoeff_file, & icvt_cmaq_fv3, raod_radius_mean_scale,raod_radius_std_scale use chemmod, only : wrf_pm2_5,aero_ratios @@ -1594,6 +1597,12 @@ module gsimod ! chem(options for gsi chem analysis) : ! berror_chem - .true. when background for chemical species that require ! conversion to lower case and/or species names longer than 5 chars +! berror_fv3_cmaq_regional - .true. use background error stat for online +! RRFS_CMAQ model. Control variable +! names extended up to 10 chars +! berror_fv3_sd_regional - .true. use background error stat for online +! RRFS_SD model. Control variable +! names extended up to 10 chars ! oneobtest_chem - one-ob trigger for chem constituent analysis ! maginnov_chem - O-B make-believe residual for one-ob chem test ! magoberr_chem - make-believe obs error for one-ob chem test @@ -1615,13 +1624,15 @@ module gsimod ! luse_deepblue - whether to use MODIS AOD from the deepblue algorithm ! lread_ext_aerosol - if true, reads aerfNN file for aerosol arrays rather than sigfNN (NGAC NEMS IO) - namelist/chem/berror_chem,berror_fv3_cmaq_regional,oneobtest_chem,maginnov_chem,magoberr_chem,& + namelist/chem/berror_chem,berror_fv3_cmaq_regional,berror_fv3_sd_regional,& + oneobtest_chem,anowbufr_ext,maginnov_chem,magoberr_chem,& oneob_type_chem,oblat_chem,oblon_chem,obpres_chem,& diag_incr,elev_tolerance,tunable_error,& in_fname,out_fname,incr_fname,& laeroana_gocart, laeroana_fv3cmaq,laeroana_fv3smoke,l_aoderr_table, aod_qa_limit, & crtm_aerosol_model,crtm_aerosolcoeff_format,crtm_aerosolcoeff_file, & icvt_cmaq_fv3,pm2_5_innov_threshold, & + pm2_5_innov_threshold,pm2_5_urban_innov_threshold,pm2_5_bg_threshold,& raod_radius_mean_scale,raod_radius_std_scale, luse_deepblue,& aero_ratios,wrf_pm2_5, lread_ext_aerosol diff --git a/src/gsi/m_berror_stats_reg.f90 b/src/gsi/m_berror_stats_reg.f90 index 601339e1ac..bf9fb20674 100644 --- a/src/gsi/m_berror_stats_reg.f90 +++ b/src/gsi/m_berror_stats_reg.f90 @@ -12,7 +12,7 @@ module m_berror_stats_reg use kinds,only : i_kind,r_kind use constants, only: zero,one,max_varname_length,half use gridmod, only: nsig - use chemmod, only : berror_chem,berror_fv3_cmaq_regional,upper2lower,lower2upper + use chemmod, only : berror_chem,berror_fv3_cmaq_regional,berror_fv3_sd_regional,upper2lower,lower2upper use m_berror_stats, only: usenewgfsberror,berror_stats implicit none @@ -312,7 +312,7 @@ subroutine berror_read_wgt_reg(msig,mlat,corz,corp,hwll,hwllp,vz,rlsig,varq,qopt use constants, only: zero,one,ten,three use mpeu_util,only: getindex use radiance_mod, only: icloud_cv,n_clouds_fwd,cloud_names_fwd - use chemmod, only: berror_fv3_cmaq_regional + use chemmod, only: berror_fv3_cmaq_regional,berror_fv3_sd_regional implicit none @@ -466,7 +466,7 @@ subroutine berror_read_wgt_reg(msig,mlat,corz,corp,hwll,hwllp,vz,rlsig,varq,qopt var=upper2lower(varshort) if (trim(var) == 'pm25') var = 'pm2_5' else - if ( berror_fv3_cmaq_regional) then + if ( berror_fv3_cmaq_regional .or. berror_fv3_sd_regional) then read(inerr,iostat=istat) varlong, isig var=varlong else diff --git a/src/gsi/read_anowbufr.f90 b/src/gsi/read_anowbufr.f90 index 1873d0b877..449ce5cdf8 100644 --- a/src/gsi/read_anowbufr.f90 +++ b/src/gsi/read_anowbufr.f90 @@ -50,7 +50,9 @@ subroutine read_anowbufr(nread,ndata,nodata,gstime,& iconc,ierror,ilat,ilon,itime,iid,ielev,isite,iikx,ilate,ilone,& elev_missing,site_scale,tunable_error,& code_pm25_ncbufr,code_pm25_anowbufr,& - code_pm10_ncbufr,code_pm10_anowbufr + code_pm10_ncbufr,code_pm10_anowbufr,& + anowbufr_ext,pm2_5_teom_max,pm10_teom_max + use mpimod, only: npe implicit none @@ -71,10 +73,12 @@ subroutine read_anowbufr(nread,ndata,nodata,gstime,& nyob=3,ndhr=4,ntyp=5,ncopopm=6 !see headr input format below integer(i_kind), parameter :: nfields=6 + integer(i_kind), parameter :: nfields_b=12 !output format parameters integer(i_kind), parameter:: nchanl=0,nreal=ilone real(r_kind),parameter :: r360 = 360.0_r_kind + real(r_kind),parameter :: r90 = 90.0_r_kind real(r_kind),parameter :: percent=1.e-2_r_kind real(r_kind), parameter :: anow_missing=1.0e11_r_kind,& @@ -96,8 +100,10 @@ subroutine read_anowbufr(nread,ndata,nodata,gstime,& real(r_kind), dimension(5) :: rinc character(len=8) :: subset character(len=80) :: headr + character(len=80) :: obstr real(r_double), dimension(nfields) :: indata + real(r_double), dimension(nfields_b) :: indata_a,indata_b real(r_kind) :: tdiff,obstime,t4dv real(r_kind) :: dlat,dlon,error_1,error_2,obserror,dlat_earth,dlon_earth @@ -141,7 +147,6 @@ subroutine read_anowbufr(nread,ndata,nodata,gstime,& ! reading each report from bufr do while (ireadmg(lunin,subset,idate) == 0) - if (trim(obstype)=='pm2_5') then if ( (subset == 'NC008031') .or. (subset == 'NC008032' ) ) then @@ -149,9 +154,16 @@ subroutine read_anowbufr(nread,ndata,nodata,gstime,& ncbufr=.true. write(6,*)'READ_PM2_5: AIRNOW data type, subset=',subset else if (subset == 'ANOWPM') then - headr='SID XOB YOB DHR TYP COPOPM' - anowbufr=.true. - write(6,*)'READ_PM2_5: AIRNOW data type, subset=',subset + if (anowbufr_ext) then + headr='SID XOB YOB DHR TYP T29 SQN PROCN RPT CAT TYPO TSIG' + obstr='TPHR QCIND COPOPM ELV COPOPM10 COPOCO' + anowbufr=.true. + write(6,*)'READ_PM2_5_BUFR_EXT: AIRNOW data type, subset=',subset + else ! default ANOWBUFR Table + headr='SID XOB YOB DHR TYP COPOPM' + anowbufr=.true. + write(6,*)'READ_PM2_5: AIRNOW data type, subset=',subset + end if else cycle endif @@ -162,6 +174,17 @@ subroutine read_anowbufr(nread,ndata,nodata,gstime,& headr='PTID CLONH CLATH TPHR TYPO COPOPM' ncbufr=.true. write(6,*)'READ_PM10: AIRNOW data type, subset=',subset + else if (subset == 'ANOWPM') then + if (anowbufr_ext) then + headr='SID XOB YOB DHR TYP T29 SQN PROCN RPT CAT TYPO TSIG' + obstr='TPHR QCIND COPOPM ELV COPOPM10 COPOCO' + anowbufr=.true. + write(6,*)'READ_PM10_BUFR_EXT: AIRNOW data type, subset=',subset + else + headr='SID XOB YOB DHR TYP COPOPM' + anowbufr=.true. + write(6,*)'READ_PM10: AIRNOW data type, subset=',subset + end if else cycle endif @@ -176,8 +199,17 @@ subroutine read_anowbufr(nread,ndata,nodata,gstime,& imin=0 do while (ireadsb(lunin) == 0) - call ufbint(lunin,indata,nfields,1,iret,headr) - + if (anowbufr_ext) then + call ufbint(lunin,indata_a,nfields_b,1,iret,headr) + indata(1:5) = indata_a(1:5) + call ufbint(lunin,indata_b,nfields_b,1,iret,obstr) + if (trim(obstype)=='pm2_5') indata(ncopopm)=indata_b(3) + if (trim(obstype)=='pm10') indata(ncopopm)=indata_b(5) + site_elev = indata_b(4) + else + call ufbint(lunin,indata,nfields,1,iret,headr) + end if + if (anowbufr) then kx=indata(ntyp) read(sid,'(Z8)')site_id @@ -198,13 +230,15 @@ subroutine read_anowbufr(nread,ndata,nodata,gstime,& nread = nread + 1 conc=indata(ncopopm) - if ( iret > 0 .and. (conc < conc_missing ) .and. & (conc >= zero)) then if(indata(nxob) >= r360) indata(nxob) = indata(nxob) - r360 if(indata(nxob) < zero) indata(nxob) = indata(nxob) + r360 + if(indata(nxob) > r360)cycle + if(indata(nyob) > r90)cycle + dlon_earth_deg=indata(nxob) dlat_earth_deg=indata(nyob) diff --git a/src/gsi/satthin.F90 b/src/gsi/satthin.F90 index 02d19b198c..2018d80be7 100644 --- a/src/gsi/satthin.F90 +++ b/src/gsi/satthin.F90 @@ -134,6 +134,8 @@ module satthin use obsmod, only: time_window_max use constants, only: deg2rad,rearth_equator,zero,two,pi,half,one,& rad2deg,r1000 + use chemmod, only: laeroana_fv3smoke + implicit none ! set default to private @@ -961,7 +963,10 @@ subroutine getsfc(mype,mype_io,use_sfc,use_sfc_any) end if if (.not.lobserver) then if(allocated(veg_frac)) deallocate(veg_frac) - if(allocated(veg_type)) deallocate(veg_type) +! veg_type will be used in setuppm2_5.f90 for rrfs_sd PM2.5 DA + if(.not. laeroana_fv3smoke )then + if(allocated(veg_type)) deallocate(veg_type) + endif if(allocated(soil_type)) deallocate(soil_type) if(allocated(soil_moi)) deallocate(soil_moi) if(allocated(sfc_rough)) deallocate(sfc_rough) diff --git a/src/gsi/setuppm2_5.f90 b/src/gsi/setuppm2_5.f90 index 79e6129cd8..ad940cce78 100644 --- a/src/gsi/setuppm2_5.f90 +++ b/src/gsi/setuppm2_5.f90 @@ -94,8 +94,8 @@ subroutine setuppm2_5(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) use gsi_4dvar, only: nobs_bins,hr_obsbin use gridmod, only : get_ij,get_ijk - use guess_grids, only : nfldsig,hrdifsig + use guess_grids, only : veg_type use gsi_bundlemod, only : gsi_bundlegetpointer,GSI_BundlePrint use gsi_chemguess_mod, only : gsi_chemguess_get,gsi_chemguess_bundle use gsi_metguess_mod, only : gsi_metguess_get,gsi_metguess_bundle @@ -115,7 +115,8 @@ subroutine setuppm2_5(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) use chemmod, only: naero_gocart_wrf,aeronames_gocart_wrf,& upper2lower,lower2upper,laeroana_gocart,wrf_pm2_5 use chemmod, only: naero_cmaq_fv3,aeronames_cmaq_fv3,imodes_cmaq_fv3,laeroana_fv3cmaq - use chemmod, only: naero_smoke_fv3,aeronames_smoke_fv3,laeroana_fv3smoke,pm2_5_innov_threshold + use chemmod, only: naero_smoke_fv3,aeronames_smoke_fv3,laeroana_fv3smoke + use chemmod, only: pm2_5_innov_threshold,pm2_5_urban_innov_threshold,pm2_5_bg_threshold use gridmod, only : cmaq_regional,wrf_mass_regional,fv3_cmaq_regional implicit none @@ -146,7 +147,7 @@ subroutine setuppm2_5(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) real(r_kind) :: pm2_5ges real(r_kind) :: ratio_errors,error real(r_kind) :: innov,innov_error2,rwgt,valqc,tfact,innov_error,elevges,& - elevdiff,conc,elevobs,ps_ges,site_id,tv_ges + elevdiff,conc,elevobs,ps_ges,site_id,tv_ges,veg_type_ges real(r_kind) errinv_input,errinv_adjst,errinv_final real(r_kind) err_input,err_adjst,err_final @@ -278,7 +279,7 @@ subroutine setuppm2_5(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) call stop2(453) endif - do i=2,naero_smoke_fv3 + do i=2,naero_smoke_fv3-1 ! remove contribution from coarsepm aeroname=trim(aeronames_smoke_fv3(i)) call gsi_bundlegetpointer(gsi_chemguess_bundle(1),trim(aeroname),& rank3,ier) @@ -705,13 +706,18 @@ subroutine setuppm2_5(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) if (wrf_mass_regional .or. fv3_cmaq_regional .or. laeroana_fv3smoke) then call tintrp2a11(ges_ps,ps_ges,dlat,dlon,dtime,hrdifsig,& mype,nfldsig) - call tintrp2a11(ges_tv(:,:,1,nfldsig),tv_ges,dlat,dlon,dtime,hrdifsig,& mype,nfldsig) conc=conc/(ps_ges*r1000/(rd*tv_ges)) endif - - +! + if (laeroana_fv3smoke) then + if (.not. allocated(veg_type)) then + print*,"VEG_TYPE NOT ALLOCATED, WILL NOT BE USED IN PM2.5 DA FOR RRFS_SD",mype + else + call intrp2a11(veg_type(:,:,1),veg_type_ges,dlat,dlon,mype) + endif + endif !if elevobs is known than calculate difference otherwise !assume that difference is acceptable @@ -740,17 +746,20 @@ subroutine setuppm2_5(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) mype,nfldsig) innov = conc - pm2_5ges if (laeroana_fv3smoke) then - if ( -1.0*innov >= pm2_5_innov_threshold .or. & - (innov > pm2_5_innov_threshold .and. pm2_5ges >=1.0_r_kind).or. & - (conc >= 40.0_r_kind .and. pm2_5ges >=1.0_r_kind).or. & - conc >= 100.0_r_kind ) then - innov = innov + if ( veg_type_ges == 13.0_r_kind ) then + if (abs(innov) < pm2_5_urban_innov_threshold) then + muse(i)=.false. + end if else - innov = 0.0_r_kind + if (abs(innov) < pm2_5_innov_threshold) then + muse(i)=.false. + end if + end if + + if (pm2_5ges < pm2_5_bg_threshold) then muse(i)=.false. end if if (tv_ges-273.15_r_kind < 5.0_r_kind) then - innov = 0.0_r_kind muse(i)=.false. end if @@ -770,21 +779,28 @@ subroutine setuppm2_5(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) mype,nfldsig) call tintrp2a11(pm25wc(:,:,:,2,nfldsig),pm25wc_ges(2),dlat,dlon,dtime,hrdifsig,& mype,nfldsig) - - if (pm25wc_ges(1) >= 1.0_r_kind) then + if (pm25wc_ges(1) >= pm2_5_bg_threshold) then pm25wc_ges(1)=1.0_r_kind else - pm25wc_ges(2)=0.0_r_kind + pm25wc_ges(1)=0.0_r_kind end if - if (pm25wc_ges(2) >= 1.0_r_kind) then + if (pm25wc_ges(2) >= pm2_5_bg_threshold) then pm25wc_ges(2)=1.0_r_kind else pm25wc_ges(2)=0.0_r_kind end if + if ( (pm25wc_ges(1)+pm25wc_ges(2)) < 1.0_r_kind ) then + muse(i) = .false. + end if else pm25wc_ges = 0.0_r_kind end if + if (oneobtest_chem) then + pm25wc_ges=1.0_r_kind + muse(i) = .true. + end if + error=one/data(ierror,i) ratio_errors=one/sqrt(real(dup(i))) innov_error = error*innov @@ -1115,6 +1131,7 @@ subroutine contents_netcdf_diag_(odiag) call nc_diag_metadata("Latitude", data(ilate,i) ) call nc_diag_metadata("Longitude", data(ilone,i) ) call nc_diag_metadata("Station_Elevation", data(ielev,i) ) + call nc_diag_metadata("Station_Veg_Type", veg_type_ges ) call nc_diag_metadata("Pressure", ps_ges ) call nc_diag_metadata("Height", data(ielev,i) ) call nc_diag_metadata("Time", dtime-time_offset ) From c56d7bc616057054f592653a7b4fd0438deace4a Mon Sep 17 00:00:00 2001 From: shoyokota <103961291+shoyokota@users.noreply.github.com> Date: Fri, 29 Sep 2023 21:27:50 -0400 Subject: [PATCH 04/13] GitHub Issue NOAA-EMC/GSI#604 Undefined values found in radar reflectivity direct DA (#605) **Description** To prevent some undefined values found in the radar reflectivity direct DA (if_model_dbz=T and l_use_dbz_directDA=F), corresponding parts are fixed. It doesn't change the result except for the case of the execution with the debug option. Fixes #604 **Type of change** - [x] Bug fix (non-breaking change which fixes an issue) **How Has This Been Tested?** The radar reflectivity DA test with the RRFS setting was done on Orion. After this modification, EnVar was completed even with the debug option. This modification didn't change the result in the test without the debug option. **Checklist** - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] New and existing tests pass with my changes - [x] Any dependent changes have been merged and published **Due date for this PR is 9/15/2023.** If this PR is not merged into `develop` by this date, the PR will be closed and returned to the developer. Co-authored-by: Sho Yokota --- src/gsi/read_dbz_nc.f90 | 16 ++++++++++------ src/gsi/setupdbz.f90 | 15 +++++++++------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/gsi/read_dbz_nc.f90 b/src/gsi/read_dbz_nc.f90 index f6ac9aa112..7f8604b9d2 100644 --- a/src/gsi/read_dbz_nc.f90 +++ b/src/gsi/read_dbz_nc.f90 @@ -69,11 +69,12 @@ subroutine read_dbz_nc(nread,ndata,nodata,infile,lunout,obstype,sis,hgtl_full,no use kinds, only: r_kind,r_double,i_kind,r_single use constants, only: zero,half,one,two,deg2rad,rad2deg, & one_tenth,r1000,r60,r60inv,r100,r400,grav_equator, & - eccentricity,somigliana,grav_ratio,grav,semi_major_axis,flattening + eccentricity,somigliana,grav_ratio,grav,semi_major_axis,flattening,r_missing use gridmod, only: tll2xy,nsig,nlat,nlon use obsmod, only: iadate,doradaroneob,oneoblat,oneoblon,oneobheight, & mintiltdbz,maxtiltdbz,minobrangedbz,maxobrangedbz,& static_gsi_nopcp_dbz,rmesh_dbz,zmesh_dbz + use gsi_4dvar, only: iwinbgn use hybrid_ensemble_parameters,only : l_hyb_ens use obsmod,only: radar_no_thinning,missing_to_nopcp use convinfo, only: nconvtype,ctwind,icuse,ioctype @@ -147,7 +148,7 @@ subroutine read_dbz_nc(nread,ndata,nodata,infile,lunout,obstype,sis,hgtl_full,no integer(i_kind) :: maxobs,nchanl,ilat,ilon,scount real(r_kind) :: thistiltr,thisrange,this_stahgt,thishgt - real(r_kind) :: thisazimuthr,t4dv, & + real(r_kind) :: thisazimuthr, & dlat,dlon,thiserr,thislon,thislat, & timeb real(r_kind) :: radartwindow @@ -337,6 +338,7 @@ subroutine read_dbz_nc(nread,ndata,nodata,infile,lunout,obstype,sis,hgtl_full,no call w3fs21(iadate,mins_an) !mins_an -integer number of mins snce 01/01/1978 rmins_an=mins_an !convert to real number + timeb=real(mins_an-iwinbgn,r_kind) !assume all observations are at the analysis time ivar = 1 @@ -453,7 +455,7 @@ subroutine read_dbz_nc(nread,ndata,nodata,infile,lunout,obstype,sis,hgtl_full,no ntmp=ndata ! counting moved to map3gridS - timedif=abs(t4dv) !don't know about this + timedif=zero ! assume all observations are at the analysis time crit1 = timedif/r6+half call map3grids(1,zflag,zl_thin,nlevz,thislat,thislon,& @@ -481,7 +483,10 @@ subroutine read_dbz_nc(nread,ndata,nodata,infile,lunout,obstype,sis,hgtl_full,no !!end modified for thinning - thisazimuthr=0.0_r_kind + thisazimuthr=r_missing + thistiltr=r_missing + this_stahgt=r_missing + thisrange=r_missing this_staid=radid !Via equivalence in declaration, value is propagated ! to rstation_id used below. cdata_all(1,iout) = thiserr ! reflectivity obs error (dB) - inflated/adjusted @@ -491,7 +496,7 @@ subroutine read_dbz_nc(nread,ndata,nodata,infile,lunout,obstype,sis,hgtl_full,no cdata_all(5,iout) = dbzQC(i,j,k) ! radar reflectivity factor cdata_all(6,iout) = thisazimuthr ! 90deg-azimuth angle (radians) - cdata_all(7,iout) = timeb*r60inv ! obs time (analyis relative hour) + cdata_all(7,iout) = timeb*r60inv ! obs time (relative hour from beginning of the DA window) cdata_all(8,iout) = ikx ! type cdata_all(9,iout) = thistiltr ! tilt angle (radians) cdata_all(10,iout)= this_stahgt ! station elevation (m) @@ -521,7 +526,6 @@ subroutine read_dbz_nc(nread,ndata,nodata,infile,lunout,obstype,sis,hgtl_full,no !---all looping done now print diagnostic output write(6,*)'READ_dBZ: Reached eof on radar reflectivity file' - write(6,*)'READ_dBZ: # volumes in input file =',nvol write(6,*)'READ_dBZ: # read in obs. number =',nread write(6,*)'READ_dBZ: # elevations outside time window =',numbadtime write(6,*)'READ_dBZ: # of noise obs to no precip obs =',num_nopcp diff --git a/src/gsi/setupdbz.f90 b/src/gsi/setupdbz.f90 index 068842cd6b..453c4a5f8d 100644 --- a/src/gsi/setupdbz.f90 +++ b/src/gsi/setupdbz.f90 @@ -590,14 +590,17 @@ subroutine setupdbz(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,radardbz_d ! Compute observation pressure (only used for diagnostics) dz = zges(k2)-zges(k1) dlnp = prsltmp(k2)-prsltmp(k1) - pobl = prsltmp(k1) + (dlnp/dz)*(zob-zges(k1)) - - presw = ten*exp(pobl) - if ( l_use_dbz_directDA ) then - presq = presw + pobl = prsltmp(k1) + (dlnp/dz)*(zob-zges(k1)) + presw = ten*exp(pobl) + presq = presw else - if( (k1 == k2) .and. (k1 == 1) ) presw=ten*exp(prsltmp(k1)) + if( (k1 == k2) .and. (k1 == 1) ) then + presw = ten*exp(prsltmp(k1)) + else + pobl = prsltmp(k1) + (dlnp/dz)*(zob-zges(k1)) + presw = ten*exp(pobl) + end if end if ! solution to Nan in some members only for EnKF which causes problem? From fae4bbfbb1124fe3ceced4c3639a53172ad2db26 Mon Sep 17 00:00:00 2001 From: Haidao Lin <63735768+HaidaoLin-NOAA@users.noreply.github.com> Date: Sat, 30 Sep 2023 09:26:52 -0600 Subject: [PATCH 05/13] fix a bug in read_obs.F90 missing N21 for EARS and DBnet (#630) This PR is to fix a bug in read_obs.F90 missing N21 for EARS and DBnet. Fixes #506 --- src/gsi/read_obs.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gsi/read_obs.F90 b/src/gsi/read_obs.F90 index cb4a7c4b8f..dab159bd0a 100644 --- a/src/gsi/read_obs.F90 +++ b/src/gsi/read_obs.F90 @@ -1065,7 +1065,7 @@ subroutine read_obs(ndata,mype) obstype == 'iasi' .or. obstype == 'atms') .and. & (dplat(i) == 'n17' .or. dplat(i) == 'n18' .or. & dplat(i) == 'n19' .or. dplat(i) == 'npp' .or. & - dplat(i) == 'n20' .or. & + dplat(i) == 'n20' .or. dplat(i) == 'n21' .or. & dplat(i) == 'metop-a' .or. dplat(i) == 'metop-b' .or. & dplat(i) == 'metop-c') ! direct broadcast from NESDIS/UW @@ -1076,7 +1076,7 @@ subroutine read_obs(ndata,mype) obstype == 'iasi') .and. & (dplat(i) == 'n17' .or. dplat(i) == 'n18' .or. & dplat(i) == 'n19' .or. dplat(i) == 'npp' .or. & - dplat(i) == 'n20' .or. & + dplat(i) == 'n20' .or. dplat(i) == 'n21' .or. & dplat(i) == 'metop-a' .or. dplat(i) == 'metop-b' .or. & dplat(i) == 'metop-c') From 25306a2bcb72f1bbe572a96f1f2b6b6e83109094 Mon Sep 17 00:00:00 2001 From: ShunLiu-NOAA Date: Wed, 4 Oct 2023 16:03:47 -0400 Subject: [PATCH 06/13] Turn off enspread reg (#635) In cplr_get_fv3_regional_ensperts.f90, "write_ens_sprd=.true." is hard-coded and overwrites the values in namelist. write_ens_sprd=.true." should be removed. Fixes #634 **Type of change** Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) --- src/gsi/cplr_get_fv3_regional_ensperts.f90 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gsi/cplr_get_fv3_regional_ensperts.f90 b/src/gsi/cplr_get_fv3_regional_ensperts.f90 index 5a3e72970d..5b8fb153b6 100644 --- a/src/gsi/cplr_get_fv3_regional_ensperts.f90 +++ b/src/gsi/cplr_get_fv3_regional_ensperts.f90 @@ -684,7 +684,6 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar) enddo ! it 4d loop ! CALCULATE ENSEMBLE SPREAD - write_ens_sprd=.true. if(write_ens_sprd ) then call this%ens_spread_dualres_regional(mype,en_perts,nelen) call mpi_barrier(mpi_comm_world,ierror) ! do we need this mpi_barrier here? From 978b7e76a53a6d5814efac17b212f5d788c7a5c3 Mon Sep 17 00:00:00 2001 From: Ming Hu Date: Fri, 6 Oct 2023 14:08:09 -0600 Subject: [PATCH 07/13] A bug fix in setupps (#638) A bug is found in setupps and setupspd: un-used observation is also marked as 1 in "Analysis_Usage_Flag". Remove a print statement in rfv3io to simply stdout. This is PR fixes #637 --- src/gsi/gsi_rfv3io_mod.f90 | 3 --- src/gsi/setupps.f90 | 2 +- src/gsi/setupspd.f90 | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gsi/gsi_rfv3io_mod.f90 b/src/gsi/gsi_rfv3io_mod.f90 index 6d16be7c13..d0cbd3afbd 100644 --- a/src/gsi/gsi_rfv3io_mod.f90 +++ b/src/gsi/gsi_rfv3io_mod.f90 @@ -2610,9 +2610,6 @@ subroutine gsi_fv3ncdf_readuv(grd_uv,ges_u,ges_v,fv3filenamegin) members(mm1) = mype endif - write(6,115)mype,kbgn,kend,procuse -115 format('gsi_fv3ncdf_readuv: mype ',i6,' has kbgn,kend= ',2(i6,1x),' set procuse ',l7) - call mpi_allreduce(members,members_read,npe,mpi_integer,mpi_max,mpi_comm_world,ierror) nread=0 diff --git a/src/gsi/setupps.f90 b/src/gsi/setupps.f90 index 118ccb45d2..f376f9ffde 100644 --- a/src/gsi/setupps.f90 +++ b/src/gsi/setupps.f90 @@ -904,7 +904,7 @@ subroutine contents_netcdf_diag_(odiag) if(muse(i)) then call nc_diag_metadata("Analysis_Use_Flag", 1.0_r_single ) else - call nc_diag_metadata("Analysis_Use_Flag", 1.0_r_single ) + call nc_diag_metadata("Analysis_Use_Flag", -1.0_r_single ) endif call nc_diag_metadata_to_single("Errinv_Input", errinv_input ) diff --git a/src/gsi/setupspd.f90 b/src/gsi/setupspd.f90 index 64366394cb..150799bf2c 100644 --- a/src/gsi/setupspd.f90 +++ b/src/gsi/setupspd.f90 @@ -962,7 +962,7 @@ subroutine contents_netcdf_diag_(odiag) if(muse(i)) then call nc_diag_metadata("Analysis_Use_Flag", 1.0_r_single ) else - call nc_diag_metadata("Analysis_Use_Flag", 1.0_r_single ) + call nc_diag_metadata("Analysis_Use_Flag", -1.0_r_single ) endif call nc_diag_metadata_to_single("Errinv_Input",errinv_input ) From f76d872859257bfa614d6f6395132700ca6b1b77 Mon Sep 17 00:00:00 2001 From: jderber-NOAA <75998838+jderber-NOAA@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:43:33 -0400 Subject: [PATCH 08/13] Replacement of float command with real command (#631) --- src/gsi/aniso_ens_util.f90 | 44 +- src/gsi/anisofilter.f90 | 50 +-- src/gsi/anisofilter_glb.f90 | 26 +- src/gsi/atms_spatial_average_mod.f90 | 2 +- src/gsi/balmod.f90 | 10 +- src/gsi/berror.f90 | 4 +- src/gsi/bkgvar_rewgt.f90 | 2 +- src/gsi/buddycheck_mod.f90 | 2 +- src/gsi/calc_fov_crosstrk.f90 | 2 +- src/gsi/compact_diffs.f90 | 54 +-- src/gsi/compute_derived.f90 | 2 +- src/gsi/compute_qvar3d.f90 | 4 +- src/gsi/cplr_get_fv3_regional_ensperts.f90 | 4 +- src/gsi/cplr_get_pseudo_ensperts.f90 | 10 +- src/gsi/cplr_get_wrf_mass_ensperts.f90 | 4 +- src/gsi/cplr_get_wrf_nmm_ensperts.f90 | 2 +- src/gsi/cplr_gfs_ensmod.f90 | 13 +- src/gsi/cplr_read_wrf_nmm_guess.f90 | 8 +- src/gsi/cplr_wrf_netcdf_interface.f90 | 4 +- src/gsi/deter_sfc_mod.f90 | 22 +- src/gsi/ens_spread_mod.f90 | 2 +- src/gsi/general_commvars_mod.f90 | 20 +- src/gsi/general_read_fv3atm.f90 | 3 +- src/gsi/general_read_gfsatm.f90 | 33 +- src/gsi/general_read_nemsaero.f90 | 3 +- src/gsi/general_spectral_transforms.f90 | 13 +- src/gsi/general_sub2grid_mod.f90 | 4 +- src/gsi/gengrid_vars.f90 | 4 +- src/gsi/gesinfo.F90 | 11 +- src/gsi/get_gefs_ensperts_dualres.f90 | 4 +- src/gsi/get_gefs_for_regional.f90 | 10 +- src/gsi/get_nmmb_ensperts.f90 | 2 +- src/gsi/gfs_stratosphere.f90 | 12 +- src/gsi/grdcrd.f90 | 4 +- src/gsi/gsd_update_mod.f90 | 2 +- src/gsi/gsdcloudlib_pseudoq_mod.f90 | 6 +- src/gsi/guess_grids.F90 | 6 +- src/gsi/hdraobmod.f90 | 2 +- src/gsi/hybrid_ensemble_isotropic.F90 | 2 +- src/gsi/intjcmod.f90 | 4 +- src/gsi/intrp2a.f90 | 12 +- src/gsi/m_berror_stats.f90 | 4 +- src/gsi/m_extOzone.F90 | 4 +- src/gsi/mod_fv3_lola.f90 | 4 +- src/gsi/mod_vtrans.f90 | 2 +- src/gsi/mod_wrfmass_to_a.f90 | 6 +- src/gsi/mp_compact_diffs_mod1.f90 | 24 +- src/gsi/ncepgfs_ghg.f90 | 4 +- src/gsi/ncepgfs_io.f90 | 10 +- src/gsi/ncepnems_io.f90 | 19 +- src/gsi/netcdfgfs_io.f90 | 4 +- src/gsi/nlmsas_ad.f90 | 6 +- src/gsi/polcarf.f90 | 4 +- src/gsi/prewgt.f90 | 4 +- src/gsi/prewgt_reg.f90 | 12 +- src/gsi/q_diag.f90 | 2 +- src/gsi/radinfo.f90 | 6 +- src/gsi/raflib.f90 | 4 +- src/gsi/rdgrbsst.f90 | 8 +- src/gsi/read_airs.f90 | 2 +- src/gsi/read_amsr2.f90 | 2 +- src/gsi/read_atms.f90 | 8 +- src/gsi/read_bufrtovs.f90 | 6 +- src/gsi/read_cris.f90 | 8 +- src/gsi/read_dbz_netcdf.f90 | 460 ++++++++++----------- src/gsi/read_files.f90 | 19 +- src/gsi/read_gfs_ozone_for_regional.f90 | 4 +- src/gsi/read_gmi.f90 | 6 +- src/gsi/read_goesglm.f90 | 34 +- src/gsi/read_goesndr.f90 | 2 +- src/gsi/read_iasi.f90 | 6 +- src/gsi/read_lidar.f90 | 2 +- src/gsi/read_nsstbufr.f90 | 2 +- src/gsi/read_ozone.f90 | 4 +- src/gsi/read_pblh.f90 | 2 +- src/gsi/read_prepbufr.f90 | 2 +- src/gsi/read_radar_wind_ascii.f90 | 242 +++++------ src/gsi/read_saphir.f90 | 10 +- src/gsi/read_wcpbufr.f90 | 2 +- src/gsi/reorg_metar_cloud.f90 | 10 +- src/gsi/rfdpar.f90 | 2 +- src/gsi/satthin.F90 | 4 +- src/gsi/setupbend.f90 | 6 +- src/gsi/setupdw.f90 | 4 +- src/gsi/setuplag.f90 | 2 +- src/gsi/setuplight.f90 | 2 +- src/gsi/setupoz.f90 | 6 +- src/gsi/setuppcp.f90 | 4 +- src/gsi/setupq.f90 | 2 +- src/gsi/setupref.f90 | 6 +- src/gsi/setupspd.f90 | 2 +- src/gsi/setupt.f90 | 6 +- src/gsi/setuptcp.f90 | 4 +- src/gsi/setupw.f90 | 4 +- src/gsi/setupwspd10m.f90 | 2 +- src/gsi/sfcobsqc.f90 | 2 +- src/gsi/smoothzrf.f90 | 2 +- src/gsi/ssmis_spatial_average_mod.f90 | 2 +- src/gsi/statsco.f90 | 8 +- src/gsi/statsconv.f90 | 74 ++-- src/gsi/statsoz.f90 | 4 +- src/gsi/statspcp.f90 | 2 +- src/gsi/statsrad.f90 | 2 +- src/gsi/stpjcmod.f90 | 2 +- src/gsi/support_2dvar.f90 | 22 +- src/gsi/tcv_mod.f90 | 8 +- src/gsi/tintrp2a.f90 | 16 +- src/gsi/tintrp3.f90 | 12 +- src/gsi/wind_fft.f90 | 8 +- src/gsi/write_fv3_spread.f90 | 6 +- src/gsi/write_incr.f90 | 6 +- 111 files changed, 817 insertions(+), 803 deletions(-) diff --git a/src/gsi/aniso_ens_util.f90 b/src/gsi/aniso_ens_util.f90 index f118bee40f..43f81216e4 100644 --- a/src/gsi/aniso_ens_util.f90 +++ b/src/gsi/aniso_ens_util.f90 @@ -122,8 +122,8 @@ subroutine ens_uv_to_psichi(u,v,truewind) do j=1,nlon rlon=region_lon(i,j) rlat=region_lat(i,j) - dlon=float(j)*one - dlat=float(i)*one + dlon=real(j,r_kind) + dlat=real(i,r_kind) ue=u(i,j) ve=v(i,j) call rotate_wind_ll2xy(ue,ve,ug,vg,rlon,dlon,dlat) @@ -440,13 +440,13 @@ subroutine ens_intpcoeffs_reg(ngrds,igbox,iref,jref,igbox0f,ensmask,enscoeff,gbl yg=rlat+90._r_kind+one end if - dxg=xg-float(floor(xg)) - dyg=yg-float(floor(yg)) + dxg=xg-real(floor(xg),r_kind) + dyg=yg-real(floor(yg),r_kind) dxg1=one-dxg dyg1=one-dyg - if (xg>=one .and. xg<=float(jxp) .and. & - yg>=one .and. yg<=float(iy) ) then + if (xg>=one .and. xg<=real(jxp,r_kind) .and. & + yg>=one .and. yg<=real(iy,r_kind) ) then enscoeff(1,i,j,kg)=dxg1*dyg1 enscoeff(2,i,j,kg)=dxg1*dyg @@ -479,9 +479,9 @@ subroutine ens_intpcoeffs_reg(ngrds,igbox,iref,jref,igbox0f,ensmask,enscoeff,gbl endif do j=1,iy - yg=float(j)*one + yg=real(j,r_kind) do i=1,jx - xg=float(i)*one + xg=real(i,r_kind) call w3fb12(xg,yg,alat1,elon1,ds,elonv,alatan,rlat,rlon,ierr8) rlon=rlon/rad2deg rlat=rlat/rad2deg @@ -620,34 +620,34 @@ subroutine ens_intpcoeffs_reg(ngrds,igbox,iref,jref,igbox0f,ensmask,enscoeff,gbl igbox(2,kg)=iimax0(kg) igbox(3,kg)=jjmin0(kg) igbox(4,kg)=jjmax0(kg) - igbox0f(1,kg)=one+float((igbox(1,kg)-1))/pf2aP1%grid_ratio_lat + ijadjust - igbox0f(2,kg)=one+float((igbox(2,kg)-1))/pf2aP1%grid_ratio_lat - ijadjust - igbox0f(3,kg)=one+float((igbox(3,kg)-1))/pf2aP1%grid_ratio_lon + ijadjust - igbox0f(4,kg)=one+float((igbox(4,kg)-1))/pf2aP1%grid_ratio_lon - ijadjust + igbox0f(1,kg)=one+real(igbox(1,kg)-1,r_kind)/pf2aP1%grid_ratio_lat + ijadjust + igbox0f(2,kg)=one+real(igbox(2,kg)-1,r_kind)/pf2aP1%grid_ratio_lat - ijadjust + igbox0f(3,kg)=one+real(igbox(3,kg)-1,r_kind)/pf2aP1%grid_ratio_lon + ijadjust + igbox0f(4,kg)=one+real(igbox(4,kg)-1,r_kind)/pf2aP1%grid_ratio_lon - ijadjust end do !==> compute blending functions do i=1,pf2aP1%nlatf - dist1=float(igbox0f(1,1)-i) - dist2=float(i-igbox0f(2,1)) + dist1=real(igbox0f(1,1)-i,r_kind) + dist2=real(i-igbox0f(2,1),r_kind) gblend_b(i,1)=half*(one-tanh(dist1)) !relax to zero gblend_t(i,1)=half*(one-tanh(dist2)) !outside 212 grid - dist1=float(igbox0f(1,2)-i) - dist2=float(i-igbox0f(2,2)) + dist1=real(igbox0f(1,2)-i,r_kind) + dist2=real(i-igbox0f(2,2),r_kind) gblend_b(i,2)=half*(one-tanh(dist1)) !relax to zero gblend_t(i,2)=half*(one-tanh(dist2)) !outside 221 grid end do do j=1,pf2aP1%nlonf - dist1=float(igbox0f(3,1)-j) - dist2=float(j-igbox0f(4,1)) + dist1=real(igbox0f(3,1)-j,r_kind) + dist2=real(j-igbox0f(4,1),r_kind) gblend_l(j,1)=half*(one-tanh(dist1)) !relax to zero gblend_r(j,1)=half*(one-tanh(dist2)) !outside 212 grid - dist1=float(igbox0f(3,2)-j) - dist2=float(j-igbox0f(4,2)) + dist1=real(igbox0f(3,2)-j,r_kind) + dist2=real(j-igbox0f(4,2),r_kind) gblend_l(j,2)=half*(one-tanh(dist1)) !relax to zero gblend_r(j,2)=half*(one-tanh(dist2)) !outside 221 grid end do @@ -1141,10 +1141,10 @@ subroutine ens_fill(ur,na,nb,u,nxx,ny,itap,no_wgt_in) no_wgt=.false. if(no_wgt_in) no_wgt=.true. - pionp1=four*atan(one)/float(itap+1) + pionp1=four*atan(one)/real(itap+1,r_kind) do i=1,itap - xi=float(i) + xi=real(i,r_kind) wt(i)=half+half*cos(pionp1*xi) enddo diff --git a/src/gsi/anisofilter.f90 b/src/gsi/anisofilter.f90 index ec05d191ba..c05c764a05 100755 --- a/src/gsi/anisofilter.f90 +++ b/src/gsi/anisofilter.f90 @@ -596,7 +596,7 @@ subroutine anprewgt_reg(mype) do i=indices%ips,indices%ipe l =max(min(int(rllatf(i,j)),mlat),1) lp=min((l+1),mlat) - dl2=rllatf(i,j)-float(l) + dl2=rllatf(i,j)-real(l,r_kind) dl1=one-dl2 if (ivar <= nrf) then if (nrf_3d(ivar)) then @@ -1056,7 +1056,7 @@ subroutine get_aspect_reg_pt(mype) asp3=scalex3*asp3 endif - rk1=float(k1-44) + rk1=real(k1-44,r_kind) fblend=half*(one-tanh(rk1))! one if (nvar_id(k) /= nrf3_loc(nrf3_q)) then @@ -1126,7 +1126,7 @@ subroutine fact_qopt2(factk,rh,kvar) d =20.0_r_kind * rh + one n =int(d) np =n+1 - dn2=d-float(n) + dn2=d-real(n,r_kind) dn1=one-dn2 n =min0(max(1,n) ,25) np=min0(max(1,np),25) @@ -2407,7 +2407,7 @@ subroutine read_bckgstats(mype) do k=1,nsig vzimax(k,n)=maxval(one/vz(k,0:mlat+1,n)) vzimin(k,n)=minval(one/vz(k,0:mlat+1,n)) - vziavg(k,n)=sum((one/vz(k,0:mlat+1,n)))/float(mlat+2) + vziavg(k,n)=sum((one/vz(k,0:mlat+1,n)))/real(mlat+2,r_kind) end do if(print_verbose) then do k=1,nsig @@ -2428,13 +2428,13 @@ subroutine read_bckgstats(mype) do n=1,nrf3 do k=1,nsig - corzavg(k,n)=sum(corz(1:mlat,k,n))/float(mlat) - hwllavg(k,n)=sum(hwll(0:mlat+1,k,n))/float(mlat+2) + corzavg(k,n)=sum(corz(1:mlat,k,n))/real(mlat,r_kind) + hwllavg(k,n)=sum(hwll(0:mlat+1,k,n))/real(mlat+2,r_kind) end do end do do n=1,nvars-nrf3 - corpavg(n)=sum(corp(1:mlat,n))/float(mlat) - hwllpavg(n)=sum(hwllp(0:mlat+1,n))/float(mlat+2) + corpavg(n)=sum(corp(1:mlat,n))/real(mlat,r_kind) + hwllpavg(n)=sum(hwllp(0:mlat+1,n))/real(mlat+2,r_kind) end do do j=1,mlat @@ -2869,7 +2869,7 @@ subroutine isotropic_scales(scale1,scale2,scale3,k) else l =max(min(int(rllatf(i,j)),mlat),1) lp=min((l+1),mlat) - dl2=rllatf(i,j)-float(l) + dl2=rllatf(i,j)-real(l,r_kind) dl1=one-dl2 hwll_loc=dl1*hwll(l,k1,n)+dl2*hwll(lp,k1,n) end if @@ -2886,7 +2886,7 @@ subroutine isotropic_scales(scale1,scale2,scale3,k) l =max(min(int(rllatf(i,j)),mlat),1) lp=min((l+1),mlat) - dl2=rllatf(i,j)-float(l) + dl2=rllatf(i,j)-real(l,r_kind) dl1=one-dl2 hwll_loc=cc*(dl1*hwllp(l,n)+dl2*hwllp(lp,n)) scale3(i,j)=one @@ -2903,7 +2903,7 @@ subroutine isotropic_scales(scale1,scale2,scale3,k) l =max(min(int(rllatf(i,j)),mlat),1) lp=min((l+1),mlat) - dl2=rllatf(i,j)-float(l) + dl2=rllatf(i,j)-real(l,r_kind) dl1=one-dl2 hwll_loc=cc*(dl1*hwllp(l,nn)+dl2*hwllp(lp,nn)) scale3(i,j)=one @@ -3027,7 +3027,7 @@ subroutine get_theta_corrl_lenghts(mype) mcount0=lon2*lat2! It's OK to count buffer points call mpi_allreduce(pbar4a,pbar4(k),1,mpi_real8,mpi_sum,mpi_comm_world,ierror) call mpi_allreduce(mcount0,mcount,1,mpi_integer4,mpi_sum,mpi_comm_world,ierror) - pbar4(k)=pbar4(k)/float(mcount) + pbar4(k)=pbar4(k)/real(mcount,r_kind) if(print_verbose) write(6,*)'in get_theta_corrl_lenghts,k,pbar4=',k,pbar4(k) call w3fa03(pbar4(k),hgt4(k),tbar4(k),thetabar4(k)) end do @@ -3881,15 +3881,15 @@ subroutine get_aspect_reg_ens(mype) do j=1,pf2aP1%nlonf do i=1,pf2aP1%nlatf - ensv(i,j,k,1)=(ensv(i,j,k,1)+ensv(i,j,k,2)+ensv(i,j,k,3))/sqrt(float(nt1)) - ensv(i,j,k,2)= (ensv(i,j,k,2)+ensv(i,j,k,3))/sqrt(float(nt2)) - ensv(i,j,k,3)= ensv(i,j,k,3) /sqrt(float(nt3)) + ensv(i,j,k,1)=(ensv(i,j,k,1)+ensv(i,j,k,2)+ensv(i,j,k,3))/sqrt(real(nt1,r_kind)) + ensv(i,j,k,2)= (ensv(i,j,k,2)+ensv(i,j,k,3))/sqrt(real(nt2,r_kind)) + ensv(i,j,k,3)= ensv(i,j,k,3) /sqrt(real(nt3,r_kind)) if( ibldani==0 .or. ibldani==2 .or. ibldani==3 ) then do m=1,6 - c(m,1)=(aniasp(m,i,j,k,1)+aniasp(m,i,j,k,2)+aniasp(m,i,j,k,3))/float(nt1) - c(m,2)= (aniasp(m,i,j,k,2)+aniasp(m,i,j,k,3))/float(nt2) - c(m,3)= aniasp(m,i,j,k,3) /float(nt3) + c(m,1)=(aniasp(m,i,j,k,1)+aniasp(m,i,j,k,2)+aniasp(m,i,j,k,3))/real(nt1,r_kind) + c(m,2)= (aniasp(m,i,j,k,2)+aniasp(m,i,j,k,3))/real(nt2,r_kind) + c(m,3)= aniasp(m,i,j,k,3) /real(nt3,r_kind) end do do igd=1,3 qlx=max(qlxmin(ivar,k1),ensv(i,j,k,igd)) @@ -3906,9 +3906,9 @@ subroutine get_aspect_reg_ens(mype) end do else if(ibldani==1) then do m=1,6 - aniasp(m,i,j,k,1)=(aniasp(m,i,j,k,1)+aniasp(m,i,j,k,2)+aniasp(m,i,j,k,3))/float(nt1) - aniasp(m,i,j,k,2)= (aniasp(m,i,j,k,2)+aniasp(m,i,j,k,3))/float(nt2) - aniasp(m,i,j,k,3)= aniasp(m,i,j,k,3) /float(nt3) + aniasp(m,i,j,k,1)=(aniasp(m,i,j,k,1)+aniasp(m,i,j,k,2)+aniasp(m,i,j,k,3))/real(nt1,r_kind) + aniasp(m,i,j,k,2)= (aniasp(m,i,j,k,2)+aniasp(m,i,j,k,3))/real(nt2,r_kind) + aniasp(m,i,j,k,3)= aniasp(m,i,j,k,3) /real(nt3,r_kind) end do smax=real(maxval(ensv(i,j,k,1:3)),r_kind) aensv(1,k)=aensv(1,k)+max(smax ,qlxmin(ivar,k1))/nlatlonf @@ -5326,7 +5326,7 @@ subroutine get2berr_reg_subdomain_option(mype) l=max(min(int(rllatf(i,j)),mlat),1) lp=min((l+1),mlat) - dl2=rllatf(i,j)-float(l) + dl2=rllatf(i,j)-real(l,r_kind) dl1=one-dl2 if (ivar <= nrf) then if (nrf_3d(ivar)) then @@ -6520,7 +6520,7 @@ subroutine isotropic_scales_subdomain_option(scale1,scale2,scale3,k,mype) else l=int(rllat(iglob,jglob)) lp=l+1 - dl2=rllat(iglob,jglob)-float(l) + dl2=rllat(iglob,jglob)-real(l,r_kind) dl1=one-dl2 hwll_loc=dl1*hwll(l,k1,n)+dl2*hwll(lp,k1,n) scale3(i,j)=one/vz(k1,l,n) @@ -6536,7 +6536,7 @@ subroutine isotropic_scales_subdomain_option(scale1,scale2,scale3,k,mype) l=int(rllat(iglob,jglob)) lp=l+1 - dl2=rllat(iglob,jglob)-float(l) + dl2=rllat(iglob,jglob)-real(l,r_kind) dl1=one-dl2 hwll_loc=cc*(dl1*hwllp(l,n)+dl2*hwllp(lp,n)) scale3(i,j)=one @@ -6553,7 +6553,7 @@ subroutine isotropic_scales_subdomain_option(scale1,scale2,scale3,k,mype) l=int(rllat(iglob,jglob)) lp=l+1 - dl2=rllat(iglob,jglob)-float(l) + dl2=rllat(iglob,jglob)-real(l,r_kind) dl1=one-dl2 hwll_loc=cc*(dl1*hwllp(l,nn)+dl2*hwllp(lp,nn)) scale3(i,j)=one diff --git a/src/gsi/anisofilter_glb.f90 b/src/gsi/anisofilter_glb.f90 index 43e67a3baa..f79b26ab79 100644 --- a/src/gsi/anisofilter_glb.f90 +++ b/src/gsi/anisofilter_glb.f90 @@ -609,7 +609,7 @@ subroutine get_stat_factk(platf,ivar,kvar,factk,rh,dvsst) l =int(platf) lp=l+1 - dl2=platf-float(l) + dl2=platf-real(l,r_kind) dl1=one-dl2 l = min(max(1,l ),mlat) lp= min(max(1,lp),mlat) @@ -971,7 +971,7 @@ subroutine read_bckgstats_glb(mype) mcount0=lon2*lat2! It's OK to count buffer points call mpi_allreduce(pbar4a,pbar4(k),1,mpi_real8,mpi_sum,mpi_comm_world,ierror) call mpi_allreduce(mcount0,mcount,1,mpi_integer4,mpi_sum,mpi_comm_world,ierror) - pbar4(k)=pbar4(k)/float(mcount) + pbar4(k)=pbar4(k)/real(mcount,r_kind) end do psfc015=r015*pbar4(1) @@ -1160,7 +1160,7 @@ subroutine get_background_glb(mype) do ilat=1,pf2aP2%nlatf do ilon=1,pf2aP2%nlonf - if(((float(ilat)-rnf2)**2+(float(ilon)-rnf2)**2)>=rnf212) then + if(((real(ilat,r_kind)-rnf2)**2+(real(ilon,r_kind)-rnf2)**2)>=rnf212) then p2ilatf(ilat,ilon)=zero p3ilatf(ilat,ilon)=zero else @@ -1611,7 +1611,7 @@ subroutine get_aspect_pt(mype) cvar=='vp' .or. cvar=='VP' .or. & cvar=='t' .or. cvar=='T' - rk1=float(k1-kthres) + rk1=real(k1-kthres,r_kind) fblend=half*(one-tanh(rk1)) !--- zonal patch @@ -1757,7 +1757,7 @@ subroutine get_theta_corrl_lenghts_glb(mype) mcount0=lon2*lat2! It's OK to count buffer points call mpi_allreduce(pbar4a,pbar4(k),1,mpi_real8,mpi_sum,mpi_comm_world,ierror) call mpi_allreduce(mcount0,mcount,1,mpi_integer4,mpi_sum,mpi_comm_world,ierror) - pbar4(k)=pbar4(k)/float(mcount) + pbar4(k)=pbar4(k)/real(mcount,r_kind) call w3fa03(pbar4(k),hgt4(k),tbar4(k),thetabar4(k)) end do @@ -2605,9 +2605,9 @@ subroutine get_aspect_ens(mype) nt1=max(1,(nens(k)-1)) - s1=maxval(ensv_p0(:,:,k))/float(nt1) - s2=maxval(ensv_p2(:,:,k))/float(nt1) - s3=maxval(ensv_p3(:,:,k))/float(nt1) + s1=maxval(ensv_p0(:,:,k))/real(nt1,r_kind) + s2=maxval(ensv_p2(:,:,k))/real(nt1,r_kind) + s3=maxval(ensv_p3(:,:,k))/real(nt1,r_kind) smax=max(s1,s2,s3) if ( nkflag(k)==1 ) then @@ -3729,13 +3729,13 @@ subroutine ens_intpglb_coeff(iref,jref,enscoeff,mype) xg=rlon+one yg=rlat+90._r_kind+one - dxg =xg-float(floor(xg)) - dyg =yg-float(floor(yg)) + dxg =xg-real(floor(xg),r_kind) + dyg =yg-real(floor(yg),r_kind) dxg1=one-dxg dyg1=one-dyg - if (xg >= one .and. xg <= float(jxp) .and. & - yg >= one .and. yg <= float(iy) ) then + if (xg >= one .and. xg <= real(jxp,r_kind) .and. & + yg >= one .and. yg <= real(iy,r_kind) ) then enscoeff(1,i,j)=dxg1*dyg1 enscoeff(2,i,j)=dxg1*dyg enscoeff(3,i,j)=dxg *dyg1 @@ -3938,7 +3938,7 @@ subroutine ens_uv2psichi(work1,work2) vor_s = vor_s + grid_vor( 1,ix) vor_n = vor_n + grid_vor(ny,ix) end do - rnlon = one/float(nlon) + rnlon = one/real(nlon,r_kind) div_s = div_s*rnlon div_n = div_n*rnlon vor_s = vor_s*rnlon diff --git a/src/gsi/atms_spatial_average_mod.f90 b/src/gsi/atms_spatial_average_mod.f90 index b3e4aafc41..639bb8c99c 100644 --- a/src/gsi/atms_spatial_average_mod.f90 +++ b/src/gsi/atms_spatial_average_mod.f90 @@ -841,7 +841,7 @@ SUBROUTINE SFFTCB( X, N, M ) END DO J = J + K 104 CONTINUE - XT = 1.0_r_kind / FLOAT( N ) + XT = 1.0_r_kind / real( N,r_kind ) DO 99, I = 1, N X(I) = XT * X(I) 99 CONTINUE diff --git a/src/gsi/balmod.f90 b/src/gsi/balmod.f90 index 1b9fa9030b..1408530a3f 100644 --- a/src/gsi/balmod.f90 +++ b/src/gsi/balmod.f90 @@ -443,7 +443,7 @@ subroutine prebal_reg(cwcoveqqcov) do i=1,lat2 l=int(rllat1(i,j)) l2=min0(l+1,llmax) - dl2=rllat1(i,j)-float(l) + dl2=rllat1(i,j)-real(l,r_kind) dl1=one-dl2 bvk(i,j,k)=dl1*bvi(l,k)+dl2*bvi(l2,k) end do @@ -465,7 +465,7 @@ subroutine prebal_reg(cwcoveqqcov) do i=1,lat2 l=int(rllat1(i,j)) l2=min0(l+1,llmax) - dl2=rllat1(i,j)-float(l) + dl2=rllat1(i,j)-real(l,r_kind) dl1=one-dl2 agvk(i,j,m,k)=dl1*agvi(l,m,k)+dl2*agvi(l2,m,k) end do @@ -477,7 +477,7 @@ subroutine prebal_reg(cwcoveqqcov) do i=1,lat2 l=int(rllat1(i,j)) l2=min0(l+1,llmax) - dl2=rllat1(i,j)-float(l) + dl2=rllat1(i,j)-real(l,r_kind) dl1=one-dl2 wgvk(i,j,k)=dl1*wgvi(l,k)+dl2*wgvi(l2,k) end do @@ -972,7 +972,7 @@ subroutine locatelat_reg(mype) do j=1,nlon do i=1,nlat if(region_lat(i,j)>=clat_avn(mlat))then - rllat(i,j)=float(mlat) + rllat(i,j)=real(mlat,r_kind) llmax=max0(mlat,llmax) llmin=min0(mlat,llmin) else if(region_lat(i,j)=clat_avn(m)).and. & (region_lat(i,j) 0)then - skip2=float(npe)/float(nskip) + skip2=real(npe,r_kind)/real(nskip,r_kind) point=zero do i=1,nskip ipoint=min(max(0,nint(point)),npe) @@ -878,7 +878,7 @@ subroutine general_deter_subdomain_nolayout(npe,mype,nlat,nlon,regional, & ! Compute number of points on full grid and target number of ! point per mpi task (pe) npts=nlat*nlon - anperpe=float(npts)/float(npe) + anperpe=real(npts,r_kind)/real(npe,r_kind) ! Start with square subdomains nrnc=sqrt(anperpe) diff --git a/src/gsi/gengrid_vars.f90 b/src/gsi/gengrid_vars.f90 index a2d352c0b3..adbf510313 100644 --- a/src/gsi/gengrid_vars.f90 +++ b/src/gsi/gengrid_vars.f90 @@ -60,13 +60,13 @@ subroutine gengrid_vars ! This is global run, so get global lons, lats, wgtlats, wgtfactlats ! Set local constants - anlon=float(nlon) + anlon=real(nlon,r_kind) pih=half*pi dlon=two*pi/anlon ! Load grid lat,lon arrays. rbs2 is used in pcp. do i=1,nlon - rlons(i)=float(i-1)*dlon + rlons(i)=real(i-1,r_kind)*dlon coslon(i)=cos(rlons(i)) sinlon(i)=sin(rlons(i)) end do diff --git a/src/gsi/gesinfo.F90 b/src/gsi/gesinfo.F90 index 0aefd34c76..9d287de414 100644 --- a/src/gsi/gesinfo.F90 +++ b/src/gsi/gesinfo.F90 @@ -62,7 +62,8 @@ subroutine gesinfo ! nfsecondn FCST Secs (i_kind) numerator ! nfsecondd FCST Secs (i_kind) denominator ! -! %fhour = float(nfhour) + float(nfminute)/r60 + float(nfsecondn)/float(nfsecondd)/r3600 +! %fhour = real(nfhour,r_kind) + real(nfminute,r_kind)/r60 + & +! real(nfsecondn,r_kind)/real(nfsecondd,r_kind)/r3600 ! ! attributes: ! language: f90 @@ -312,8 +313,8 @@ subroutine gesinfo nfhour, nfminute, nfsecondn, nfsecondd call stop2(99) endif - gfshead%fhour = float(nfhour) + float(nfminute)/r60 + & - float(nfsecondn)/float(nfsecondd)/r3600 + gfshead%fhour = real(nfhour,r_kind) + real(nfminute,r_kind)/r60 + & + real(nfsecondn,r_kind)/real(nfsecondd,r_kind)/r3600 gfshead%idate(1) = idate(4) !hour gfshead%idate(3) = idate(3) !day @@ -551,7 +552,7 @@ subroutine gesinfo ida(:)=0 jda(:)=0 fha(:)=zero - fha(2)=-float(int(min_offset/60)) + fha(2)=-real(int(min_offset/60),r_kind) fha(3)=-(min_offset+fha(2)*r60) ida(1:3)=iadate(1:3) ida(5:6)=iadate(4:5) @@ -582,7 +583,7 @@ subroutine gesinfo ! Get time offset call time_4dvar(ianldate,time_offset) #ifdef RR_CLOUDANALYSIS - fha(2)=float(int(min_offset/60)) + fha(2)=real(int(min_offset/60),r_kind) fha(3)=(min_offset-fha(2)*r60) time_offset=time_offset+fha(3)/r60 #endif diff --git a/src/gsi/get_gefs_ensperts_dualres.f90 b/src/gsi/get_gefs_ensperts_dualres.f90 index bb5ee374af..ca551efa21 100644 --- a/src/gsi/get_gefs_ensperts_dualres.f90 +++ b/src/gsi/get_gefs_ensperts_dualres.f90 @@ -123,7 +123,7 @@ subroutine get_gefs_ensperts_dualres im=en_perts(1,1,1)%grid%im jm=en_perts(1,1,1)%grid%jm km=en_perts(1,1,1)%grid%km - bar_norm = one/float(n_ens) + bar_norm = one/real(n_ens,r_kind) sig_norm=sqrt(one/max(one,n_ens-one)) ! Create temporary communication information for read ensemble routines @@ -444,7 +444,7 @@ subroutine ens_spread_dualres(en_bar,ibin) call stop2(999) endif - sp_norm=(one/float(n_ens)) + sp_norm=(one/real(n_ens,r_kind)) sube%values=zero do n=1,n_ens diff --git a/src/gsi/get_gefs_for_regional.f90 b/src/gsi/get_gefs_for_regional.f90 index 43a88ef300..cc5e0a2c86 100644 --- a/src/gsi/get_gefs_for_regional.f90 +++ b/src/gsi/get_gefs_for_regional.f90 @@ -304,8 +304,8 @@ subroutine get_gefs_for_regional if (nframe /= 0) call error_msg(trim(my_name),trim(filename),'nframe', & 'getfilehead',istop,nframe) - fhour = float(nfhour) + float(nfminute)/r60 + & - float(nfsecondn)/float(nfsecondd)/r3600 + fhour = real(nfhour,r_kind) + real(nfminute,r_kind)/r60 + & + real(nfsecondn,r_kind)/real(nfsecondd,r_kind)/r3600 nlat_gfs=latb+2 nlon_gfs=lonb @@ -897,8 +897,8 @@ subroutine get_gefs_for_regional iimin=min(ii,iimin) jjmax=max(jj,jjmax) jjmin=min(jj,jjmin) - dlon_ens=float(jj) - dlat_ens=float(ii) + dlon_ens=real(jj,r_kind) + dlat_ens=real(ii,r_kind) dlon=one+(dlon_ens-one)*ratio_x dlat=one+(dlat_ens-one)*ratio_y call rotate_wind_ll2xy(work_sub(1,i,j,ku),work_sub(1,i,j,kv), & @@ -992,7 +992,7 @@ subroutine get_gefs_for_regional end do ! Convert to mean - bar_norm = one/float(n_ens_gfs) + bar_norm = one/real(n_ens_gfs,r_kind) do k=1,grd_mix%nsig do j=1,grd_mix%lon2 do i=1,grd_mix%lat2 diff --git a/src/gsi/get_nmmb_ensperts.f90 b/src/gsi/get_nmmb_ensperts.f90 index ece1780c03..4dc3254ccd 100644 --- a/src/gsi/get_nmmb_ensperts.f90 +++ b/src/gsi/get_nmmb_ensperts.f90 @@ -313,7 +313,7 @@ subroutine get_nmmb_ensperts end do ! end do over ensemble ! Convert to mean - bar_norm = one/float(n_ens) + bar_norm = one/real(n_ens,r_kind) en_bar%values=en_bar%values*bar_norm ! Copy pbar to module array. ps_bar may be needed for vertical localization diff --git a/src/gsi/gfs_stratosphere.f90 b/src/gsi/gfs_stratosphere.f90 index 22581b2db0..6014045c76 100644 --- a/src/gsi/gfs_stratosphere.f90 +++ b/src/gsi/gfs_stratosphere.f90 @@ -308,8 +308,8 @@ subroutine mix_gfs_nmmb_vcoords(deta1 ,aeta1 ,eta1 ,deta2 ,aeta2 ,eta2 ,pdtop,pt if (nframe /= 0) call error_msg(trim(my_name),trim(filename),'nframe', & 'getfilehead',istop,nframe) - fhour = float(nfhour) + float(nfminute)/r60 + & - float(nfsecondn)/float(nfsecondd)/r3600 + fhour = real(nfhour,r_kind) + real(nfminute,r_kind)/r60 + & + real(nfsecondn,r_kind)/real(nfsecondd,r_kind)/r3600 write(6,*) ' input filename=',filename write(6,*) ' nemsio head: fhour,idate=',fhour,idate write(6,*) ' nemsio head: levs=',levs @@ -1183,8 +1183,8 @@ subroutine add_gfs_stratosphere if ( nframe /= 0 ) call error_msg(trim(my_name),trim(filename),'nframe', & 'getfilehead',istop,nframe) - fhour = float(nfhour) + float(nfminute)/r60 + & - float(nfsecondn)/float(nfsecondd)/r3600 + fhour = real(nfhour,r_kind) + real(nfminute,r_kind)/r60 + & + real(nfsecondn,r_kind)/real(nfsecondd,r_kind)/r3600 if ( mype == 0 ) then write(6,*) ' input filename=',filename write(6,*) ' nemsio head: fhour,idate=',fhour,idate @@ -1545,8 +1545,8 @@ subroutine add_gfs_stratosphere jj=j+grd_mix%jstart(mm1)-2 ii=min(grd_mix%nlat,max(1,ii)) jj=min(grd_mix%nlon,max(1,jj)) - dlon=float(jj) - dlat=float(ii) + dlon=real(jj,r_kind) + dlat=real(ii,r_kind) do k=1,nsig_save xspli_r(k)=log(prsl_r(i,j,k)*ten) enddo diff --git a/src/gsi/grdcrd.f90 b/src/gsi/grdcrd.f90 index c20e02ce7f..bb655fc68b 100644 --- a/src/gsi/grdcrd.f90 +++ b/src/gsi/grdcrd.f90 @@ -63,7 +63,7 @@ subroutine grdcrd(d,nd,x,nx,flg) ix=isrchf(nx-1,x,d(id),flg)-1 end if end if - d(id)=float(ix)+(d(id)-x(ix))/(x(ix+1)-x(ix)) + d(id)=real(ix,r_kind)+(d(id)-x(ix))/(x(ix+1)-x(ix)) end do ! Treat special case of nx=1 @@ -135,7 +135,7 @@ subroutine grdcrd1(d,x,nx,flg) ix=isrchf(nx-1,x,d,flg)-1 end if end if - d=float(ix)+(d-x(ix))/(x(ix+1)-x(ix)) + d=real(ix,r_kind)+(d-x(ix))/(x(ix+1)-x(ix)) ! Treat special case of nx=1 elseif (nx==1) then diff --git a/src/gsi/gsd_update_mod.f90 b/src/gsi/gsd_update_mod.f90 index 7b43f55fb2..35f7663322 100644 --- a/src/gsi/gsd_update_mod.f90 +++ b/src/gsi/gsd_update_mod.f90 @@ -699,7 +699,7 @@ subroutine gsd_gen_coast_prox nip = nip+1 end do end do - hcoast_prox(1,i,j) = float(nco)/float (nip) + hcoast_prox(1,i,j) = real(nco,r_kind)/real(nip,r_kind) end if end do end do diff --git a/src/gsi/gsdcloudlib_pseudoq_mod.f90 b/src/gsi/gsdcloudlib_pseudoq_mod.f90 index b7544a860c..3b04558da7 100644 --- a/src/gsi/gsdcloudlib_pseudoq_mod.f90 +++ b/src/gsi/gsdcloudlib_pseudoq_mod.f90 @@ -192,9 +192,9 @@ SUBROUTINE cloudCover_Surface_col(mype,nsig, & endif ! convert cloud base observation from AGL to ASL - cl_base_ista = float(ocld(6+ic)) + Oelvtn - zh + cl_base_ista = real(ocld(6+ic),r_kind) + Oelvtn - zh if(zh < 1.0_r_kind .and. Oelvtn > 20.0_r_kind & - .and. float(ocld(6+ic)) < 250.0_r_kind) then + .and. real(ocld(6+ic),r_kind) < 250.0_r_kind) then cycle ! limit the use of METAR station over oceas for low cloud base endif @@ -267,7 +267,7 @@ SUBROUTINE cloudCover_Surface_col(mype,nsig, & ! -- Use visibility for low-level cloud whether if (wthr_type < 30 .and. wthr_type > 20 .and. & ocld(13) < 5000 .and. ocld(13) > 1 ) then - betav = 3.912_r_kind / (float(ocld(13)) / 1000._r_kind) + betav = 3.912_r_kind / (real(ocld(13),r_kind) / 1000._r_kind) vis2qc = ( (betav/144.7_r_kind) ** 1.14_r_kind) / 1000._r_kind endif ! cloud or clear diff --git a/src/gsi/guess_grids.F90 b/src/gsi/guess_grids.F90 index bf493a0628..0601959aad 100644 --- a/src/gsi/guess_grids.F90 +++ b/src/gsi/guess_grids.F90 @@ -1783,7 +1783,7 @@ subroutine load_gsdpbl_hgt(mype) k=1 DO while (abs(pbl_height(i,j,jj)) < 0.0001_r_kind) if( thetav(k) > thsfc + 1.0_r_kind ) then - pbl_height(i,j,jj) = float(k) - (thetav(k) - (thsfc + 1.0_r_kind))/ & + pbl_height(i,j,jj) = real(k,r_kind) - (thetav(k) - (thsfc + 1.0_r_kind))/ & max((thetav(k)-thetav(k-1)),0.01_r_kind) endif k=k+1 @@ -2318,7 +2318,7 @@ subroutine guess_grids_stats3d_(name,a,mype) end do end do end do - work_a(nsig+1)=float(lon1*lat1) + work_a(nsig+1)=real(lon1*lat1,r_kind) call mpi_allreduce(work_a,work_a1,nsig+1,mpi_rtype,mpi_sum,& mpi_comm_world,ierror) @@ -2386,7 +2386,7 @@ subroutine guess_grids_stats2d_(name,a,mype) work_a(1) = work_a(1) + a(i,j) end do end do - work_a(2)=float(lon1*lat1) + work_a(2)=real(lon1*lat1,r_kind) call mpi_allreduce(work_a,work_a1,2,mpi_rtype,mpi_sum,& mpi_comm_world,ierror) diff --git a/src/gsi/hdraobmod.f90 b/src/gsi/hdraobmod.f90 index 00abeb66be..c56b400909 100644 --- a/src/gsi/hdraobmod.f90 +++ b/src/gsi/hdraobmod.f90 @@ -580,7 +580,7 @@ subroutine read_hdraob(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,& ! Add obs reference time, then subtract analysis time to get obs ! time relative to analysis - time_correction=float(minobs-minan)*r60inv + time_correction=real(minobs-minan,r_kind)*r60inv else time_correction=zero diff --git a/src/gsi/hybrid_ensemble_isotropic.F90 b/src/gsi/hybrid_ensemble_isotropic.F90 index fc87026c98..4bad129a72 100644 --- a/src/gsi/hybrid_ensemble_isotropic.F90 +++ b/src/gsi/hybrid_ensemble_isotropic.F90 @@ -247,7 +247,7 @@ subroutine init_rf_z(z_len) kap1=rd_over_cp+one kapr=one/rd_over_cp nxy=grd_ens%latlon11 - rnsig=float(nsig) + rnsig=real(nsig,r_kind) ! use new factorization: diff --git a/src/gsi/intjcmod.f90 b/src/gsi/intjcmod.f90 index 2b093312ac..f36e9e4b26 100644 --- a/src/gsi/intjcmod.f90 +++ b/src/gsi/intjcmod.f90 @@ -740,7 +740,7 @@ subroutine intjcpdry(rval,sval,nbins,pjc) it=ntguessig mass=zero_quad - rcon=(one_quad/(two_quad*float(nlon)))**2 + rcon=(one_quad/(two_quad*real(nlon,r_quad)))**2 mm1=mype+1 do n=1,nbins @@ -1020,7 +1020,7 @@ subroutine intjcpdry2(rval,nbins,mass,pjc) integer(i_kind) :: n it=ntguessig - rcon=(one_quad/(two_quad*float(nlon)))**2 + rcon=(one_quad/(two_quad*real(nlon,r_quad)))**2 mm1=mype+1 do n=1,nbins diff --git a/src/gsi/intrp2a.f90 b/src/gsi/intrp2a.f90 index 0d2926b8c7..129b48059f 100644 --- a/src/gsi/intrp2a.f90 +++ b/src/gsi/intrp2a.f90 @@ -56,8 +56,8 @@ subroutine intrp2a(f,g,dx,dy,n,nlevs,mype) ix1=int(dx(i)) iy1=int(dy(i)) ix1=max(1,min(ix1,nlat)) - delx=dx(i)-float(ix1) - dely=dy(i)-float(iy1) + delx=dx(i)-real(ix1,r_kind) + dely=dy(i)-real(iy1,r_kind) delx=max(zero,min(delx,one)) ix=ix1-istart(mm1)+2 iy=iy1-jstart(mm1)+2 @@ -135,8 +135,8 @@ subroutine intrp2a1(f,g,dx,dy,nlevs,mype) ix1=int(dx) iy1=int(dy) ix1=max(1,min(ix1,nlat)) - delx=dx-float(ix1) - dely=dy-float(iy1) + delx=dx-real(ix1,r_kind) + dely=dy-real(iy1,r_kind) delx=max(zero,min(delx,one)) ix=ix1-istart(mm1)+2 iy=iy1-jstart(mm1)+2 @@ -211,8 +211,8 @@ subroutine intrp2a11(f,g,dx,dy,mype) ix1=int(dx) iy1=int(dy) ix1=max(1,min(ix1,nlat)) - delx=dx-float(ix1) - dely=dy-float(iy1) + delx=dx-real(ix1,r_kind) + dely=dy-real(iy1,r_kind) delx=max(zero,min(delx,one)) ix=ix1-istart(mm1)+2 iy=iy1-jstart(mm1)+2 diff --git a/src/gsi/m_berror_stats.f90 b/src/gsi/m_berror_stats.f90 index 808aee9954..088a7619fe 100644 --- a/src/gsi/m_berror_stats.f90 +++ b/src/gsi/m_berror_stats.f90 @@ -646,7 +646,7 @@ subroutine setcoroz_(coroz,mype) enddo enddo enddo - work_oz(nsig+1,mm1)=float(lon1*lat1) + work_oz(nsig+1,mm1)=real(lon1*lat1,r_kind) call mpi_allreduce(work_oz,work_oz1,(nsig+1)*npe,mpi_rtype,mpi_sum,& mpi_comm_world,ierror) @@ -869,7 +869,7 @@ subroutine setcorchem_(cname,corchem,rc) enddo enddo enddo - work_chem(nsig+1,mm1)=float(lon1*lat1) + work_chem(nsig+1,mm1)=real(lon1*lat1,r_kind) call mpi_allreduce(work_chem,work_chem1,(nsig+1)*npe,mpi_rtype,mpi_sum,& mpi_comm_world,ierror) diff --git a/src/gsi/m_extOzone.F90 b/src/gsi/m_extOzone.F90 index a28209292f..bf2b137466 100644 --- a/src/gsi/m_extOzone.F90 +++ b/src/gsi/m_extOzone.F90 @@ -1111,7 +1111,7 @@ subroutine ozlev_ncread_(dfile,dtype,ozout,nmrecs,ndata,nodata, gstime,twind) ozout(8,ndata)=usage ozout(9,ndata)=pob ! pressure ozout(10,ndata)=obserr ! ozone mixing ratio precision in ppmv - ozout(11,ndata)=float(ipos(ilev)) ! pointer of obs level index in ozinfo.txt + ozout(11,ndata)=real(ipos(ilev),r_kind) ! pointer of obs level index in ozinfo.txt ozout(12,ndata)=levs ! # of vertical levels ozout(13,ndata)=ppmv ! ozone mixing ratio in ppmv endif @@ -1424,7 +1424,7 @@ subroutine ozlev_bufrread_(dfile,dtype,dsis, ozout,nmrecs,ndata,nodata, & ozout( 8,ndata)=usage1(k) ! ozout( 9,ndata)=mlspres(k) ! mls pressure in log(cb) ozout(10,ndata)=mlsozpc(k) ! ozone mixing ratio precision in ppmv - ozout(11,ndata)=float(ipos(k)) ! pointer of obs level index in ozinfo.txt + ozout(11,ndata)=real(ipos(k),r_kind) ! pointer of obs level index in ozinfo.txt ozout(12,ndata)=nloz ! # of mls vertical levels ozout(13,ndata)=mlsoz(k) ! ozone mixing ratio in ppmv endif diff --git a/src/gsi/mod_fv3_lola.f90 b/src/gsi/mod_fv3_lola.f90 index 84f8144968..ebe0816c4a 100644 --- a/src/gsi/mod_fv3_lola.f90 +++ b/src/gsi/mod_fv3_lola.f90 @@ -321,10 +321,10 @@ subroutine generate_anl_grid(nx,ny,grid_lon,grid_lont,grid_lat,grid_latt) !!!! define analysis A grid !!!!!!!!!!!!! do j=1,nxa - xa_a(j)=(float(j-nlonh)-cx)*grid_ratio_fv3_regional + xa_a(j)=(real(j-nlonh,r_kind)-cx)*grid_ratio_fv3_regional end do do i=1,nya - ya_a(i)=(float(i-nlath)-cy)*grid_ratio_fv3_regional + ya_a(i)=(real(i-nlath,r_kind)-cy)*grid_ratio_fv3_regional end do !!!!!compute fv3 to A grid interpolation parameters !!!!!!!!! diff --git a/src/gsi/mod_vtrans.f90 b/src/gsi/mod_vtrans.f90 index 3c7d8af8f4..f9538e0735 100644 --- a/src/gsi/mod_vtrans.f90 +++ b/src/gsi/mod_vtrans.f90 @@ -269,7 +269,7 @@ subroutine create_vtrans(mype) ! count: ! Not clear if area weighting would be better. - count=one/float(nlat*nlon) + count=one/real(nlat*nlon,r_kind) ier=0 call gsi_bundlegetpointer (gsi_metguess_bundle(ntguessig),'ps',ges_ps_nt, istatus) diff --git a/src/gsi/mod_wrfmass_to_a.f90 b/src/gsi/mod_wrfmass_to_a.f90 index 716ff37f77..594f128709 100644 --- a/src/gsi/mod_wrfmass_to_a.f90 +++ b/src/gsi/mod_wrfmass_to_a.f90 @@ -312,7 +312,7 @@ subroutine wrfmass_obs_to_a8(obsba,nreal,maxobs,ilat,ilon,numobs) i=int(ria(n)+0.5_r_kind) j=int(rja(n)+0.5_r_kind) - adist=(ria(n)-float(i))*(ria(n)-float(i))+(rja(n)-float(j))*(rja(n)-float(j)) + adist=(ria(n)-real(i,r_kind))**2+(rja(n)-real(j,r_kind))**2 if(adist < dist(i,j)) then dist(i,j)=adist ija(i,j)=n @@ -324,8 +324,8 @@ subroutine wrfmass_obs_to_a8(obsba,nreal,maxobs,ilat,ilon,numobs) do i=1,nxa if(ija(i,j) > 0) then n=n+1 - obsba(ilon,n)=float(i) - obsba(ilat,n)=float(j) + obsba(ilon,n)=real(i,r_kind) + obsba(ilat,n)=real(j,r_kind) do k=3,nreal obsba(k,n)=obsa(k,ija(i,j)) enddo diff --git a/src/gsi/mp_compact_diffs_mod1.f90 b/src/gsi/mp_compact_diffs_mod1.f90 index bb924441b7..292986a56a 100644 --- a/src/gsi/mp_compact_diffs_mod1.f90 +++ b/src/gsi/mp_compact_diffs_mod1.f90 @@ -1550,8 +1550,8 @@ subroutine mp_compact_dlon(b,dbdx,vector) polu=polu+grid3(ix)*coslon(ix) polv=polv+grid3(ix)*sinlon(ix) end do - polu=polu/float(nlon) - polv=polv/float(nlon) + polu=polu/real(nlon,r_kind) + polv=polv/real(nlon,r_kind) do ix=1,nlon grid3pol(ix)=polu*coslon(ix)+polv*sinlon(ix) end do @@ -1673,8 +1673,8 @@ subroutine mp_compact_dlon_ad(b,dbdx,vector) polu=polu+grid3pol(ix)*coslon(ix) polv=polv+grid3pol(ix)*sinlon(ix) end do - polu=polu/float(nlon) - polv=polv/float(nlon) + polu=polu/real(nlon,r_kind) + polv=polv/real(nlon,r_kind) do ix=1,nlon grid3(ix)=grid3(ix)+polu*coslon(ix)+polv*sinlon(ix) end do @@ -1977,8 +1977,8 @@ subroutine mp_uv_pole(u,v) polsu=polsu+u(2,ix,k)*coslon(ix)+v(2,ix,k)*sinlon(ix) polsv=polsv+u(2,ix,k)*sinlon(ix)-v(2,ix,k)*coslon(ix) end do - polsu=polsu/float(nlon) - polsv=polsv/float(nlon) + polsu=polsu/real(nlon,r_kind) + polsv=polsv/real(nlon,r_kind) do ix=1,nlon u(1,ix,k)=polsu*coslon(ix)+polsv*sinlon(ix) v(1,ix,k)=polsu*sinlon(ix)-polsv*coslon(ix) @@ -1993,8 +1993,8 @@ subroutine mp_uv_pole(u,v) polnu=polnu+u(1,ix,k)*coslon(ix)-v(1,ix,k)*sinlon(ix) polnv=polnv+u(1,ix,k)*sinlon(ix)+v(1,ix,k)*coslon(ix) end do - polnu=polnu/float(nlon) - polnv=polnv/float(nlon) + polnu=polnu/real(nlon,r_kind) + polnv=polnv/real(nlon,r_kind) do ix=1,nlon u(2,ix,k)= polnu*coslon(ix)+polnv*sinlon(ix) v(2,ix,k)=-polnu*sinlon(ix)+polnv*coslon(ix) @@ -2055,8 +2055,8 @@ subroutine mp_uv_pole_ad(u,v) u(1,ix,k)=zero v(1,ix,k)=zero end do - polsu=polsu/float(nlon) - polsv=polsv/float(nlon) + polsu=polsu/real(nlon,r_kind) + polsv=polsv/real(nlon,r_kind) do ix=1,nlon u(2,ix,k)=u(2,ix,k)+polsu*coslon(ix)+polsv*sinlon(ix) v(2,ix,k)=v(2,ix,k)+polsu*sinlon(ix)-polsv*coslon(ix) @@ -2073,8 +2073,8 @@ subroutine mp_uv_pole_ad(u,v) u(2,ix,k)=zero v(2,ix,k)=zero end do - polnu=polnu/float(nlon) - polnv=polnv/float(nlon) + polnu=polnu/real(nlon,r_kind) + polnv=polnv/real(nlon,r_kind) do ix=1,nlon u(1,ix,k)=u(1,ix,k)+polnu*coslon(ix)+polnv*sinlon(ix) v(1,ix,k)=v(1,ix,k)-polnu*sinlon(ix)+polnv*coslon(ix) diff --git a/src/gsi/ncepgfs_ghg.f90 b/src/gsi/ncepgfs_ghg.f90 index 6c5fa7bb9d..9b34d8aa6e 100644 --- a/src/gsi/ncepgfs_ghg.f90 +++ b/src/gsi/ncepgfs_ghg.f90 @@ -326,7 +326,7 @@ subroutine read_gfsco2 & do i=1,nmxlon co2diff= co2_sav2(i,j,k)-co2_sav1(i,j,k) co2rate= co2diff/ndmax - co2_Tintrp(i,j,k)= co2_sav1(i,j,k)+ co2rate*float(idd-1) + co2_Tintrp(i,j,k)= co2_sav1(i,j,k)+ co2rate*real(idd-1,r_kind) enddo enddo enddo @@ -558,7 +558,7 @@ subroutine read_ch4n2oco & do i=1,nmaxlon ghgdiff= ghg_sav2(1,j,k)-ghg_sav1(1,j,k) ghgrate= ghgdiff/ndmax - ghg_Tintrp(1,j,k)= ghg_sav1(1,j,k)+ ghgrate*float(idd-1) + ghg_Tintrp(1,j,k)= ghg_sav1(1,j,k)+ ghgrate*real(idd-1,r_kind) enddo enddo enddo diff --git a/src/gsi/ncepgfs_io.f90 b/src/gsi/ncepgfs_io.f90 index 59be6d3925..dd46916039 100644 --- a/src/gsi/ncepgfs_io.f90 +++ b/src/gsi/ncepgfs_io.f90 @@ -2640,9 +2640,9 @@ subroutine write_ens_sfc_nst(mype_so,dsfct) allocate(slatx(jmax),wlatx(jmax)) allocate(rlats_ens_sfc(nlat_ens_sfc),rlons_ens_sfc(nlon_ens_sfc)) call splat(4,jmax,slatx,wlatx) - dlon=two*pi/float(nlon_ens_sfc) + dlon=two*pi/real(nlon_ens_sfc,r_kind) do i=1,nlon_ens_sfc - rlons_ens_sfc(i)=float(i-1)*dlon + rlons_ens_sfc(i)=real(i-1,r_kind)*dlon end do do i=1,(nlat_ens_sfc-1)/2 rlats_ens_sfc(i+1)=-asin(slatx(i)) @@ -3074,9 +3074,9 @@ subroutine write_ens_dsfct(mype_so,dsfct) allocate(slatx(jmax),wlatx(jmax)) allocate(rlats_ens_sfc(nlat_ens_sfc),rlons_ens_sfc(nlon_ens_sfc)) call splat(4,jmax,slatx,wlatx) - dlon=two*pi/float(nlon_ens_sfc) + dlon=two*pi/real(nlon_ens_sfc,r_kind) do i=1,nlon_ens_sfc - rlons_ens_sfc(i)=float(i-1)*dlon + rlons_ens_sfc(i)=real(i-1,r_kind)*dlon end do do i=1,(nlat_ens_sfc-1)/2 rlats_ens_sfc(i+1)=-asin(slatx(i)) @@ -3247,7 +3247,7 @@ subroutine glbave(fld,ave) enddo enddo enddo - xave=xave/(two_quad*float(nlon)) + xave=xave/(two_quad*real(nlon,r_quad)) call mpl_allreduce(size(ave,1),qpvals=xave) ave=xave deallocate(xave) diff --git a/src/gsi/ncepnems_io.f90 b/src/gsi/ncepnems_io.f90 index 73f06ffd07..595f07e152 100755 --- a/src/gsi/ncepnems_io.f90 +++ b/src/gsi/ncepnems_io.f90 @@ -82,7 +82,8 @@ module ncepnems_io ! nfsecondn FCST Secs (i_kind) numerator ! nfsecondd FCST Secs (i_kind) denominator ! -! %fhour = float(nfhour) + float(nfminute)/r60 + float(nfsecondn)/float(nfsecondd)/r3600 +! %fhour = real(nfhour,r_kind) + real(nfminute,r_kind)/r60 + & +! real(nfsecondn,r_kind)/real(nfsecondd,r_kind)/r3600 ! ! nframe - nframe is the number of grids extend outward from the ! edge of modeling domain. @@ -835,7 +836,8 @@ subroutine read_atm_ (grd,filename,sp_a,uvflag,vordivflag,zflag, & call stop2(101) end if - fhour = float(nfhour) + float(nfminute)/r60 + float(nfsecondn)/float(nfsecondd)/r3600 + fhour = real(nfhour,r_kind) + real(nfminute,r_kind)/r60 + & + real(nfsecondn,r_kind)/real(nfsecondd,r_kind)/r3600 odate(1) = idate(4) !hour odate(2) = idate(2) !month odate(3) = idate(3) !day @@ -1300,7 +1302,8 @@ subroutine read_sfc_(sfct,soil_moi,sno,soil_temp,veg_frac,fact10,sfc_rough, & call stop2(102) end if - fhour = float(nfhour) + float(nfminute)/r60 + float(nfsecondn)/float(nfsecondd)/r3600 + fhour = real(nfhour,r_kind) + real(nfminute,r_kind)/r60 + & + real(nfsecondn,r_kind)/real(nfsecondd,r_kind)/r3600 odate(1) = idate(4) !hour odate(2) = idate(2) !month odate(3) = idate(3) !day @@ -1699,7 +1702,8 @@ subroutine read_sfc_anl_(isli_anl) call stop2(102) end if - fhour = float(nfhour) + float(nfminute)/r60 + float(nfsecondn)/float(nfsecondd)/r3600 + fhour = real(nfhour,r_kind) + real(nfminute,r_kind)/r60 + & + real(nfsecondn,r_kind)/real(nfsecondd,r_kind)/r3600 odate(1) = idate(4) !hour odate(2) = idate(2) !month odate(3) = idate(3) !day @@ -2029,7 +2033,8 @@ subroutine read_nst_ (tref,dt_cool,z_c,dt_warm,z_w,c_0,c_d,w_0,w_d) call stop2(istop) end if - fhour = float(nfhour) + float(nfminute)/r60 + float(nfsecondn)/float(nfsecondd)/r3600 + fhour = real(nfhour,r_kind) + real(nfminute,r_kind)/r60 + & + real(nfsecondn,r_kind)/real(nfsecondd,r_kind)/r3600 odate(1) = idate(4) !hour odate(2) = idate(2) !month odate(3) = idate(3) !day @@ -5469,8 +5474,8 @@ subroutine tran_gfssfc(ain,aout,lonb,latb) sumn = ain(i,1) + sumn sums = ain(i,latb) + sums end do - sumn = sumn/float(lonb) - sums = sums/float(lonb) + sumn = sumn/real(lonb,r_kind) + sums = sums/real(lonb,r_kind) ! Transfer from local work array to surface guess array do j = 1,lonb aout(1,j)=sums diff --git a/src/gsi/netcdfgfs_io.f90 b/src/gsi/netcdfgfs_io.f90 index 41e8f33e03..8aa6c4cc6a 100644 --- a/src/gsi/netcdfgfs_io.f90 +++ b/src/gsi/netcdfgfs_io.f90 @@ -3202,8 +3202,8 @@ subroutine tran_gfsncsfc(ain,aout,lonb,latb) sumn = ain(i,1) + sumn sums = ain(i,latb) + sums end do - sumn = sumn/float(lonb) - sums = sums/float(lonb) + sumn = sumn/real(lonb,r_kind) + sums = sums/real(lonb,r_kind) ! Transfer from local work array to surface guess array do j = 1,lonb aout(1,j)=sums diff --git a/src/gsi/nlmsas_ad.f90 b/src/gsi/nlmsas_ad.f90 index be8213b340..7ad413aa6b 100644 --- a/src/gsi/nlmsas_ad.f90 +++ b/src/gsi/nlmsas_ad.f90 @@ -707,10 +707,10 @@ subroutine nlmsas_ad_im_ix_(im,ix,km,jcap,delt,del,sl,rcs,& pdpdwn = zero pdetrn = 200._r_kind xlambu = 1.e-4_r_kind - fjcap = (float(jcap) / 126._r_kind) ** 2 + fjcap = (real(jcap,r_kind) / 126._r_kind) ** 2 val = one fjcap = max(fjcap,val) - fkm = (float(km) / 28._r_kind) ** 2 + fkm = (real(km,r_kind) / 28._r_kind) ** 2 fkm = max(fkm,one) w1l = -8.e-3_r_kind w2l = -4.e-2_r_kind @@ -1058,7 +1058,7 @@ subroutine nlmsas_ad_im_ix_(im,ix,km,jcap,delt,del,sl,rcs,& ! Select cloud from ensemble do i=1,im - kt2(i) = nint(xkt2(i)*float(ktcon(i)-jmin(i))-half) + jmin(i) + 1 + kt2(i) = nint(xkt2(i)*real(ktcon(i)-jmin(i),r_kind)-half) + jmin(i) + 1 tem1 = hcko(jmin(i),i) - hesol(kt2(i),i) tem2 = sumz(kt2(i),i) * hesol(kt2(i),i) - sumh(kt2(i),i) if (abs(tem2) > 0.000001_r_kind) then diff --git a/src/gsi/polcarf.f90 b/src/gsi/polcarf.f90 index 4ed450daa1..f2038d9d95 100644 --- a/src/gsi/polcarf.f90 +++ b/src/gsi/polcarf.f90 @@ -617,7 +617,7 @@ subroutine polcas(afg,axr,nxem,norm,naxr,wtaxs,wtxrs,inaxs,inxrs,nf,mr,nr) do i=0,naxr-1 valp=valp+axr(i,mr+1) end do - valp=valp/float(naxr) + valp=valp/real(naxr,r_kind) do i=0,naxr-1 axr(i,mr)=valp end do @@ -692,7 +692,7 @@ subroutine polcasa(afg,axr,nxem,norm,naxr,wtaxs,wtxrs,inaxs,inxrs,nf,mr,nr) do i=0,naxr-1 valp=valp+axr(i,mr) end do - valp=valp/float(naxr) + valp=valp/real(naxr,r_kind) do i=0,naxr-1 axr(i,mr)=zero axr(i,mr+1)=axr(i,mr+1)+valp diff --git a/src/gsi/prewgt.f90 b/src/gsi/prewgt.f90 index 38d61050fe..7f3d2fc091 100644 --- a/src/gsi/prewgt.f90 +++ b/src/gsi/prewgt.f90 @@ -273,7 +273,7 @@ subroutine prewgt(mype) end do do j=1,lon2 do i=1,lat2 - temp(i,j)=float(isli2(i,j)) + temp(i,j)=real(isli2(i,j),r_kind) end do end do @@ -585,7 +585,7 @@ subroutine prewgt(mype) ! rearth_equator is the equatorial radius from a 1999 IAG report. The ! horizontal scales are defined at the equator, hence the need for the ! equatorial radius. - s2u=(two*pi*rearth_equator)/float(nlon) + s2u=(two*pi*rearth_equator)/real(nlon,r_kind) allocate(sli(ny,nx,2,nnnn1o),sli1(-nf:nf,-nf:nf,2,nnnn1o), & diff --git a/src/gsi/prewgt_reg.f90 b/src/gsi/prewgt_reg.f90 index bde1c9dece..1da89a703b 100644 --- a/src/gsi/prewgt_reg.f90 +++ b/src/gsi/prewgt_reg.f90 @@ -452,7 +452,7 @@ subroutine prewgt_reg(mype) d=region_lat(il,jl)*rad2deg+90._r_kind l=int(d) l2=l+1 - dl2=d-float(l) + dl2=d-real(l,r_kind) dl1=one-dl2 do k=1,nsig dssv(i,j,k,n)=(dl1*ozmzt(l,k)+dl2*ozmzt(l2,k))*dsv(1,k,llmin) @@ -581,7 +581,7 @@ subroutine prewgt_reg(mype) do i=1,lon2 l=int(rllat1(j,i)) l2=min0(l+1,llmax) - dl2=rllat1(j,i)-float(l) + dl2=rllat1(j,i)-real(l,r_kind) dl1=one-dl2 do k=1,nsig dssv(j,i,k,n)=dl1*dsv(i,k,l)+dl2*dsv(i,k,l2) @@ -604,7 +604,7 @@ subroutine prewgt_reg(mype) do i=1,lon2 l=int(rllat1(j,i)) l2=min0(l+1,llmax) - dl2=rllat1(j,i)-float(l) + dl2=rllat1(j,i)-real(l,r_kind) dl1=one-dl2 do k=1,nsig dssv(j,i,k,n)=dl1*dsv(i,k,l)+dl2*dsv(i,k,l2) @@ -662,7 +662,7 @@ subroutine prewgt_reg(mype) do i=1,lon2 l=int(rllat1(j,i)) l2=min0(l+1,llmax) - dl2=rllat1(j,i)-float(l) + dl2=rllat1(j,i)-real(l,r_kind) dl1=one-dl2 dssvs(j,i,n)=dl1*dsvs(i,l)+dl2*dsvs(i,l2) if (mvars>=2.and.n==nrf2_sst) then @@ -738,7 +738,7 @@ subroutine prewgt_reg(mype) do j=1,ny l=int(rllat(j,i)) lp=min0(l+1,llmax) - dl2=rllat(j,i)-float(l) + dl2=rllat(j,i)-real(l,r_kind) dl1=one-dl2 fact=one/(dl1*hwll(l,k1,nn)+dl2*hwll(lp,k1,nn)) slw((i-1)*ny+j,k)=slw((i-1)*ny+j,1)*fact**2 @@ -778,7 +778,7 @@ subroutine prewgt_reg(mype) do j=1,ny l=int(rllat(j,i)) lp=min0(l+1,llmax) - dl2=rllat(j,i)-float(l) + dl2=rllat(j,i)-real(l,r_kind) dl1=one-dl2 fact=cc/(dl1*hwllp(l,nn)+dl2*hwllp(lp,nn)) slw((i-1)*ny+j,k)=slw((i-1)*ny+j,1)*fact**2 diff --git a/src/gsi/q_diag.f90 b/src/gsi/q_diag.f90 index 15ef49c6b5..fe5f2f0e94 100644 --- a/src/gsi/q_diag.f90 +++ b/src/gsi/q_diag.f90 @@ -147,7 +147,7 @@ subroutine q_diag(it,mype) call load_grid(work_pw,grid_pw) globps=zero globpw=zero - rlon=one/float(nlon) + rlon=one/real(nlon,r_kind) do jj=2,nlat-1 j=jj-1 fmeanps=zero diff --git a/src/gsi/radinfo.f90 b/src/gsi/radinfo.f90 index ffc4641696..ede58b9bca 100644 --- a/src/gsi/radinfo.f90 +++ b/src/gsi/radinfo.f90 @@ -1454,7 +1454,7 @@ real(r_kind) function rnad_pos(isis,iscan,jch) piece=-0.625_r_kind if (mod(iscan,2) == 1) piece = 0.625_r_kind - rnad_pos=radstart(jch)+radstep(jch)*float((iscan-1)/2)+piece + rnad_pos=radstart(jch)+radstep(jch)*real((iscan-1)/2,r_kind)+piece else @@ -1466,7 +1466,7 @@ real(r_kind) function rnad_pos(isis,iscan,jch) else ifov=iscan end if - rnad_pos=radstart(jch)+radstep(jch)*float(ifov-1) + rnad_pos=radstart(jch)+radstep(jch)*real(ifov-1,r_kind) end if @@ -2034,7 +2034,7 @@ subroutine init_predx tlap2(jj) = tlap0(jj) + tlap1(jj)/tsum(jj) count_tlapmean(jj)=count_tlapmean(jj)+one elseif (tcnt(jj)>0) then - ratio = max(zero,min(tcnt(jj)/float(nthreshold),one)) + ratio = max(zero,min(tcnt(jj)/real(nthreshold,r_kind),one)) tsum(jj)=ratio*tsum(jj)+tsum0(jj) ! tlap2(jj) = tlap0(jj) + ratio*wgtlap*tlap1(jj)/tsum(jj) tlap2(jj) = tlap0(jj) + ratio*tlap1(jj)/tsum(jj) diff --git a/src/gsi/raflib.f90 b/src/gsi/raflib.f90 index 227bda3cb1..eb6d399d21 100644 --- a/src/gsi/raflib.f90 +++ b/src/gsi/raflib.f90 @@ -4488,14 +4488,14 @@ SUBROUTINE EIGEN(A,R,N,MV) end do if(anorm>zero) then ANORM=1.414_r_kind*SQRT(ANORM) - ANRMX=ANORM*RANGE/FLOAT(N) + ANRMX=ANORM*RANGE/real(N,r_kind) ! ! INITIALIZE INDICATORS AND COMPUTE THRESHOLD, THR ! IND=0 THR=ANORM loop1: do - THR=THR/FLOAT(N) + THR=THR/real(N,r_kind) loop2: do L=1 loop3: do diff --git a/src/gsi/rdgrbsst.f90 b/src/gsi/rdgrbsst.f90 index 8be85ad608..29e5346eae 100644 --- a/src/gsi/rdgrbsst.f90 +++ b/src/gsi/rdgrbsst.f90 @@ -132,14 +132,14 @@ subroutine rdgrbsst(file_sst,mlat_sst,mlon_sst,& ! Get lat_sst & lon_sst do i = 2, nlat_sst - 1 - rlats_sst(i) = (xsst0 + float(i-2)*dres)*deg2rad + rlats_sst(i) = (xsst0 + real(i-2,r_kind)*dres)*deg2rad enddo rlats_sst(1) = -90.0_r_kind*deg2rad rlats_sst(nlat_sst) = 90.0_r_kind*deg2rad do j = 2, nlon_sst - 1 - rlons_sst(j) = (ysst0 + float(j-2)*dres)*deg2rad + rlons_sst(j) = (ysst0 + real(j-2,r_kind)*dres)*deg2rad enddo rlons_sst(1) = -half*dres*deg2rad ! 1 @@ -184,8 +184,8 @@ subroutine rdgrbsst(file_sst,mlat_sst,mlon_sst,& sums = sums + sst(j,2) sumn = sumn + sst(j,nlat_sst-1) end do - sums = sums / float(i) - sumn = sumn / float(i) + sums = sums / real(i,r_kind) + sumn = sumn / real(i,r_kind) do j = 2,nlon_sst-1 sst(j,1) = sums sst(j,nlat_sst) = sumn diff --git a/src/gsi/read_airs.f90 b/src/gsi/read_airs.f90 index 16e890abd1..8dd22ffd5e 100644 --- a/src/gsi/read_airs.f90 +++ b/src/gsi/read_airs.f90 @@ -790,7 +790,7 @@ subroutine read_airs(mype,val_airs,ithin,isfcalc,rmesh,jsatid,gstime,& endif sol_aziang = aquaspot(2) - lza = (start + float(ifov-1)*step)*deg2rad + lza = (start + real(ifov-1,r_kind)*step)*deg2rad ! ! interpolate NSST variables to Obs. location and get dtw, dtc, tz_tr ! diff --git a/src/gsi/read_amsr2.f90 b/src/gsi/read_amsr2.f90 index a7b27abccc..9d8d4944d9 100644 --- a/src/gsi/read_amsr2.f90 +++ b/src/gsi/read_amsr2.f90 @@ -566,7 +566,7 @@ subroutine read_amsr2(mype,val_amsr2,ithin,rmesh,jsatid,gstime,& if(.not. regional .and. dist1 > 0.75_r_kind) cycle obsloop endif - crit1 = crit1 + 10._r_kind * float(iskip) + crit1 = crit1 + 10._r_kind * real(iskip,r_kind) call checkob(dist1,crit1,itx,iuse) if(.not. iuse) then cycle obsloop diff --git a/src/gsi/read_atms.f90 b/src/gsi/read_atms.f90 index 47b675b3a3..c6ed159068 100644 --- a/src/gsi/read_atms.f90 +++ b/src/gsi/read_atms.f90 @@ -401,7 +401,7 @@ subroutine read_atms(mype,val_tovs,ithin,isfcalc,& ! inflate selection value for ears_db data crit0 = 0.01_r_kind - if ( llll > 1 ) crit0 = crit0 + r100 * float(llll) + if ( llll > 1 ) crit0 = crit0 + r100 * real(llll,r_kind) call ufbint(lnbufr,bfr1bhdr,n1bhdr,1,iret,hdr1b) @@ -455,7 +455,7 @@ subroutine read_atms(mype,val_tovs,ithin,isfcalc,& lza = bfr2bhdr(1)*deg2rad ! local zenith angle if(ifov <= 48) lza=-lza - panglr=(start+float(ifov-1)*step)*deg2rad + panglr=(start+real(ifov-1,r_kind)*step)*deg2rad satellite_height=bfr1bhdr(13) ! Ensure orbit height is reasonable if (satellite_height < 780000.0_r_kind .OR. & @@ -648,7 +648,7 @@ subroutine read_atms(mype,val_tovs,ithin,isfcalc,& idomsfc(1),sfcpct,ts,tsavg,vty,vfr,sty,stp,sm,sn,zz,ff10,sfcr) endif - crit1 = crit1 + rlndsea(isflg) + 10._r_kind*float(iskip) + 0.01_r_kind * abs(zz) + crit1 = crit1 + rlndsea(isflg) + 10._r_kind*real(iskip,r_kind) + 0.01_r_kind * abs(zz) call checkob(dist1,crit1,itx,iuse) if(.not. iuse)cycle ObsLoop @@ -726,7 +726,7 @@ subroutine read_atms(mype,val_tovs,ithin,isfcalc,& endif ! Re-calculate look angle - panglr=(start+float(ifov-1)*step)*deg2rad + panglr=(start+real(ifov-1,r_kind)*step)*deg2rad ! Load selected observation into data array diff --git a/src/gsi/read_bufrtovs.f90 b/src/gsi/read_bufrtovs.f90 index a819acd2c3..2fc14b5cdf 100644 --- a/src/gsi/read_bufrtovs.f90 +++ b/src/gsi/read_bufrtovs.f90 @@ -673,7 +673,7 @@ subroutine read_bufrtovs(mype,val_tovs,ithin,isfcalc,& terrain = 50._r_kind if(llll == 1)terrain = 0.01_r_kind*abs(bfr1bhdr(13)) crit0 = 0.01_r_kind + terrain - if (llll > 1 ) crit0 = crit0 + r100 * float(llll) + if (llll > 1 ) crit0 = crit0 + r100 * real(llll,r_kind) timeinflat=two call tdiff2crit(tdiff,ptime,ithin_time,timeinflat,crit0,crit1,it_mesh) call map2tgrid(dlat_earth,dlon_earth,dist1,crit1,itx,ithin,itt,iuse,sis,it_mesh=it_mesh) @@ -699,7 +699,7 @@ subroutine read_bufrtovs(mype,val_tovs,ithin,isfcalc,& if(hirs .and. ((jsatid == 'n16') .or. (jsatid == 'n17'))) & ifovmod=ifovmod+1 - panglr=(start+float(ifovmod-1)*step)*deg2rad + panglr=(start+real(ifovmod-1,r_kind)*step)*deg2rad lzaest = asin(rato*sin(panglr)) if( msu .or. hirs2 .or. ssu)then lza = lzaest @@ -821,7 +821,7 @@ subroutine read_bufrtovs(mype,val_tovs,ithin,isfcalc,& end do if (iskip >= nchanl) cycle read_loop ! Map obs to thinning grid - crit1 = crit1 + 10._r_kind*float(iskip) + crit1 = crit1 + 10._r_kind*real(iskip,r_kind) call checkob(dist1,crit1,itx,iuse) if(.not. iuse)cycle read_loop diff --git a/src/gsi/read_cris.f90 b/src/gsi/read_cris.f90 index a257480c9a..9843f919d7 100644 --- a/src/gsi/read_cris.f90 +++ b/src/gsi/read_cris.f90 @@ -582,7 +582,7 @@ subroutine read_cris(mype,val_cris,ithin,isfcalc,rmesh,jsatid,gstime,& ! Increment nread counter by bufr_nchan (should be changed to number of channels in satinfo file? (satinfo_nchan)) nread = nread + satinfo_nchan crit0 = 0.01_r_kind - if( llll > 1 ) crit0 = crit0 + r100 * float(llll) + if( llll > 1 ) crit0 = crit0 + r100 * real(llll,r_kind) timeinflat=6.0_r_kind call tdiff2crit(tdiff,ptime,ithin_time,timeinflat,crit0,crit1,it_mesh) call map2tgrid(dlat_earth,dlon_earth,dist1,crit1,itx,ithin,itt,iuse,sis,it_mesh=it_mesh) @@ -600,8 +600,8 @@ subroutine read_cris(mype,val_cris,ithin,isfcalc,rmesh,jsatid,gstime,& if( ifor <= 15 ) sat_zenang = -sat_zenang ! Compute scan angle including sensor twist. - look_angle_est = (start + float((ifor-1))*step) * deg2rad + & - fov_dist(ifov) * sin(fov_ang(ifov) - float(ifor-1)*step*deg2rad) + look_angle_est = (start + real((ifor-1),r_kind)*step) * deg2rad + & + fov_dist(ifov) * sin(fov_ang(ifov) - real(ifor-1,r_kind)*step*deg2rad) sat_look_angle=asin(rato*sin(sat_zenang*deg2rad)) if(abs(sat_look_angle)*rad2deg > MAX_SENSOR_ZENITH_ANGLE) then @@ -763,7 +763,7 @@ subroutine read_cris(mype,val_cris,ithin,isfcalc,rmesh,jsatid,gstime,& if(iskip > 0 .and. print_verbose)write(6,*) ' READ_CRIS : iskip > 0 ',iskip ! if( iskip >= 10 )cycle read_loop - crit1=crit1 + ten*float(iskip) + crit1=crit1 + ten*real(iskip,r_kind) ! Final map obs to grids if ( clear ) then diff --git a/src/gsi/read_dbz_netcdf.f90 b/src/gsi/read_dbz_netcdf.f90 index 6ea03afaff..ecfb9169c4 100644 --- a/src/gsi/read_dbz_netcdf.f90 +++ b/src/gsi/read_dbz_netcdf.f90 @@ -170,9 +170,9 @@ subroutine read_dbz_mrms_netcdf(nread,ndata,nodata,infile,obstype,lunout,sis,nob integer(i_kind) :: num_missing=0,num_nopcp=0, & !counts numbadtime=0,num_badtilt=0, & num_badrange=0,num_m2nopcp=0, & - num_noise=0,num_limmax=0 ,num_limmin=0 - - + num_noise=0,num_limmax=0 ,num_limmin=0 + + !--General declarations integer(i_kind) :: ierror,lunrad,i,j,k,v,na,nb,nelv,nvol, & @@ -185,7 +185,7 @@ subroutine read_dbz_mrms_netcdf(nread,ndata,nodata,infile,obstype,lunout,sis,nob real(r_kind) :: thistiltr,selev0,celev0,thisrange,this_stahgt,thishgt real(r_kind) :: celev,selev,gamma,thisazimuthr,rlon0, & clat0,slat0,dlat,dlon,thiserr,thislon,thislat, & - rlonloc,rlatloc,rlonglob,rlatglob,timeb,rad_per_meter + rlonloc,rlatloc,rlonglob,rlatglob,timeb,rad_per_meter real(r_kind) :: radartwindow real(r_kind) :: dbzerr,rmins_an,rmins_ob real(r_kind),allocatable,dimension(:,:):: cdata_all @@ -203,7 +203,7 @@ subroutine read_dbz_mrms_netcdf(nread,ndata,nodata,infile,obstype,lunout,sis,nob !---------SETTINGS FOR FUTURE NAMELIST---------! integer(i_kind) :: maxobrange=999000 ! Range (m) *within* which to use observations - obs *outside* this range are not used integer(i_kind) :: minobrange=-999 ! Range (m) *outside* of which to use observatons - obs *inside* this range are not used - real(r_kind) :: mintilt=0.0_r_kind ! Only use tilt(elevation) angles (deg) >= this number + real(r_kind) :: mintilt=0.0_r_kind ! Only use tilt(elevation) angles (deg) >= this number real(r_kind) :: maxtilt=20.0_r_kind ! Do no use tilt(elevation) angles (deg) >= this number logical :: missing_to_nopcp=.false. ! Set missing observations to 'no precipitation' observations -> dbznoise (See Aksoy et al. 2009, MWR) real(r_kind) :: dbznoise=2.0_r_kind ! dBZ obs must be >= dbznoise for assimilation @@ -241,13 +241,13 @@ subroutine read_dbz_mrms_netcdf(nread,ndata,nodata,infile,obstype,lunout,sis,nob if(trim(obstype) == trim(ioctype(i)) .and. abs(icuse(i))== 1) then ikx=i radartwindow=ctwind(ikx)*r60 !Time window units converted to minutes - ! (default setting for dbz within convinfo is 0.05 hours) - dbzerr=5_r_kind !Ob error (dB) to use for radar reflectivity factor - exit !Exit loop when finished with initial convinfo fields + ! (default setting for dbz within convinfo is 0.05 hours) + dbzerr=5_r_kind !Ob error (dB) to use for radar reflectivity factor + exit !Exit loop when finished with initial convinfo fields else if ( i==nconvtype ) then write(6,*) 'READ_dBZ: ERROR - OBSERVATION TYPE IS NOT PRESENT IN CONVINFO OR USE FLAG IS ZERO' - write(6,*) 'READ_dBZ: ABORTTING read_dbz.f90 - NO REFLECTIVITY OBS READ!' - return + write(6,*) 'READ_dBZ: ABORTTING read_dbz.f90 - NO REFLECTIVITY OBS READ!' + return endif end do @@ -420,12 +420,12 @@ subroutine read_dbz_mrms_netcdf(nread,ndata,nodata,infile,obstype,lunout,sis,nob obdate(1)=strct_in_dbz(v,k)%year obdate(2)=strct_in_dbz(v,k)%month - obdate(3)=strct_in_dbz(v,k)%day + obdate(3)=strct_in_dbz(v,k)%day obdate(4)=strct_in_dbz(v,k)%hour obdate(5)=strct_in_dbz(v,k)%minute call w3fs21(obdate,mins_ob) !mins_ob -integer number of mins snce 01/01/1978 - rmins_ob=mins_ob !convert to real number - rmins_ob=rmins_ob+(strct_in_dbz(v,k)%second*r60inv) !convert seconds to minutes and add to ob time + rmins_ob=mins_ob !convert to real number + rmins_ob=rmins_ob+(strct_in_dbz(v,k)%second*r60inv) !convert seconds to minutes and add to ob time !-Comparison is done in units of minutes @@ -439,139 +439,139 @@ subroutine read_dbz_mrms_netcdf(nread,ndata,nodata,infile,obstype,lunout,sis,nob if (thistilt <= maxtilt .and. thistilt >= mintilt) then gates: do i=1,strct_in_dbz(v,k)%num_gate - - thisrange=strct_in_dbz(v,k)%fstgatdis + float(i-1)*strct_in_dbz(v,k)%gateWidth + + thisrange=strct_in_dbz(v,k)%fstgatdis + real(i-1,r_kind)*strct_in_dbz(v,k)%gateWidth !-Check to make sure observations are within specified range - if (thisrange <= maxobrange .and. thisrange >= minobrange) then - azms: do j=1,strct_in_dbz(v,k)%num_beam - - !-Check to see if this is a missing observation - - nread=nread+1 - + if (thisrange <= maxobrange .and. thisrange >= minobrange) then + azms: do j=1,strct_in_dbz(v,k)%num_beam + + !-Check to see if this is a missing observation + + nread=nread+1 + if ( abs(strct_in_dbz(v,k)%field(i,j)) >= 99.0_r_kind ) then - - !--Extend no precip observations to missing data fields? + + !--Extend no precip observations to missing data fields? ! May help suppress spurious convection if a problem. - + if (missing_to_nopcp) then - strct_in_dbz(v,k)%field(i,j) = dbznoise - num_m2nopcp = num_m2nopcp+1 - else - num_missing=num_missing+1 - cycle azms !No reason to process the ob if it is missing + strct_in_dbz(v,k)%field(i,j) = dbznoise + num_m2nopcp = num_m2nopcp+1 + else + num_missing=num_missing+1 + cycle azms !No reason to process the ob if it is missing end if - + end if - - - if (l_limmax) then - if ( strct_in_dbz(v,k)%field(i,j) > 60_r_kind ) then - strct_in_dbz(v,k)%field(i,j) = 60_r_kind - num_limmax=num_limmax+1 - end if - end if - if (l_limmin) then - if ( strct_in_dbz(v,k)%field(i,j) < 0_r_kind ) then - strct_in_dbz(v,k)%field(i,j) = 0_r_kind - num_limmin=num_limmin+1 - end if - end if - - !--Find observation height using method from read_l2bufr_mod.f90 - - this_stahgt=strct_in_dbz(v,k)%radhgt + + + if (l_limmax) then + if ( strct_in_dbz(v,k)%field(i,j) > 60_r_kind ) then + strct_in_dbz(v,k)%field(i,j) = 60_r_kind + num_limmax=num_limmax+1 + end if + end if + if (l_limmin) then + if ( strct_in_dbz(v,k)%field(i,j) < 0_r_kind ) then + strct_in_dbz(v,k)%field(i,j) = 0_r_kind + num_limmin=num_limmin+1 + end if + end if + + !--Find observation height using method from read_l2bufr_mod.f90 + + this_stahgt=strct_in_dbz(v,k)%radhgt aactual=rearth+this_stahgt a43=four_thirds*aactual thistiltr=thistilt*deg2rad selev0=sin(thistiltr) - celev0=cos(thistiltr) - b=thisrange*(thisrange+two*aactual*selev0) + celev0=cos(thistiltr) + b=thisrange*(thisrange+two*aactual*selev0) c=sqrt(aactual*aactual+b) ha=b/(aactual+c) epsh=(thisrange*thisrange-ha*ha)/(r8*aactual) h=ha-epsh - thishgt=this_stahgt+h - - !--Find observation location using method from read_l2bufr_mod.f90 - - !-Get corrected tilt angle - celev=celev0 - selev=selev0 - celev=a43*celev0/(a43+h) - selev=(thisrange*thisrange+h*h+two*a43*h)/(two*thisrange*(a43+h)) - - gamma=half*thisrange*(celev0+celev) - + thishgt=this_stahgt+h + + !--Find observation location using method from read_l2bufr_mod.f90 + + !-Get corrected tilt angle + celev=celev0 + selev=selev0 + celev=a43*celev0/(a43+h) + selev=(thisrange*thisrange+h*h+two*a43*h)/(two*thisrange*(a43+h)) + + gamma=half*thisrange*(celev0+celev) + !-Get earth lat lon of observation - + rlon0=deg2rad*strct_in_dbz(v,k)%radlon - clat0=cos(deg2rad*strct_in_dbz(v,k)%radlat) - slat0=sin(deg2rad*strct_in_dbz(v,k)%radlat) - thisazimuthr=(90.0_r_kind-strct_in_dbz(v,k)%azim(j))*deg2rad !Storing as 90-azm to - ! be consistent with - ! read_l2bufr_mod.f90 - rad_per_meter=one/rearth - rlonloc=rad_per_meter*gamma*cos(thisazimuthr) + clat0=cos(deg2rad*strct_in_dbz(v,k)%radlat) + slat0=sin(deg2rad*strct_in_dbz(v,k)%radlat) + thisazimuthr=(90.0_r_kind-strct_in_dbz(v,k)%azim(j))*deg2rad !Storing as 90-azm to + ! be consistent with + ! read_l2bufr_mod.f90 + rad_per_meter=one/rearth + rlonloc=rad_per_meter*gamma*cos(thisazimuthr) rlatloc=rad_per_meter*gamma*sin(thisazimuthr) - - call invtllv(rlonloc,rlatloc,rlon0,clat0,slat0,rlonglob,rlatglob) + + call invtllv(rlonloc,rlatloc,rlon0,clat0,slat0,rlonglob,rlatglob) - thislat=rlatglob*rad2deg + thislat=rlatglob*rad2deg thislon=rlonglob*rad2deg !-Check format of longitude and correct if necessary - if(thislon>=r360) thislon=thislon-r360 + if(thislon>=r360) thislon=thislon-r360 if(thislon= this number + real(r_kind) :: mintilt=0.0_r_kind ! Only use tilt(elevation) angles (deg) >= this number real(r_kind) :: maxtilt=20.0_r_kind ! Do no use tilt(elevation) angles (deg) >= this number logical :: missing_to_nopcp=.false. ! Set missing observations to 'no precipitation' observations -> dbznoise (See Aksoy et al. 2009, MWR) real(r_kind) :: dbznoise=2_r_kind ! dBZ obs must be >= dbznoise for assimilation @@ -863,13 +863,13 @@ subroutine read_dbz_mrms_sparse_netcdf(nread,ndata,nodata,infile,obstype,lunout, if(trim(obstype) == trim(ioctype(i)) .and. abs(icuse(i))== 1) then ikx=i radartwindow=ctwind(ikx)*r60 !Time window units converted to minutes - ! (default setting for dbz within convinfo is 0.05 hours) - dbzerr=5_r_kind !Ob error (dB) to use for radar reflectivity factor - exit !Exit loop when finished with initial convinfo fields + ! (default setting for dbz within convinfo is 0.05 hours) + dbzerr=5_r_kind !Ob error (dB) to use for radar reflectivity factor + exit !Exit loop when finished with initial convinfo fields else if ( i==nconvtype ) then write(6,*) 'READ_dBZ: ERROR - OBSERVATION TYPE IS NOT PRESENT IN CONVINFO OR USE FLAG IS ZERO' - write(6,*) 'READ_dBZ: ABORTTING read_dbz.f90 - NO REFLECTIVITY OBS READ!' - return + write(6,*) 'READ_dBZ: ABORTTING read_dbz.f90 - NO REFLECTIVITY OBS READ!' + return endif end do @@ -1017,20 +1017,20 @@ subroutine read_dbz_mrms_sparse_netcdf(nread,ndata,nodata,infile,obstype,lunout, ! transform the read-in ob to the intermidate obs variables( radar obs to be used in GSI - strct_in_dbz(v,k)%radid=radarsite_nc - strct_in_dbz(v,k)%vcpnum=vcp_nc - strct_in_dbz(v,k)%year=iyear ! to be defind from infile name + strct_in_dbz(v,k)%radid=radarsite_nc + strct_in_dbz(v,k)%vcpnum=vcp_nc + strct_in_dbz(v,k)%year=iyear ! to be defind from infile name strct_in_dbz(v,k)%month=imon strct_in_dbz(v,k)%day=iday strct_in_dbz(v,k)%hour=ihour strct_in_dbz(v,k)%minute=imin strct_in_dbz(v,k)%second=isec - strct_in_dbz(v,k)%radlat=lat_nc + strct_in_dbz(v,k)%radlat=lat_nc strct_in_dbz(v,k)%radlon=lon_nc strct_in_dbz(v,k)%radhgt=height_nc - strct_in_dbz(v,k)%fstgatdis =firstgate_nc + strct_in_dbz(v,k)%fstgatdis =firstgate_nc strct_in_dbz(v,k)%gateWidth=gatewidth_nc(1) ! always the same ??) - strct_in_dbz(v,k)%elev_angle=elev_nc + strct_in_dbz(v,k)%elev_angle=elev_nc strct_in_dbz(v,k)%num_beam=numazim_nc strct_in_dbz(v,k)%num_gate=numgate_nc na=strct_in_dbz(v,k)%num_beam @@ -1065,8 +1065,8 @@ subroutine read_dbz_mrms_sparse_netcdf(nread,ndata,nodata,infile,obstype,lunout, obdate(5)=strct_in_dbz(v,k)%minute call w3fs21(obdate,mins_ob) !mins_ob -integer number of mins snce 01/01/1978 - rmins_ob=mins_ob !convert to real number - rmins_ob=rmins_ob+(strct_in_dbz(v,k)%second*r60inv) !convert seconds to minutes and add to ob time + rmins_ob=mins_ob !convert to real number + rmins_ob=rmins_ob+(strct_in_dbz(v,k)%second*r60inv) !convert seconds to minutes and add to ob time !-Comparison is done in units of minutes @@ -1088,139 +1088,139 @@ subroutine read_dbz_mrms_sparse_netcdf(nread,ndata,nodata,infile,obstype,lunout, pixel: do ipix=1,real_numpixel j=pixel_x_nc(ipix)+1 i=pixel_y_nc(ipix)+1 - - thisrange=strct_in_dbz(v,k)%fstgatdis + float(i-1)*strct_in_dbz(v,k)%gateWidth + + thisrange=strct_in_dbz(v,k)%fstgatdis + real(i-1,r_kind)*strct_in_dbz(v,k)%gateWidth !-Check to make sure observations are within specified range - if (thisrange <= maxobrange .and. thisrange >= minobrange) then - - - nread=nread+1 + if (thisrange <= maxobrange .and. thisrange >= minobrange) then + + + nread=nread+1 if ( abs(obdata_pixel_nc(ipix)) >= 999.0_r_kind ) then - - !--Extend no precip observations to missing data fields? + + !--Extend no precip observations to missing data fields? ! May help suppress spurious convection if a problem. - + if (missing_to_nopcp) then - obdata_pixel_nc(ipix) = dbznoise - num_m2nopcp = num_m2nopcp+1 - else - num_missing=num_missing+1 - cycle pixel !No reason to process the ob if it is missing + obdata_pixel_nc(ipix) = dbznoise + num_m2nopcp = num_m2nopcp+1 + else + num_missing=num_missing+1 + cycle pixel !No reason to process the ob if it is missing end if - + + end if + + + if (l_limmax) then + if ( obdata_pixel_nc(ipix) > 60_r_kind ) then + obdata_pixel_nc(ipix) = 60_r_kind + num_limmax=num_limmax+1 + end if end if - - - if (l_limmax) then - if ( obdata_pixel_nc(ipix) > 60_r_kind ) then - obdata_pixel_nc(ipix) = 60_r_kind - num_limmax=num_limmax+1 - end if - end if - if (l_limmin) then - if ( obdata_pixel_nc(ipix) < 0_r_kind ) then - obdata_pixel_nc(ipix) = 0_r_kind - num_limmin=num_limmin+1 - end if - end if - - !-Special treatment for no-precip obs? - - - !--Find observation height using method from read_l2bufr_mod.f90 - - this_stahgt=strct_in_dbz(v,k)%radhgt + if (l_limmin) then + if ( obdata_pixel_nc(ipix) < 0_r_kind ) then + obdata_pixel_nc(ipix) = 0_r_kind + num_limmin=num_limmin+1 + end if + end if + + !-Special treatment for no-precip obs? + + + !--Find observation height using method from read_l2bufr_mod.f90 + + this_stahgt=strct_in_dbz(v,k)%radhgt aactual=rearth+this_stahgt a43=four_thirds*aactual thistiltr=thistilt*deg2rad selev0=sin(thistiltr) - celev0=cos(thistiltr) - b=thisrange*(thisrange+two*aactual*selev0) + celev0=cos(thistiltr) + b=thisrange*(thisrange+two*aactual*selev0) c=sqrt(aactual*aactual+b) ha=b/(aactual+c) epsh=(thisrange*thisrange-ha*ha)/(r8*aactual) h=ha-epsh - thishgt=this_stahgt+h - - !--Find observation location using method from read_l2bufr_mod.f90 - - !-Get corrected tilt angle - celev=celev0 - selev=selev0 - celev=a43*celev0/(a43+h) - selev=(thisrange*thisrange+h*h+two*a43*h)/(two*thisrange*(a43+h)) - - gamma=half*thisrange*(celev0+celev) - + thishgt=this_stahgt+h + + !--Find observation location using method from read_l2bufr_mod.f90 + + !-Get corrected tilt angle + celev=celev0 + selev=selev0 + celev=a43*celev0/(a43+h) + selev=(thisrange*thisrange+h*h+two*a43*h)/(two*thisrange*(a43+h)) + + gamma=half*thisrange*(celev0+celev) + !-Get earth lat lon of observation - + rlon0=deg2rad*strct_in_dbz(v,k)%radlon - clat0=cos(deg2rad*strct_in_dbz(v,k)%radlat) - slat0=sin(deg2rad*strct_in_dbz(v,k)%radlat) - thisazimuthr=(90.0_r_kind-strct_in_dbz(v,k)%azim(j))*deg2rad !Storing as 90-azm to - ! be consistent with - ! read_l2bufr_mod.f90 - rad_per_meter=one/rearth - rlonloc=rad_per_meter*gamma*cos(thisazimuthr) + clat0=cos(deg2rad*strct_in_dbz(v,k)%radlat) + slat0=sin(deg2rad*strct_in_dbz(v,k)%radlat) + thisazimuthr=(90.0_r_kind-strct_in_dbz(v,k)%azim(j))*deg2rad !Storing as 90-azm to + ! be consistent with + ! read_l2bufr_mod.f90 + rad_per_meter=one/rearth + rlonloc=rad_per_meter*gamma*cos(thisazimuthr) rlatloc=rad_per_meter*gamma*sin(thisazimuthr) - - call invtllv(rlonloc,rlatloc,rlon0,clat0,slat0,rlonglob,rlatglob) + + call invtllv(rlonloc,rlatloc,rlon0,clat0,slat0,rlonglob,rlatglob) - thislat=rlatglob*rad2deg + thislat=rlatglob*rad2deg thislon=rlonglob*rad2deg !-Check format of longitude and correct if necessary - if(thislon>=r360) thislon=thislon-r360 + if(thislon>=r360) thislon=thislon-r360 if(thislon 0.75_r_kind) cycle obsloop endif - crit1 = crit1 + 10._r_kind * float(iskip) + crit1 = crit1 + 10._r_kind * real(iskip,r_kind) call checkob(dist1,crit1,itx,iuse) if(.not. iuse) then cycle obsloop @@ -819,7 +819,7 @@ subroutine read_gmi(mype,val_gmi,ithin,rmesh,jsatid,gstime,& if(pos_max==0) then j2=1 else - j2=nint(float(pos_statis(i))/pos_max) + j2=nint(real(pos_statis(i),r_kind)/pos_max) j2=max(1,j2) endif do j=1,pos_statis(i),j2 @@ -835,7 +835,7 @@ subroutine read_gmi(mype,val_gmi,ithin,rmesh,jsatid,gstime,& if(pos_max==0) then j2=1 else - j2=nint(float(pos_statis(i))/pos_max) + j2=nint(real(pos_statis(i),r_kind)/pos_max) j2=max(1,j2) endif do j=1,pos_statis(i),j2 diff --git a/src/gsi/read_goesglm.f90 b/src/gsi/read_goesglm.f90 index bf8639c72d..f087430092 100644 --- a/src/gsi/read_goesglm.f90 +++ b/src/gsi/read_goesglm.f90 @@ -224,7 +224,7 @@ subroutine read_goesglm(nread,ndata,nodata,infile,obstype,lunout,twindin,sis) call w3fs21(idate5,minan) ! analysis ref time in seconds relative to historic date ! Add obs reference time, then subtract analysis time to get obs time relative to analysis - time_correction=float(minobs-minan)*r60inv + time_correction=real(minobs-minan,r_kind)*r60inv else time_correction=zero end if @@ -512,13 +512,13 @@ subroutine convert_to_flash_rate & end do !! do iobs=2,ndata_strike - darea=darea_sum/float(ndata_strike) + darea=darea_sum/real(ndata_strike,r_kind) else !! ndata_strike=0 darea=zero end if !! if(ndata_strike>0) then - dtime=float(nhr_assimilation) + dtime=real(nhr_assimilation,r_kind) ! Regional @@ -574,8 +574,8 @@ subroutine convert_to_flash_rate & !! find lightning strikes near the (ii0,jj0) point - xbound=float(ii0) - ybound=float(jj0) + xbound=real(ii0,r_kind) + ybound=real(jj0,r_kind) xflag=(xx>xbound) .AND. (xxybound) .AND. (yy0) then - glon_central(index)=glon_central(index)/float(lcount(index)) - glat_central(index)=glat_central(index)/float(lcount(index)) - lon_central(index)= lon_central(index)/float(lcount(index)) - lat_central(index)= lat_central(index)/float(lcount(index)) + glon_central(index)=glon_central(index)/real(lcount(index),r_kind) + glat_central(index)=glat_central(index)/real(lcount(index),r_kind) + lon_central(index)= lon_central(index)/real(lcount(index),r_kind) + lat_central(index)= lat_central(index)/real(lcount(index),r_kind) endif !! if(lcount(index)>0) then enddo !! do index=1,ngridh @@ -653,7 +653,7 @@ subroutine convert_to_flash_rate & cdata_flash_h( 3,icount)=glat_central(index) if (darea>0._r_kind) then - cdata_flash_h( 4,icount)=float(lcount(index))/(darea*dtime) + cdata_flash_h( 4,icount)=real(lcount(index),r_kind)/(darea*dtime) else cdata_flash_h( 4,icount)=0. end if @@ -727,22 +727,22 @@ subroutine convert_time (date_old,date_new,nmax) jdd=INT(0.0001_r_kind*xdate(i)) idd=INT(xdate(i))-jdd*10000 - ysumidd=float(idd) - dd=float(INT(0.01_r_kind*ysumidd)) + ysumidd=real(idd,r_kind) + dd=real(INT(0.01_r_kind*ysumidd),r_kind) hh=ysumidd-dd*100._r_kind sumidd=sumidd+dd*24._r_kind+hh enddo !! do i=1,nmax - xsumidd=float(sumidd)/nmax - ysumidd=float(INT(xsumidd)) + xsumidd=real(sumidd,r_kind)/nmax + ysumidd=real(INT(xsumidd),r_kind) kdd=INT(xsumidd/24._r_kind) - xdd=float(kdd) - xhh=ysumidd-float(kdd)*24._r_kind + xdd=real(kdd,r_kind) + xhh=ysumidd-real(kdd,r_kind)*24._r_kind - ydate=float(jdd)*10000._r_kind+xdd*100._r_kind+xhh+xccyy + ydate=real(jdd,r_kind)*10000._r_kind+xdd*100._r_kind+xhh+xccyy date_old=ydate diff --git a/src/gsi/read_goesndr.f90 b/src/gsi/read_goesndr.f90 index 86fc1f0a5c..7c55b6ab4c 100644 --- a/src/gsi/read_goesndr.f90 +++ b/src/gsi/read_goesndr.f90 @@ -382,7 +382,7 @@ subroutine read_goesndr(mype,val_goes,ithin,rmesh,jsatid,infile,& nread=nread+nchanl crit0=0.01_r_kind - if(ifov < mfov .and. ifov > 0) crit0 = crit0+two*float(mfov-ifov) + if(ifov < mfov .and. ifov > 0) crit0 = crit0+two*real(mfov-ifov,r_kind) timeinflat=6.0_r_kind call tdiff2crit(tdiff,ptime,ithin_time,timeinflat,crit0,crit1,it_mesh) call map2tgrid(dlat_earth,dlon_earth,dist1,crit1,itx,ithin,itt,iuse,sis,it_mesh=it_mesh) diff --git a/src/gsi/read_iasi.f90 b/src/gsi/read_iasi.f90 index 4e688cd36e..9ab1d5446f 100644 --- a/src/gsi/read_iasi.f90 +++ b/src/gsi/read_iasi.f90 @@ -577,7 +577,7 @@ subroutine read_iasi(mype,val_iasi,ithin,isfcalc,rmesh,jsatid,gstime,& nread = nread + satinfo_nchan crit0 = 0.01_r_kind - if( llll > 1 ) crit0 = crit0 + r100 * float(llll) + if( llll > 1 ) crit0 = crit0 + r100 * real(llll,r_kind) timeinflat=6.0_r_kind call tdiff2crit(tdiff,ptime,ithin_time,timeinflat,crit0,crit1,it_mesh) call map2tgrid(dlat_earth,dlon_earth,dist1,crit1,itx,ithin,itt,iuse,sis,it_mesh=it_mesh) @@ -598,7 +598,7 @@ subroutine read_iasi(mype,val_iasi,ithin,isfcalc,rmesh,jsatid,gstime,& ! Compare IASI satellite scan angle and zenith angle piece = -step_adjust if ( mod(ifovn,2) == 1) piece = step_adjust - lza = ((start + float((ifov-1)/4)*step) + piece)*deg2rad + lza = ((start + real((ifov-1)/4,r_kind)*step) + piece)*deg2rad sat_height_ratio = (earth_radius + linele(4))/earth_radius lzaest = asin(sat_height_ratio*sin(lza))*rad2deg if (abs(sat_zenang - lzaest) > one) then @@ -748,7 +748,7 @@ subroutine read_iasi(mype,val_iasi,ithin,isfcalc,rmesh,jsatid,gstime,& cycle read_loop end if -! crit1=crit1 + ten*float(iskip) +! crit1=crit1 + ten*real(iskip,r_kind) ! If the surface channel exists (~960.0 cm-1) and the AVHRR cloud information is missing, use an ! estimate of the surface temperature to determine if the profile may be clear. diff --git a/src/gsi/read_lidar.f90 b/src/gsi/read_lidar.f90 index 6d74de0802..ad5b27b784 100644 --- a/src/gsi/read_lidar.f90 +++ b/src/gsi/read_lidar.f90 @@ -172,7 +172,7 @@ subroutine read_lidar(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) ! add obs reference time, then subtract analysis time to get obs time relative to analysis - time_correction=float(minobs-minan)*r60inv + time_correction=real(minobs-minan,r_kind)*r60inv else time_correction=zero diff --git a/src/gsi/read_nsstbufr.f90 b/src/gsi/read_nsstbufr.f90 index adfdee4f13..d7a3472dd0 100644 --- a/src/gsi/read_nsstbufr.f90 +++ b/src/gsi/read_nsstbufr.f90 @@ -367,7 +367,7 @@ subroutine read_nsstbufr(nread,ndata,nodata,gstime,infile,obstype,lunout, & if ( rsc > 60.0_r_kind .or. rsc < zero ) rsc = zero !second in real call w3fs21(idate5,nmind) - sstime=float(nmind) + sstime=real(nmind,r_kind) tdiff=(sstime-gstime)*r60inv diff --git a/src/gsi/read_ozone.f90 b/src/gsi/read_ozone.f90 index 43dd16d5c8..2ad95a858e 100644 --- a/src/gsi/read_ozone.f90 +++ b/src/gsi/read_ozone.f90 @@ -1056,7 +1056,7 @@ subroutine read_ozone(nread,ndata,nodata,jsatid,infile,gstime,lunout, & ozout(8,ndata)=usage1(k) ! ozout(9,ndata)=mlspres(k) ! mls pressure in log(cb) ozout(10,ndata)=mlsozpc(k) ! ozone mixing ratio precision in ppmv - ozout(11,ndata)=float(ipos(k)) ! pointer of obs level index in ozinfo.txt + ozout(11,ndata)=real(ipos(k),r_kind) ! pointer of obs level index in ozinfo.txt ozout(12,ndata)=nloz ! # of mls vertical levels ozout(nreal+1,ndata)=mlsoz(k) ! ozone mixing ratio in ppmv end do @@ -1220,7 +1220,7 @@ subroutine read_ozone(nread,ndata,nodata,jsatid,infile,gstime,lunout, & ozout(8,ndata)=usage1(k) ! ozout(9,ndata)=log(press(k)) ! ompslp pressure in log(cb) ozout(10,ndata)=omrstd(k)*ompslp_mult_fact ! ozone mixing ratio precision in ppmv - ozout(11,ndata)=float(ipos(k)) ! pointer of obs level index in + ozout(11,ndata)=real(ipos(k),r_kind) ! pointer of obs level index in ! ozinfo.txt ozout(12,ndata)=j !nloz ! # of ompslp vertical levels ozout(13,ndata)=omr(k) ! ozone mixing ratio in ppmv diff --git a/src/gsi/read_pblh.f90 b/src/gsi/read_pblh.f90 index a7b7c066a2..1ff2cd2c23 100644 --- a/src/gsi/read_pblh.f90 +++ b/src/gsi/read_pblh.f90 @@ -343,7 +343,7 @@ subroutine read_pblh(nread,ndata,nodata,infile,obstype,lunout,twindin,& ! Add obs reference time, then subtract analysis time to get obs time relative to analysis - time_correction=float(minobs-minan)/60._r_kind + time_correction=real(minobs-minan,r_kind)/60._r_kind else time_correction=zero diff --git a/src/gsi/read_prepbufr.f90 b/src/gsi/read_prepbufr.f90 index 304fa62590..eaece05451 100644 --- a/src/gsi/read_prepbufr.f90 +++ b/src/gsi/read_prepbufr.f90 @@ -1070,7 +1070,7 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,& ! Add obs reference time, then subtract analysis time to get obs time relative to analysis - time_correction=float(minobs-minan)*r60inv + time_correction=real(minobs-minan,r_kind)*r60inv else time_correction=zero diff --git a/src/gsi/read_radar_wind_ascii.f90 b/src/gsi/read_radar_wind_ascii.f90 index 604d9d0eca..9d92699b6e 100644 --- a/src/gsi/read_radar_wind_ascii.f90 +++ b/src/gsi/read_radar_wind_ascii.f90 @@ -173,19 +173,19 @@ subroutine read_radar_wind_ascii(nread,ndata,nodata,infile,lunout,obstype,sis,hg end type radar !--Counters for diagnostics - integer(i_kind) :: num_missing=0,numbadtime=0, & !counts - num_badtilt=0,num_badrange=0, & - ibadazm=0 + integer(i_kind) :: num_missing=0,numbadtime=0, & !counts + num_badtilt=0,num_badrange=0, & + ibadazm=0 -integer(i_kind) :: ithin,zflag,nlevz,icntpnt,klon1,klat1,kk,klatp1,klonp1 -real(r_kind) :: rmesh,xmesh,zmesh,dx,dy,dx1,dy1,w00,w01,w10,w11 -real(r_kind), allocatable, dimension(:) :: zl_thin + integer(i_kind) :: ithin,zflag,nlevz,icntpnt,klon1,klat1,kk,klatp1,klonp1 + real(r_kind) :: rmesh,xmesh,zmesh,dx,dy,dx1,dy1,w00,w01,w10,w11 + real(r_kind), allocatable, dimension(:) :: zl_thin real(r_kind),dimension(nsig):: hges,zges real(r_kind) sin2,termg,termr,termrg,zobs,height integer(i_kind) ntmp,iout,iiout,ntdrvr_thin2 real(r_kind) crit1,timedif real(r_kind),parameter:: r16000 = 16000.0_r_kind -logical :: luse + logical :: luse integer(i_kind) maxout,maxdata integer(i_kind),allocatable,dimension(:):: isort @@ -201,7 +201,7 @@ subroutine read_radar_wind_ascii(nread,ndata,nodata,infile,lunout,obstype,sis,hg real(r_kind) :: thistiltr,selev0,celev0,thisrange,this_stahgt,thishgt real(r_kind) :: celev,selev,gamma,thisazimuthr,rlon0,t4dv, & clat0,slat0,dlat,dlon,thiserr,thislon,thislat, & - rlonloc,rlatloc,rlonglob,rlatglob,timeb,rad_per_meter + rlonloc,rlatloc,rlonglob,rlatglob,timeb,rad_per_meter real(r_kind) :: azm,cosazm_earth,sinazm_earth,cosazm,sinazm real(r_kind) :: radartwindow real(r_kind) :: rmins_an,rmins_ob @@ -217,7 +217,7 @@ subroutine read_radar_wind_ascii(nread,ndata,nodata,infile,lunout,obstype,sis,hg type(radar),allocatable :: strct_in_vel(:,:) -real(r_kind) :: mintilt,maxtilt,maxobrange,minobrange + real(r_kind) :: mintilt,maxtilt,maxobrange,minobrange integer(i_kind) :: thin_freq=1 @@ -228,10 +228,10 @@ subroutine read_radar_wind_ascii(nread,ndata,nodata,infile,lunout,obstype,sis,hg !-Check if radial velocity is in the convinfo file and extract necessary attributes - ithin=1 !number of obs to keep per grid box - if(radar_no_thinning) then - ithin=-1 - endif + ithin=1 !number of obs to keep per grid box + if(radar_no_thinning) then + ithin=-1 + endif errmax=-huge(errmax) errmin=huge(errmin) @@ -241,13 +241,13 @@ subroutine read_radar_wind_ascii(nread,ndata,nodata,infile,lunout,obstype,sis,hg if(trim(obstype) == trim(ioctype(i)) .and. abs(icuse(i))== 1) then ikx=i radartwindow=ctwind(ikx)*r60 !Time window units converted to minutes - ! (default setting for dbz within convinfo is 0.05 hours) - thiserr= 2_r_kind !1.75_r_kind !2_r_kind !Ob error (m/s) to use for radial velocity - exit !Exit loop when finished with initial convinfo fields + ! (default setting for dbz within convinfo is 0.05 hours) + thiserr= 2_r_kind !1.75_r_kind !2_r_kind !Ob error (m/s) to use for radial velocity + exit !Exit loop when finished with initial convinfo fields else if ( i==nconvtype ) then write(6,*) 'READ_RADAR_WIND_ASCII: ERROR - OBSERVATION TYPE IS NOT PRESENT IN CONVINFO OR USE FLAG IS ZERO' - write(6,*) 'READ_RADAR_WIND_ASCII: ABORTING read_radar_wind_ascii.f90 - NO VELOCITY OBS READ!' - return + write(6,*) 'READ_RADAR_WIND_ASCII: ABORTING read_radar_wind_ascii.f90 - NO VELOCITY OBS READ!' + return endif end do @@ -362,12 +362,12 @@ subroutine read_radar_wind_ascii(nread,ndata,nodata,infile,lunout,obstype,sis,hg obdate(1)=strct_in_vel(1,k)%year obdate(2)=strct_in_vel(1,k)%month - obdate(3)=strct_in_vel(1,k)%day + obdate(3)=strct_in_vel(1,k)%day obdate(4)=strct_in_vel(1,k)%hour obdate(5)=strct_in_vel(1,k)%minute call w3fs21(obdate,mins_ob) !mins_ob -integer number of mins snce 01/01/1978 - rmins_ob=mins_ob !convert to real number - rmins_ob=rmins_ob+(strct_in_vel(1,k)%second*r60inv) !convert seconds to minutes and add to ob time + rmins_ob=mins_ob !convert to real number + rmins_ob=rmins_ob+(strct_in_vel(1,k)%second*r60inv) !convert seconds to minutes and add to ob time !-Comparison is done in units of minutes @@ -377,70 +377,70 @@ subroutine read_radar_wind_ascii(nread,ndata,nodata,infile,lunout,obstype,sis,hg if(doradaroneob .and. (oneobradid /= strct_in_vel(1,k)%radid)) cycle tilts if(abs(timeb) > abs(radartwindow)) then - numbadtime=numbadtime+1 - cycle tilts !If not in time window, cycle the loop - end if + numbadtime=numbadtime+1 + cycle tilts !If not in time window, cycle the loop + end if !--Time window check complete--! thistilt=strct_in_vel(1,k)%elev_angle if (thistilt <= maxtilt .and. thistilt >= mintilt) then gates: do i=1,strct_in_vel(1,k)%num_gate,thin_freq - thisrange=strct_in_vel(1,k)%fstgatdis + float(i-1)*strct_in_vel(1,k)%gateWidth - + thisrange=strct_in_vel(1,k)%fstgatdis + real(i-1,r_kind)*strct_in_vel(1,k)%gateWidth + !-Check to make sure observations are within specified range - if (thisrange <= maxobrange .and. thisrange >= minobrange) then - - azms: do j=1,strct_in_vel(1,k)%num_beam - - !-Check to see if this is a missing observation) - nread=nread+1 - if ( strct_in_vel(1,k)%field(i,j) >= 999.0_r_kind ) then - num_missing=num_missing+1 - cycle azms !No reason to process the ob if it is missing + if (thisrange <= maxobrange .and. thisrange >= minobrange) then + + azms: do j=1,strct_in_vel(1,k)%num_beam + + !-Check to see if this is a missing observation) + nread=nread+1 + if ( strct_in_vel(1,k)%field(i,j) >= 999.0_r_kind ) then + num_missing=num_missing+1 + cycle azms !No reason to process the ob if it is missing end if - - !--Find observation height using method from read_l2bufr_mod.f90 - - this_stahgt=strct_in_vel(1,k)%radhgt + + !--Find observation height using method from read_l2bufr_mod.f90 + + this_stahgt=strct_in_vel(1,k)%radhgt aactual=rearth+this_stahgt a43=four_thirds*aactual thistiltr=thistilt*deg2rad selev0=sin(thistiltr) - celev0=cos(thistiltr) - b=thisrange*(thisrange+two*aactual*selev0) + celev0=cos(thistiltr) + b=thisrange*(thisrange+two*aactual*selev0) c=sqrt(aactual*aactual+b) ha=b/(aactual+c) epsh=(thisrange*thisrange-ha*ha)/(r8*aactual) h=ha-epsh - thishgt=this_stahgt+h + thishgt=this_stahgt+h height=thishgt - !--Find observation location using method from read_l2bufr_mod.f90 - - !-Get corrected tilt angle - celev=celev0 - selev=selev0 - celev=a43*celev0/(a43+h) - selev=(thisrange*thisrange+h*h+two*a43*h)/(two*thisrange*(a43+h)) - - gamma=half*thisrange*(celev0+celev) - + !--Find observation location using method from read_l2bufr_mod.f90 + + !-Get corrected tilt angle + celev=celev0 + selev=selev0 + celev=a43*celev0/(a43+h) + selev=(thisrange*thisrange+h*h+two*a43*h)/(two*thisrange*(a43+h)) + + gamma=half*thisrange*(celev0+celev) + !-Get earth lat lon of observation - + rlon0=deg2rad*strct_in_vel(1,k)%radlon - clat0=cos(deg2rad*strct_in_vel(1,k)%radlat) - slat0=sin(deg2rad*strct_in_vel(1,k)%radlat) - thisazimuthr=(90.0_r_kind-strct_in_vel(1,k)%azim(j))*deg2rad !Storing as 90-azm to - ! be consistent with - ! read_l2bufr_mod.f90 - rad_per_meter=one/rearth - rlonloc=rad_per_meter*gamma*cos(thisazimuthr) + clat0=cos(deg2rad*strct_in_vel(1,k)%radlat) + slat0=sin(deg2rad*strct_in_vel(1,k)%radlat) + thisazimuthr=(90.0_r_kind-strct_in_vel(1,k)%azim(j))*deg2rad !Storing as 90-azm to + ! be consistent with + ! read_l2bufr_mod.f90 + rad_per_meter=one/rearth + rlonloc=rad_per_meter*gamma*cos(thisazimuthr) rlatloc=rad_per_meter*gamma*sin(thisazimuthr) - - call invtllv(rlonloc,rlatloc,rlon0,clat0,slat0,rlonglob,rlatglob) + + call invtllv(rlonloc,rlatloc,rlon0,clat0,slat0,rlonglob,rlatglob) - thislat=rlatglob*rad2deg + thislat=rlatglob*rad2deg thislon=rlonglob*rad2deg if(doradaroneob) then @@ -450,21 +450,21 @@ subroutine read_radar_wind_ascii(nread,ndata,nodata,infile,lunout,obstype,sis,hg endif - if(thislon>=r360) thislon=thislon-r360 + if(thislon>=r360) thislon=thislon-r360 if(thislonzero) errmin=min(error,errmin) if(abs(azm)>r400) then ibadazm=ibadazm+1 cycle azms end if - - this_staid=strct_in_vel(1,k)%radid !Via equivalence in declaration, value is propagated - ! to rstation_id used below. - - ! Get model terrain at radar station location - ! If radar station is outside of grid, does not mean the - ! radar obs are outside the grid - therefore no need to - ! cycle azms. - - radar_lon=deg2rad*strct_in_vel(1,k)%radlon - radar_lat=deg2rad*strct_in_vel(1,k)%radlat - call tll2xy(radar_lon,radar_lat,dlon_radar,dlat_radar,outside) + + this_staid=strct_in_vel(1,k)%radid !Via equivalence in declaration, value is propagated + ! to rstation_id used below. + + ! Get model terrain at radar station location + ! If radar station is outside of grid, does not mean the + ! radar obs are outside the grid - therefore no need to + ! cycle azms. + + radar_lon=deg2rad*strct_in_vel(1,k)%radlon + radar_lat=deg2rad*strct_in_vel(1,k)%radlat + call tll2xy(radar_lon,radar_lat,dlon_radar,dlat_radar,outside) call deter_zsfc_model(dlat_radar,dlon_radar,zsges) - - ! Determines land surface type based on surrounding land + + ! Determines land surface type based on surrounding land ! surface types - t4dv=timeb*r60inv - - call deter_sfc2(thislat,thislon,t4dv,idomsfc,skint,ff10,sfcr) - + t4dv=timeb*r60inv + + call deter_sfc2(thislat,thislon,t4dv,idomsfc,skint,ff10,sfcr) + !#################### Data thinning ################### @@ -573,37 +573,37 @@ subroutine read_radar_wind_ascii(nread,ndata,nodata,infile,lunout,obstype,sis,hg isort(icntpnt)=iout endif - cdata_all(1,iout) = error ! wind obs error (m/s) - cdata_all(2,iout) = dlon ! grid relative longitude - cdata_all(3,iout) = dlat ! grid relative latitude - cdata_all(4,iout) = thishgt ! obs absolute height (m) - cdata_all(5,iout) = strct_in_vel(1,k)%field(i,j) ! wind obs (m/s) - cdata_all(6,iout) = azm ! azimuth angle (radians) - cdata_all(7,iout) = t4dv ! obs time (hour) - analysis relative - cdata_all(8,iout) = ikx ! type - cdata_all(9,iout) = thistiltr ! tilt angle (radians) - cdata_all(10,iout)= this_stahgt ! station elevation (m) - cdata_all(11,iout)= rstation_id ! station id - cdata_all(12,iout)= icuse(ikx) ! usage parameter - cdata_all(13,iout)= idomsfc ! dominate surface type - cdata_all(14,iout)= skint ! skin temperature - cdata_all(15,iout)= ff10 ! 10 meter wind factor - cdata_all(16,iout)= sfcr ! surface roughness - cdata_all(17,iout)=thislon*rad2deg ! earth relative longitude (degrees) - cdata_all(18,iout)=thislat*rad2deg ! earth relative latitude (degrees) - cdata_all(19,iout)=thisrange/1000_r_kind ! range from radar in km (used to estimate beam spread) - cdata_all(20,iout)=zsges ! model elevation at radar site - cdata_all(21,iout)=thiserr - cdata_all(22,iout)=two ! Level 2 data + cdata_all(1,iout) = error ! wind obs error (m/s) + cdata_all(2,iout) = dlon ! grid relative longitude + cdata_all(3,iout) = dlat ! grid relative latitude + cdata_all(4,iout) = thishgt ! obs absolute height (m) + cdata_all(5,iout) = strct_in_vel(1,k)%field(i,j) ! wind obs (m/s) + cdata_all(6,iout) = azm ! azimuth angle (radians) + cdata_all(7,iout) = t4dv ! obs time (hour) - analysis relative + cdata_all(8,iout) = ikx ! type + cdata_all(9,iout) = thistiltr ! tilt angle (radians) + cdata_all(10,iout)= this_stahgt ! station elevation (m) + cdata_all(11,iout)= rstation_id ! station id + cdata_all(12,iout)= icuse(ikx) ! usage parameter + cdata_all(13,iout)= idomsfc ! dominate surface type + cdata_all(14,iout)= skint ! skin temperature + cdata_all(15,iout)= ff10 ! 10 meter wind factor + cdata_all(16,iout)= sfcr ! surface roughness + cdata_all(17,iout)=thislon*rad2deg ! earth relative longitude (degrees) + cdata_all(18,iout)=thislat*rad2deg ! earth relative latitude (degrees) + cdata_all(19,iout)=thisrange/1000._r_kind ! range from radar in km (used to estimate beam spread) + cdata_all(20,iout)=zsges ! model elevation at radar site + cdata_all(21,iout)=thiserr + cdata_all(22,iout)=two ! Level 2 data if(doradaroneob .and. (cdata_all(5,iout) > -99_r_kind) ) exit volumes end do azms !j else - num_badrange=num_badrange+1 !If outside acceptable range, increment - end if !Range check - - end do gates !i + num_badrange=num_badrange+1 !If outside acceptable range, increment + end if !Range check + + end do gates !i else num_badtilt=num_badtilt+1 !If outside acceptable tilts, increment diff --git a/src/gsi/read_saphir.f90 b/src/gsi/read_saphir.f90 index 3547f2cf5c..06e992b03d 100644 --- a/src/gsi/read_saphir.f90 +++ b/src/gsi/read_saphir.f90 @@ -360,10 +360,10 @@ subroutine read_saphir(mype,val_tovs,ithin,isfcalc,& ! compute look angle (panglr) and check against max angle -! panglr=(start+float(ifov-1)*step)*deg2rad +! panglr=(start+real(ifov-1,r_kind)*step)*deg2rad ! Use this calculation for now: step = .6660465 - panglr = (42.96 - float(ifov-1)*step)*deg2rad + panglr = (42.96 - real(ifov-1,r_kind)*step)*deg2rad if(abs(lza)*rad2deg > MAX_SENSOR_ZENITH_ANGLE) then write(6,*)'READ_SAPHIR WARNING lza error ',lza,panglr @@ -508,7 +508,7 @@ subroutine read_saphir(mype,val_tovs,ithin,isfcalc,& - crit1 = crit1 + rlndsea(isflg) + 10._r_kind*float(iskip) + 0.01_r_kind * abs(zz) + crit1 = crit1 + rlndsea(isflg) + 10._r_kind*real(iskip,r_kind) + 0.01_r_kind * abs(zz) call checkob(dist1,crit1,itx,iuse) if(.not. iuse)cycle ObsLoop @@ -529,10 +529,10 @@ subroutine read_saphir(mype,val_tovs,ithin,isfcalc,& endif ! Re-calculate look angle -! panglr=(start+float(ifov-1)*step)*deg2rad +! panglr=(start+real(ifov-1,r_kind)*step)*deg2rad ! Use this calculation for now: step = .6660465 - panglr = (42.96 - float(ifov-1)*step)*deg2rad + panglr = (42.96 - real(ifov-1,r_kind)*step)*deg2rad ! Load selected observation into data array diff --git a/src/gsi/read_wcpbufr.f90 b/src/gsi/read_wcpbufr.f90 index 41dc36f3f6..f3daa5de43 100644 --- a/src/gsi/read_wcpbufr.f90 +++ b/src/gsi/read_wcpbufr.f90 @@ -430,7 +430,7 @@ subroutine read_wcpbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,& ! Add obs reference time, then subtract analysis time to get obs time relative to analysis - time_correction=float(minobs-minan)*r60inv + time_correction=real(minobs-minan,r_kind)*r60inv else time_correction=zero diff --git a/src/gsi/reorg_metar_cloud.f90 b/src/gsi/reorg_metar_cloud.f90 index 2d947f2ef3..478d1ab363 100644 --- a/src/gsi/reorg_metar_cloud.f90 +++ b/src/gsi/reorg_metar_cloud.f90 @@ -264,9 +264,9 @@ subroutine reorg_metar_cloud(cdata,nreal,ndata,cdata_all,maxobs,ngrid) min_dist = 1.e10_r_kind do ic= 1,nsta_cld ista = sta_cld(ic) - dist = (float(i1)-cdata(2,ista))*(float(i1)-cdata(2,ista)) & - +(float(j1)-cdata(3,ista))*(float(j1)-cdata(3,ista)) - if (dist < min_dist .and. dist < float(isprd2)) then + dist = (real(i1,r_kind)-cdata(2,ista))*(real(i1,r_kind)-cdata(2,ista)) & + +(real(j1,r_kind)-cdata(3,ista))*(real(j1,r_kind)-cdata(3,ista)) + if (dist < min_dist .and. dist < real(isprd2,r_kind)) then min_dist = dist ista_min = ista end if @@ -318,8 +318,8 @@ subroutine reorg_metar_cloud(cdata,nreal,ndata,cdata_all,maxobs,ngrid) enddo cdata_all(24,iout) = cdata_all(2,iout) ! save observaion station i cdata_all(25,iout) = cdata_all(3,iout) ! save observaion station j - cdata_all(2,iout) = float(i1) ! grid index i - cdata_all(3,iout) = float(j1) ! grid index j + cdata_all(2,iout) = real(i1,r_kind) ! grid index i + cdata_all(3,iout) = real(j1,r_kind) ! grid index j cdata_all(23,iout)= min_dist ! distance from station endif endif diff --git a/src/gsi/rfdpar.f90 b/src/gsi/rfdpar.f90 index 79fa959bcb..b679ed6448 100644 --- a/src/gsi/rfdpar.f90 +++ b/src/gsi/rfdpar.f90 @@ -71,7 +71,7 @@ subroutine rfdpar1(be,rate,m) cof=zero cof(0)=one do i=1,m - cof(i)=half*cof(i-1)/float(i) + cof(i)=half*cof(i-1)/real(i,r_kind) enddo ! Locate the m roots of this polynomial: call zroots(cof,m,croot,polish) diff --git a/src/gsi/satthin.F90 b/src/gsi/satthin.F90 index 2018d80be7..93f193014f 100644 --- a/src/gsi/satthin.F90 +++ b/src/gsi/satthin.F90 @@ -614,9 +614,9 @@ subroutine getsfc(mype,mype_io,use_sfc,use_sfc_any) jmax=nlat_sfc-2 allocate(slatx(jmax),wlatx(jmax)) call splat(idrt,jmax,slatx,wlatx) - dlon=two*pi/float(nlon_sfc) + dlon=two*pi/real(nlon_sfc,r_kind) do i=1,nlon_sfc - rlons_sfc(i)=float(i-1)*dlon + rlons_sfc(i)=real(i-1,r_kind)*dlon end do do i=1,(nlat_sfc-1)/2 rlats_sfc(i+1)=-asin(slatx(i)) diff --git a/src/gsi/setupbend.f90 b/src/gsi/setupbend.f90 index 9bc856d67a..e82aa3dec9 100644 --- a/src/gsi/setupbend.f90 +++ b/src/gsi/setupbend.f90 @@ -331,9 +331,9 @@ subroutine setupbend(obsLL,odiagLL, & ! Intialize variables nsig_up=nsig+nsig_ext ! extend nsig_ext levels above interface level nsig - rsig=float(nsig) + rsig=real(nsig,r_kind) rdog=rd/grav - rsig_up=float(nsig_up) + rsig_up=real(nsig_up,r_kind) nobs_out=0 hob_s_top=one mm1=mype+1 @@ -618,7 +618,7 @@ subroutine setupbend(obsLL,odiagLL, & ihob=hob k1=min(max(1,ihob),nsig) k2=max(1,min(ihob+1,nsig)) - delz=hob-float(k1) + delz=hob-real(k1,r_kind) delz=max(zero,min(delz,one)) trefges=tges_o(k1,i)*(one-delz)+tges_o(k2,i)*delz qrefges=qges_o(k1)*(one-delz)+qges_o(k2)*delz !Lidia diff --git a/src/gsi/setupdw.f90 b/src/gsi/setupdw.f90 index 63c0df4b19..6ca68e4cae 100644 --- a/src/gsi/setupdw.f90 +++ b/src/gsi/setupdw.f90 @@ -298,7 +298,7 @@ subroutine setupdw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa end if scale=one - rsig=float(nsig) + rsig=real(nsig,r_kind) mm1=mype+1 call dtime_setup() @@ -496,7 +496,7 @@ subroutine setupdw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa dwwind=(ugesindw*sinazm+vgesindw*cosazm)*factw iz = max(1, min( int(dpres), nsig)) - delz = max(zero, min(dpres - float(iz), one)) + delz = max(zero, min(dpres - real(iz,r_kind), one)) if (save_jacobian) then u_ind = getindex(svars3d, 'u') diff --git a/src/gsi/setuplag.f90 b/src/gsi/setuplag.f90 index 0bad754a0c..01692d8164 100644 --- a/src/gsi/setuplag.f90 +++ b/src/gsi/setuplag.f90 @@ -171,7 +171,7 @@ subroutine setuplag(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) end if scale=one - rsig=float(nsig) + rsig=real(nsig,r_kind) mm1=mype+1 call dtime_setup() diff --git a/src/gsi/setuplight.f90 b/src/gsi/setuplight.f90 index 040ef19bc6..b1118dd1f8 100644 --- a/src/gsi/setuplight.f90 +++ b/src/gsi/setuplight.f90 @@ -534,7 +534,7 @@ subroutine setuplight(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,light_di ! eps0 - guess value of lightning flash rate if(nobs_gbl > 0) then - eps=eps0*exp( (one/ float(nobs_gbl))*sum_gbl/(one+r0/w0) ) + eps=eps0*exp( (one/ real(nobs_gbl,r_kind))*sum_gbl/(one+r0/w0) ) else eps=eps0 endif !! if(nobs_gbl .gt. 0) then diff --git a/src/gsi/setupoz.f90 b/src/gsi/setupoz.f90 index 7112e967ba..b16a33b414 100644 --- a/src/gsi/setupoz.f90 +++ b/src/gsi/setupoz.f90 @@ -1361,13 +1361,13 @@ subroutine setupozlev(obsLL,odiagLL,lunin,mype,stats_oz,nlevs,nreal,nobs,& ! Check if observation above model top or below model surface rlow=max(sfcchk-dpres,zero) - rhgh=max(dpres-0.001_r_kind-float(nsig),zero) + rhgh=max(dpres-0.001_r_kind-real(nsig,r_kind),zero) ! calculate factor for error adjustment if too (high,low) ratio_errors=obserror/(obserror+1.0e6_r_kind*rhgh+four*rlow) ! Check to see if observations is above the top of the model - if (dpres > float(nsig)) then + if (dpres > real(nsig,r_kind)) then ratio_errors=zero obserror=1.0e6_r_kind end if @@ -1379,7 +1379,7 @@ subroutine setupozlev(obsLL,odiagLL,lunin,mype,stats_oz,nlevs,nreal,nobs,& call tintrp31(ges_oz,o3ges,dlat,dlon,dpres,dtime, & hrdifsig,mype,nfldsig) iz = max(1, min( int(dpres), nsig)) - delz = max(zero, min(dpres - float(iz), one)) + delz = max(zero, min(dpres - real(iz,r_kind), one)) if (save_jacobian) then oz_ind = getindex(svars3d, 'oz') if (oz_ind < 0) then diff --git a/src/gsi/setuppcp.f90 b/src/gsi/setuppcp.f90 index 8a6c8c0d80..7a89ccb6ca 100644 --- a/src/gsi/setuppcp.f90 +++ b/src/gsi/setuppcp.f90 @@ -416,8 +416,8 @@ subroutine setuppcp(obsLL,odiagLL,lunin,mype,aivals,nele,nobs,& elseif (amsu) then itype = 8 endif - rterm1=one/float(nsig) - rterm2=one/float(nsig*(nsig-1)) + rterm1=one/real(nsig,r_kind) + rterm2=one/real(nsig*(nsig-1),r_kind) call dtime_setup() do n = 1,nobs diff --git a/src/gsi/setupq.f90 b/src/gsi/setupq.f90 index aa557b72c2..cebdeecd7b 100644 --- a/src/gsi/setupq.f90 +++ b/src/gsi/setupq.f90 @@ -674,7 +674,7 @@ subroutine setupq(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav error=one/(error*qsges) iz = max(1, min( int(dpres), nsig)) - delz = max(zero, min(dpres - float(iz), one)) + delz = max(zero, min(dpres - real(iz,r_kind), one)) if (save_jacobian) then diff --git a/src/gsi/setupref.f90 b/src/gsi/setupref.f90 index 752cce7e7b..4f240d756b 100644 --- a/src/gsi/setupref.f90 +++ b/src/gsi/setupref.f90 @@ -301,7 +301,7 @@ subroutine setupref(obsLL,odiagLL,lunin,mype,awork,nele,nobs,toss_gps_sub,is,ini ilate=15 ! index of earth relative latitude (degrees) ! Initialize variables - rsig=float(nsig) + rsig=real(nsig,r_kind) mm1=mype+1 ! Check to see if required guess fields are available @@ -967,11 +967,11 @@ subroutine setupref(obsLL,odiagLL,lunin,mype,awork,nele,nobs,toss_gps_sub,is,ini end do end if -! delz=dpres-float(k1) +! delz=dpres-real(k1,r_kind) kl=dpresl(i) k1l=min(max(1,kl),nsig) k2l=max(1,min(kl+1,nsig)) - delz=dpresl(i)-float(k1l) + delz=dpresl(i)-real(k1l,r_kind) delz=max(zero,min(delz,one)) my_head%jac_t(k1l)=my_head%jac_t(k1l)+termt(i)*(one-delz) my_head%jac_t(k2l)=my_head%jac_t(k2l)+termt(i)*delz diff --git a/src/gsi/setupspd.f90 b/src/gsi/setupspd.f90 index 150799bf2c..2437ea63ce 100644 --- a/src/gsi/setupspd.f90 +++ b/src/gsi/setupspd.f90 @@ -504,7 +504,7 @@ subroutine setupspd(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags spdges=sqrt(ugesin*ugesin+vgesin*vgesin) iz = max(1, min( int(dpres), nsig)) - delz = max(zero, min(dpres - float(iz), one)) + delz = max(zero, min(dpres - real(iz,r_kind), one)) if (save_jacobian) then diff --git a/src/gsi/setupt.f90 b/src/gsi/setupt.f90 index 5467a6dec9..d0ec421f06 100644 --- a/src/gsi/setupt.f90 +++ b/src/gsi/setupt.f90 @@ -515,7 +515,7 @@ subroutine setupt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav if(netcdf_diag) call init_netcdf_diag_ end if scale=one - rsig=float(nsig) + rsig=real(nsig,r_kind) mm1=mype+1 ! rsli=isli @@ -770,7 +770,7 @@ subroutine setupt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav hrdifsig,mype,nfldsig) iz = max(1, min( int(dpres), nsig)) - delz = max(zero, min(dpres - float(iz), one)) + delz = max(zero, min(dpres - real(iz,r_kind), one)) if (save_jacobian) then t_ind = getindex(svars3d, 'tv') @@ -792,7 +792,7 @@ subroutine setupt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav hrdifsig,mype,nfldsig) iz = max(1, min( int(dpres), nsig)) - delz = max(zero, min(dpres - float(iz), one)) + delz = max(zero, min(dpres - real(iz,r_kind), one)) if (save_jacobian) then t_ind = getindex(svars3d, 'tsen') diff --git a/src/gsi/setuptcp.f90 b/src/gsi/setuptcp.f90 index 3d13c5fe8e..68428175b1 100644 --- a/src/gsi/setuptcp.f90 +++ b/src/gsi/setuptcp.f90 @@ -255,9 +255,9 @@ subroutine setuptcp(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags lb=dlat-tcp_box le=dlat+tcp_box do j=jb,je - lj=float(j) + lj=real(j,r_kind) do l=lb,le - li=float(l) + li=real(l,r_kind) call tintrp2a11(ges_ps,psges,li,lj,dtime,hrdifsig,mype,nfldsig) if(pmin>psges)then imin=l diff --git a/src/gsi/setupw.f90 b/src/gsi/setupw.f90 index 784df1dfbe..6e653a9db0 100644 --- a/src/gsi/setupw.f90 +++ b/src/gsi/setupw.f90 @@ -677,7 +677,7 @@ subroutine setupw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav hrdifsig,mype,nfldsig) iz = max(1, min( int(dpres), nsig)) - delz = max(zero, min(dpres - float(iz), one)) + delz = max(zero, min(dpres - real(iz,r_kind), one)) if (save_jacobian) then @@ -805,7 +805,7 @@ subroutine setupw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav hrdifsig,mype,nfldsig) iz = max(1, min( int(dpres), nsig)) - delz = max(zero, min(dpres - float(iz), one)) + delz = max(zero, min(dpres - real(iz,r_kind), one)) if (save_jacobian) then u_ind = getindex(svars3d, 'u') diff --git a/src/gsi/setupwspd10m.f90 b/src/gsi/setupwspd10m.f90 index ad50c5b0c1..c702faaecf 100644 --- a/src/gsi/setupwspd10m.f90 +++ b/src/gsi/setupwspd10m.f90 @@ -449,7 +449,7 @@ subroutine setupwspd10m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_d hrdifsig,mype,nfldsig) iz = max(1, min( int(dpres), nsig)) - delz = max(zero, min(dpres - float(iz), one)) + delz = max(zero, min(dpres - real(iz,r_kind), one)) if (save_jacobian) then diff --git a/src/gsi/sfcobsqc.f90 b/src/gsi/sfcobsqc.f90 index 8327b532e7..880e584b1b 100644 --- a/src/gsi/sfcobsqc.f90 +++ b/src/gsi/sfcobsqc.f90 @@ -1162,7 +1162,7 @@ subroutine get_wbinid(udbl,vdbl,nbins,ibin) endif else do n=1,nbins - if ( wdir >= float(n-1)*binwidth .and. wdir < float(n)*binwidth ) then + if ( wdir >= real(n-1,r_kind)*binwidth .and. wdir < real(n,r_kind)*binwidth ) then ibin=n exit endif diff --git a/src/gsi/smoothzrf.f90 b/src/gsi/smoothzrf.f90 index 06e877ee68..dae656ca1b 100644 --- a/src/gsi/smoothzrf.f90 +++ b/src/gsi/smoothzrf.f90 @@ -81,7 +81,7 @@ subroutine frfhvo(p1,iv) do k=1,lat2 l=int(rllat1(k,j)) l2=min0(l+1,llmax) - dl2(k,j)=rllat1(k,j)-float(l) + dl2(k,j)=rllat1(k,j)-real(l,r_kind) dl1(k,j)=one-dl2(k,j) end do end do diff --git a/src/gsi/ssmis_spatial_average_mod.f90 b/src/gsi/ssmis_spatial_average_mod.f90 index 24ac91d3f1..64dd5c6cf7 100644 --- a/src/gsi/ssmis_spatial_average_mod.f90 +++ b/src/gsi/ssmis_spatial_average_mod.f90 @@ -1551,7 +1551,7 @@ SUBROUTINE SFFTCB( X, N, M ) END DO J = J + K 104 CONTINUE - XT = 1.0 / FLOAT( N ) + XT = 1.0 / real( N,r_kind ) DO 99 I = 1, N X(I) = XT * X(I) 99 CONTINUE diff --git a/src/gsi/statsco.f90 b/src/gsi/statsco.f90 index ebef4a31e4..54f28ccfd9 100644 --- a/src/gsi/statsco.f90 +++ b/src/gsi/statsco.f90 @@ -119,7 +119,7 @@ subroutine statsco(stats_co,bwork,awork,ndata) if (iasim > 0) then svar = error_co(i) if (iuse_co(i)/=1) svar = -svar - rsum = one/float(iasim) + rsum = one/real(iasim,r_kind) icerr = nint(stats_co(2,i)) do j=3,6 ! j=3=obs-mod(w_biascor) ! j=4=(obs-mod(w_biascor))**2 @@ -145,7 +145,7 @@ subroutine statsco(stats_co,bwork,awork,ndata) do i=1,ndat if (idisplay(i)) then cpen=zero - if (icount_asim(i)>0) cpen=rpenal(i)/float(icount_asim(i)) + if (icount_asim(i)>0) cpen=rpenal(i)/real(icount_asim(i),r_kind) write(iout_co,1115) jiter,dplat(i),dtype(i),ndata(i,2), & ndata(i,3),icount_asim(i),rpenal(i),cpen,qcpenal(i),iqccount_asim(i) endif @@ -184,8 +184,8 @@ subroutine statsco(stats_co,bwork,awork,ndata) num(k)=nint(awork(5*nsig+k+100)) rat=zero ; rat3=zero if(num(k) > 0) then - rat=awork(6*nsig+k+100)/float(num(k)) - rat3=awork(3*nsig+k+100)/float(num(k)) + rat=awork(6*nsig+k+100)/real(num(k),r_kind) + rat3=awork(3*nsig+k+100)/real(num(k),r_kind) end if ntot=ntot+num(k); o3plty=o3plty+awork(6*nsig+k+100) o3qcplty=o3qcplty+awork(3*nsig+k+100) diff --git a/src/gsi/statsconv.f90 b/src/gsi/statsconv.f90 index 0da8606f24..3011fdefea 100644 --- a/src/gsi/statsconv.f90 +++ b/src/gsi/statsconv.f90 @@ -204,8 +204,8 @@ subroutine statsconv(mype,& rat1=zero rat2=zero if(num(k) > 0)then - rat1=awork(4*nsig+k+100,i_uv)/float(num(k)) - rat2=awork(5*nsig+k+100,i_uv)/float(num(k)) + rat1=awork(4*nsig+k+100,i_uv)/real(num(k),r_kind) + rat2=awork(5*nsig+k+100,i_uv)/real(num(k),r_kind) end if umplty=umplty+awork(4*nsig+k+100,i_uv) vmplty=vmplty+awork(5*nsig+k+100,i_uv) @@ -218,8 +218,8 @@ subroutine statsconv(mype,& rat1=zero rat3=zero if(num(k) > 0)then - rat1=(awork(4*nsig+k+100,i_uv)+awork(5*nsig+k+100,i_uv))/float(num(k)) - rat3=awork(3*nsig+k+100,i_uv)/float(num(k)) + rat1=(awork(4*nsig+k+100,i_uv)+awork(5*nsig+k+100,i_uv))/real(num(k),r_kind) + rat3=awork(3*nsig+k+100,i_uv)/real(num(k),r_kind) end if uvqcplty=uvqcplty+awork(3*nsig+k+100,i_uv) write(iout_uv,240) 'w',num(k),k,awork(4*nsig+k+100,i_uv)+awork(5*nsig+k+100,i_uv), & @@ -231,9 +231,9 @@ subroutine statsconv(mype,& write(iout_uv,925) 'wind',numgross,numfailqc ! Write statistics regarding penalties if(ntot > 0)then - tu=umplty/float(ntot) - tv=vmplty/float(ntot) - tuv=uvqcplty/float(ntot) + tu=umplty/real(ntot,r_kind) + tv=vmplty/real(ntot,r_kind) + tuv=uvqcplty/real(ntot,r_kind) end if if(numssm > 0)then tssm=awork(5,i_uv)/awork(6,i_uv) @@ -286,8 +286,8 @@ subroutine statsconv(mype,& rat=zero rat3=zero if(num(k)>0) then - rat=awork(6*nsig+k+100,i_gps)/float(num(k)) - rat3=awork(3*nsig+k+100,i_gps)/float(num(k)) + rat=awork(6*nsig+k+100,i_gps)/real(num(k),r_kind) + rat3=awork(3*nsig+k+100,i_gps)/real(num(k),r_kind) end if ntot=ntot+num(k); gpsmplty=gpsmplty+awork(6*nsig+k+100,i_gps) gpsqcplty=gpsqcplty+awork(3*nsig+k+100,i_gps) @@ -352,8 +352,8 @@ subroutine statsconv(mype,& rat=zero rat3=zero if(num(k) > 0)then - rat=awork(5*nsig+k+100,i_q)/float(num(k)) - rat3=awork(3*nsig+k+100,i_q)/float(num(k)) + rat=awork(5*nsig+k+100,i_q)/real(num(k),r_kind) + rat3=awork(3*nsig+k+100,i_q)/real(num(k),r_kind) end if qmplty=qmplty+awork(5*nsig+k+100,i_q) qqcplty=qqcplty+awork(3*nsig+k+100,i_q) @@ -371,8 +371,8 @@ subroutine statsconv(mype,& numhgh = nint(awork(3,i_q)) write(iout_q,900) 'q',numhgh,numlow if(ntot > 0) then - tq=qmplty/float(ntot) - qctq=qqcplty/float(ntot) + tq=qmplty/real(ntot,r_kind) + qctq=qqcplty/real(ntot,r_kind) end if end if @@ -414,8 +414,8 @@ subroutine statsconv(mype,& numfailqc=nint(awork(21,i_ps)) write(iout_ps,925) 'psfc',numgross,numfailqc if(nump > 0)then - pw=awork(4,i_ps)/float(nump) - pw3=awork(22,i_ps)/float(nump) + pw=awork(4,i_ps)/real(nump,r_kind) + pw3=awork(22,i_ps)/real(nump,r_kind) end if end if @@ -1116,8 +1116,8 @@ subroutine statsconv(mype,& num(k)=nint(awork(5*nsig+k+100,i_t)) rat=zero ; rat3=zero if(num(k) > 0) then - rat=awork(6*nsig+k+100,i_t)/float(num(k)) - rat3=awork(3*nsig+k+100,i_t)/float(num(k)) + rat=awork(6*nsig+k+100,i_t)/real(num(k),r_kind) + rat3=awork(3*nsig+k+100,i_t)/real(num(k),r_kind) end if ntot=ntot+num(k); tmplty=tmplty+awork(6*nsig+k+100,i_t) tqcplty=tqcplty+awork(3*nsig+k+100,i_t) @@ -1176,8 +1176,8 @@ subroutine statsconv(mype,& rat=zero rat3=zero if(num(k) > 0) then - rat=awork(6*nsig+k+100,i_dw)/float(num(k)) - rat3=awork(3*nsig+k+100,i_dw)/float(num(k)) + rat=awork(6*nsig+k+100,i_dw)/real(num(k),r_kind) + rat3=awork(3*nsig+k+100,i_dw)/real(num(k),r_kind) end if ntot=ntot+num(k) dwmplty=dwmplty+awork(6*nsig+k+100,i_dw) @@ -1188,8 +1188,8 @@ subroutine statsconv(mype,& numgross=nint(awork(4,i_dw)) numfailqc=nint(awork(21,i_dw)) if(ntot > 0) then - tdw=dwmplty/float(ntot) - qctdw=dwqcplty/float(ntot) + tdw=dwmplty/real(ntot,r_kind) + qctdw=dwqcplty/real(ntot,r_kind) end if write(iout_dw,925) 'dw',numgross,numfailqc numlow = nint(awork(2,i_dw)) @@ -1238,8 +1238,8 @@ subroutine statsconv(mype,& rat=zero rat3=zero if(num(k) > 0) then - rat=awork(6*nsig+k+100,i_rw)/float(num(k)) - rat3=awork(3*nsig+k+100,i_rw)/float(num(k)) + rat=awork(6*nsig+k+100,i_rw)/real(num(k),r_kind) + rat3=awork(3*nsig+k+100,i_rw)/real(num(k),r_kind) end if ntot=ntot+num(k) rwmplty=rwmplty+awork(6*nsig+k+100,i_rw) @@ -1248,8 +1248,8 @@ subroutine statsconv(mype,& awork(3*nsig+k+100,i_rw),rat,rat3 end do if(ntot > 0) then - trw=rwmplty/float(ntot) - qctrw=rwqcplty/float(ntot) + trw=rwmplty/real(ntot,r_kind) + qctrw=rwqcplty/real(ntot,r_kind) end if write(iout_rw,925) 'rw',numgross,numfailqc numlow = nint(awork(2,i_rw)) @@ -1299,8 +1299,8 @@ subroutine statsconv(mype,& rat=zero rat3=zero if(num(k) > 0) then - rat=awork(6*nsig+k+100,i_dbz)/float(num(k)) - rat3=awork(3*nsig+k+100,i_dbz)/float(num(k)) + rat=awork(6*nsig+k+100,i_dbz)/real(num(k),r_kind) + rat3=awork(3*nsig+k+100,i_dbz)/real(num(k),r_kind) end if ntot=ntot+num(k) dbzmplty=dbzmplty+awork(6*nsig+k+100,i_dbz) @@ -1309,8 +1309,8 @@ subroutine statsconv(mype,& awork(3*nsig+k+100,i_dbz),rat,rat3 end do if(ntot > 0) then - tdbz=dbzmplty/float(ntot) - qctdbz=dbzqcplty/float(ntot) + tdbz=dbzmplty/real(ntot,r_kind) + qctdbz=dbzqcplty/real(ntot,r_kind) end if write(iout_dbz,925) 'dbz',numgross,numfailqc numlow = nint(awork(2,i_dbz)) @@ -1360,8 +1360,8 @@ subroutine statsconv(mype,& rat=zero rat3=zero if(num(k) > 0) then - rat=awork(6*nsig+k+100,i_fed)/float(num(k)) - rat3=awork(3*nsig+k+100,i_fed)/float(num(k)) + rat=awork(6*nsig+k+100,i_fed)/real(num(k),r_kind) + rat3=awork(3*nsig+k+100,i_fed)/real(num(k),r_kind) end if ntot=ntot+num(k) fedmplty=fedmplty+awork(6*nsig+k+100,i_fed) @@ -1370,8 +1370,8 @@ subroutine statsconv(mype,& awork(3*nsig+k+100,i_fed),rat,rat3 end do if(ntot > 0) then - tfed=fedmplty/float(ntot) - qctfed=fedqcplty/float(ntot) + tfed=fedmplty/real(ntot,r_kind) + qctfed=fedqcplty/real(ntot,r_kind) end if write(iout_fed,925) 'fed',numgross,numfailqc numlow = nint(awork(2,i_fed)) @@ -1419,8 +1419,8 @@ subroutine statsconv(mype,& write(iout_tcp,925) 'psfc',numgross,numfailqc if(nump > 0)then - pw=awork(4,i_tcp)/float(nump) - pw3=awork(22,i_tcp)/float(nump) + pw=awork(4,i_tcp)/real(nump,r_kind) + pw3=awork(22,i_tcp)/real(nump,r_kind) end if end if @@ -1460,8 +1460,8 @@ subroutine statsconv(mype,& num(k)=nint(awork(6*nsig+k+100,i_lag)) rat=zero ; rat3=zero if(num(k) > 0) then - rat=awork(4*nsig+k+100,i_lag)/float(num(k)) - rat3=awork(3*nsig+k+100,i_lag)/float(num(k)) + rat=awork(4*nsig+k+100,i_lag)/real(num(k),r_kind) + rat3=awork(3*nsig+k+100,i_lag)/real(num(k),r_kind) end if ntot=ntot+num(k); tmplty=tmplty+awork(4*nsig+k+100,i_lag) tqcplty=tqcplty+awork(3*nsig+k+100,i_lag) diff --git a/src/gsi/statsoz.f90 b/src/gsi/statsoz.f90 index 069082d6b7..fb5f536914 100644 --- a/src/gsi/statsoz.f90 +++ b/src/gsi/statsoz.f90 @@ -101,7 +101,7 @@ subroutine statsoz(stats_oz,ndata) if (iasim > 0) then svar = error_oz(i) if (iuse_oz(i)/=1) svar = -svar - rsum = one/float(iasim) + rsum = one/real(iasim,r_kind) icerr = nint(stats_oz(2,i)) do j=3,6 ! j=3=obs-mod(w_biascor) ! j=4=(obs-mod(w_biascor))**2 @@ -127,7 +127,7 @@ subroutine statsoz(stats_oz,ndata) do i=1,ndat if (idisplay(i)) then cpen=zero - if (icount_asim(i)>0) cpen=rpenal(i)/float(icount_asim(i)) + if (icount_asim(i)>0) cpen=rpenal(i)/real(icount_asim(i),r_kind) write(iout_oz,1115) jiter,dplat(i),dtype(i),ndata(i,2), & ndata(i,3),icount_asim(i),rpenal(i),cpen,qcpenal(i),iqccount_asim(i) endif diff --git a/src/gsi/statspcp.f90 b/src/gsi/statspcp.f90 index e16f6dfbe5..ad79aed67d 100644 --- a/src/gsi/statspcp.f90 +++ b/src/gsi/statspcp.f90 @@ -210,7 +210,7 @@ subroutine statspcp(aivals,ndata) if (isum > 0 .and. display(is)) then rpen(is) = aivals(15,is) qcpen(is) = aivals(39,is) - rsum = one/float(isum) + rsum = one/real(isum,r_kind) icerr = nint(aivals(12,is)) do j=13,16 aivals(j,is)=aivals(j,is)*rsum diff --git a/src/gsi/statsrad.f90 b/src/gsi/statsrad.f90 index 121761fa76..d42a53f7d6 100644 --- a/src/gsi/statsrad.f90 +++ b/src/gsi/statsrad.f90 @@ -120,7 +120,7 @@ subroutine statsrad(aivals,stats,ndata) if (iasim > 0) then svar = varch(i) if (iuse_rad(i) < 1) svar=-svar - rsum = one/float(iasim) + rsum = one/real(iasim,r_kind) icerr = nint(stats(2,i)) do j=3,6 ! j=3=obs-mod(w_biascor) ! j=4=(obs-mod(w_biascor))**2 diff --git a/src/gsi/stpjcmod.f90 b/src/gsi/stpjcmod.f90 index 2c811912a0..1cdabe60eb 100644 --- a/src/gsi/stpjcmod.f90 +++ b/src/gsi/stpjcmod.f90 @@ -871,7 +871,7 @@ subroutine stpjcpdry(rval,sval,pen,b,c,nbins) it=ntguessig dmass=zero_quad - rcon=one_quad/(two_quad*float(nlon)) + rcon=one_quad/(two_quad*real(nlon,r_quad)) mm1=mype+1 return_now = .false. do n=1,nbins diff --git a/src/gsi/support_2dvar.f90 b/src/gsi/support_2dvar.f90 index 35599ba548..0a83e96942 100644 --- a/src/gsi/support_2dvar.f90 +++ b/src/gsi/support_2dvar.f90 @@ -2465,19 +2465,19 @@ subroutine relocsfcob(rlon8,rlat8,cobtypein,cstationin,kxin) js=max(1,(jstart-jneighbour)) je=min((jstart+jneighbour),ny) - ris=float(is) - rie=float(ie) - rjs=float(js) - rje=float(je) + ris=real(is,r_single) + rie=real(ie,r_single) + rjs=real(js,r_single) + rje=real(je,r_single) distmin=1.e+20_r_single lfound=.false. do j=1,npts - rj=rjs+float(j-1)*dy + rj=rjs+real(j-1,r_single)*dy if (rj > rje) cycle do i=1,npts - ri=ris+float(i-1)*dx + ri=ris+real(i-1,r_single)*dx if (ri > rie) cycle call bilinear_2d0(slmask,nx,ny,slmask0,rj,ri) @@ -2655,7 +2655,7 @@ subroutine mkvalley_file endif enddo enddo - hmean=hmean/max(1._r_single,float(ncount)) + hmean=hmean/max(1._r_single,real(ncount,r_single)) if ((hmax-hmin)>=hdiff0 .and. terrain(i,j) Date: Fri, 27 Oct 2023 08:24:33 -0400 Subject: [PATCH 10/13] Feature/hafs rtcases (#646) Add HAFS related regression test into GSI Ctests to solve the issue #600. Four set of regression tests for the current suite of HAFSv1 GSI: 3DEnvar with GDAS Ensemble plus FGAT capability -- "hafs_3denvar_glbens". 4Denvar with GDAS Ensemble plus FGAT capability -- "hafs_4denvar_glbens". 3Envar with self-cycled HAFS Ensemble -- "hafs_3denvar_hafens". 3Envar with GDAS Ensemble plus self-cycled HAFS Ensemble -- "hafs_3denvar_hybens". Fixes #600 Partially fixes #647 **Type of change** - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update **How Has This Been Tested?** These changes are tested under Orion through GSI Ctests. **Checklist** - [x ] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] New and existing tests pass with my changes - [x] Any dependent changes have been merged and published **DUE DATE for this PR is 12/4/2023.** If this PR is not merged into `develop` by this date, the PR will be closed and returned to the developer. --- regression/CMakeLists.txt | 5 +- regression/global_3dvar.sh | 305 ---- regression/global_4dvar.sh | 338 ---- regression/hafs_3denvar_hybens.sh | 455 ++++++ regression/hafs_4denvar_glbens.sh | 455 ++++++ regression/hwrf_nmm_d2.sh | 339 ---- regression/hwrf_nmm_d3.sh | 337 ---- regression/multi_regression.sh | 16 +- regression/regression_namelists.sh | 2130 ++++++------------------- regression/regression_namelists_db.sh | 790 ++++----- regression/regression_param.sh | 153 +- regression/regression_test.sh | 38 +- regression/regression_test_enkf.sh | 31 - regression/regression_var.sh | 10 +- 14 files changed, 1702 insertions(+), 3700 deletions(-) delete mode 100755 regression/global_3dvar.sh delete mode 100755 regression/global_4dvar.sh create mode 100755 regression/hafs_3denvar_hybens.sh create mode 100755 regression/hafs_4denvar_glbens.sh delete mode 100755 regression/hwrf_nmm_d2.sh delete mode 100755 regression/hwrf_nmm_d3.sh diff --git a/regression/CMakeLists.txt b/regression/CMakeLists.txt index cfbce04b40..99d92162e6 100644 --- a/regression/CMakeLists.txt +++ b/regression/CMakeLists.txt @@ -38,9 +38,10 @@ endif() # GSI regression test names list(APPEND GSI_REG_TEST_NAMES - global_3dvar global_4dvar global_4denvar - hwrf_nmm_d2 hwrf_nmm_d3 rtma + global_4denvar + rtma rrfs_3denvar_glbens netcdf_fv3_regional + hafs_4denvar_glbens hafs_3denvar_hybens ) # EnKF regression test names diff --git a/regression/global_3dvar.sh b/regression/global_3dvar.sh deleted file mode 100755 index 56f78ad384..0000000000 --- a/regression/global_3dvar.sh +++ /dev/null @@ -1,305 +0,0 @@ -set -x - -# Set experiment name and analysis date - -exp=$jobname - -# Set the JCAP resolution which you want. -export JCAP=48 -export LEVS=127 -export JCAP_B=$JCAP - -# Set runtime directories -tmpdir=$tmpdir/$tmpregdir/${exp} - -# Specify GSI fixed field and data directories. -fixcrtm=${fixcrtm:-$CRTM_FIX} - - -# Set variables used in script -UNCOMPRESS=gunzip -CLEAN=NO -ncp=/bin/cp -nln="/bin/ln -fs" - - -# Given the requested resolution, set dependent resolution parameters -if [[ "$JCAP" = "96" ]]; then - export LONA=384 - export LATA=192 - export DELTIM=1200 -elif [[ "$JCAP" = "48" ]]; then - export LONA=192 - export LATA=96 - export DELTIM=1200 -else - echo "INVALID JCAP = $JCAP" - exit -fi -export NLON=$LONA -export NLAT=$((${LATA}+2)) - - -# Given the analysis date, compute the date from which the -# first guess comes. Extract cycle and set prefix and suffix -# for guess and observation data files -gdate=`date +%Y%m%d%H -d "${global_adate:0:8} ${global_adate:8:2} - 6 hours"` -PDYa=`echo $global_adate | cut -c1-8` -cyca=`echo $global_adate | cut -c9-10` -PDYg=`echo $gdate | cut -c1-8` -cycg=`echo $gdate | cut -c9-10` - -dumpobs=gdas -prefix_obs=${dumpobs}.t${cyca}z -prefix_ges=gdas.t${cycg}z -prefix_ens=gdas.t${cycg}z -suffix=tm00.bufr_d - -dumpges=gdas -COMROOTgfs=$casesdir/gfs/prod -datobs=$COMROOTgfs/$dumpobs.$PDYa/${cyca}/atmos -datges=$COMROOTgfs/$dumpges.$PDYg/${cycg}/atmos -datens=$COMROOTgfs/enkfgdas.$PDYg/${cycg}/atmos - - -# Set up $tmpdir -rm -rf $tmpdir -mkdir -p $tmpdir -cd $tmpdir - -# Make gsi namelist - -. $scripts/regression_nl_update.sh - -SETUP="$SETUP_update" -GRIDOPTS="$GRIDOPTS_update" -BKGVERR="$BKGVERR_update" -ANBKGERR="$ANBKERR_update" -JCOPTS="$JCOPTS_update" -STRONGOPTS="$STRONGOPTS_update" -OBSQC="$OBSQC_update" -OBSINPUT="$OBSINPUT_update" -SUPERRAD="$SUPERRAD_update" -SINGLEOB="$SINGLEOB_update" - -if [ "$debug" = ".false." ]; then - . $scripts/regression_namelists.sh global_3dvar -else - . $scripts/regression_namelists_db.sh global_3dvar -fi - -cat << EOF > gsiparm.anl - -$gsi_namelist - -EOF - -# Set fixed files -# berror = forecast model background error statistics -# specoef = CRTM spectral coefficients -# trncoef = CRTM transmittance coefficients -# emiscoef = CRTM coefficients for IR sea surface emissivity model -# aerocoef = CRTM coefficients for aerosol effects -# cldcoef = CRTM coefficients for cloud effects -# satinfo = text file with information about assimilation of brightness temperatures -# satangl = angle dependent bias correction file (fixed in time) -# pcpinfo = text file with information about assimilation of prepcipitation rates -# ozinfo = text file with information about assimilation of ozone data -# errtable = text file with obs error for conventional data (optional) -# convinfo = text file with information about assimilation of conventional data -# bufrtable= text file ONLY needed for single obs test (oneobstest=.true.) -# bftab_sst= bufr table for sst ONLY needed for sst retrieval (retrieval=.true.) -# aeroinfo = text file with information about assimilation of aerosol data - -anavinfo=$fixgsi/global_anavinfo.l${LEVS}.txt -berror=$fixgsi/Big_Endian/global_berror.l${LEVS}y${NLAT}.f77 -locinfo=$fixgsi/global_hybens_info.l${LEVS}.txt -satinfo=$fixgsi/global_satinfo.txt -scaninfo=$fixgsi/global_scaninfo.txt -satangl=$fixgsi/global_satangbias.txt -pcpinfo=$fixgsi/global_pcpinfo.txt -ozinfo=$fixgsi/global_ozinfo.txt -convinfo=$fixgsi/global_convinfo.txt -vqcdat=$fixgsi/vqctp001.dat -insituinfo=$fixgsi/global_insituinfo.txt -errtable=$fixgsi/prepobs_errtable.global -aeroinfo=$fixgsi/global_aeroinfo.txt -atmsbeaminfo=$fixgsi/atms_beamwidth.txt -cloudyinfo=$fixgsi/cloudy_radiance_info.txt - -emiscoef_IRwater=$fixcrtm/Nalli.IRwater.EmisCoeff.bin -emiscoef_IRice=$fixcrtm/NPOESS.IRice.EmisCoeff.bin -emiscoef_IRland=$fixcrtm/NPOESS.IRland.EmisCoeff.bin -emiscoef_IRsnow=$fixcrtm/NPOESS.IRsnow.EmisCoeff.bin -emiscoef_VISice=$fixcrtm/NPOESS.VISice.EmisCoeff.bin -emiscoef_VISland=$fixcrtm/NPOESS.VISland.EmisCoeff.bin -emiscoef_VISsnow=$fixcrtm/NPOESS.VISsnow.EmisCoeff.bin -emiscoef_VISwater=$fixcrtm/NPOESS.VISwater.EmisCoeff.bin -emiscoef_MWwater=$fixcrtm/FASTEM6.MWwater.EmisCoeff.bin -aercoef=$fixcrtm/AerosolCoeff.bin -cldcoef=$fixcrtm/CloudCoeff.bin -#cldcoef=$fixcrtm/CloudCoeff.GFDLFV3.-109z-1.bin # use with crtm/2.4.0 - -# Only need this file for single obs test -bufrtable=$fixgsi/prepobs_prep.bufrtable - -# Only need this file for sst retrieval -bftab_sst=$fixgsi/bufrtab.012 - -# Copy executable and fixed files to $tmpdir -if [[ $exp == *"updat"* ]]; then - $ncp $gsiexec_updat ./gsi.x -elif [[ $exp == *"contrl"* ]]; then - $ncp $gsiexec_contrl ./gsi.x -fi - -$ncp $anavinfo ./anavinfo -$ncp $berror ./berror_stats -$ncp $locinfo ./hybens_info -$ncp $satinfo ./satinfo -$ncp $scaninfo ./scaninfo -$ncp $pcpinfo ./pcpinfo -$ncp $ozinfo ./ozinfo -$ncp $convinfo ./convinfo -$ncp $vqcdat ./vqctp001.dat -$ncp $insituinfo ./insituinfo -$ncp $errtable ./errtable -$ncp $aeroinfo ./aeroinfo -$ncp $atmsbeaminfo ./atms_beamwidth.txt -$ncp $cloudyinfo ./cloudy_radiance_info.txt - -$ncp $bufrtable ./prepobs_prep.bufrtable -$ncp $bftab_sst ./bftab_sstphr - -#If using correlated error, get the covariance files -if grep -q "Rcov" $anavinfo ; -then - if ls ${fixgsi}/Rcov* 1> /dev/null 2>&1; - then - $ncp ${fixgsi}/Rcov* $tmpdir - -# Correlated error utlizes mkl lapack. Found it necesary to fix the -# number of mkl threads to ensure reproducible results independent -# of the job configuration. - export MKL_NUM_THREADS=1 - - else - echo "Warning: Satellite error covariance files are missing." - echo "Check for the required Rcov files in " $ANAVINFO - exit 1 - fi -fi - -# Copy CRTM coefficient files based on entries in satinfo file -export CRTM_PATH="./crtm_coeffs/" -mkdir -p ${CRTM_PATH} -for file in `awk '{if($1!~"!"){print $1}}' satinfo | sort | uniq` ;do - $nln $fixcrtm/${file}.SpcCoeff.bin ${CRTM_PATH}/${file}.SpcCoeff.bin - $nln $fixcrtm/${file}.TauCoeff.bin ${CRTM_PATH}/${file}.TauCoeff.bin -done -$nln $fixcrtm/amsua_metop-a_v2.SpcCoeff.bin ${CRTM_PATH}/amsua_metop-a_v2.SpcCoeff.bin - -$nln $emiscoef_IRwater ${CRTM_PATH}Nalli.IRwater.EmisCoeff.bin -$nln $emiscoef_IRice ${CRTM_PATH}NPOESS.IRice.EmisCoeff.bin -$nln $emiscoef_IRsnow ${CRTM_PATH}NPOESS.IRsnow.EmisCoeff.bin -$nln $emiscoef_IRland ${CRTM_PATH}NPOESS.IRland.EmisCoeff.bin -$nln $emiscoef_VISice ${CRTM_PATH}NPOESS.VISice.EmisCoeff.bin -$nln $emiscoef_VISland ${CRTM_PATH}NPOESS.VISland.EmisCoeff.bin -$nln $emiscoef_VISsnow ${CRTM_PATH}NPOESS.VISsnow.EmisCoeff.bin -$nln $emiscoef_VISwater ${CRTM_PATH}NPOESS.VISwater.EmisCoeff.bin -$nln $emiscoef_MWwater ${CRTM_PATH}FASTEM6.MWwater.EmisCoeff.bin -$nln $aercoef ${CRTM_PATH}AerosolCoeff.bin -$nln $cldcoef ${CRTM_PATH}CloudCoeff.bin - -# Copy observational data -$nln $datobs/${prefix_obs}.prepbufr ./prepbufr -$nln $datobs/${prefix_obs}.prepbufr.acft_profiles ./prepbufr_profl -$nln $datobs/${prefix_obs}.nsstbufr ./nsstbufr -$nln $datobs/${prefix_obs}.syndata.tcvitals.tm00 ./tcvitl -$nln $datobs/${prefix_obs}.gpsro.${suffix} ./gpsrobufr -$nln $datobs/${prefix_obs}.satwnd.${suffix} ./satwndbufr -$nln $datobs/${prefix_obs}.hdob.${suffix} ./hdobbufr - -$nln $datobs/${prefix_obs}.osbuv8.${suffix} ./sbuvbufr -$nln $datobs/${prefix_obs}.gome.${suffix} ./gomebufr -$nln $datobs/${prefix_obs}.omi.${suffix} ./omibufr -$nln $datobs/${prefix_obs}.mls.${suffix} ./mlsbufr -$nln $datobs/${prefix_obs}.ompsn8.${suffix} ./ompsnpbufr -$nln $datobs/${prefix_obs}.ompst8.${suffix} ./ompstcbufr -$nln $datobs/${prefix_obs}.ompslp.${suffix} ./ompslpbufr - -$nln $datobs/${prefix_obs}.goesfv.${suffix} ./gsnd1bufr -$nln $datobs/${prefix_obs}.hrs3db.${suffix} ./hirs3bufr_db -$nln $datobs/${prefix_obs}.airsev.${suffix} ./airsbufr -$nln $datobs/${prefix_obs}.sevcsr.${suffix} ./seviribufr -$nln $datobs/${prefix_obs}.saphir.${suffix} ./saphirbufr -$nln $datobs/${prefix_obs}.avcsam.${suffix} ./avhambufr -$nln $datobs/${prefix_obs}.avcspm.${suffix} ./avhpmbufr -$nln $datobs/${prefix_obs}.1bhrs4.${suffix} ./hirs4bufr -$nln $datobs/${prefix_obs}.1bhrs2.${suffix} ./hirs2bufr -$nln $datobs/${prefix_obs}.1bhrs3.${suffix} ./hirs3bufr -$nln $datobs/${prefix_obs}.eshrs3.${suffix} ./hirs3bufrears -$nln $datobs/${prefix_obs}.hrs3db.${suffix} ./hirs3bufr_db -$nln $datobs/${prefix_obs}.mtiasi.${suffix} ./iasibufr -$nln $datobs/${prefix_obs}.esiasi.${suffix} ./iasibufrears -$nln $datobs/${prefix_obs}.iasidb.${suffix} ./iasibufr_db -$nln $datobs/${prefix_obs}.crisf4.${suffix} ./crisfsbufr -$nln $datobs/${prefix_obs}.escrsf.${suffix} ./crisfsbufrears -$nln $datobs/${prefix_obs}.crsfdb.${suffix} ./crisfsbufr_db -$nln $datobs/${prefix_obs}.ahicsr.${suffix} ./ahibufr -$nln $datobs/${prefix_obs}.gsrcsr.${suffix} ./abibufr -$nln $datobs/${prefix_obs}.sstvcw.${suffix} ./sstviirs - -$nln $datobs/${prefix_obs}.1bmhs.${suffix} ./mhsbufr -$nln $datobs/${prefix_obs}.1bmsu.${suffix} ./msubufr -$nln $datobs/${prefix_obs}.gmi1cr.${suffix} ./gmibufr -$nln $datobs/${prefix_obs}.ssmit.${suffix} ./ssmitbufr -$nln $datobs/${prefix_obs}.ssmisu.${suffix} ./ssmisbufr -$nln $datobs/${prefix_obs}.1bamua.${suffix} ./amsuabufr -$nln $datobs/${prefix_obs}.esamua.${suffix} ./amsuabufrears -$nln $datobs/${prefix_obs}.amuadb.${suffix} ./amsuabufr_db -$nln $datobs/${prefix_obs}.1bamub.${suffix} ./amsubbufr -$nln $datobs/${prefix_obs}.esamub.${suffix} ./amsubbufrears -$nln $datobs/${prefix_obs}.amubdb.${suffix} ./amsubbufr_db -$nln $datobs/${prefix_obs}.atms.${suffix} ./atmsbufr -$nln $datobs/${prefix_obs}.atmsdb.${suffix} ./atmsbufr_db -$nln $datobs/${prefix_obs}.esatms.${suffix} ./atmsbufrears - -# Do not process -## $nln $datobs/${prefix_obs}.amsre.${suffix} ./amsrebufr -## $nln $datobs/${prefix_obs}.amsr2.tm00.bufr_d ./amsr2bufr - -# Copy bias correction, atmospheric and surface files -$nln $datges/${prefix_ges}.abias ./satbias_in -$nln $datges/${prefix_ges}.abias_pc ./satbias_pc -$nln $datges/${prefix_ges}.abias_air ./aircftbias_in -$nln $datges/${prefix_ges}.radstat ./radstat.gdas - -member=mem001 -$nln $datens/$member/${prefix_ges}.sfcf003.nc ./sfcf03 -$nln $datens/$member/${prefix_ges}.sfcf006.nc ./sfcf06 -$nln $datens/$member/${prefix_ges}.sfcf009.nc ./sfcf09 - -$nln $datens/$member/${prefix_ges}.atmf003.nc ./sigf03 -$nln $datens/$member/${prefix_ges}.atmf006.nc ./sigf06 -$nln $datens/$member/${prefix_ges}.atmf009.nc ./sigf09 - -$nln $datens/${prefix_ens}.sfcf006.ensmean.nc ./sfcf06_anlgrid - - -listdiag=`tar xvf radstat.gdas | cut -d' ' -f2 | grep _ges` -for type in $listdiag; do - diag_file=`echo $type | cut -d',' -f1` - fname=`echo $diag_file | cut -d'.' -f1` - date=`echo $diag_file | cut -d'.' -f2` - $UNCOMPRESS $diag_file - fnameanl=$(echo $fname|sed 's/_ges//g') - mv ${fname}.${date} $fnameanl -done - -# Run GSI -echo "run gsi now" -eval "$APRUN $tmpdir/gsi.x > stdout 2>&1" -rc=$? - -exit $rc diff --git a/regression/global_4dvar.sh b/regression/global_4dvar.sh deleted file mode 100755 index cac0d28e6b..0000000000 --- a/regression/global_4dvar.sh +++ /dev/null @@ -1,338 +0,0 @@ -set -x - -# Set experiment name and analysis date - -exp=$jobname - -# Set the JCAP resolution which you want. -export JCAP=48 -export LEVS=127 -export JCAP_B=48 - -# Set runtime directories -tmpdir=$tmpdir/$tmpregdir/${exp} - -# Specify GSI fixed field and data directories. -fixcrtm=${fixcrtm:-$CRTM_FIX} - - -# Set variables used in script -UNCOMPRESS=gunzip -CLEAN=NO -ncp=/bin/cp -nln="/bin/ln -fs" - - -# Given the requested resolution, set dependent resolution parameters -if [[ "$JCAP" = "96" ]]; then - export LONA=384 - export LATA=192 - export DELTIM=1200 -elif [[ "$JCAP" = "48" ]]; then - export LONA=192 - export LATA=96 - export DELTIM=1200 -else - echo "INVALID JCAP = $JCAP" - exit -fi -export NLON=$LONA -export NLAT=$((${LATA}+2)) - - -# Given the analysis date, compute the date from which the -# first guess comes. Extract cycle and set prefix and suffix -# for guess and observation data files -gdate=`date +%Y%m%d%H -d "${global_adate:0:8} ${global_adate:8:2} - 6 hours"` -PDYa=`echo $global_adate | cut -c1-8` -cyca=`echo $global_adate | cut -c9-10` -PDYg=`echo $gdate | cut -c1-8` -cycg=`echo $gdate | cut -c9-10` - -dumpobs=gdas -prefix_obs=${dumpobs}.t${cyca}z -prefix_ges=gdas.t${cycg}z -prefix_ens=gdas.t${cycg}z -suffix=tm00.bufr_d - -dumpges=gdas -COMROOTgfs=$casesdir/gfs/prod -datobs=$COMROOTgfs/$dumpobs.$PDYa/${cyca}/atmos -datges=$COMROOTgfs/$dumpges.$PDYg/${cycg}/atmos -datens=$COMROOTgfs/enkfgdas.$PDYg/${cycg}/atmos - - -# Set up $tmpdir -rm -rf $tmpdir -mkdir -p $tmpdir -cd $tmpdir - -# Make gsi namelist - -SETUP="" -GRIDOPTS="" -BKGVERR="" -ANBKGERR="" -JCOPTS="" -STRONGOPTS="" -OBSQC="" -OBSINPUT="" -SUPERRAD="" -SINGLEOB="" - - -# Set fixed files -# berror = forecast model background error statistics -# specoef = CRTM spectral coefficients -# trncoef = CRTM transmittance coefficients -# emiscoef = CRTM coefficients for IR sea surface emissivity model -# aerocoef = CRTM coefficients for aerosol effects -# cldcoef = CRTM coefficients for cloud effects -# satinfo = text file with information about assimilation of brightness temperatures -# satangl = angle dependent bias correction file (fixed in time) -# pcpinfo = text file with information about assimilation of prepcipitation rates -# ozinfo = text file with information about assimilation of ozone data -# errtable = text file with obs error for conventional data (optional) -# convinfo = text file with information about assimilation of conventional data -# bufrtable= text file ONLY needed for single obs test (oneobstest=.true.) -# bftab_sst= bufr table for sst ONLY needed for sst retrieval (retrieval=.true.) -# aeroinfo = text file with information about assimilation of aerosol data - -anavinfo=$fixgsi/global_anavinfo_qlqi.l${LEVS}.txt -berror=$fixgsi/Big_Endian/global_berror.l${LEVS}y${NLAT}.f77 -locinfo=$fixgsi/global_hybens_info.l${LEVS}.txt -satinfo=$fixgsi/global_satinfo.txt -scaninfo=$fixgsi/global_scaninfo.txt -satangl=$fixgsi/global_satangbias.txt -pcpinfo=$fixgsi/global_pcpinfo.txt -ozinfo=$fixgsi/global_ozinfo.txt -convinfo=$fixgsi/global_convinfo.txt -vqcdat=$fixgsi/vqctp001.dat -insituinfo=$fixgsi/global_insituinfo.txt -errtable=$fixgsi/prepobs_errtable.global -aeroinfo=$fixgsi/global_aeroinfo.txt -atmsbeaminfo=$fixgsi/atms_beamwidth.txt -cloudyinfo=$fixgsi/cloudy_radiance_info.txt - -emiscoef_IRwater=$fixcrtm/Nalli.IRwater.EmisCoeff.bin -emiscoef_IRice=$fixcrtm/NPOESS.IRice.EmisCoeff.bin -emiscoef_IRland=$fixcrtm/NPOESS.IRland.EmisCoeff.bin -emiscoef_IRsnow=$fixcrtm/NPOESS.IRsnow.EmisCoeff.bin -emiscoef_VISice=$fixcrtm/NPOESS.VISice.EmisCoeff.bin -emiscoef_VISland=$fixcrtm/NPOESS.VISland.EmisCoeff.bin -emiscoef_VISsnow=$fixcrtm/NPOESS.VISsnow.EmisCoeff.bin -emiscoef_VISwater=$fixcrtm/NPOESS.VISwater.EmisCoeff.bin -emiscoef_MWwater=$fixcrtm/FASTEM6.MWwater.EmisCoeff.bin -aercoef=$fixcrtm/AerosolCoeff.bin -cldcoef=$fixcrtm/CloudCoeff.bin -#cldcoef=$fixcrtm/CloudCoeff.GFDLFV3.-109z-1.bin # use with crtm/2.4.0 - -# Only need this file for single obs test -bufrtable=$fixgsi/prepobs_prep.bufrtable - -# Only need this file for sst retrieval -bftab_sst=$fixgsi/bufrtab.012 - -# Copy executable and fixed files to $tmpdir -if [[ $exp == *"updat"* ]]; then - $ncp $gsiexec_updat ./gsi.x -elif [[ $exp == *"contrl"* ]]; then - $ncp $gsiexec_contrl ./gsi.x -fi - -$ncp $anavinfo ./anavinfo -$ncp $berror ./berror_stats -$ncp $locinfo ./hybens_info -$ncp $satinfo ./satinfo -$ncp $scaninfo ./scaninfo -##$ncp $satangl ./satbias_angle -$ncp $pcpinfo ./pcpinfo -$ncp $ozinfo ./ozinfo -$ncp $convinfo ./convinfo -$ncp $vqcdat ./vqctp001.dat -$ncp $insituinfo ./insituinfo -$ncp $errtable ./errtable -$ncp $aeroinfo ./aeroinfo -$ncp $atmsbeaminfo ./atms_beamwidth.txt -$ncp $cloudyinfo ./cloudy_radiance_info.txt - -$ncp $bufrtable ./prepobs_prep.bufrtable -$ncp $bftab_sst ./bftab_sstphr - -#If using correlated error, get the covariance files -if grep -q "Rcov" $anavinfo ; -then - if ls ${fixgsi}/Rcov* 1> /dev/null 2>&1; - then - $ncp ${fixgsi}/Rcov* $tmpdir - -# Correlated error utlizes mkl lapack. Found it necesary to fix the -# number of mkl threads to ensure reproducible results independent -# of the job configuration. - export MKL_NUM_THREADS=1 - - else - echo "Warning: Satellite error covariance files are missing." - echo "Check for the required Rcov files in " $ANAVINFO - exit 1 - fi -fi - -# Copy CRTM coefficient files based on entries in satinfo file -export CRTM_PATH="./crtm_coeffs/" -mkdir -p ${CRTM_PATH} -for file in `awk '{if($1!~"!"){print $1}}' satinfo | sort | uniq` ;do - $nln $fixcrtm/${file}.SpcCoeff.bin ${CRTM_PATH}/${file}.SpcCoeff.bin - $nln $fixcrtm/${file}.TauCoeff.bin ${CRTM_PATH}/${file}.TauCoeff.bin -done -$nln $fixcrtm/amsua_metop-a_v2.SpcCoeff.bin ${CRTM_PATH}/amsua_metop-a_v2.SpcCoeff.bin - -$nln $emiscoef_IRwater ${CRTM_PATH}Nalli.IRwater.EmisCoeff.bin -$nln $emiscoef_IRice ${CRTM_PATH}NPOESS.IRice.EmisCoeff.bin -$nln $emiscoef_IRsnow ${CRTM_PATH}NPOESS.IRsnow.EmisCoeff.bin -$nln $emiscoef_IRland ${CRTM_PATH}NPOESS.IRland.EmisCoeff.bin -$nln $emiscoef_VISice ${CRTM_PATH}NPOESS.VISice.EmisCoeff.bin -$nln $emiscoef_VISland ${CRTM_PATH}NPOESS.VISland.EmisCoeff.bin -$nln $emiscoef_VISsnow ${CRTM_PATH}NPOESS.VISsnow.EmisCoeff.bin -$nln $emiscoef_VISwater ${CRTM_PATH}NPOESS.VISwater.EmisCoeff.bin -$nln $emiscoef_MWwater ${CRTM_PATH}FASTEM6.MWwater.EmisCoeff.bin -$nln $aercoef ${CRTM_PATH}AerosolCoeff.bin -$nln $cldcoef ${CRTM_PATH}CloudCoeff.bin - -# Copy observational data -$nln $datobs/${prefix_obs}.prepbufr ./prepbufr -$nln $datobs/${prefix_obs}.prepbufr.acft_profiles ./prepbufr_profl -$nln $datobs/${prefix_obs}.nsstbufr ./nsstbufr -$nln $datobs/${prefix_obs}.syndata.tcvitals.tm00 ./tcvitl -$nln $datobs/${prefix_obs}.gpsro.${suffix} ./gpsrobufr -$nln $datobs/${prefix_obs}.satwnd.${suffix} ./satwndbufr -$nln $datobs/${prefix_obs}.hdob.${suffix} ./hdobbufr - -$nln $datobs/${prefix_obs}.osbuv8.${suffix} ./sbuvbufr -$nln $datobs/${prefix_obs}.gome.${suffix} ./gomebufr -$nln $datobs/${prefix_obs}.omi.${suffix} ./omibufr -$nln $datobs/${prefix_obs}.mls.${suffix} ./mlsbufr -$nln $datobs/${prefix_obs}.ompsn8.${suffix} ./ompsnpbufr -$nln $datobs/${prefix_obs}.ompst8.${suffix} ./ompstcbufr -$nln $datobs/${prefix_obs}.ompslp.${suffix} ./ompslpbufr - -$nln $datobs/${prefix_obs}.goesfv.${suffix} ./gsnd1bufr -$nln $datobs/${prefix_obs}.hrs3db.${suffix} ./hirs3bufr_db -$nln $datobs/${prefix_obs}.airsev.${suffix} ./airsbufr -$nln $datobs/${prefix_obs}.sevcsr.${suffix} ./seviribufr -$nln $datobs/${prefix_obs}.saphir.${suffix} ./saphirbufr -$nln $datobs/${prefix_obs}.avcsam.${suffix} ./avhambufr -$nln $datobs/${prefix_obs}.avcspm.${suffix} ./avhpmbufr -$nln $datobs/${prefix_obs}.1bhrs4.${suffix} ./hirs4bufr -$nln $datobs/${prefix_obs}.1bhrs2.${suffix} ./hirs2bufr -$nln $datobs/${prefix_obs}.1bhrs3.${suffix} ./hirs3bufr -$nln $datobs/${prefix_obs}.eshrs3.${suffix} ./hirs3bufrears -$nln $datobs/${prefix_obs}.hrs3db.${suffix} ./hirs3bufr_db -$nln $datobs/${prefix_obs}.mtiasi.${suffix} ./iasibufr -$nln $datobs/${prefix_obs}.esiasi.${suffix} ./iasibufrears -$nln $datobs/${prefix_obs}.iasidb.${suffix} ./iasibufr_db -$nln $datobs/${prefix_obs}.crisf4.${suffix} ./crisfsbufr -$nln $datobs/${prefix_obs}.escrsf.${suffix} ./crisfsbufrears -$nln $datobs/${prefix_obs}.crsfdb.${suffix} ./crisfsbufr_db -$nln $datobs/${prefix_obs}.ahicsr.${suffix} ./ahibufr -$nln $datobs/${prefix_obs}.gsrcsr.${suffix} ./abibufr -$nln $datobs/${prefix_obs}.sstvcw.${suffix} ./sstviirs - -$nln $datobs/${prefix_obs}.1bmhs.${suffix} ./mhsbufr -$nln $datobs/${prefix_obs}.1bmsu.${suffix} ./msubufr -$nln $datobs/${prefix_obs}.gmi1cr.${suffix} ./gmibufr -$nln $datobs/${prefix_obs}.ssmit.${suffix} ./ssmitbufr -$nln $datobs/${prefix_obs}.ssmisu.${suffix} ./ssmisbufr -$nln $datobs/${prefix_obs}.1bamua.${suffix} ./amsuabufr -$nln $datobs/${prefix_obs}.esamua.${suffix} ./amsuabufrears -$nln $datobs/${prefix_obs}.amuadb.${suffix} ./amsuabufr_db -$nln $datobs/${prefix_obs}.1bamub.${suffix} ./amsubbufr -$nln $datobs/${prefix_obs}.esamub.${suffix} ./amsubbufrears -$nln $datobs/${prefix_obs}.amubdb.${suffix} ./amsubbufr_db -$nln $datobs/${prefix_obs}.atms.${suffix} ./atmsbufr -$nln $datobs/${prefix_obs}.atmsdb.${suffix} ./atmsbufr_db -$nln $datobs/${prefix_obs}.esatms.${suffix} ./atmsbufrears - -# Do not process -## $nln $datobs/${prefix_obs}.amsre.${suffix} ./amsrebufr -## $nln $datobs/${prefix_obs}.amsr2.tm00.bufr_d ./amsr2bufr - -# Copy bias correction, atmospheric and surface files -##$nln $datges/${prefix_ges}.abias ./satbias_in -##$nln $datges/${prefix_ges}.abias_pc ./satbias_pc -##$nln $datges/${prefix_ges}.abias_air ./aircftbias_in - - -#$nln $datges/${prefix_ges}.abias.4dvar ./satbias_in -$nln $datges/${prefix_ges}.satang.4dvar ./satbias_angle - -$nln $datges/${prefix_ges}.radstat ./radstat.gdas - -member=mem001 -$nln $datens/$member/${prefix_ges}.sfcf003.nc ./sfcf03 -##$nln $datens/$member/${prefix_ges}.sfcf004.nc ./sfcf04 -##$nln $datens/$member/${prefix_ges}.sfcf005.nc ./sfcf05 -$nln $datens/$member/${prefix_ges}.sfcf006.nc ./sfcf06 -##$nln $datens/$member/${prefix_ges}.sfcf007.nc ./sfcf07 -##$nln $datens/$member/${prefix_ges}.sfcf008.nc ./sfcf08 -$nln $datens/$member/${prefix_ges}.sfcf009.nc ./sfcf09 - -$nln $datens/$member/${prefix_ges}.atmf003.nc ./sigf03 -##$nln $datens/$member/${prefix_ges}.atmf004.nc ./sigf04 -##$nln $datens/$member/${prefix_ges}.atmf005.nc ./sigf05 -$nln $datens/$member/${prefix_ges}.atmf006.nc ./sigf06 -##$nln $datens/$member/${prefix_ges}.atmf007.nc ./sigf07 -##$nln $datens/$member/${prefix_ges}.atmf008.nc ./sigf08 -$nln $datens/$member/${prefix_ges}.atmf009.nc ./sigf09 - -$nln $datens/${prefix_ens}.sfcf006.ensmean.nc ./sfcf06_anlgrid - -listdiag=`tar xvf radstat.gdas | cut -d' ' -f2 | grep _ges` -for type in $listdiag; do - diag_file=`echo $type | cut -d',' -f1` - fname=`echo $diag_file | cut -d'.' -f1` - date=`echo $diag_file | cut -d'.' -f2` - $UNCOMPRESS $diag_file - fnameanl=$(echo $fname|sed 's/_ges//g') - mv $fname.$date $fnameanl -done - - -# Run GSI in observer mode -SETUP="l4dvar=.true.,jiterstart=1,lobserver=.true.,iwrtinc=1,nhr_assimilation=6,nhr_obsbin=1," -if [ "$debug" = ".false." ]; then - . $scripts/regression_namelists.sh global_lanczos -else - . $scripts/regression_namelists_db.sh global_lanczos -fi -rm gsiparm.anl -cat << EOF > gsiparm.anl -$gsi_namelist -EOF -cp gsiparm.anl gsiparm.anl.obsvr - -echo "run gsi observer" -eval "$APRUN $tmpdir/gsi.x < gsiparm.anl > stdout.obsvr 2>&1" -ra=$? - -# Run gsi identity model 4dvar under Parallel Operating Environment (poe) on NCEP IBM -rm -f siganl sfcanl.gsi satbias_out fort.2* -rm -rf dir.0* - -# Create namelist for identity model 4dvar run -SETUP="l4dvar=.true.,jiterstart=1,nhr_assimilation=6,nhr_obsbin=1,idmodel=.true.,iwrtinc=1,lanczosave=.true.," -if [ "$debug" = ".false." ]; then - . $scripts/regression_namelists.sh global_lanczos -else - . $scripts/regression_namelists_db.sh global_lanczos -fi -rm gsiparm.anl -cat < gsiparm.anl -$gsi_namelist -EOF - -echo "run gsi 4dvar" -eval "$APRUN $tmpdir/gsi.x < gsiparm.anl > stdout 2>&1" -rb=$? -rc=$((ra+rb)) -exit $rc diff --git a/regression/hafs_3denvar_hybens.sh b/regression/hafs_3denvar_hybens.sh new file mode 100755 index 0000000000..bd1c5b886d --- /dev/null +++ b/regression/hafs_3denvar_hybens.sh @@ -0,0 +1,455 @@ +set -x +# Set variables used in script +# CLEAN up $tmpdir when finished (YES=remove, NO=leave alone) +# ncp is cp replacement, currently keep as /bin/cp + +UNCOMPRESS=gunzip +CLEAN=NO +ncp=/bin/cp +nln="/bin/ln -sf" + +# HAFS test cases set up +RUN_FGAT=YES # use FGAT or not +RUN_ENSDA=YES +l4densvar=.false. +nhr_obsbin=-1 +l_both_fv3sar_gfs_ens=.true. +n_ens_gfs=5 +n_ens_fv3sar=5 + +# +# Set experiment name +# +exp=$jobname + +#----------------------------------------------------------------------- +# +# Extract from ADATE the starting year, month, day, and hour of the +# forecast. These are needed below for various operations. +# +#----------------------------------------------------------------------- +# +adate=${hafs_envar_adate} +YYYYMMDDHH=$(date +%Y%m%d%H -d "${adate:0:8} ${adate:8:2}") +JJJ=$(date +%j -d "${adate:0:8} ${adate:8:2}") + +YYYY=${YYYYMMDDHH:0:4} +MM=${YYYYMMDDHH:4:2} +DD=${YYYYMMDDHH:6:2} +HH=${YYYYMMDDHH:8:2} +YYYYMMDD=${YYYYMMDDHH:0:8} +PDY=${YYYYMMDD} +cyc=${HH} +# prior date and hour +adateprior=`date +%Y%m%d%H -d "${adate:0:8} ${adate:8:2} - 6 hours"` + +ymdprior=$(echo ${adateprior} | cut -c1-8) +hhprior=$(echo ${adateprior} | cut -c9-10) + +CDATEtm03=`date +%Y%m%d%H -d "${adate:0:8} ${adate:8:2} - 3 hours"` +ymdtm03=$(echo ${CDATEtm03} | cut -c1-8) +hhtm03=$(echo ${CDATEtm03} | cut -c9-10) + +CDATEtp03=`date +%Y%m%d%H -d "${adate:0:8} ${adate:8:2} + 3 hours"` +ymdtp03=$(echo ${CDATEtp03} | cut -c1-8) +hhtp03=$(echo ${CDATEtp03} | cut -c9-10) + +# +#----------------------------------------------------------------------- +# +# go to working directory and save directory. +# define fix and background path +# +#----------------------------------------------------------------------- +# Set runtime and save directories +tmpdir=$tmpdir/tmpreg_hafs_3denvar_hybens/${exp} +savdir=$savdir/outreg_hafs_3denvar_hybens/${exp} + +# Set up $tmpdir +rm -rf $tmpdir +mkdir -p $tmpdir +chgrp rstprod $tmpdir +chmod 750 $tmpdir +cd $tmpdir + +bkpath=${hafs_envar_ges} +fixcrtm=${fixcrtm:-$CRTM_FIX} + +################################################################ +##### input data and fix directory ####################### +inputdata=${hafs_envar_ges} +COMINgdas=${hafs_envar_ens} +COMINobs=${hafs_envar_obs} +COMINgfs=${hafs_envar_obs} +WORKhafs=${hafs_envar_obs} +########################################################## + +# use FGAT or not +if [ ${RUN_FGAT} = "YES" ]; then + ln -sf ${inputdata}/coupler.res_03 . + ln -sf ${inputdata}/fv3_akbk_03 . + ln -sf ${inputdata}/fv3_sfcdata_03 . + ln -sf ${inputdata}/fv3_srfwnd_03 . + ln -sf ${inputdata}/fv3_dynvars_03 . + ln -sf ${inputdata}/fv3_tracer_03 . + + ln -sf ${inputdata}/coupler.res_09 . + ln -sf ${inputdata}/fv3_akbk_09 . + ln -sf ${inputdata}/fv3_sfcdata_09 . + ln -sf ${inputdata}/fv3_srfwnd_09 . + ln -sf ${inputdata}/fv3_dynvars_09 . + ln -sf ${inputdata}/fv3_tracer_09 . +fi + +# copy background and grib configuration files +cp ${bkpath}/${YYYYMMDD}.${HH}0000.coupler.res ./coupler.res +cp ${bkpath}/${YYYYMMDD}.${HH}0000.fv_core.res.nc ./fv3_akbk +cp ${bkpath}/${YYYYMMDD}.${HH}0000.sfc_data.nc ./fv3_sfcdata +cp ${bkpath}/${YYYYMMDD}.${HH}0000.fv_srf_wnd.res.tile1.nc ./fv3_srfwnd +cp ${bkpath}/${YYYYMMDD}.${HH}0000.fv_core.res.tile1.nc ./fv3_dynvars +cp ${bkpath}/${YYYYMMDD}.${HH}0000.fv_tracer.res.tile1.nc ./fv3_tracer + +cp ${bkpath}/oro_data.nc ./fv3_oro_data +cp ${bkpath}/atmos_static.nc ./fv3_atmos_static +cp ${bkpath}/grid_spec.nc ./fv3_grid_spec + +# create ensemble member file list +if [ ${RUN_ENSDA} != "YES" ] || [ $l_both_fv3sar_gfs_ens = .true. ]; then +# Link gdas ensemble members + mkdir -p ensemble_data + GSUFFIX=${GSUFFIX:-.nc} + if [ ${l4densvar:-.false.} = ".true." ]; then + fhrs="03 06 09" + else + fhrs="06" + fi + for fhh in $fhrs; do + rm -f filelist${fhh} + for mem in $(seq -f '%03g' 1 ${n_ens_gfs}); do + if [ -s ${COMINgdas}/enkfgdas.${ymdprior}/${hhprior}/atmos/mem${mem}/gdas.t${hhprior}z.atmf0${fhh}s${GSUFFIX:-.nc} ]; then + ${nln} ${COMINgdas}/enkfgdas.${ymdprior}/${hhprior}/atmos/mem${mem}/gdas.t${hhprior}z.atmf0${fhh}s${GSUFFIX:-.nc} ./ensemble_data/enkfgdas.${ymdprior}${hhprior}.atmf0${fhh}_ens_${mem} + elif [ -s ${COMINgdas}/enkfgdas.${ymdprior}/${hhprior}/atmos/mem${mem}/gdas.t${hhprior}z.atmf0${fhh}${GSUFFIX:-.nc} ]; then + ${nln} ${COMINgdas}/enkfgdas.${ymdprior}/${hhprior}/atmos/mem${mem}/gdas.t${hhprior}z.atmf0${fhh}${GSUFFIX:-.nc} ./ensemble_data/enkfgdas.${ymdprior}${hhprior}.atmf0${fhh}_ens_${mem} + fi + echo "./ensemble_data/enkfgdas.${ymdprior}${hhprior}.atmf0${fhh}_ens_${mem}" >> filelist${fhh} + done + done +fi + +if [ ${RUN_ENSDA} = "YES" ]; then + for mem in $(seq -f '%03g' 1 ${n_ens_fv3sar}) + do + RESTARTens=${inputdata} + fhh="06" + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-coupler.res . + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-fv3_akbk . + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-fv3_sfcdata . + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-fv3_srfwnd . + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-fv3_dynvars . + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-fv3_tracer . + if [ ! -s ./fv3_ens_grid_spec ]; then + ln -sf ${RESTARTens}/grid_spec.nc ./fv3_ens_grid_spec + fi + if [ ${l4densvar:-.false.} = ".true." ]; then + export ENS_NSTARTHR=3 + fhh="03" + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-coupler.res . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_akbk . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_sfcdata . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_srfwnd . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_dynvars . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_tracer . + fhh="09" + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-coupler.res . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_akbk . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_sfcdata . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_srfwnd . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_dynvars . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_tracer . + fi + done +fi +if [ ${RUN_ENSDA} != "YES" ]; then + export N_ENS=${n_ens_gfs} + export BETA_S0=${BETA_S0:-0.2} + export GRID_RATIO_ENS=1 + export REGIONAL_ENSEMBLE_OPTION=1 +elif [ ${RUN_ENSDA} = "YES" ]; then + if [ $l_both_fv3sar_gfs_ens = .false. ]; then + export N_ENS=${n_ens_fv3sar} + export BETA_S0=${BETA_S0:-0.0} + export GRID_RATIO_ENS=2 + export grid_ratio_fv3_regional=2 + export REGIONAL_ENSEMBLE_OPTION=5 + elif [ $l_both_fv3sar_gfs_ens = .true. ]; then + export N_ENS=$((${n_ens_gfs} + ${n_ens_fv3sar})) + export BETA_S0=${BETA_S0:-0.0} + export GRID_RATIO_ENS=2 + export grid_ratio_fv3_regional=2 + export REGIONAL_ENSEMBLE_OPTION=5 + fi +fi + +#----------------------------------------------------------------------- +# +# link observation files +# copy observation files to working directory +# +#----------------------------------------------------------------------- + +# Link GFS/GDAS input and observation files +COMIN_OBS=${COMIN_OBS:-${COMINobs}} +COMIN_GFS=${COMIN_GFS:-${COMINgfs}} + +OPREFIX=${OPREFIX:-"gfs.t${cyc}z."} +OSUFFIX=${OSUFFIX:-""} +PREPQC=${PREPQC:-${COMIN_OBS}/${OPREFIX}prepbufr${OSUFFIX}} +PREPQCPF=${PREPQCPF:-${COMIN_OBS}/${OPREFIX}prepbufr.acft_profiles${OSUFFIX}} +NSSTBF=${NSSTBF:-${COMIN_OBS}/${OPREFIX}nsstbufr${OSUFFIX}} +SATWND=${SATWND:-${COMIN_OBS}/${OPREFIX}satwnd.tm00.bufr_d${OSUFFIX}} +SATWHR=${SATWHR:-${COMIN_OBS}/${OPREFIX}satwhr.tm00.bufr_d${OSUFFIX}} +OSCATBF=${OSCATBF:-${COMIN_OBS}/${OPREFIX}oscatw.tm00.bufr_d${OSUFFIX}} +RAPIDSCATBF=${RAPIDSCATBF:-${COMIN_OBS}/${OPREFIX}rapidscatw.tm00.bufr_d${OSUFFIX}} +GSNDBF=${GSNDBF:-${COMIN_OBS}/${OPREFIX}goesnd.tm00.bufr_d${OSUFFIX}} +GSNDBF1=${GSNDBF1:-${COMIN_OBS}/${OPREFIX}goesfv.tm00.bufr_d${OSUFFIX}} +B1HRS2=${B1HRS2:-${COMIN_OBS}/${OPREFIX}1bhrs2.tm00.bufr_d${OSUFFIX}} +B1MSU=${B1MSU:-${COMIN_OBS}/${OPREFIX}1bmsu.tm00.bufr_d${OSUFFIX}} +B1HRS3=${B1HRS3:-${COMIN_OBS}/${OPREFIX}1bhrs3.tm00.bufr_d${OSUFFIX}} +B1HRS4=${B1HRS4:-${COMIN_OBS}/${OPREFIX}1bhrs4.tm00.bufr_d${OSUFFIX}} +B1AMUA=${B1AMUA:-${COMIN_OBS}/${OPREFIX}1bamua.tm00.bufr_d${OSUFFIX}} +B1AMUB=${B1AMUB:-${COMIN_OBS}/${OPREFIX}1bamub.tm00.bufr_d${OSUFFIX}} +B1MHS=${B1MHS:-${COMIN_OBS}/${OPREFIX}1bmhs.tm00.bufr_d${OSUFFIX}} +ESHRS3=${ESHRS3:-${COMIN_OBS}/${OPREFIX}eshrs3.tm00.bufr_d${OSUFFIX}} +ESAMUA=${ESAMUA:-${COMIN_OBS}/${OPREFIX}esamua.tm00.bufr_d${OSUFFIX}} +ESAMUB=${ESAMUB:-${COMIN_OBS}/${OPREFIX}esamub.tm00.bufr_d${OSUFFIX}} +ESMHS=${ESMHS:-${COMIN_OBS}/${OPREFIX}esmhs.tm00.bufr_d${OSUFFIX}} +HRS3DB=${HRS3DB:-${COMIN_OBS}/${OPREFIX}hrs3db.tm00.bufr_d${OSUFFIX}} +AMUADB=${AMUADB:-${COMIN_OBS}/${OPREFIX}amuadb.tm00.bufr_d${OSUFFIX}} +AMUBDB=${AMUBDB:-${COMIN_OBS}/${OPREFIX}amubdb.tm00.bufr_d${OSUFFIX}} +MHSDB=${MHSDB:-${COMIN_OBS}/${OPREFIX}mhsdb.tm00.bufr_d${OSUFFIX}} +AIRSBF=${AIRSBF:-${COMIN_OBS}/${OPREFIX}airsev.tm00.bufr_d${OSUFFIX}} +IASIBF=${IASIBF:-${COMIN_OBS}/${OPREFIX}mtiasi.tm00.bufr_d${OSUFFIX}} +ESIASI=${ESIASI:-${COMIN_OBS}/${OPREFIX}esiasi.tm00.bufr_d${OSUFFIX}} +IASIDB=${IASIDB:-${COMIN_OBS}/${OPREFIX}iasidb.tm00.bufr_d${OSUFFIX}} +AMSREBF=${AMSREBF:-${COMIN_OBS}/${OPREFIX}amsre.tm00.bufr_d${OSUFFIX}} +AMSR2BF=${AMSR2BF:-${COMIN_OBS}/${OPREFIX}amsr2.tm00.bufr_d${OSUFFIX}} +GMI1CRBF=${GMI1CRBF:-${COMIN_OBS}/${OPREFIX}gmi1cr.tm00.bufr_d${OSUFFIX}} +SAPHIRBF=${SAPHIRBF:-${COMIN_OBS}/${OPREFIX}saphir.tm00.bufr_d${OSUFFIX}} +SEVIRIBF=${SEVIRIBF:-${COMIN_OBS}/${OPREFIX}sevcsr.tm00.bufr_d${OSUFFIX}} +AHIBF=${AHIBF:-${COMIN_OBS}/${OPREFIX}ahicsr.tm00.bufr_d${OSUFFIX}} +ABIBF=${ABIBF:-${COMIN_OBS}/${OPREFIX}gsrcsr.tm00.bufr_d${OSUFFIX}} +CRISBF=${CRISBF:-${COMIN_OBS}/${OPREFIX}cris.tm00.bufr_d${OSUFFIX}} +ESCRIS=${ESCRIS:-${COMIN_OBS}/${OPREFIX}escris.tm00.bufr_d${OSUFFIX}} +CRISDB=${CRISDB:-${COMIN_OBS}/${OPREFIX}crisdb.tm00.bufr_d${OSUFFIX}} +CRISFSBF=${CRISFSBF:-${COMIN_OBS}/${OPREFIX}crisf4.tm00.bufr_d${OSUFFIX}} +ESCRISFS=${ESCRISFS:-${COMIN_OBS}/${OPREFIX}escrsf.tm00.bufr_d${OSUFFIX}} +CRISFSDB=${CRISFSDB:-${COMIN_OBS}/${OPREFIX}crsfdb.tm00.bufr_d${OSUFFIX}} +ATMSBF=${ATMSBF:-${COMIN_OBS}/${OPREFIX}atms.tm00.bufr_d${OSUFFIX}} +ESATMS=${ESATMS:-${COMIN_OBS}/${OPREFIX}esatms.tm00.bufr_d${OSUFFIX}} +ATMSDB=${ATMSDB:-${COMIN_OBS}/${OPREFIX}atmsdb.tm00.bufr_d${OSUFFIX}} +ESATMS=${ESATMS:-${COMIN_OBS}/${OPREFIX}esatms.tm00.bufr_d${OSUFFIX}} +ATMSDB=${ATMSDB:-${COMIN_OBS}/${OPREFIX}atmsdb.tm00.bufr_d${OSUFFIX}} +SSMITBF=${SSMITBF:-${COMIN_OBS}/${OPREFIX}ssmit.tm00.bufr_d${OSUFFIX}} +SSMISBF=${SSMISBF:-${COMIN_OBS}/${OPREFIX}ssmisu.tm00.bufr_d${OSUFFIX}} +SBUVBF=${SBUVBF:-${COMIN_OBS}/${OPREFIX}osbuv8.tm00.bufr_d${OSUFFIX}} +OMPSNPBF=${OMPSNPBF:-${COMIN_OBS}/${OPREFIX}ompsn8.tm00.bufr_d${OSUFFIX}} +OMPSTCBF=${OMPSTCBF:-${COMIN_OBS}/${OPREFIX}ompst8.tm00.bufr_d${OSUFFIX}} +GOMEBF=${GOMEBF:-${COMIN_OBS}/${OPREFIX}gome.tm00.bufr_d${OSUFFIX}} +OMIBF=${OMIBF:-${COMIN_OBS}/${OPREFIX}omi.tm00.bufr_d${OSUFFIX}} +MLSBF=${MLSBF:-${COMIN_OBS}/${OPREFIX}mls.tm00.bufr_d${OSUFFIX}} +OMPSLPBF=${OMPSLPBF:-${COMIN_OBS}/${OPREFIX}ompslp.tm00.bufr_d${OSUFFIX}} +SMIPCP=${SMIPCP:-${COMIN_OBS}/${OPREFIX}spssmi.tm00.bufr_d${OSUFFIX}} +TMIPCP=${TMIPCP:-${COMIN_OBS}/${OPREFIX}sptrmm.tm00.bufr_d${OSUFFIX}} +if [[ ${use_bufr_nr:-no} = "no" ]]; then + GPSROBF=${GPSROBF:-${COMIN_OBS}/${OPREFIX}gpsro.tm00.bufr_d${OSUFFIX}} +else + GPSROBF=${GPSROBF:-${COMIN_OBS}/${OPREFIX}gpsro.tm00.bufr_d.nr} +fi +TCVITL=${TCVITL:-${COMIN_GFS}/${OPREFIX}syndata.tcvitals.tm00} +B1AVHAM=${B1AVHAM:-${COMIN_OBS}/${OPREFIX}avcsam.tm00.bufr_d${OSUFFIX}} +B1AVHPM=${B1AVHPM:-${COMIN_OBS}/${OPREFIX}avcspm.tm00.bufr_d${OSUFFIX}} + +# Observational data +if [[ ${use_bufr_nr:-no} = "no" ]] && [ -s $PREPQC ]; then + $ncp -Lp $PREPQC prepbufr +else + touch prepbufr +fi +ln -sf $SATWND satwndbufr +ln -sf $SATWHR satwhrbufr +ln -sf $GSNDBF1 gsnd1bufr +ln -sf $B1HRS3 hirs3bufr +ln -sf $B1HRS4 hirs4bufr +ln -sf $B1AMUA amsuabufr +ln -sf $B1MHS mhsbufr +ln -sf $ESHRS3 hirs3bufrears +ln -sf $ESAMUA amsuabufrears +ln -sf $HRS3DB hirs3bufr_db +ln -sf $SBUVBF sbuvbufr +ln -sf $OMPSNPBF ompsnpbufr +ln -sf $OMPSTCBF ompstcbufr +ln -sf $GOMEBF gomebufr +ln -sf $OMIBF omibufr +ln -sf $MLSBF mlsbufr +ln -sf $AIRSBF airsbufr +ln -sf $IASIBF iasibufr +ln -sf $ESIASI iasibufrears +ln -sf $IASIDB iasibufr_db +ln -sf $AMSR2BF amsr2bufr +ln -sf $GMI1CRBF gmibufr +ln -sf $SAPHIRBF saphirbufr +ln -sf $SEVIRIBF seviribufr +ln -sf $CRISBF crisbufr +ln -sf $ESCRIS crisbufrears +ln -sf $CRISDB crisbufr_db +ln -sf $CRISFSBF crisfsbufr +ln -sf $ESCRISFS crisfsbufrears +ln -sf $CRISFSDB crisfsbufr_db +ln -sf $ATMSBF atmsbufr +ln -sf $ESATMS atmsbufrears +ln -sf $ATMSDB atmsbufr_db +ln -sf $SSMISBF ssmisbufr +ln -sf $GPSROBF gpsrobufr +ln -sf $TCVITL tcvitl +ln -sf $B1AVHAM avhambufr +ln -sf $B1AVHPM avhpmbufr + +if [[ ${use_bufr_nr:-no} = "yes" ]]; then + + if [ -s ${PREPQC}.nr ]; then + $ncp -L ${PREPQC}.nr prepbufr + fi + ln -sf ${SAPHIRBF}.nr saphirbufr + +fi +# HAFS specific observations +INTCOMobs=${WORKhafs}/obs_prep +# Use updated prepbufr if exists +if [ -s ${INTCOMobs}/hafs.t${cyc}z.prepbufr ]; then + ln -s ${INTCOMobs}/hafs.t${cyc}z.prepbufr prepbufr +fi +# cat tempdrop.prepbufr with drifting correction into prepbufr +if [ -s ${INTCOMobs}/hafs.t${cyc}z.tempdrop.prepbufr ]; then + cat ${INTCOMobs}/hafs.t${cyc}z.tempdrop.prepbufr >> prepbufr +fi +if [ -s ${INTCOMobs}/hafs.t${cyc}z.tldplr.tm00.bufr_d ]; then + ln -s ${INTCOMobs}/hafs.t${cyc}z.tldplr.tm00.bufr_d tldplrbufr +fi +if [ -s ${INTCOMobs}/hafs.t${cyc}z.hdob.tm00.bufr_d ]; then + ln -s ${INTCOMobs}/hafs.t${cyc}z.hdob.tm00.bufr_d hdobbufr +fi +if [ -s ${INTCOMobs}/hafs.t${cyc}z.nexrad.tm00.bufr_d ]; then + ln -s ${INTCOMobs}/hafs.t${cyc}z.nexrad.tm00.bufr_d l2rwbufr +fi + + +# +#----------------------------------------------------------------------- +# +# Create links to fix files in the FIXgsi directory. +# +#----------------------------------------------------------------------- + +ln -sf ${inputdata}/berror_stats . +ln -sf ${inputdata}/satinfo . +ln -sf ${inputdata}/atms_beamwidth.txt . +ln -sf ${inputdata}/anavinfo . +ln -sf ${inputdata}/convinfo . +ln -sf ${inputdata}/ozinfo . +ln -sf ${inputdata}/pcpinfo . +ln -sf ${inputdata}/scaninfo . +ln -sf ${inputdata}/errtable . +ln -sf ${inputdata}/prepobs_prep.bufrtable . +ln -sf ${inputdata}/bftab_sstphr . + +#----------------------------------------------------------------------- +# +# CRTM Spectral and Transmittance coefficients +# +#----------------------------------------------------------------------- +emiscoef_IRwater=${fixcrtm}/Nalli.IRwater.EmisCoeff.bin +emiscoef_IRice=${fixcrtm}/NPOESS.IRice.EmisCoeff.bin +emiscoef_IRland=${fixcrtm}/NPOESS.IRland.EmisCoeff.bin +emiscoef_IRsnow=${fixcrtm}/NPOESS.IRsnow.EmisCoeff.bin +emiscoef_VISice=${fixcrtm}/NPOESS.VISice.EmisCoeff.bin +emiscoef_VISland=${fixcrtm}/NPOESS.VISland.EmisCoeff.bin +emiscoef_VISsnow=${fixcrtm}/NPOESS.VISsnow.EmisCoeff.bin +emiscoef_VISwater=${fixcrtm}/NPOESS.VISwater.EmisCoeff.bin +emiscoef_MWwater=${fixcrtm}/FASTEM6.MWwater.EmisCoeff.bin +aercoef=${fixcrtm}/AerosolCoeff.bin +cldcoef=${fixcrtm}/CloudCoeff.bin + +ln -sf ${emiscoef_IRwater} Nalli.IRwater.EmisCoeff.bin +ln -sf $emiscoef_IRice ./NPOESS.IRice.EmisCoeff.bin +ln -sf $emiscoef_IRsnow ./NPOESS.IRsnow.EmisCoeff.bin +ln -sf $emiscoef_IRland ./NPOESS.IRland.EmisCoeff.bin +ln -sf $emiscoef_VISice ./NPOESS.VISice.EmisCoeff.bin +ln -sf $emiscoef_VISland ./NPOESS.VISland.EmisCoeff.bin +ln -sf $emiscoef_VISsnow ./NPOESS.VISsnow.EmisCoeff.bin +ln -sf $emiscoef_VISwater ./NPOESS.VISwater.EmisCoeff.bin +ln -sf $emiscoef_MWwater ./FASTEM6.MWwater.EmisCoeff.bin +ln -sf $aercoef ./AerosolCoeff.bin +ln -sf $cldcoef ./CloudCoeff.bin + + +# Copy CRTM coefficient files based on entries in satinfo file +for file in $(awk '{if($1!~"!"){print $1}}' ./satinfo | sort | uniq) ;do + ln -sf ${fixcrtm}/${file}.SpcCoeff.bin ./ + ln -sf ${fixcrtm}/${file}.TauCoeff.bin ./ +done + +# Read from previous cycles for satbias predictors (no online satbias) +PASSIVE_BC=.false. +UPD_PRED=0 +ln -sf ${COMINgdas}/gdas.t${hhprior}z.abias satbias_in +ln -sf ${COMINgdas}/gdas.t${hhprior}z.abias_pc satbias_pc + +#----------------------------------------------------------------------- +# +# Build the GSI namelist on-the-fly +# +#----------------------------------------------------------------------- +# + +. $scripts/regression_nl_update.sh + +SETUP="$SETUP_update" +GRIDOPTS="$GRIDOPTS_update" +BKGVERR="$BKGVERR_update" +ANBKGERR="$ANBKERR_update" +JCOPTS="$JCOPTS_update" +STRONGOPTS="$STRONGOPTS_update" +OBSQC="$OBSQC_update" +OBSINPUT="$OBSINPUT_update" +SUPERRAD="$SUPERRAD_update" +HYBRID_ENSEMBLE='ensemble_path="",' +SINGLEOB="$SINGLEOB_update" + +if [ "$debug" = ".false." ]; then + . $scripts/regression_namelists.sh hafs_envar +else + . $scripts/regression_namelists_db.sh hafs_envar +fi + +cat << EOF > gsiparm.anl + +$gsi_namelist + +EOF + +# Copy executable and fixed files to $tmpdir +if [[ $exp == *"updat"* ]]; then + $ncp $gsiexec_updat ./gsi.x +elif [[ $exp == *"contrl"* ]]; then + $ncp $gsiexec_contrl ./gsi.x +fi + +# Run GSI +cd $tmpdir +echo "run gsi now" +eval "$APRUN $tmpdir/gsi.x > stdout 2>&1" +rc=$? +exit $rc + + + diff --git a/regression/hafs_4denvar_glbens.sh b/regression/hafs_4denvar_glbens.sh new file mode 100755 index 0000000000..e19519e8fa --- /dev/null +++ b/regression/hafs_4denvar_glbens.sh @@ -0,0 +1,455 @@ +set -x +# Set variables used in script +# CLEAN up $tmpdir when finished (YES=remove, NO=leave alone) +# ncp is cp replacement, currently keep as /bin/cp + +UNCOMPRESS=gunzip +CLEAN=NO +ncp=/bin/cp +nln="/bin/ln -sf" + +# HAFS test cases set up +RUN_FGAT=YES # use FGAT or not +RUN_ENSDA=NO +l4densvar=.true. +nhr_obsbin=3 +l_both_fv3sar_gfs_ens=.false. +n_ens_gfs=5 +n_ens_fv3sar=5 + +# +# Set experiment name +# +exp=$jobname + +#----------------------------------------------------------------------- +# +# Extract from ADATE the starting year, month, day, and hour of the +# forecast. These are needed below for various operations. +# +#----------------------------------------------------------------------- +# +adate=${hafs_envar_adate} +YYYYMMDDHH=$(date +%Y%m%d%H -d "${adate:0:8} ${adate:8:2}") +JJJ=$(date +%j -d "${adate:0:8} ${adate:8:2}") + +YYYY=${YYYYMMDDHH:0:4} +MM=${YYYYMMDDHH:4:2} +DD=${YYYYMMDDHH:6:2} +HH=${YYYYMMDDHH:8:2} +YYYYMMDD=${YYYYMMDDHH:0:8} +PDY=${YYYYMMDD} +cyc=${HH} +# prior date and hour +adateprior=`date +%Y%m%d%H -d "${adate:0:8} ${adate:8:2} - 6 hours"` + +ymdprior=$(echo ${adateprior} | cut -c1-8) +hhprior=$(echo ${adateprior} | cut -c9-10) + +CDATEtm03=`date +%Y%m%d%H -d "${adate:0:8} ${adate:8:2} - 3 hours"` +ymdtm03=$(echo ${CDATEtm03} | cut -c1-8) +hhtm03=$(echo ${CDATEtm03} | cut -c9-10) + +CDATEtp03=`date +%Y%m%d%H -d "${adate:0:8} ${adate:8:2} + 3 hours"` +ymdtp03=$(echo ${CDATEtp03} | cut -c1-8) +hhtp03=$(echo ${CDATEtp03} | cut -c9-10) + +# +#----------------------------------------------------------------------- +# +# go to working directory and save directory. +# define fix and background path +# +#----------------------------------------------------------------------- +# Set runtime and save directories +tmpdir=$tmpdir/tmpreg_hafs_4denvar_glbens/${exp} +savdir=$savdir/outreg_hafs_4denvar_glbens/${exp} + +# Set up $tmpdir +rm -rf $tmpdir +mkdir -p $tmpdir +chgrp rstprod $tmpdir +chmod 750 $tmpdir +cd $tmpdir + +bkpath=${hafs_envar_ges} +fixcrtm=${fixcrtm:-$CRTM_FIX} + +################################################################ +##### input data and fix directory ####################### +inputdata=${hafs_envar_ges} +COMINgdas=${hafs_envar_ens} +COMINobs=${hafs_envar_obs} +COMINgfs=${hafs_envar_obs} +WORKhafs=${hafs_envar_obs} +########################################################## + +# use FGAT or not +if [ ${RUN_FGAT} = "YES" ]; then + ln -sf ${inputdata}/coupler.res_03 . + ln -sf ${inputdata}/fv3_akbk_03 . + ln -sf ${inputdata}/fv3_sfcdata_03 . + ln -sf ${inputdata}/fv3_srfwnd_03 . + ln -sf ${inputdata}/fv3_dynvars_03 . + ln -sf ${inputdata}/fv3_tracer_03 . + + ln -sf ${inputdata}/coupler.res_09 . + ln -sf ${inputdata}/fv3_akbk_09 . + ln -sf ${inputdata}/fv3_sfcdata_09 . + ln -sf ${inputdata}/fv3_srfwnd_09 . + ln -sf ${inputdata}/fv3_dynvars_09 . + ln -sf ${inputdata}/fv3_tracer_09 . +fi + +# copy background and grib configuration files +cp ${bkpath}/${YYYYMMDD}.${HH}0000.coupler.res ./coupler.res +cp ${bkpath}/${YYYYMMDD}.${HH}0000.fv_core.res.nc ./fv3_akbk +cp ${bkpath}/${YYYYMMDD}.${HH}0000.sfc_data.nc ./fv3_sfcdata +cp ${bkpath}/${YYYYMMDD}.${HH}0000.fv_srf_wnd.res.tile1.nc ./fv3_srfwnd +cp ${bkpath}/${YYYYMMDD}.${HH}0000.fv_core.res.tile1.nc ./fv3_dynvars +cp ${bkpath}/${YYYYMMDD}.${HH}0000.fv_tracer.res.tile1.nc ./fv3_tracer + +cp ${bkpath}/oro_data.nc ./fv3_oro_data +cp ${bkpath}/atmos_static.nc ./fv3_atmos_static +cp ${bkpath}/grid_spec.nc ./fv3_grid_spec + +# create ensemble member file list +if [ ${RUN_ENSDA} != "YES" ] || [ $l_both_fv3sar_gfs_ens = .true. ]; then +# Link gdas ensemble members + mkdir -p ensemble_data + GSUFFIX=${GSUFFIX:-.nc} + if [ ${l4densvar:-.false.} = ".true." ]; then + fhrs="03 06 09" + else + fhrs="06" + fi + for fhh in $fhrs; do + rm -f filelist${fhh} + for mem in $(seq -f '%03g' 1 ${n_ens_gfs}); do + if [ -s ${COMINgdas}/enkfgdas.${ymdprior}/${hhprior}/atmos/mem${mem}/gdas.t${hhprior}z.atmf0${fhh}s${GSUFFIX:-.nc} ]; then + ${nln} ${COMINgdas}/enkfgdas.${ymdprior}/${hhprior}/atmos/mem${mem}/gdas.t${hhprior}z.atmf0${fhh}s${GSUFFIX:-.nc} ./ensemble_data/enkfgdas.${ymdprior}${hhprior}.atmf0${fhh}_ens_${mem} + elif [ -s ${COMINgdas}/enkfgdas.${ymdprior}/${hhprior}/atmos/mem${mem}/gdas.t${hhprior}z.atmf0${fhh}${GSUFFIX:-.nc} ]; then + ${nln} ${COMINgdas}/enkfgdas.${ymdprior}/${hhprior}/atmos/mem${mem}/gdas.t${hhprior}z.atmf0${fhh}${GSUFFIX:-.nc} ./ensemble_data/enkfgdas.${ymdprior}${hhprior}.atmf0${fhh}_ens_${mem} + fi + echo "./ensemble_data/enkfgdas.${ymdprior}${hhprior}.atmf0${fhh}_ens_${mem}" >> filelist${fhh} + done + done +fi + +if [ ${RUN_ENSDA} = "YES" ]; then + for mem in $(seq -f '%03g' 1 ${n_ens_fv3sar}) + do + RESTARTens=${inputdata} + fhh="06" + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-coupler.res . + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-fv3_akbk . + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-fv3_sfcdata . + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-fv3_srfwnd . + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-fv3_dynvars . + ln -sf ${inputdata}/fv3SAR${fhh}_ens_mem${mem}-fv3_tracer . + if [ ! -s ./fv3_ens_grid_spec ]; then + ln -sf ${RESTARTens}/grid_spec.nc ./fv3_ens_grid_spec + fi + if [ ${l4densvar:-.false.} = ".true." ]; then + export ENS_NSTARTHR=3 + fhh="03" + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-coupler.res . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_akbk . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_sfcdata . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_srfwnd . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_dynvars . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_tracer . + fhh="09" + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-coupler.res . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_akbk . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_sfcdata . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_srfwnd . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_dynvars . + ${nln} ${RESTARTens}/fv3SAR${fhh}_ens_mem${mem}-fv3_tracer . + fi + done +fi +if [ ${RUN_ENSDA} != "YES" ]; then + export N_ENS=${n_ens_gfs} + export BETA_S0=${BETA_S0:-0.2} + export GRID_RATIO_ENS=1 + export REGIONAL_ENSEMBLE_OPTION=1 +elif [ ${RUN_ENSDA} = "YES" ]; then + if [ $l_both_fv3sar_gfs_ens = .false. ]; then + export N_ENS=${n_ens_fv3sar} + export BETA_S0=${BETA_S0:-0.0} + export GRID_RATIO_ENS=2 + export grid_ratio_fv3_regional=2 + export REGIONAL_ENSEMBLE_OPTION=5 + elif [ $l_both_fv3sar_gfs_ens = .true. ]; then + export N_ENS=$((${n_ens_gfs} + ${n_ens_fv3sar})) + export BETA_S0=${BETA_S0:-0.0} + export GRID_RATIO_ENS=2 + export grid_ratio_fv3_regional=2 + export REGIONAL_ENSEMBLE_OPTION=5 + fi +fi + +#----------------------------------------------------------------------- +# +# link observation files +# copy observation files to working directory +# +#----------------------------------------------------------------------- + +# Link GFS/GDAS input and observation files +COMIN_OBS=${COMIN_OBS:-${COMINobs}} +COMIN_GFS=${COMIN_GFS:-${COMINgfs}} + +OPREFIX=${OPREFIX:-"gfs.t${cyc}z."} +OSUFFIX=${OSUFFIX:-""} +PREPQC=${PREPQC:-${COMIN_OBS}/${OPREFIX}prepbufr${OSUFFIX}} +PREPQCPF=${PREPQCPF:-${COMIN_OBS}/${OPREFIX}prepbufr.acft_profiles${OSUFFIX}} +NSSTBF=${NSSTBF:-${COMIN_OBS}/${OPREFIX}nsstbufr${OSUFFIX}} +SATWND=${SATWND:-${COMIN_OBS}/${OPREFIX}satwnd.tm00.bufr_d${OSUFFIX}} +SATWHR=${SATWHR:-${COMIN_OBS}/${OPREFIX}satwhr.tm00.bufr_d${OSUFFIX}} +OSCATBF=${OSCATBF:-${COMIN_OBS}/${OPREFIX}oscatw.tm00.bufr_d${OSUFFIX}} +RAPIDSCATBF=${RAPIDSCATBF:-${COMIN_OBS}/${OPREFIX}rapidscatw.tm00.bufr_d${OSUFFIX}} +GSNDBF=${GSNDBF:-${COMIN_OBS}/${OPREFIX}goesnd.tm00.bufr_d${OSUFFIX}} +GSNDBF1=${GSNDBF1:-${COMIN_OBS}/${OPREFIX}goesfv.tm00.bufr_d${OSUFFIX}} +B1HRS2=${B1HRS2:-${COMIN_OBS}/${OPREFIX}1bhrs2.tm00.bufr_d${OSUFFIX}} +B1MSU=${B1MSU:-${COMIN_OBS}/${OPREFIX}1bmsu.tm00.bufr_d${OSUFFIX}} +B1HRS3=${B1HRS3:-${COMIN_OBS}/${OPREFIX}1bhrs3.tm00.bufr_d${OSUFFIX}} +B1HRS4=${B1HRS4:-${COMIN_OBS}/${OPREFIX}1bhrs4.tm00.bufr_d${OSUFFIX}} +B1AMUA=${B1AMUA:-${COMIN_OBS}/${OPREFIX}1bamua.tm00.bufr_d${OSUFFIX}} +B1AMUB=${B1AMUB:-${COMIN_OBS}/${OPREFIX}1bamub.tm00.bufr_d${OSUFFIX}} +B1MHS=${B1MHS:-${COMIN_OBS}/${OPREFIX}1bmhs.tm00.bufr_d${OSUFFIX}} +ESHRS3=${ESHRS3:-${COMIN_OBS}/${OPREFIX}eshrs3.tm00.bufr_d${OSUFFIX}} +ESAMUA=${ESAMUA:-${COMIN_OBS}/${OPREFIX}esamua.tm00.bufr_d${OSUFFIX}} +ESAMUB=${ESAMUB:-${COMIN_OBS}/${OPREFIX}esamub.tm00.bufr_d${OSUFFIX}} +ESMHS=${ESMHS:-${COMIN_OBS}/${OPREFIX}esmhs.tm00.bufr_d${OSUFFIX}} +HRS3DB=${HRS3DB:-${COMIN_OBS}/${OPREFIX}hrs3db.tm00.bufr_d${OSUFFIX}} +AMUADB=${AMUADB:-${COMIN_OBS}/${OPREFIX}amuadb.tm00.bufr_d${OSUFFIX}} +AMUBDB=${AMUBDB:-${COMIN_OBS}/${OPREFIX}amubdb.tm00.bufr_d${OSUFFIX}} +MHSDB=${MHSDB:-${COMIN_OBS}/${OPREFIX}mhsdb.tm00.bufr_d${OSUFFIX}} +AIRSBF=${AIRSBF:-${COMIN_OBS}/${OPREFIX}airsev.tm00.bufr_d${OSUFFIX}} +IASIBF=${IASIBF:-${COMIN_OBS}/${OPREFIX}mtiasi.tm00.bufr_d${OSUFFIX}} +ESIASI=${ESIASI:-${COMIN_OBS}/${OPREFIX}esiasi.tm00.bufr_d${OSUFFIX}} +IASIDB=${IASIDB:-${COMIN_OBS}/${OPREFIX}iasidb.tm00.bufr_d${OSUFFIX}} +AMSREBF=${AMSREBF:-${COMIN_OBS}/${OPREFIX}amsre.tm00.bufr_d${OSUFFIX}} +AMSR2BF=${AMSR2BF:-${COMIN_OBS}/${OPREFIX}amsr2.tm00.bufr_d${OSUFFIX}} +GMI1CRBF=${GMI1CRBF:-${COMIN_OBS}/${OPREFIX}gmi1cr.tm00.bufr_d${OSUFFIX}} +SAPHIRBF=${SAPHIRBF:-${COMIN_OBS}/${OPREFIX}saphir.tm00.bufr_d${OSUFFIX}} +SEVIRIBF=${SEVIRIBF:-${COMIN_OBS}/${OPREFIX}sevcsr.tm00.bufr_d${OSUFFIX}} +AHIBF=${AHIBF:-${COMIN_OBS}/${OPREFIX}ahicsr.tm00.bufr_d${OSUFFIX}} +ABIBF=${ABIBF:-${COMIN_OBS}/${OPREFIX}gsrcsr.tm00.bufr_d${OSUFFIX}} +CRISBF=${CRISBF:-${COMIN_OBS}/${OPREFIX}cris.tm00.bufr_d${OSUFFIX}} +ESCRIS=${ESCRIS:-${COMIN_OBS}/${OPREFIX}escris.tm00.bufr_d${OSUFFIX}} +CRISDB=${CRISDB:-${COMIN_OBS}/${OPREFIX}crisdb.tm00.bufr_d${OSUFFIX}} +CRISFSBF=${CRISFSBF:-${COMIN_OBS}/${OPREFIX}crisf4.tm00.bufr_d${OSUFFIX}} +ESCRISFS=${ESCRISFS:-${COMIN_OBS}/${OPREFIX}escrsf.tm00.bufr_d${OSUFFIX}} +CRISFSDB=${CRISFSDB:-${COMIN_OBS}/${OPREFIX}crsfdb.tm00.bufr_d${OSUFFIX}} +ATMSBF=${ATMSBF:-${COMIN_OBS}/${OPREFIX}atms.tm00.bufr_d${OSUFFIX}} +ESATMS=${ESATMS:-${COMIN_OBS}/${OPREFIX}esatms.tm00.bufr_d${OSUFFIX}} +ATMSDB=${ATMSDB:-${COMIN_OBS}/${OPREFIX}atmsdb.tm00.bufr_d${OSUFFIX}} +ESATMS=${ESATMS:-${COMIN_OBS}/${OPREFIX}esatms.tm00.bufr_d${OSUFFIX}} +ATMSDB=${ATMSDB:-${COMIN_OBS}/${OPREFIX}atmsdb.tm00.bufr_d${OSUFFIX}} +SSMITBF=${SSMITBF:-${COMIN_OBS}/${OPREFIX}ssmit.tm00.bufr_d${OSUFFIX}} +SSMISBF=${SSMISBF:-${COMIN_OBS}/${OPREFIX}ssmisu.tm00.bufr_d${OSUFFIX}} +SBUVBF=${SBUVBF:-${COMIN_OBS}/${OPREFIX}osbuv8.tm00.bufr_d${OSUFFIX}} +OMPSNPBF=${OMPSNPBF:-${COMIN_OBS}/${OPREFIX}ompsn8.tm00.bufr_d${OSUFFIX}} +OMPSTCBF=${OMPSTCBF:-${COMIN_OBS}/${OPREFIX}ompst8.tm00.bufr_d${OSUFFIX}} +GOMEBF=${GOMEBF:-${COMIN_OBS}/${OPREFIX}gome.tm00.bufr_d${OSUFFIX}} +OMIBF=${OMIBF:-${COMIN_OBS}/${OPREFIX}omi.tm00.bufr_d${OSUFFIX}} +MLSBF=${MLSBF:-${COMIN_OBS}/${OPREFIX}mls.tm00.bufr_d${OSUFFIX}} +OMPSLPBF=${OMPSLPBF:-${COMIN_OBS}/${OPREFIX}ompslp.tm00.bufr_d${OSUFFIX}} +SMIPCP=${SMIPCP:-${COMIN_OBS}/${OPREFIX}spssmi.tm00.bufr_d${OSUFFIX}} +TMIPCP=${TMIPCP:-${COMIN_OBS}/${OPREFIX}sptrmm.tm00.bufr_d${OSUFFIX}} +if [[ ${use_bufr_nr:-no} = "no" ]]; then + GPSROBF=${GPSROBF:-${COMIN_OBS}/${OPREFIX}gpsro.tm00.bufr_d${OSUFFIX}} +else + GPSROBF=${GPSROBF:-${COMIN_OBS}/${OPREFIX}gpsro.tm00.bufr_d.nr} +fi +TCVITL=${TCVITL:-${COMIN_GFS}/${OPREFIX}syndata.tcvitals.tm00} +B1AVHAM=${B1AVHAM:-${COMIN_OBS}/${OPREFIX}avcsam.tm00.bufr_d${OSUFFIX}} +B1AVHPM=${B1AVHPM:-${COMIN_OBS}/${OPREFIX}avcspm.tm00.bufr_d${OSUFFIX}} + +# Observational data +if [[ ${use_bufr_nr:-no} = "no" ]] && [ -s $PREPQC ]; then + $ncp -Lp $PREPQC prepbufr +else + touch prepbufr +fi +ln -sf $SATWND satwndbufr +ln -sf $SATWHR satwhrbufr +ln -sf $GSNDBF1 gsnd1bufr +ln -sf $B1HRS3 hirs3bufr +ln -sf $B1HRS4 hirs4bufr +ln -sf $B1AMUA amsuabufr +ln -sf $B1MHS mhsbufr +ln -sf $ESHRS3 hirs3bufrears +ln -sf $ESAMUA amsuabufrears +ln -sf $HRS3DB hirs3bufr_db +ln -sf $SBUVBF sbuvbufr +ln -sf $OMPSNPBF ompsnpbufr +ln -sf $OMPSTCBF ompstcbufr +ln -sf $GOMEBF gomebufr +ln -sf $OMIBF omibufr +ln -sf $MLSBF mlsbufr +ln -sf $AIRSBF airsbufr +ln -sf $IASIBF iasibufr +ln -sf $ESIASI iasibufrears +ln -sf $IASIDB iasibufr_db +ln -sf $AMSR2BF amsr2bufr +ln -sf $GMI1CRBF gmibufr +ln -sf $SAPHIRBF saphirbufr +ln -sf $SEVIRIBF seviribufr +ln -sf $CRISBF crisbufr +ln -sf $ESCRIS crisbufrears +ln -sf $CRISDB crisbufr_db +ln -sf $CRISFSBF crisfsbufr +ln -sf $ESCRISFS crisfsbufrears +ln -sf $CRISFSDB crisfsbufr_db +ln -sf $ATMSBF atmsbufr +ln -sf $ESATMS atmsbufrears +ln -sf $ATMSDB atmsbufr_db +ln -sf $SSMISBF ssmisbufr +ln -sf $GPSROBF gpsrobufr +ln -sf $TCVITL tcvitl +ln -sf $B1AVHAM avhambufr +ln -sf $B1AVHPM avhpmbufr + +if [[ ${use_bufr_nr:-no} = "yes" ]]; then + + if [ -s ${PREPQC}.nr ]; then + $ncp -L ${PREPQC}.nr prepbufr + fi + ln -sf ${SAPHIRBF}.nr saphirbufr + +fi +# HAFS specific observations +INTCOMobs=${WORKhafs}/obs_prep +# Use updated prepbufr if exists +if [ -s ${INTCOMobs}/hafs.t${cyc}z.prepbufr ]; then + ln -s ${INTCOMobs}/hafs.t${cyc}z.prepbufr prepbufr +fi +# cat tempdrop.prepbufr with drifting correction into prepbufr +if [ -s ${INTCOMobs}/hafs.t${cyc}z.tempdrop.prepbufr ]; then + cat ${INTCOMobs}/hafs.t${cyc}z.tempdrop.prepbufr >> prepbufr +fi +if [ -s ${INTCOMobs}/hafs.t${cyc}z.tldplr.tm00.bufr_d ]; then + ln -s ${INTCOMobs}/hafs.t${cyc}z.tldplr.tm00.bufr_d tldplrbufr +fi +if [ -s ${INTCOMobs}/hafs.t${cyc}z.hdob.tm00.bufr_d ]; then + ln -s ${INTCOMobs}/hafs.t${cyc}z.hdob.tm00.bufr_d hdobbufr +fi +if [ -s ${INTCOMobs}/hafs.t${cyc}z.nexrad.tm00.bufr_d ]; then + ln -s ${INTCOMobs}/hafs.t${cyc}z.nexrad.tm00.bufr_d l2rwbufr +fi + + +# +#----------------------------------------------------------------------- +# +# Create links to fix files in the FIXgsi directory. +# +#----------------------------------------------------------------------- + +ln -sf ${inputdata}/berror_stats . +ln -sf ${inputdata}/satinfo . +ln -sf ${inputdata}/atms_beamwidth.txt . +ln -sf ${inputdata}/anavinfo . +ln -sf ${inputdata}/convinfo . +ln -sf ${inputdata}/ozinfo . +ln -sf ${inputdata}/pcpinfo . +ln -sf ${inputdata}/scaninfo . +ln -sf ${inputdata}/errtable . +ln -sf ${inputdata}/prepobs_prep.bufrtable . +ln -sf ${inputdata}/bftab_sstphr . + +#----------------------------------------------------------------------- +# +# CRTM Spectral and Transmittance coefficients +# +#----------------------------------------------------------------------- +emiscoef_IRwater=${fixcrtm}/Nalli.IRwater.EmisCoeff.bin +emiscoef_IRice=${fixcrtm}/NPOESS.IRice.EmisCoeff.bin +emiscoef_IRland=${fixcrtm}/NPOESS.IRland.EmisCoeff.bin +emiscoef_IRsnow=${fixcrtm}/NPOESS.IRsnow.EmisCoeff.bin +emiscoef_VISice=${fixcrtm}/NPOESS.VISice.EmisCoeff.bin +emiscoef_VISland=${fixcrtm}/NPOESS.VISland.EmisCoeff.bin +emiscoef_VISsnow=${fixcrtm}/NPOESS.VISsnow.EmisCoeff.bin +emiscoef_VISwater=${fixcrtm}/NPOESS.VISwater.EmisCoeff.bin +emiscoef_MWwater=${fixcrtm}/FASTEM6.MWwater.EmisCoeff.bin +aercoef=${fixcrtm}/AerosolCoeff.bin +cldcoef=${fixcrtm}/CloudCoeff.bin + +ln -sf ${emiscoef_IRwater} Nalli.IRwater.EmisCoeff.bin +ln -sf $emiscoef_IRice ./NPOESS.IRice.EmisCoeff.bin +ln -sf $emiscoef_IRsnow ./NPOESS.IRsnow.EmisCoeff.bin +ln -sf $emiscoef_IRland ./NPOESS.IRland.EmisCoeff.bin +ln -sf $emiscoef_VISice ./NPOESS.VISice.EmisCoeff.bin +ln -sf $emiscoef_VISland ./NPOESS.VISland.EmisCoeff.bin +ln -sf $emiscoef_VISsnow ./NPOESS.VISsnow.EmisCoeff.bin +ln -sf $emiscoef_VISwater ./NPOESS.VISwater.EmisCoeff.bin +ln -sf $emiscoef_MWwater ./FASTEM6.MWwater.EmisCoeff.bin +ln -sf $aercoef ./AerosolCoeff.bin +ln -sf $cldcoef ./CloudCoeff.bin + + +# Copy CRTM coefficient files based on entries in satinfo file +for file in $(awk '{if($1!~"!"){print $1}}' ./satinfo | sort | uniq) ;do + ln -sf ${fixcrtm}/${file}.SpcCoeff.bin ./ + ln -sf ${fixcrtm}/${file}.TauCoeff.bin ./ +done + +# Read from previous cycles for satbias predictors (no online satbias) +PASSIVE_BC=.false. +UPD_PRED=0 +ln -sf ${COMINgdas}/gdas.t${hhprior}z.abias satbias_in +ln -sf ${COMINgdas}/gdas.t${hhprior}z.abias_pc satbias_pc + +#----------------------------------------------------------------------- +# +# Build the GSI namelist on-the-fly +# +#----------------------------------------------------------------------- +# + +. $scripts/regression_nl_update.sh + +SETUP="$SETUP_update" +GRIDOPTS="$GRIDOPTS_update" +BKGVERR="$BKGVERR_update" +ANBKGERR="$ANBKERR_update" +JCOPTS="$JCOPTS_update" +STRONGOPTS="$STRONGOPTS_update" +OBSQC="$OBSQC_update" +OBSINPUT="$OBSINPUT_update" +SUPERRAD="$SUPERRAD_update" +HYBRID_ENSEMBLE='ensemble_path="",' +SINGLEOB="$SINGLEOB_update" + +if [ "$debug" = ".false." ]; then + . $scripts/regression_namelists.sh hafs_envar +else + . $scripts/regression_namelists_db.sh hafs_envar +fi + +cat << EOF > gsiparm.anl + +$gsi_namelist + +EOF + +# Copy executable and fixed files to $tmpdir +if [[ $exp == *"updat"* ]]; then + $ncp $gsiexec_updat ./gsi.x +elif [[ $exp == *"contrl"* ]]; then + $ncp $gsiexec_contrl ./gsi.x +fi + +# Run GSI +cd $tmpdir +echo "run gsi now" +eval "$APRUN $tmpdir/gsi.x > stdout 2>&1" +rc=$? +exit $rc + + + diff --git a/regression/hwrf_nmm_d2.sh b/regression/hwrf_nmm_d2.sh deleted file mode 100755 index 2b4d2e1bfe..0000000000 --- a/regression/hwrf_nmm_d2.sh +++ /dev/null @@ -1,339 +0,0 @@ - -set -x - -# Set analysis date -adate=$hwrf_nmm_adate - -io_format=netcdf - -if [[ "$io_format" = "binary" ]]; then - NETCDF=.false. - FORMAT=binary -elif [[ "$io_format" = "netcdf" ]]; then - NETCDF=.true. - FORMAT=netcdf -else - echo "***ERRROR*** INVALID io_format = $io_format" - exit -fi - -# Set experiment name and analysis date - -exp=$jobname - -# Set path/file for gsi executable -#gsiexec=$gsiexec - -# Set the JCAP resolution which you want. -# All resolutions use LEVS=64 -#export JCAP=62 -export LEVS=60 -export JCAP_B=$JCAP -export DELTIM=1200 - -# Set runtime and save directories -tmpdir=$tmpdir/tmpreg_hwrf_nmm_d2/${exp} -savdir=$savdir/outreg_hwrf_nmm_d2/${exp} - -# Specify GSI fixed field and data directories. -fixcrtm=${fixcrtm:-$CRTM_FIX} - -#datobs=$datobs - -# Set variables used in script -# CLEAN up $tmpdir when finished (YES=remove, NO=leave alone) -# ncp is cp replacement, currently keep as /bin/cp - -CLEAN=NO -ncp=/bin/cp -lnsf='ln -sf' - -NX2=166 -NY2=336 -export NLAT=$(( NY2 - 1 )) -export NLON=$(( NX2 - 1 )) - -# Given the analysis date, compute the date from which the -# first guess comes. Extract cycle and set prefix and suffix -# for guess and observation data files -gdate=`date +%Y%m%d%H -d "${adate:0:8} ${adate:8:2} - 6 hours"` -hha=`echo $adate | cut -c9-10` -hhg=`echo $gdate | cut -c9-10` -prefixa=gfs.t${hha}z -prefixo=gdas1.t${hha}z -suffix=tm00.bufr_d - - -# Set up $tmpdir -rm -rf $tmpdir -mkdir -p $tmpdir -cd $tmpdir -rm -rf core* - -# Make gsi namelist - -. $scripts/regression_nl_update.sh - -GRIDOPTS="$GRIDOPTS_update" -BKGVERR="$BKGVERR_update" -ANBKGERR="$ANBKERR_update" -JCOPTS="$JCOPTS_update" -STRONGOPTS="$STRONGOPTS_update" -OBSQC="$OBSQC_update" -OBSINPUT="$OBSINPUT_update" -SUPERRAD="$SUPERRAD_update" -SINGLEOB="$SINGLEOB_update" - -# parameters for radiance data assimilation -export SETUP="newpc4pred=.true., adp_anglebc=.true., angord=4, \ - passive_bc=.false., use_edges=.false., emiss_bc=.true., \ - diag_precon=.true., step_start=1.e-3, upd_pred(1)=0, \ - upd_pred(2)=0,upd_pred(3)=0,upd_pred(4)=0, \ - upd_pred(5)=0,upd_pred(6)=0,upd_pred(7)=0, \ - upd_pred(8)=0,upd_pred(9)=0,upd_pred(10)=0, \ - upd_pred(11)=0,upd_pred(12)=0," - -export USE_GFS_STRATOSPHERE=".true." -export USE_GFS_OZONE=".true." -export REGIONAL_OZONE=".false." - -if [ "$debug" = ".false." ]; then - . $scripts/regression_namelists.sh hwrf_nmm_d2 -else - . $scripts/regression_namelists_db.sh hwrf_nmm_d2 -fi - -cat << EOF > gsiparm.anl - -$gsi_namelist - -EOF - -# Set fixed files -# berror = forecast model background error statistics -# specoef = CRTM spectral coefficients -# trncoef = CRTM transmittance coefficients -# emiscoef = CRTM coefficients for IR sea surface emissivity model -# aerocoef = CRTM coefficients for aerosol effects -# cldcoef = CRTM coefficients for cloud effects -# satinfo = text file with information about assimilation of brightness temperatures -# cloudyinfo = text file with information about assimilation of cloudy radiance -# pcpinfo = text file with information about assimilation of prepcipitation rates -# ozinfo = text file with information about assimilation of ozone data -# errtable = text file with obs error for conventional data (optional) -# convinfo = text file with information about assimilation of conventional data -# bufrtable= text file ONLY needed for single obs test (oneobstest=.true.) -# bftab_sst= bufr table for sst ONLY needed for sst retrieval (retrieval=.true.) - -anavinfo=$fixgsi/anavinfo_hwrf_L75 -berror=$fixgsi/$endianness/nam_glb_berror.f77.gcv -emiscoef_IRwater=$fixcrtm/Nalli.IRwater.EmisCoeff.bin -emiscoef_IRice=$fixcrtm/NPOESS.IRice.EmisCoeff.bin -emiscoef_IRland=$fixcrtm/NPOESS.IRland.EmisCoeff.bin -emiscoef_IRsnow=$fixcrtm/NPOESS.IRsnow.EmisCoeff.bin -emiscoef_VISice=$fixcrtm/NPOESS.VISice.EmisCoeff.bin -emiscoef_VISland=$fixcrtm/NPOESS.VISland.EmisCoeff.bin -emiscoef_VISsnow=$fixcrtm/NPOESS.VISsnow.EmisCoeff.bin -emiscoef_VISwater=$fixcrtm/NPOESS.VISwater.EmisCoeff.bin -emiscoef_MWwater=$fixcrtm/FASTEM6.MWwater.EmisCoeff.bin -aercoef=$fixcrtm/AerosolCoeff.bin -cldcoef=$fixcrtm/CloudCoeff.bin -satinfo=$fixgsi/hwrf_satinfo.txt -cloudyinfo=$fixgsi/cloudy_radiance_info.txt -atmsbeaminfo=$fixgsi/atms_beamwidth.txt -scaninfo=$fixgsi/global_scaninfo.txt -pcpinfo=$fixgsi/nam_global_pcpinfo.txt -ozinfo=$fixgsi/global_ozinfo.txt -errtable=$fixgsi/hwrf_nam_errtable.r3dv -convinfo=$fixgsi/hwrf_convinfo.txt -### add 9 tables -errtable_pw=$fixgsi/prepobs_errtable_pw.global -errtable_ps=$fixgsi/prepobs_errtable_ps.global_nqcf -errtable_t=$fixgsi/prepobs_errtable_t.global_nqcf -errtable_q=$fixgsi/prepobs_errtable_q.global_nqcf -errtable_uv=$fixgsi/prepobs_errtable_uv.global_nqcf -btable_ps=$fixgsi/nqc_b_ps.global_nqcf -btable_t=$fixgsi/nqc_b_t.global_nqcf -btable_q=$fixgsi/nqc_b_q.global_nqcf -btable_uv=$fixgsi/nqc_b_uv.global_nqcf - -# add vertical profile of localization and beta_s,beta_e weights for hybrid ensemble runs -hybens_info=$fixgsi/hwrf_hybens_d2_info - - -# Only need this file for single obs test -bufrtable=$fixgsi/prepobs_prep.bufrtable - -# Only need this file for sst retrieval -bftab_sst=$fixgsi/bufrtab.012 - -# Copy executable and fixed files to $tmpdir -if [[ $exp == *"updat"* ]]; then - $ncp $gsiexec_updat ./gsi.x -elif [[ $exp == *"contrl"* ]]; then - $ncp $gsiexec_contrl ./gsi.x -fi - -$ncp $anavinfo ./anavinfo -$ncp $berror ./berror_stats -$ncp $emiscoef_IRwater ./Nalli.IRwater.EmisCoeff.bin -$ncp $emiscoef_IRice ./NPOESS.IRice.EmisCoeff.bin -$ncp $emiscoef_IRsnow ./NPOESS.IRsnow.EmisCoeff.bin -$ncp $emiscoef_IRland ./NPOESS.IRland.EmisCoeff.bin -$ncp $emiscoef_VISice ./NPOESS.VISice.EmisCoeff.bin -$ncp $emiscoef_VISland ./NPOESS.VISland.EmisCoeff.bin -$ncp $emiscoef_VISsnow ./NPOESS.VISsnow.EmisCoeff.bin -$ncp $emiscoef_VISwater ./NPOESS.VISwater.EmisCoeff.bin -$ncp $emiscoef_MWwater ./FASTEM6.MWwater.EmisCoeff.bin -$ncp $aercoef ./AerosolCoeff.bin -$ncp $cldcoef ./CloudCoeff.bin -$ncp $satinfo ./satinfo -$ncp $cloudyinfo ./cloudy_radiance_info.txt -$ncp $scaninfo ./scaninfo -$ncp $pcpinfo ./pcpinfo -$ncp $ozinfo ./ozinfo -$ncp $convinfo ./convinfo -$ncp $errtable ./errtable -$ncp $atmsbeaminfo ./atms_beamwidth.txt - -#add 9 tables for new varqc -$ncp $errtable_pw ./errtable_pw -$ncp $errtable_ps ./errtable_ps -$ncp $errtable_t ./errtable_t -$ncp $errtable_q ./errtable_q -$ncp $errtable_uv ./errtable_uv -$ncp $btable_ps ./btable_ps -$ncp $btable_t ./btable_t -$ncp $btable_q ./btable_q -$ncp $btable_uv ./btable_uv - -$ncp $hybens_info ./hybens_info - -$ncp $bufrtable ./prepobs_prep.bufrtable -$ncp $bftab_sst ./bftab_sstphr - -# Copy CRTM coefficient files based on entries in satinfo file -for file in `awk '{if($1!~"!"){print $1}}' ./satinfo | sort | uniq` ;do - $ncp $fixcrtm/${file}.SpcCoeff.bin ./ - $ncp $fixcrtm/${file}.TauCoeff.bin ./ -done - - -# Copy observational data to $tmpdir -$lnsf $hwrf_nmm_obs/${prefixa}.prepbufr ./prepbufr -$lnsf $hwrf_nmm_obs/${prefixa}.satwnd.${suffix} ./satwndbufr -$lnsf $hwrf_nmm_obs/${prefixa}.gpsro.${suffix} ./gpsrobufr -#$lnsf $hwrf_nmm_obs/${prefixa}.spssmi.${suffix} ./ssmirrbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.sptrmm.${suffix} ./tmirrbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.gome.${suffix} ./gomebufr -#$lnsf $hwrf_nmm_obs/${prefixa}.omi.${suffix} ./omibufr -#$lnsf $hwrf_nmm_obs/${prefixa}.mls.${suffix} ./mlsbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.osbuv8.${suffix} ./sbuvbufr -$lnsf $hwrf_nmm_obs/${prefixa}.goesfv.${suffix} ./gsnd1bufr -$lnsf $hwrf_nmm_obs/${prefixa}.1bamua.${suffix} ./amsuabufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bamub.${suffix} ./amsubbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bhrs2.${suffix} ./hirs2bufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bhrs3.${suffix} ./hirs3bufr -$lnsf $hwrf_nmm_obs/${prefixa}.1bhrs4.${suffix} ./hirs4bufr -$lnsf $hwrf_nmm_obs/${prefixa}.1bmhs.${suffix} ./mhsbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bmsu.${suffix} ./msubufr -$lnsf $hwrf_nmm_obs/${prefixa}.airsev.${suffix} ./airsbufr -$lnsf $hwrf_nmm_obs/${prefixa}.sevcsr.${suffix} ./seviribufr -$lnsf $hwrf_nmm_obs/${prefixa}.mtiasi.${suffix} ./iasibufr -$lnsf $hwrf_nmm_obs/${prefixa}.esamua.${suffix} ./amsuabufrears -$lnsf $hwrf_nmm_obs/${prefixa}.esamub.${suffix} ./amsubbufrears -$lnsf $hwrf_nmm_obs/${prefixa}.eshrs3.${suffix} ./hirs3bufrears -#$lnsf $hwrf_nmm_obs/${prefixa}.ssmit.${suffix} ./ssmitbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.amsre.${suffix} ./amsrebufr -#$lnsf $hwrf_nmm_obs/${prefixa}.ssmis.${suffix} ./ssmisbufr -$lnsf $hwrf_nmm_obs/${prefixa}.atms.${suffix} ./atmsbufr -$lnsf $hwrf_nmm_obs/${prefixa}.cris.${suffix} ./crisbufr -$lnsf $hwrf_nmm_obs/${prefixa}.crisf4.${suffix} ./crisfsbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.syndata.tcvitals.tm00 ./tcvitl -$lnsf $hwrf_nmm_obs/${prefixo}.tldplr.${suffix} ./tldplrbufr - - -# Copy bias correction, atmospheric and surface files -$lnsf $hwrf_nmm_obs/gdas1.t${hhg}z.abias ./satbias_in -$lnsf $hwrf_nmm_obs/gdas1.t${hhg}z.abias_pc ./satbias_pc - -$ncp $hwrf_nmm_ges/wrfghost_d02_03 ./wrf_inou3 -$ncp $hwrf_nmm_ges/wrfghost_d02_06 ./wrf_inout -$ncp $hwrf_nmm_ges/wrfghost_d02_09 ./wrf_inou9 - -$ncp $hwrf_nmm_ges/gdas1.t${hhg}z.sf03 ./gfs_sigf03 -$ncp $hwrf_nmm_ges/gdas1.t${hhg}z.sf06 ./gfs_sigf06 -$ncp $hwrf_nmm_ges/gdas1.t${hhg}z.sf09 ./gfs_sigf09 - -# Copy ensemble forecast files for hybrid analysis -export ENSEMBLE_SIZE_REGIONAL=10 ->filelist06 -n=1 -while [[ $n -le ${ENSEMBLE_SIZE_REGIONAL} ]]; do - $lnsf $hwrf_nmm_ges/$( printf sfg_${gdate}_fhr06s_mem%03d $n ) \ - ./$( printf sfg_${gdate}_fhr06s_mem%03d $n ) - ls ./$( printf sfg_${gdate}_fhr06s_mem%03d $n ) >> filelist06 - n=$((n + 1)) -done - -# Run GSI -cd $tmpdir -echo "run gsi now" -eval "$APRUN $tmpdir/gsi.x > stdout 2>&1" -rc=$? -exit $rc - - - - -# Loop over first and last outer loops to generate innovation -# diagnostic files for indicated observation types (groups) -# -# NOTE: Since we set miter=2 in GSI namelist SETUP, outer -# loop 03 will contain innovations with respect to -# the analysis. Creation of o-a innovation files -# is triggered by write_diag(3)=.true. The setting -# write_diag(1)=.true. turns on creation of o-g -# innovation files. -# - - -echo "Time before diagnostic loop is `date` " -cd $tmpdir -loops="01 03" -for loop in $loops; do - -case $loop in - 01) string=ges;; - 03) string=anl;; - *) string=$loop;; -esac - -# Collect diagnostic files for obs types (groups) below - listall="hirs2_n14 msu_n14 sndr_g08 sndr_g11 sndr_g11 sndr_g12 sndr_g13 sndr_g08_prep sndr_g11_prep sndr_g12_prep sndr_g13_prep sndrd1_g11 sndrd2_g11 sndrd3_g11 sndrd4_g11 sndrd1_g12 sndrd2_g12 sndrd3_g12 sndrd4_g12 sndrd1_g13 sndrd2_g13 sndrd3_g13 sndrd4_g13 hirs3_n15 hirs3_n16 hirs3_n17 amsua_n15 amsua_n16 amsua_n17 amsub_n15 amsub_n16 amsub_n17 hsb_aqua airs_aqua amsua_aqua imgr_g08 imgr_g11 imgr_g12 pcp_ssmi_dmsp pcp_tmi_trmm conv sbuv2_n16 sbuv2_n17 sbuv2_n18 gome_metop-a omi_aura ssmi_f13 ssmi_f15 hirs4_n18 hirs4_metop-a amsua_n18 amsua_metop-a mhs_n18 mhs_metop-a amsre_low_aqua amsre_mid_aqua amsre_hig_aqua ssmis_las_f16 ssmis_uas_f16 ssmis_img_f16 ssmis_env_f16 iasi_metop-a" - for type in $listall; do - count=`ls dir.*/${type}_${loop}* | wc -l` - if [[ $count -gt 0 ]]; then - cat dir.*/${type}_${loop}* > diag_${type}_${string}.${hwrf_nmm_adate} - compress diag_${type}_${string}.${hwrf_nmm_adate} - $ncp diag_${type}_${string}.${hwrf_nmm_adate}.Z $savdir/ - fi - done -done -echo "Time after diagnostic loop is `date` " - - - -# If requested, clean up $tmpdir -if [[ "$CLEAN" = "YES" ]];then - if [[ $rc -eq 0 ]];then - rm -rf $tmpdir - cd $tmpdir - cd ../ - rmdir $tmpdir - fi -fi - - -# End of script -exit diff --git a/regression/hwrf_nmm_d3.sh b/regression/hwrf_nmm_d3.sh deleted file mode 100755 index 7b6746b741..0000000000 --- a/regression/hwrf_nmm_d3.sh +++ /dev/null @@ -1,337 +0,0 @@ - -set -x - -# Set analysis date -adate=$hwrf_nmm_adate - -io_format=netcdf - -if [[ "$io_format" = "binary" ]]; then - NETCDF=.false. - FORMAT=binary -elif [[ "$io_format" = "netcdf" ]]; then - NETCDF=.true. - FORMAT=netcdf -else - echo "***ERRROR*** INVALID io_format = $io_format" - exit -fi - -# Set experiment name and analysis date - -exp=$jobname - -# Set path/file for gsi executable -#gsiexec=$gsiexec - -# Set the JCAP resolution which you want. -# All resolutions use LEVS=64 -#export JCAP=62 -export LEVS=60 -export JCAP_B=$JCAP -export DELTIM=1200 - -# Set runtime and save directories -tmpdir=$tmpdir/tmpreg_hwrf_nmm_d3/${exp} -savdir=$savdir/outreg_hwrf_nmm_d3/${exp} - -# Specify GSI fixed field and data directories. -fixcrtm=${fixcrtm:-$CRTM_FIX} - -#datobs=$datobs - -# Set variables used in script -# CLEAN up $tmpdir when finished (YES=remove, NO=leave alone) -# ncp is cp replacement, currently keep as /bin/cp - -CLEAN=NO -ncp=/bin/cp -lnsf='ln -sf' - -NX3=250 -NY3=500 -export NLAT=$(( NY3 - 1 )) -export NLON=$(( NX3 - 1 )) - -# Given the analysis date, compute the date from which the -# first guess comes. Extract cycle and set prefix and suffix -# for guess and observation data files -gdate=`date +%Y%m%d%H -d "${adate:0:8} ${adate:8:2} - 6 hours"` -hha=`echo $adate | cut -c9-10` -hhg=`echo $gdate | cut -c9-10` -prefixa=gfs.t${hha}z -prefixo=gdas1.t${hha}z -suffix=tm00.bufr_d - - -# Set up $tmpdir -rm -rf $tmpdir -mkdir -p $tmpdir -cd $tmpdir -rm -rf core* - -# Make gsi namelist - -. $scripts/regression_nl_update.sh - -GRIDOPTS="$GRIDOPTS_update" -BKGVERR="$BKGVERR_update" -ANBKGERR="$ANBKERR_update" -JCOPTS="$JCOPTS_update" -STRONGOPTS="$STRONGOPTS_update" -OBSQC="$OBSQC_update" -OBSINPUT="$OBSINPUT_update" -SUPERRAD="$SUPERRAD_update" -SINGLEOB="$SINGLEOB_update" - -# parameters for radiance data assimilation -export SETUP="newpc4pred=.true., adp_anglebc=.true., angord=4, \ - passive_bc=.false., use_edges=.false., emiss_bc=.true., \ - diag_precon=.true., step_start=1.e-3, upd_pred(1)=0, \ - upd_pred(2)=0,upd_pred(3)=0,upd_pred(4)=0, \ - upd_pred(5)=0,upd_pred(6)=0,upd_pred(7)=0, \ - upd_pred(8)=0,upd_pred(9)=0,upd_pred(10)=0, \ - upd_pred(11)=0,upd_pred(12)=0," - -export USE_GFS_STRATOSPHERE=".false." -export USE_GFS_OZONE=".false." -export REGIONAL_OZONE=".false." - -if [ "$debug" = ".false." ]; then - . $scripts/regression_namelists.sh hwrf_nmm_d3 -else - . $scripts/regression_namelists_db.sh hwrf_nmm_d3 -fi - -cat << EOF > gsiparm.anl - -$gsi_namelist - -EOF - -# Set fixed files -# berror = forecast model background error statistics -# specoef = CRTM spectral coefficients -# trncoef = CRTM transmittance coefficients -# emiscoef = CRTM coefficients for IR sea surface emissivity model -# aerocoef = CRTM coefficients for aerosol effects -# cldcoef = CRTM coefficients for cloud effects -# satinfo = text file with information about assimilation of brightness temperatures -# cloudyinfo = text file with information about assimilation of cloudy radiance -# pcpinfo = text file with information about assimilation of prepcipitation rates -# ozinfo = text file with information about assimilation of ozone data -# errtable = text file with obs error for conventional data (optional) -# convinfo = text file with information about assimilation of conventional data -# bufrtable= text file ONLY needed for single obs test (oneobstest=.true.) -# bftab_sst= bufr table for sst ONLY needed for sst retrieval (retrieval=.true.) - -anavinfo=$fixgsi/anavinfo_hwrf_L60_nooz -berror=$fixgsi/$endianness/nam_glb_berror.f77.gcv -emiscoef_IRwater=$fixcrtm/Nalli.IRwater.EmisCoeff.bin -emiscoef_IRice=$fixcrtm/NPOESS.IRice.EmisCoeff.bin -emiscoef_IRland=$fixcrtm/NPOESS.IRland.EmisCoeff.bin -emiscoef_IRsnow=$fixcrtm/NPOESS.IRsnow.EmisCoeff.bin -emiscoef_VISice=$fixcrtm/NPOESS.VISice.EmisCoeff.bin -emiscoef_VISland=$fixcrtm/NPOESS.VISland.EmisCoeff.bin -emiscoef_VISsnow=$fixcrtm/NPOESS.VISsnow.EmisCoeff.bin -emiscoef_VISwater=$fixcrtm/NPOESS.VISwater.EmisCoeff.bin -emiscoef_MWwater=$fixcrtm/FASTEM6.MWwater.EmisCoeff.bin -aercoef=$fixcrtm/AerosolCoeff.bin -cldcoef=$fixcrtm/CloudCoeff.bin -satinfo=$fixgsi/hwrf_satinfo.txt -cloudyinfo=$fixgsi/cloudy_radiance_info.txt -atmsbeaminfo=$fixgsi/atms_beamwidth.txt -scaninfo=$fixgsi/global_scaninfo.txt -pcpinfo=$fixgsi/nam_global_pcpinfo.txt -ozinfo=$fixgsi/global_ozinfo.txt -errtable=$fixgsi/hwrf_nam_errtable.r3dv -convinfo=$fixgsi/hwrf_convinfo.txt -### add 9 tables -errtable_pw=$fixgsi/prepobs_errtable_pw.global -errtable_ps=$fixgsi/prepobs_errtable_ps.global_nqcf -errtable_t=$fixgsi/prepobs_errtable_t.global_nqcf -errtable_q=$fixgsi/prepobs_errtable_q.global_nqcf -errtable_uv=$fixgsi/prepobs_errtable_uv.global_nqcf -btable_ps=$fixgsi/nqc_b_ps.global_nqcf -btable_t=$fixgsi/nqc_b_t.global_nqcf -btable_q=$fixgsi/nqc_b_q.global_nqcf -btable_uv=$fixgsi/nqc_b_uv.global_nqcf - -# add vertical profile of localization and beta_s,beta_e weights for hybrid ensemble runs -hybens_info=$fixgsi/hwrf_hybens_d3_info - - -# Only need this file for single obs test -bufrtable=$fixgsi/prepobs_prep.bufrtable - -# Only need this file for sst retrieval -bftab_sst=$fixgsi/bufrtab.012 - -# Copy executable and fixed files to $tmpdir -if [[ $exp == *"updat"* ]]; then - $ncp $gsiexec_updat ./gsi.x -elif [[ $exp == *"contrl"* ]]; then - $ncp $gsiexec_contrl ./gsi.x -fi - -$ncp $anavinfo ./anavinfo -$ncp $berror ./berror_stats -$ncp $emiscoef_IRwater ./Nalli.IRwater.EmisCoeff.bin -$ncp $emiscoef_IRice ./NPOESS.IRice.EmisCoeff.bin -$ncp $emiscoef_IRsnow ./NPOESS.IRsnow.EmisCoeff.bin -$ncp $emiscoef_IRland ./NPOESS.IRland.EmisCoeff.bin -$ncp $emiscoef_VISice ./NPOESS.VISice.EmisCoeff.bin -$ncp $emiscoef_VISland ./NPOESS.VISland.EmisCoeff.bin -$ncp $emiscoef_VISsnow ./NPOESS.VISsnow.EmisCoeff.bin -$ncp $emiscoef_VISwater ./NPOESS.VISwater.EmisCoeff.bin -$ncp $emiscoef_MWwater ./FASTEM6.MWwater.EmisCoeff.bin -$ncp $aercoef ./AerosolCoeff.bin -$ncp $cldcoef ./CloudCoeff.bin -$ncp $satinfo ./satinfo -$ncp $cloudyinfo ./cloudy_radiance_info.txt -$ncp $scaninfo ./scaninfo -$ncp $pcpinfo ./pcpinfo -$ncp $ozinfo ./ozinfo -$ncp $convinfo ./convinfo -$ncp $errtable ./errtable -$ncp $atmsbeaminfo ./atms_beamwidth.txt -#add 9 tables for new varqc -$ncp $errtable_pw ./errtable_pw -$ncp $errtable_ps ./errtable_ps -$ncp $errtable_t ./errtable_t -$ncp $errtable_q ./errtable_q -$ncp $errtable_uv ./errtable_uv -$ncp $btable_ps ./btable_ps -$ncp $btable_t ./btable_t -$ncp $btable_q ./btable_q -$ncp $btable_uv ./btable_uv - -$ncp $hybens_info ./hybens_info - -$ncp $bufrtable ./prepobs_prep.bufrtable -$ncp $bftab_sst ./bftab_sstphr - -# Copy CRTM coefficient files based on entries in satinfo file -for file in `awk '{if($1!~"!"){print $1}}' ./satinfo | sort | uniq` ;do - $ncp $fixcrtm/${file}.SpcCoeff.bin ./ - $ncp $fixcrtm/${file}.TauCoeff.bin ./ -done - - -# Copy observational data to $tmpdir -$lnsf $hwrf_nmm_obs/${prefixa}.prepbufr ./prepbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.satwnd.${suffix} ./satwndbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.gpsro.${suffix} ./gpsrobufr -#$lnsf $hwrf_nmm_obs/${prefixa}.spssmi.${suffix} ./ssmirrbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.sptrmm.${suffix} ./tmirrbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.gome.${suffix} ./gomebufr -#$lnsf $hwrf_nmm_obs/${prefixa}.omi.${suffix} ./omibufr -#$lnsf $hwrf_nmm_obs/${prefixa}.mls.${suffix} ./mlsbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.osbuv8.${suffix} ./sbuvbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.goesfv.${suffix} ./gsnd1bufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bamua.${suffix} ./amsuabufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bamub.${suffix} ./amsubbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bhrs2.${suffix} ./hirs2bufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bhrs3.${suffix} ./hirs3bufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bhrs4.${suffix} ./hirs4bufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bmhs.${suffix} ./mhsbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.1bmsu.${suffix} ./msubufr -#$lnsf $hwrf_nmm_obs/${prefixa}.airsev.${suffix} ./airsbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.sevcsr.${suffix} ./seviribufr -#$lnsf $hwrf_nmm_obs/${prefixa}.mtiasi.${suffix} ./iasibufr -#$lnsf $hwrf_nmm_obs/${prefixa}.esamua.${suffix} ./amsuabufrears -#$lnsf $hwrf_nmm_obs/${prefixa}.esamub.${suffix} ./amsubbufrears -#$lnsf $hwrf_nmm_obs/${prefixa}.eshrs3.${suffix} ./hirs3bufrears -#$lnsf $hwrf_nmm_obs/${prefixa}.ssmit.${suffix} ./ssmitbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.amsre.${suffix} ./amsrebufr -#$lnsf $hwrf_nmm_obs/${prefixa}.ssmis.${suffix} ./ssmisbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.atms.${suffix} ./atmsbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.cris.${suffix} ./crisbufr -#$lnsf $hwrf_nmm_obs/${prefixa}.syndata.tcvitals.tm00 ./tcvitl -$lnsf $hwrf_nmm_obs/${prefixo}.tldplr.${suffix} ./tldplrbufr - - -# Copy bias correction, atmospheric and surface files -$lnsf $hwrf_nmm_obs/gdas1.t${hhg}z.abias ./satbias_in -$lnsf $hwrf_nmm_obs/gdas1.t${hhg}z.abias_pc ./satbias_pc - -$ncp $hwrf_nmm_ges/wrfghost_d03_03 ./wrf_inou3 -$ncp $hwrf_nmm_ges/wrfghost_d03_06 ./wrf_inout -$ncp $hwrf_nmm_ges/wrfghost_d03_09 ./wrf_inou9 - -$ncp $hwrf_nmm_ges/gdas1.t${hhg}z.sf03 ./gfs_sigf03 -$ncp $hwrf_nmm_ges/gdas1.t${hhg}z.sf06 ./gfs_sigf06 -$ncp $hwrf_nmm_ges/gdas1.t${hhg}z.sf09 ./gfs_sigf09 - -# Copy ensemble forecast files for hybrid analysis -export ENSEMBLE_SIZE_REGIONAL=10 ->filelist06 -n=1 -while [[ $n -le ${ENSEMBLE_SIZE_REGIONAL} ]]; do - $lnsf $hwrf_nmm_ges/$( printf sfg_${gdate}_fhr06s_mem%03d $n ) \ - ./$( printf sfg_${gdate}_fhr06s_mem%03d $n ) - ls ./$( printf sfg_${gdate}_fhr06s_mem%03d $n ) >> filelist06 - n=$((n + 1)) -done - -# Run GSI -cd $tmpdir -echo "run gsi now" -eval "$APRUN $tmpdir/gsi.x > stdout 2>&1" -rc=$? -exit $rc - - - - -# Loop over first and last outer loops to generate innovation -# diagnostic files for indicated observation types (groups) -# -# NOTE: Since we set miter=2 in GSI namelist SETUP, outer -# loop 03 will contain innovations with respect to -# the analysis. Creation of o-a innovation files -# is triggered by write_diag(3)=.true. The setting -# write_diag(1)=.true. turns on creation of o-g -# innovation files. -# - - -echo "Time before diagnostic loop is `date` " -cd $tmpdir -loops="01 03" -for loop in $loops; do - -case $loop in - 01) string=ges;; - 03) string=anl;; - *) string=$loop;; -esac - -# Collect diagnostic files for obs types (groups) below - listall="hirs2_n14 msu_n14 sndr_g08 sndr_g11 sndr_g11 sndr_g12 sndr_g13 sndr_g08_prep sndr_g11_prep sndr_g12_prep sndr_g13_prep sndrd1_g11 sndrd2_g11 sndrd3_g11 sndrd4_g11 sndrd1_g12 sndrd2_g12 sndrd3_g12 sndrd4_g12 sndrd1_g13 sndrd2_g13 sndrd3_g13 sndrd4_g13 hirs3_n15 hirs3_n16 hirs3_n17 amsua_n15 amsua_n16 amsua_n17 amsub_n15 amsub_n16 amsub_n17 hsb_aqua airs_aqua amsua_aqua imgr_g08 imgr_g11 imgr_g12 pcp_ssmi_dmsp pcp_tmi_trmm conv sbuv2_n16 sbuv2_n17 sbuv2_n18 gome_metop-a omi_aura ssmi_f13 ssmi_f15 hirs4_n18 hirs4_metop-a amsua_n18 amsua_metop-a mhs_n18 mhs_metop-a amsre_low_aqua amsre_mid_aqua amsre_hig_aqua ssmis_las_f16 ssmis_uas_f16 ssmis_img_f16 ssmis_env_f16 iasi_metop-a" - for type in $listall; do - count=`ls dir.*/${type}_${loop}* | wc -l` - if [[ $count -gt 0 ]]; then - cat dir.*/${type}_${loop}* > diag_${type}_${string}.${hwrf_nmm_adate} - compress diag_${type}_${string}.${hwrf_nmm_adate} - $ncp diag_${type}_${string}.${hwrf_nmm_adate}.Z $savdir/ - fi - done -done -echo "Time after diagnostic loop is `date` " - - - -# If requested, clean up $tmpdir -if [[ "$CLEAN" = "YES" ]];then - if [[ $rc -eq 0 ]];then - rm -rf $tmpdir - cd $tmpdir - cd ../ - rmdir $tmpdir - fi -fi - - -# End of script -exit diff --git a/regression/multi_regression.sh b/regression/multi_regression.sh index b850863d69..4df5581097 100755 --- a/regression/multi_regression.sh +++ b/regression/multi_regression.sh @@ -1,22 +1,18 @@ #!/bin/sh --login -regtests_all="global_3dvar - global_4dvar - global_4denvar +regtests_all="global_4denvar netcdf_fv3_regional rrfs_3denvar_glbens - hwrf_nmm_d2 - hwrf_nmm_d3 + hafs_4denvar_glbens + hafs_3denvar_hybens rtma global_enkf" -regtests_debug="global_3dvar - global_4dvar - global_4denvar +regtests_debug="global_4denvar netcdf_fv3_regional rrfs_3denvar_glbens - hwrf_nmm_d2 - hwrf_nmm_d3 + hafs_4denvar_glbens + hafs_3denvar_hybens rtma global_enkf" diff --git a/regression/regression_namelists.sh b/regression/regression_namelists.sh index 3668a6f8c1..2448bd155e 100755 --- a/regression/regression_namelists.sh +++ b/regression/regression_namelists.sh @@ -2,14 +2,14 @@ regtest=$1 case $regtest in - global_3dvar) + global_4denvar) -# Define namelist for global run (pcgsoi minimization) +# Define namelist for global hybrid run export gsi_namelist=" &SETUP - miter=2,niter(1)=5,niter(2)=10, + miter=2,niter(1)=5,niter(2)=5, niter_no_qc(1)=2,niter_no_qc(2)=0, write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., qoption=2, @@ -26,9 +26,12 @@ export gsi_namelist=" verbose=.false.,imp_physics=11,lupp=.true., binary_diag=.false.,netcdf_diag=.true., lobsdiag_forenkf=.false., - nhr_anal=3,6,9,nhr_obsbin=3, + nhr_anal=3,6,9,nhr_obsbin=1, + l4densvar=.true.,ens_nstarthr=3,nhr_assimilation=6,lwrite4danl=.true., optconv=0.05,cao_check=.true.,ta2tb=.false., - tzr_qc=1,sfcnst_comb=.true., write_fv3_incr=.true.,incvars_to_zero= 'liq_wat_inc','icmr_inc','rwmr_inc','snmr_inc','grle_inc',incvars_zero_strat='sphum_inc','liq_wat_inc','icmr_inc','rwmr_inc','snmr_inc','grle_inc',incvars_efold=5, use_gfs_ncio=.true., + tzr_qc=1,sfcnst_comb=.true., + write_fv3_incr=.true.,incvars_to_zero= 'liq_wat_inc','icmr_inc','rwmr_inc','snmr_inc','grle_inc', + incvars_zero_strat='sphum_inc','liq_wat_inc','icmr_inc','rwmr_inc','snmr_inc','grle_inc',incvars_efold=5, use_gfs_ncio=.true., $SETUP / &GRIDOPTS @@ -56,7 +59,8 @@ export gsi_namelist=" $JCOPTS / &STRONGOPTS - tlnmc_option=2,nstrong=1,nvmodes_keep=8,period_max=6.,period_width=1.5, + tlnmc_option=3,nstrong=1,nvmodes_keep=8,period_max=6.,period_width=1.5, + baldiag_full=.false.,baldiag_inc=.false., $STRONGOPTS / @@ -195,7 +199,11 @@ OBS_INPUT:: / &HYBRID_ENSEMBLE - $HYBRIDENSEMBLE + l_hyb_ens=.true.,n_ens=$NMEM_ENKF,beta_s0=0.125,readin_beta=.false.,s_ens_h=800,s_ens_v=-0.8, + generate_ens=.false.,uv_hyb_ens=.true.,jcap_ens=48,nlat_ens=98,nlon_ens=192, + ANISO_A_EN=.false.,jcap_ens_test=48,oz_univ_static=.false.,readin_localization=.true., + ensemble_path='./ensemble_data/',ens_fast_read=.true.,write_ens_sprd=.false., + $HYBRID_ENSEMBLE / &RAPIDREFRESH_CLDSURF dfi_radar_latent_heat_time_period=30.0, @@ -214,151 +222,85 @@ OBS_INPUT:: / " ;; + RTMA) - global_lanczos) - -# Define namelist for global run (lanczos minimization) +# Define namelist for RTMA runs -export gsi_namelist=" +export gsi_namelist=" &SETUP - miter=2,niter(1)=50,niter(2)=50, - niter_no_qc(1)=500,niter_no_qc(2)=500, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - gencode=82,qoption=2, - factqmin=0.005,factqmax=0.005,deltim=$DELTIM, + miter=2,niter(1)=5,niter(2)=5, + write_diag(1)=.true.,write_diag(2)=.true.,write_diag(3)=.true., + gencode=78,qoption=1,tsensible=.true. + factqmin=1.0,factqmax=1.0,factv=0.0,factcldch=0.0,factw10m=1.0,deltim=$DELTIM, iguess=-1, - oneobtest=.false.,retrieval=.false.,l_foto=.false., - use_pbl=.false.,use_compress=.false.,nsig_ext=10,gpstop=30., - crtm_coeffs_path='./crtm_coeffs/', - lsqrtb=.true.,lcongrad=.true.,ltlint=.true.,ladtest=.true.,lgrtest=.false., - use_gfs_nemsio=.false.,lrun_subdirs=.true.,use_gfs_ncio=.true., + oneobtest=.false.,retrieval=.false., + diag_rad=.false.,diag_pcp=.false.,diag_ozone=.false.,diag_aero=.false., + nhr_assimilation=6,min_offset=180,use_compress=.false.,lrun_subdirs=.true., + use_similarity_2dvar=.true., + neutral_stability_windfact_2dvar=.false., + use_prepb_satwnd=.false., $SETUP / &GRIDOPTS JCAP=$JCAP,JCAP_B=$JCAP_B,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS, - regional=.false.,nlayers(63)=3,nlayers(64)=6, - $GRIDOPTS + wrf_nmm_regional=.false.,wrf_mass_regional=.false.,twodvar_regional=.true., + diagnostic_reg=.false., + filled_grid=.false.,half_grid=.true.,netcdf=.false., / &BKGERR - vs=0.7, - hzscl=1.7,0.8,0.5, - hswgt=0.45,0.3,0.25, - bw=0.0,norsp=4, - bkgv_flowdep=.true.,bkgv_rewgtfct=1.5, - $BKGVERR + hzscl=1.414,1.000,0.707, + vs=0.5,bw=0.0, / &ANBKGERR - anisotropic=.false., - $ANBKGERR + anisotropic=.true.,an_vs=0.5,ngauss=1, + an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., + ifilt_ord=2,npass=3,normal=-200,grid_ratio=1.,nord_f2a=4, + rtma_subdomain_option=.true.,triad4=.true.,nsmooth=0,nsmooth_shapiro=0,lreadnorm=.true., / &JCOPTS - ljcpdry=.false.,bamp_jcpdry=2.5e7, - $JCOPTS / &STRONGOPTS - tlnmc_option=1,nstrong=1,nvmodes_keep=8,period_max=6.,period_width=1.5, + nstrong=1,nvmodes_keep=20,period_max=3., baldiag_full=.true.,baldiag_inc=.true., - $STRONGOPTS / &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.false.,oberrflg=.false.,c_varqc=0.02, - use_poq7=.true.,njqc=.false.,vqc=.true., + dfact=0.75,dfact1=3.0,noiqc=.true.,c_varqc=0.02,vadfile='prepbufr',hilbert_curve=.true., + buddycheck_t=.false.,buddydiag_save=.false.,oberrflg=.true.,njqc=.true.,vqc=.false., $OBSQC / &OBS_INPUT - dmesh(1)=180.0,dmesh(2)=145.0,dmesh(3)=240.0,dmesh(4)=160.0,dmesh(5)=180.0,dmesh(6)=150.0,dmesh(7)=145.0,time_window_max=3.0, - $OBSINPUT + dmesh(1)=60.0,dmesh(2)=60.0,dmesh(3)=60.0,dmesh(4)=60.0,time_window_max=3.0, / OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 1.0 0 0 - prepbufr t null t 1.0 0 0 - prepbufr q null q 1.0 0 0 - prepbufr pw null pw 1.0 0 0 - satwndbufr uv null uv 1.0 0 0 - prepbufr uv null uv 1.0 0 0 - prepbufr spd null spd 1.0 0 0 - prepbufr dw null dw 1.0 0 0 - radarbufr rw null l3rw 1.0 0 0 - l2rwbufr rw null l2rw 1.0 0 0 - prepbufr sst null sst 1.0 0 0 - gpsrobufr $gps_dtype null gps 1.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 1.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 1.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 1.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 1.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 1.0 0 0 - hirs2bufr hirs2 n14 hirs2_n14 6.0 1 1 - hirs3bufr hirs3 n16 hirs3_n16 0.0 1 1 - hirs3bufr hirs3 n17 hirs3_n17 6.0 1 1 - hirs4bufr hirs4 n18 hirs4_n18 0.0 1 1 - hirs4bufr hirs4 metop-a hirs4_metop-a 6.0 1 1 - gsndrbufr sndr g11 sndr_g11 0.0 1 0 - gsndrbufr sndr g12 sndr_g12 0.0 1 0 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 20.0 1 1 - msubufr msu n14 msu_n14 2.0 2 1 - amsuabufr amsua n15 amsua_n15 10.0 2 1 - amsuabufr amsua n16 amsua_n16 0.0 2 1 - amsuabufr amsua n17 amsua_n17 0.0 2 1 - amsuabufr amsua n18 amsua_n18 10.0 2 1 - amsuabufr amsua metop-a amsua_metop-a 10.0 2 1 - airsbufr amsua aqua amsua_aqua 5.0 2 1 - amsubbufr amsub n15 amsub_n15 3.0 3 1 - amsubbufr amsub n16 amsub_n16 3.0 3 1 - amsubbufr amsub n17 amsub_n17 3.0 3 1 - mhsbufr mhs n18 mhs_n18 3.0 3 1 - mhsbufr mhs metop-a mhs_metop-a 3.0 3 1 - ssmitbufr ssmi f13 ssmi_f13 0.0 4 0 - ssmitbufr ssmi f15 ssmi_f15 0.0 4 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 4 1 - amsrebufr amsre_mid aqua amsre_aqua 0.0 4 1 - amsrebufr amsre_hig aqua amsre_aqua 0.0 4 1 - ssmisbufr ssmis f16 ssmis_f16 0.0 4 1 - gsnd1bufr sndrd1 g12 sndrD1_g12 1.5 5 0 - gsnd1bufr sndrd2 g12 sndrD2_g12 1.5 5 0 - gsnd1bufr sndrd3 g12 sndrD3_g12 1.5 5 0 - gsnd1bufr sndrd4 g12 sndrD4_g12 1.5 5 0 - gsnd1bufr sndrd1 g11 sndrD1_g11 1.5 5 0 - gsnd1bufr sndrd2 g11 sndrD2_g11 1.5 5 0 - gsnd1bufr sndrd3 g11 sndrD3_g11 1.5 5 0 - gsnd1bufr sndrd4 g11 sndrD4_g11 1.5 5 0 - gsnd1bufr sndrd1 g13 sndrD1_g13 1.5 5 0 - gsnd1bufr sndrd2 g13 sndrD2_g13 1.5 5 0 - gsnd1bufr sndrd3 g13 sndrD3_g13 1.5 5 0 - gsnd1bufr sndrd4 g13 sndrD4_g13 1.5 5 0 - iasibufr iasi metop-a iasi_metop-a 20.0 1 1 - gomebufr gome metop-a gome_metop-a 1.0 6 0 - omibufr omi aura omi_aura 1.0 6 0 - sbuvbufr sbuv2 n19 sbuv8_n19 1.0 0 0 - hirs4bufr hirs4 n19 hirs4_n19 6.0 1 1 - amsuabufr amsua n19 amsua_n19 10.0 2 1 - mhsbufr mhs n19 mhs_n19 3.0 3 1 - tcvitl tcp null tcp 1.0 0 0 - mlsbufr mls30 aura mls30_aura 1.0 0 0 - seviribufr seviri m08 seviri_m08 0.0 7 0 - seviribufr seviri m09 seviri_m09 0.0 7 0 - seviribufr seviri m10 seviri_m10 0.0 7 0 - seviribufr seviri m11 seviri_m11 0.0 7 0 - oscatbufr uv null uv 1.0 0 0 - ompsnpbufr ompsnp npp ompsnp_npp 1.0 0 0 - ompstcbufr ompstc8 npp ompstc8_npp 1.0 6 0 - abibufr abi g16 abi_g16 0.0 7 0 - ahibufr ahi himawari8 ahi_himawari8 0.0 7 0 - abibufr abi g17 abi_g17 0.0 7 0 - abibufr abi g18 abi_g18 0.0 7 0 - ahibufr ahi himawari9 ahi_himawari9 0.0 7 0 - atmsbufr atms n21 atms_n21 0.0 7 1 - crisfsbufr cris-fsr n21 cris-fsr_n21 0.0 7 0 - sstviirs viirs-m j2 viirs-m_j2 0.0 4 0 - ompsnpbufr ompsnp n21 ompsnp_n21 0.0 0 0 - ompstcbufr ompstc8 n21 ompstc8_n21 0.0 6 0 - gomebufr gome metop-c gome_metop-c 0.0 6 0 +! dfile dtype dplat dsis dval dthin dsfcalc + prepbufr ps null ps 1.0 0 0 + prepbufr t null t 1.0 0 0 + prepbufr q null q 1.0 0 0 + prepbufr uv null uv 1.0 0 0 + satwndbufr uv null uv 1.0 0 0 + prepbufr spd null spd 1.0 0 0 + prepbufr wspd10m null wspd10m 1.0 0 0 + satwnd wspd10m null wspd10m 1.0 0 0 + prepbufr uwnd10m null uwnd10m 1.0 0 0 + satwnd uwnd10m null uwnd10m 1.0 0 0 + prepbufr vwnd10m null vwnd10m 1.0 0 0 + satwnd vwnd10m null vwnd10m 1.0 0 0 + prepbufr gust null gust 1.0 0 0 + prepbufr vis null vis 1.0 0 0 + prepbufr td2m null td2m 1.0 0 0 + mxtmdat mxtm null mxtm 1.0 0 0 + mitmdat mitm null mitm 1.0 0 0 + prepbufr mxtm null mxtm 1.0 0 0 + prepbufr mitm null mitm 1.0 0 0 + prepbufr pmsl null pmsl 1.0 0 0 + prepbufr howv null howv 1.0 0 0 + satmar howv null howv 1.0 0 0 + prepbufr tcamt null tcamt 1.0 0 0 + goessky tcamt null tcamt 1.0 0 0 + prepbufr cldch null cldch 1.0 0 0 :: - &SUPEROB_RADAR - $SUPERRAD + &SUPEROB_RADAR / &LAG_DATA / @@ -366,908 +308,264 @@ OBS_INPUT:: / &RAPIDREFRESH_CLDSURF dfi_radar_latent_heat_time_period=30.0, + l_closeobs=.true. / &CHEM / &SINGLEOB_TEST maginnov=0.1,magoberr=0.1,oneob_type='t', - oblat=45.,oblon=180.,obpres=1000.,obdattim=${adate}, + oblat=36.,oblon=260.,obpres=1000.,obdattim=${adate}, obhourset=0., - $SINGLEOB / &NST / " - ;; + rrfs_3denvar_glbens) - global_hybrid_T126) - -# Define namelist for global hybrid run +# Define namelist for rrfs 3d hybrid envar run with global ensembles export gsi_namelist=" &SETUP - miter=1,niter(1)=5,niter(2)=150, - niter_no_qc(1)=50,niter_no_qc(2)=0, + miter=2,niter(1)=5,niter(2)=5, write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - qoption=2,cwoption=3, - gencode=82,factqmin=0.1,factqmax=0.1,deltim=$DELTIM, + qoption=2,print_obs_para=.true.,diag_radardbz=.false., + if_model_dbz=.false., static_gsi_nopcp_dbz=0.0, + rmesh_dbz=4.0,rmesh_vr=4.0,zmesh_dbz=1000.0,zmesh_vr=1000.0, + missing_to_nopcp=.false.,radar_no_thinning=.true., + gencode=78,factqmin=0.0,factqmax=0.0, iguess=-1, - oneobtest=.false.,retrieval=.false.,l_foto=.false., + lread_obs_save=.false.,lread_obs_skip=.false., + oneobtest=.false.,retrieval=.false., + nhr_assimilation=3,l_foto=.false., use_pbl=.false.,use_prepb_satwnd=.false., - nhr_assimilation=6,lrun_subdirs=.true., - $SETUP + newpc4pred=.true.,adp_anglebc=.true.,angord=4, + passive_bc=.true.,use_edges=.false.,emiss_bc=.true., + diag_precon=.true.,step_start=1.e-3, + l4densvar=.false.,nhr_obsbin=3, + use_gfs_nemsio=.false.,use_gfs_ncio=.true.,reset_bad_radbc=.true., + netcdf_diag=.false.,binary_diag=.true., + l_obsprvdiag=.false., / &GRIDOPTS - JCAP_B=$JCAP_B,JCAP=$JCAP,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS, - regional=.false.,nlayers(63)=3,nlayers(64)=6, - $GRIDOPTS + fv3_regional=.true.,grid_ratio_fv3_regional=2.0,nvege_type=20, + fv3_io_layout_y=1, / &BKGERR - hzscl=1.7,0.8,0.5, - hswgt=0.45,0.3,0.25, - - bw=0.0,norsp=4, - bkgv_flowdep=.true.,bkgv_rewgtfct=1.5, - bkgv_write=.false., - $BKGVERR - / + vs=1.0, + hzscl=0.7,1.4,2.80, + bw=0.,fstat=.true., + usenewgfsberror=.true., +/ &ANBKGERR anisotropic=.false., - $ANBKGERR / &JCOPTS - ljcdfi=.false.,alphajc=0.0,ljcpdry=.true.,bamp_jcpdry=2.5e7, - $JCOPTS / &STRONGOPTS - tlnmc_option=1,nstrong=1,nvmodes_keep=8,period_max=6.,period_width=1.5, - baldiag_full=.true.,baldiag_inc=.true., - $STRONGOPTS / &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.true.,oberrflg=.false.,c_varqc=0.02, - use_poq7=.true.,njqc=.false.,vqc=.true.,aircraft_t_bc=.true.,biaspredt=1000.0,upd_aircraft=.true., - $OBSQC + dfact=0.75,dfact1=3.0,noiqc=.false.,c_varqc=0.02,vadfile='prepbufr', + vadwnd_l2rw_qc=.true., / &OBS_INPUT - dmesh(1)=145.0,dmesh(2)=150.0,time_window_max=3.0, - $OBSINPUT + dmesh(1)=120.0,dmesh(2)=60.0,dmesh(3)=30,time_window_max=1.5,time_window_rad=1.0,ext_sonde=.true., / OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 0.0 0 0 - prepbufr t null t 0.0 0 0 - prepbufr_profl t null t 0.0 0 0 - prepbufr q null q 0.0 0 0 - prepbufr_profl q null q 0.0 0 0 - prepbufr pw null pw 0.0 0 0 - prepbufr uv null uv 0.0 0 0 - prepbufr_profl uv null uv 0.0 0 0 - satwndbufr uv null uv 0.0 0 0 - prepbufr spd null spd 0.0 0 0 - prepbufr dw null dw 0.0 0 0 - radarbufr rw null l3rw 0.0 0 0 - l2rwbufr rw null l2rw 0.0 0 0 - prepbufr sst null sst 0.0 0 0 - gpsrobufr gps_bnd null gps 0.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 0.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 0.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 - hirs3bufr hirs3 n17 hirs3_n17 0.0 1 0 - hirs4bufr hirs4 metop-a hirs4_metop-a 0.0 1 1 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 0.0 1 1 - amsuabufr amsua n15 amsua_n15 0.0 1 1 - amsuabufr amsua n18 amsua_n18 0.0 1 1 - amsuabufr amsua metop-a amsua_metop-a 0.0 1 1 - airsbufr amsua aqua amsua_aqua 0.0 1 1 - amsubbufr amsub n17 amsub_n17 0.0 1 1 - mhsbufr mhs n18 mhs_n18 0.0 1 1 - mhsbufr mhs metop-a mhs_metop-a 0.0 1 1 - ssmitbufr ssmi f15 ssmi_f15 0.0 1 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 1 0 - amsrebufr amsre_mid aqua amsre_aqua 0.0 1 0 - amsrebufr amsre_hig aqua amsre_aqua 0.0 1 0 - ssmisbufr ssmis_las f16 ssmis_f16 0.0 1 0 - ssmisbufr ssmis_uas f16 ssmis_f16 0.0 1 0 - ssmisbufr ssmis_img f16 ssmis_f16 0.0 1 0 - ssmisbufr ssmis_env f16 ssmis_f16 0.0 1 0 - gsnd1bufr sndrd1 g12 sndrD1_g12 0.0 1 0 - gsnd1bufr sndrd2 g12 sndrD2_g12 0.0 1 0 - gsnd1bufr sndrd3 g12 sndrD3_g12 0.0 1 0 - gsnd1bufr sndrd4 g12 sndrD4_g12 0.0 1 0 - gsnd1bufr sndrd1 g11 sndrD1_g11 0.0 1 0 - gsnd1bufr sndrd2 g11 sndrD2_g11 0.0 1 0 - gsnd1bufr sndrd3 g11 sndrD3_g11 0.0 1 0 - gsnd1bufr sndrd4 g11 sndrD4_g11 0.0 1 0 - gsnd1bufr sndrd1 g13 sndrD1_g13 0.0 1 0 - gsnd1bufr sndrd2 g13 sndrD2_g13 0.0 1 0 - gsnd1bufr sndrd3 g13 sndrD3_g13 0.0 1 0 - gsnd1bufr sndrd4 g13 sndrD4_g13 0.0 1 0 - iasibufr iasi metop-a iasi_metop-a 0.0 1 1 - gomebufr gome metop-a gome_metop-a 0.0 2 0 - omibufr omi aura omi_aura 0.0 2 0 - sbuvbufr sbuv2 n19 sbuv8_n19 0.0 0 0 - hirs4bufr hirs4 n19 hirs4_n19 0.0 1 1 - amsuabufr amsua n19 amsua_n19 0.0 1 1 - mhsbufr mhs n19 mhs_n19 0.0 1 1 - tcvitl tcp null tcp 0.0 0 0 - seviribufr seviri m08 seviri_m08 0.0 1 0 - seviribufr seviri m09 seviri_m09 0.0 1 0 - seviribufr seviri m10 seviri_m10 0.0 1 0 - seviribufr seviri m11 seviri_m11 0.0 1 0 - hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 1 0 - amsuabufr amsua metop-b amsua_metop-b 0.0 1 0 - mhsbufr mhs metop-b mhs_metop-b 0.0 1 0 - iasibufr iasi metop-b iasi_metop-b 0.0 1 0 - gomebufr gome metop-b gome_metop-b 0.0 2 0 - atmsbufr atms npp atms_npp 0.0 1 0 - atmsbufr atms n20 atms_n20 0.0 1 0 - crisbufr cris npp cris_npp 0.0 1 0 - crisfsbufr cris-fsr npp cris-fsr_npp 0.0 1 0 - crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 1 0 - gsnd1bufr sndrd1 g14 sndrD1_g14 0.0 1 0 - gsnd1bufr sndrd2 g14 sndrD2_g14 0.0 1 0 - gsnd1bufr sndrd3 g14 sndrD3_g14 0.0 1 0 - gsnd1bufr sndrd4 g14 sndrD4_g14 0.0 1 0 - gsnd1bufr sndrd1 g15 sndrD1_g15 0.0 1 0 - gsnd1bufr sndrd2 g15 sndrD2_g15 0.0 1 0 - gsnd1bufr sndrd3 g15 sndrD3_g15 0.0 1 0 - gsnd1bufr sndrd4 g15 sndrD4_g15 0.0 1 0 - ompsnpbufr ompsnp npp ompsnp_npp 0.0 0 0 - ompstcbufr ompstc8 npp ompstc8_npp 0.0 2 0 - abibufr abi g16 abi_g16 0.0 1 0 - ahibufr ahi himawari8 ahi_himawari8 0.0 1 0 - abibufr abi g17 abi_g17 0.0 1 0 - abibufr abi g18 abi_g18 0.0 1 0 - ahibufr ahi himawari9 ahi_himawari9 0.0 1 0 - atmsbufr atms n21 atms_n21 0.0 1 1 - crisfsbufr cris-fsr n21 cris-fsr_n21 0.0 1 0 - sstviirs viirs-m j2 viirs-m_j2 0.0 4 0 - ompsnpbufr ompsnp n21 ompsnp_n21 0.0 0 0 - ompstcbufr ompstc8 n21 ompstc8_n21 0.0 2 0 - gomebufr gome metop-c gome_metop-c 0.0 2 0 +! dfile dtype dplat dsis dval dthin dsfcalc + dbzobs.nc dbz null dbz 1.0 0 0 + prepbufr ps null ps 1.0 0 0 + prepbufr t null t 1.0 0 0 + prepbufr q null q 1.0 0 0 + prepbufr pw null pw 1.0 0 0 + satwndbufr uv null uv 1.0 0 0 + prepbufr uv null uv 1.0 0 0 + prepbufr spd null spd 1.0 0 0 + prepbufr dw null dw 1.0 0 0 + l2rwbufr rw null l2rw 1.0 0 0 + prepbufr sst null sst 1.0 0 0 + gpsrobufr gps_ref null gps 1.0 0 0 + ssmirrbufr pcp_ssmi dmsp pcp_ssmi 1.0 -1 0 + tmirrbufr pcp_tmi trmm pcp_tmi 1.0 -1 0 + sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 + sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 + sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 + hirs3bufr hirs3 n16 hirs3_n16 0.0 1 0 + hirs3bufr hirs3 n17 hirs3_n17 0.0 1 0 + hirs4bufr hirs4 metop-a hirs4_metop-a 0.0 2 0 + hirs4bufr hirs4 n18 hirs4_n18 0.0 1 0 + hirs4bufr hirs4 n19 hirs4_n19 0.0 2 0 + hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 2 0 + gimgrbufr goes_img g11 imgr_g11 0.0 1 0 + gimgrbufr goes_img g12 imgr_g12 0.0 1 0 + airsbufr airs aqua airs_aqua 0.0 2 0 + amsuabufr amsua n15 amsua_n15 0.0 2 0 + amsuabufr amsua n18 amsua_n18 0.0 2 0 + amsuabufr amsua n19 amsua_n19 0.0 2 0 + amsuabufr amsua metop-a amsua_metop-a 0.0 2 0 + amsuabufr amsua metop-b amsua_metop-b 0.0 2 0 + airsbufr amsua aqua amsua_aqua 0.0 2 0 + amsubbufr amsub n17 amsub_n17 0.0 1 0 + mhsbufr mhs n18 mhs_n18 0.0 2 0 + mhsbufr mhs n19 mhs_n19 0.0 2 0 + mhsbufr mhs metop-a mhs_metop-a 0.0 2 0 + mhsbufr mhs metop-b mhs_metop-b 0.0 2 0 + ssmitbufr ssmi f13 ssmi_f13 0.0 2 0 + ssmitbufr ssmi f14 ssmi_f14 0.0 2 0 + ssmitbufr ssmi f15 ssmi_f15 0.0 2 0 + amsrebufr amsre_low aqua amsre_aqua 0.0 2 0 + amsrebufr amsre_mid aqua amsre_aqua 0.0 2 0 + amsrebufr amsre_hig aqua amsre_aqua 0.0 2 0 + ssmisbufr ssmis f16 ssmis_f16 0.0 2 0 + ssmisbufr ssmis f17 ssmis_f17 0.0 2 0 + ssmisbufr ssmis f18 ssmis_f18 0.0 2 0 + ssmisbufr ssmis f19 ssmis_f19 0.0 2 0 + gsnd1bufr sndrd1 g12 sndrD1_g12 0.0 1 0 + gsnd1bufr sndrd2 g12 sndrD2_g12 0.0 1 0 + gsnd1bufr sndrd3 g12 sndrD3_g12 0.0 1 0 + gsnd1bufr sndrd4 g12 sndrD4_g12 0.0 1 0 + gsnd1bufr sndrd1 g11 sndrD1_g11 0.0 1 0 + gsnd1bufr sndrd2 g11 sndrD2_g11 0.0 1 0 + gsnd1bufr sndrd3 g11 sndrD3_g11 0.0 1 0 + gsnd1bufr sndrd4 g11 sndrD4_g11 0.0 1 0 + gsnd1bufr sndrd1 g13 sndrD1_g13 0.0 1 0 + gsnd1bufr sndrd2 g13 sndrD2_g13 0.0 1 0 + gsnd1bufr sndrd3 g13 sndrD3_g13 0.0 1 0 + gsnd1bufr sndrd4 g13 sndrD4_g13 0.0 1 0 + gsnd1bufr sndrd1 g15 sndrD1_g15 0.0 2 0 + gsnd1bufr sndrd2 g15 sndrD2_g15 0.0 2 0 + gsnd1bufr sndrd3 g15 sndrD3_g15 0.0 2 0 + gsnd1bufr sndrd4 g15 sndrD4_g15 0.0 2 0 + iasibufr iasi metop-a iasi_metop-a 0.0 2 0 + gomebufr gome metop-a gome_metop-a 0.0 2 0 + atmsbufr atms npp atms_npp 0.0 2 0 + atmsbufr atms n20 atms_n20 0.0 2 0 + crisbufr cris npp cris_npp 0.0 2 0 + crisfsbufr cris-fsr npp cris-fsr_npp 0.0 2 0 + crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 2 0 + abibufr abi g16 abi_g16 0.0 2 0 + mlsbufr mls30 aura mls30_aura 0.0 0 0 + oscatbufr uv null uv 0.0 0 0 + prepbufr mta_cld null mta_cld 1.0 0 0 + prepbufr gos_ctp null gos_ctp 1.0 0 0 + refInGSI rad_ref null rad_ref 1.0 0 0 + lghtInGSI lghtn null lghtn 1.0 0 0 + larcInGSI larccld null larccld 1.0 0 0 :: - &SUPEROB_RADAR - $SUPERRAD + &SUPEROB_RADAR + del_azimuth=5.,del_elev=.25,del_range=5000.,del_time=.5,elev_angle_max=5.,minnum=50,range_max=100000., l2superob_only=.false., / &LAG_DATA - $LAGDATA / &HYBRID_ENSEMBLE - l_hyb_ens=.true.,n_ens=$ENS_NUM_ANAL,beta_s0=0.25,readin_beta=.false.,s_ens_h=800,s_ens_v=-0.7,generate_ens=.false.,uv_hyb_ens=.true.,jcap_ens=62, - nlat_ens=96,nlon_ens=192,ANISO_A_EN=.false.,jcap_ens_test=62,oz_univ_static=.true.,readin_localization=.true., - write_ens_sprd=.false., - $HYBRID_ENSEMBLE + l_hyb_ens=${ifhyb}, + uv_hyb_ens=.true., + q_hyb_ens=.false., + aniso_a_en=.false.,generate_ens=.false., + n_ens=${nummem}, + beta_s0=0.15,s_ens_h=110,s_ens_v=3, + regional_ensemble_option=1, + pseudo_hybens = .false., + grid_ratio_ens = 3, + l_ens_in_diff_time=.true., + ensemble_path='', + i_en_perts_io=1, + jcap_ens=574, + fv3sar_bg_opt=0, + readin_localization=.true., + ens_fast_read=.false., / &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - - / - &SINGLEOB_TEST - maginnov=0.1,magoberr=0.1,oneob_type='t', - oblat=45.,oblon=180.,obpres=1000.,obdattim=${global_hybrid_T126_adate}, - obhourset=0., - $SINGLEOB - / - &NST - / -" -;; - - global_4denvar ) - -# Define namelist for global hybrid run - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=5,niter(2)=10, - niter_no_qc(1)=2,niter_no_qc(2)=0, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - qoption=2, - gencode=0,factqmin=0.5,factqmax=0.0002,deltim=$DELTIM, - iguess=-1, - oneobtest=.false.,retrieval=.false.,l_foto=.false., - use_pbl=.false.,use_compress=.true.,nsig_ext=45,gpstop=50., - commgpstop=45.,commgpserrinf=1.0, - use_gfs_nemsio=.false.,lrun_subdirs=.true., - use_readin_anl_sfcmask=.true., - crtm_coeffs_path='./crtm_coeffs/', - newpc4pred=.true.,adp_anglebc=.true.,angord=4,passive_bc=.true.,use_edges=.false., - diag_precon=.true.,step_start=1.e-3,emiss_bc=.true.,thin4d=.true.,cwoption=3, - verbose=.false.,imp_physics=11,lupp=.true., - binary_diag=.false.,netcdf_diag=.true., - lobsdiag_forenkf=.false., - nhr_anal=3,6,9,nhr_obsbin=1, - l4densvar=.true.,ens_nstarthr=3,nhr_assimilation=6,lwrite4danl=.true., - optconv=0.05,cao_check=.true.,ta2tb=.false., - tzr_qc=1,sfcnst_comb=.true., - write_fv3_incr=.true.,incvars_to_zero= 'liq_wat_inc','icmr_inc','rwmr_inc','snmr_inc','grle_inc', - incvars_zero_strat='sphum_inc','liq_wat_inc','icmr_inc','rwmr_inc','snmr_inc','grle_inc',incvars_efold=5, use_gfs_ncio=.true., - $SETUP - / - &GRIDOPTS - JCAP=$JCAP,JCAP_B=$JCAP_B,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS, - regional=.false., - $GRIDOPTS - / - &BKGERR - vs=0.7, - hzscl=1.7,0.8,0.5, - hswgt=0.45,0.3,0.25, - bw=0.0,norsp=4, - bkgv_flowdep=.true.,bkgv_rewgtfct=1.5, - bkgv_write=.false., - cwcoveqqcov=.false., - $BKGVERR - / - &ANBKGERR - anisotropic=.false., - $ANBKGERR - / - &JCOPTS - ljcdfi=.false.,alphajc=0.0,ljcpdry=.true.,bamp_jcpdry=5.0e7, - ljc4tlevs=.true., - $JCOPTS - / - &STRONGOPTS - tlnmc_option=3,nstrong=1,nvmodes_keep=8,period_max=6.,period_width=1.5, - - baldiag_full=.false.,baldiag_inc=.false., - $STRONGOPTS - / - &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.true.,oberrflg=.false.,c_varqc=0.04, - use_poq7=.true.,qc_noirjaco3_pole=.true.,vqc=.false.,nvqc=.true.,hub_norm=.true., - aircraft_t_bc=.true.,biaspredt=1.0e5,upd_aircraft=.true.,cleanup_tail=.true., - tcp_width=70.0,tcp_ermax=7.35, - $OBSQC - / - &OBS_INPUT - dmesh(1)=1450.0,dmesh(2)=1500.0,dmesh(3)=1000.0,dmesh(4)=500.0,time_window_max=3.0, - $OBSINPUT - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 0.0 0 0 - prepbufr t null t 0.0 0 0 - prepbufr_profl t null t 0.0 0 0 - hdobbufr t null t 0.0 0 0 - prepbufr q null q 0.0 0 0 - prepbufr_profl q null q 0.0 0 0 - hdobbufr q null q 0.0 0 0 - prepbufr pw null pw 0.0 0 0 - prepbufr uv null uv 0.0 0 0 - prepbufr_profl uv null uv 0.0 0 0 - satwndbufr uv null uv 0.0 0 0 - hdobbufr uv null uv 0.0 0 0 - prepbufr spd null spd 0.0 0 0 - hdobbufr spd null spd 0.0 0 0 - prepbufr dw null dw 0.0 0 0 - radarbufr rw null rw 0.0 0 0 - nsstbufr sst nsst sst 0.0 0 0 - gpsrobufr gps_bnd null gps 0.0 0 0 - sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 - hirs3bufr hirs3 n17 hirs3_n17 0.0 1 0 - hirs4bufr hirs4 metop-a hirs4_metop-a 0.0 1 1 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 0.0 1 1 - amsuabufr amsua n15 amsua_n15 0.0 1 1 - amsuabufr amsua n18 amsua_n18 0.0 1 1 - amsuabufr amsua metop-a amsua_metop-a 0.0 1 1 - airsbufr amsua aqua amsua_aqua 0.0 1 1 - amsubbufr amsub n17 amsub_n17 0.0 1 1 - mhsbufr mhs n18 mhs_n18 0.0 1 1 - mhsbufr mhs metop-a mhs_metop-a 0.0 1 1 - ssmitbufr ssmi f15 ssmi_f15 0.0 1 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 1 0 - amsrebufr amsre_mid aqua amsre_aqua 0.0 1 0 - amsrebufr amsre_hig aqua amsre_aqua 0.0 1 0 - ssmisbufr ssmis f16 ssmis_f16 0.0 1 0 - ssmisbufr ssmis f17 ssmis_f17 0.0 1 0 - ssmisbufr ssmis f18 ssmis_f18 0.0 1 0 - gsnd1bufr sndrd1 g12 sndrD1_g12 0.0 1 0 - gsnd1bufr sndrd2 g12 sndrD2_g12 0.0 1 0 - gsnd1bufr sndrd3 g12 sndrD3_g12 0.0 1 0 - gsnd1bufr sndrd4 g12 sndrD4_g12 0.0 1 0 - gsnd1bufr sndrd1 g11 sndrD1_g11 0.0 1 0 - gsnd1bufr sndrd2 g11 sndrD2_g11 0.0 1 0 - gsnd1bufr sndrd3 g11 sndrD3_g11 0.0 1 0 - gsnd1bufr sndrd4 g11 sndrD4_g11 0.0 1 0 - gsnd1bufr sndrd1 g13 sndrD1_g13 0.0 1 0 - gsnd1bufr sndrd2 g13 sndrD2_g13 0.0 1 0 - gsnd1bufr sndrd3 g13 sndrD3_g13 0.0 1 0 - gsnd1bufr sndrd4 g13 sndrD4_g13 0.0 1 0 - iasibufr iasi metop-a iasi_metop-a 0.0 1 1 - gomebufr gome metop-a gome_metop-a 0.0 2 0 - omibufr omi aura omi_aura 0.0 2 0 - sbuvbufr sbuv2 n19 sbuv8_n19 0.0 0 0 - hirs4bufr hirs4 n19 hirs4_n19 0.0 1 1 - amsuabufr amsua n19 amsua_n19 0.0 1 1 - mhsbufr mhs n19 mhs_n19 0.0 1 1 - tcvitl tcp null tcp 0.0 0 0 - seviribufr seviri m08 seviri_m08 0.0 1 0 - seviribufr seviri m09 seviri_m09 0.0 1 0 - seviribufr seviri m10 seviri_m10 0.0 1 0 - seviribufr seviri m11 seviri_m11 0.0 1 0 - hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 1 1 - amsuabufr amsua metop-b amsua_metop-b 0.0 1 1 - mhsbufr mhs metop-b mhs_metop-b 0.0 1 1 - iasibufr iasi metop-b iasi_metop-b 0.0 1 1 - gomebufr gome metop-b gome_metop-b 0.0 2 0 - atmsbufr atms npp atms_npp 0.0 1 1 - atmsbufr atms n20 atms_n20 0.0 1 1 - crisbufr cris npp cris_npp 0.0 1 0 - crisfsbufr cris-fsr npp cris-fsr_npp 0.0 1 0 - crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 1 0 - gsnd1bufr sndrd1 g14 sndrD1_g14 0.0 1 0 - gsnd1bufr sndrd2 g14 sndrD2_g14 0.0 1 0 - gsnd1bufr sndrd3 g14 sndrD3_g14 0.0 1 0 - gsnd1bufr sndrd4 g14 sndrD4_g14 0.0 1 0 - gsnd1bufr sndrd1 g15 sndrD1_g15 0.0 1 0 - gsnd1bufr sndrd2 g15 sndrD2_g15 0.0 1 0 - gsnd1bufr sndrd3 g15 sndrD3_g15 0.0 1 0 - gsnd1bufr sndrd4 g15 sndrD4_g15 0.0 1 0 - oscatbufr uv null uv 0.0 0 0 - mlsbufr mls30 aura mls30_aura 0.0 0 0 - avhambufr avhrr metop-a avhrr3_metop-a 0.0 4 0 - avhpmbufr avhrr n18 avhrr3_n18 0.0 4 0 - avhambufr avhrr metop-b avhrr3_metop-b 0.0 4 0 - avhambufr avhrr metop-c avhrr3_metop-c 0.0 4 0 - avhpmbufr avhrr n19 avhrr3_n19 0.0 4 0 - amsr2bufr amsr2 gcom-w1 amsr2_gcom-w1 0.0 3 0 - gmibufr gmi gpm gmi_gpm 0.0 1 0 - saphirbufr saphir meghat saphir_meghat 0.0 3 0 - ahibufr ahi himawari8 ahi_himawari8 0.0 1 0 - abibufr abi g16 abi_g16 0.0 1 0 - abibufr abi g17 abi_g17 0.0 1 0 - rapidscatbufr uv null uv 0.0 0 0 - ompsnpbufr ompsnp npp ompsnp_npp 0.0 0 0 - ompslpbufr ompslp npp ompslp_npp 0.0 0 0 - ompstcbufr ompstc8 npp ompstc8_npp 0.0 2 0 - ompsnpbufr ompsnp n20 ompsnp_n20 0.0 0 0 - ompstcbufr ompstc8 n20 ompstc8_n20 0.0 2 0 - amsuabufr amsua metop-c amsua_metop-c 0.0 1 1 - mhsbufr mhs metop-c mhs_metop-c 0.0 1 1 - iasibufr iasi metop-c iasi_metop-c 0.0 1 1 - sstviirs viirs-m npp viirs-m_npp 0.0 4 0 - sstviirs viirs-m j1 viirs-m_j1 0.0 4 0 - abibufr abi g18 abi_g18 0.0 1 0 - ahibufr ahi himawari9 ahi_himawari9 0.0 1 0 - atmsbufr atms n21 atms_n21 0.0 1 1 - crisfsbufr cris-fsr n21 cris-fsr_n21 0.0 1 0 - sstviirs viirs-m j2 viirs-m_j2 0.0 4 0 - ompsnpbufr ompsnp n21 ompsnp_n21 0.0 0 0 - ompstcbufr ompstc8 n21 ompstc8_n21 0.0 2 0 - gomebufr gome metop-c gome_metop-c 0.0 2 0 -:: - &SUPEROB_RADAR - $SUPERRAD - / - &LAG_DATA - - / - &HYBRID_ENSEMBLE - l_hyb_ens=.true.,n_ens=$NMEM_ENKF,beta_s0=0.125,readin_beta=.false.,s_ens_h=800,s_ens_v=-0.8, - generate_ens=.false.,uv_hyb_ens=.true.,jcap_ens=48,nlat_ens=98,nlon_ens=192, - ANISO_A_EN=.false.,jcap_ens_test=48,oz_univ_static=.false.,readin_localization=.true., - ensemble_path='./ensemble_data/',ens_fast_read=.true.,write_ens_sprd=.false., - $HYBRID_ENSEMBLE - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - - / - &CHEM - - / - &NST - nst_gsi=3,nstinfo=4,zsea1=0,zsea2=0,fac_dtl=1,fac_tsl=1, - / - &SINGLEOB_TEST - maginnov=0.1,magoberr=0.1,oneob_type='t', - oblat=5.,oblon=180.,obpres=850.,obdattim=2022110900, - obhourset=0., - / -" -;; - - global_fv3_4denvar_C192 ) - -# Define namelist for global hybrid run - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=5,niter(2)=5, - niter_no_qc(1)=2,niter_no_qc(2)=0, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - qoption=2, - gencode=82,factqmin=0.5,factqmax=0.0002,deltim=400 - iguess=-1, - oneobtest=.false.,retrieval=.false.,l_foto=.false., - use_pbl=.false.,use_compress=.true.,nsig_ext=56,gpstop=55., - use_gfs_nemsio=.false.,lrun_subdirs=.true.,use_readin_anl_sfcmask=.true., - crtm_coeffs_path='./crtm_coeffs/', - newpc4pred=.true.,adp_anglebc=.true.,angord=4,passive_bc=.true.,use_edges=.false., - diag_precon=.true.,step_start=1.e-3,emiss_bc=.true.,thin4d=.true.,cwoption=3, - verbose=.false.,imp_physics=11,lupp=.true., - binary_diag=.false.,netcdf_diag=.true., - lobsdiag_forenkf=.false., - nhr_anal=3,6,9, - l4densvar=.true.,ens_nstarthr=3,nhr_obsbin=1,nhr_assimilation=6,lwrite4danl=.true., - tzr_qc=1,sfcnst_comb=.true., - write_fv3_incr=.true.,incvars_to_zero= 'liq_wat_inc','icmr_inc',incvars_zero_strat='sphum_inc','liq_wat_inc','icmr_inc', - incvars_efold=5, - use_gfs_ncio=.true., - $SETUP - / - &GRIDOPTS - JCAP_B=$JCAP_B,JCAP=$JCAP,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS, - regional=.false., - $GRIDOPTS - / - &BKGERR - vs=0.7, - hzscl=1.7,0.8,0.5, - hswgt=0.45,0.3,0.25, - bw=0.0,norsp=4, - bkgv_flowdep=.true.,bkgv_rewgtfct=1.5, - bkgv_write=.false., - cwcoveqqcov=.false., - $BKGVERR - / - &ANBKGERR - anisotropic=.false., - $ANBKGERR - / - &JCOPTS - ljcdfi=.false.,alphajc=0.0,ljcpdry=.true.,bamp_jcpdry=5.0e7, - ljc4tlevs=.true., - $JCOPTS - / - &STRONGOPTS - tlnmc_option=3,nstrong=1,nvmodes_keep=8,period_max=6.,period_width=1.5, - baldiag_full=.false.,baldiag_inc=.false., - $STRONGOPTS - / - &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.true.,oberrflg=.false.,c_varqc=0.04, - use_poq7=.true.,qc_noirjaco3_pole=.true.,vqc=.false., - aircraft_t_bc=.true.,biaspredt=1.0e5,upd_aircraft=.true.,cleanup_tail=.true. - nvqc=.true., - $OBSQC - / - &OBS_INPUT - dmesh(1)=1450.0,dmesh(2)=1500.0,dmesh(3)=1000.0,time_window_max=3.0, - $OBSINPUT - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 0.0 0 0 - prepbufr t null t 0.0 0 0 - prepbufr_profl t null t 0.0 0 0 - prepbufr q null q 0.0 0 0 - prepbufr_profl q null q 0.0 0 0 - prepbufr pw null pw 0.0 0 0 - prepbufr uv null uv 0.0 0 0 - prepbufr_profl uv null uv 0.0 0 0 - satwndbufr uv null uv 0.0 0 0 - prepbufr spd null spd 0.0 0 0 - prepbufr dw null dw 0.0 0 0 - radarbufr rw null rw 0.0 0 0 - nsstbufr sst nsst sst 0.0 0 0 - gpsrobufr gps_bnd null gps 0.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 0.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 0.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 - hirs3bufr hirs3 n17 hirs3_n17 0.0 1 0 - hirs4bufr hirs4 metop-a hirs4_metop-a 0.0 1 1 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 0.0 1 1 - amsuabufr amsua n15 amsua_n15 0.0 1 1 - amsuabufr amsua n18 amsua_n18 0.0 1 1 - amsuabufr amsua metop-a amsua_metop-a 0.0 1 1 - airsbufr amsua aqua amsua_aqua 0.0 1 1 - amsubbufr amsub n17 amsub_n17 0.0 1 1 - mhsbufr mhs n18 mhs_n18 0.0 1 1 - mhsbufr mhs metop-a mhs_metop-a 0.0 1 1 - ssmitbufr ssmi f15 ssmi_f15 0.0 1 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 1 0 - amsrebufr amsre_mid aqua amsre_aqua 0.0 1 0 - amsrebufr amsre_hig aqua amsre_aqua 0.0 1 0 - ssmisbufr ssmis f16 ssmis_f16 0.0 1 0 - ssmisbufr ssmis f17 ssmis_f17 0.0 1 0 - ssmisbufr ssmis f18 ssmis_f18 0.0 1 0 - gsnd1bufr sndrd1 g12 sndrD1_g12 0.0 1 0 - gsnd1bufr sndrd2 g12 sndrD2_g12 0.0 1 0 - gsnd1bufr sndrd3 g12 sndrD3_g12 0.0 1 0 - gsnd1bufr sndrd4 g12 sndrD4_g12 0.0 1 0 - gsnd1bufr sndrd1 g11 sndrD1_g11 0.0 1 0 - gsnd1bufr sndrd2 g11 sndrD2_g11 0.0 1 0 - gsnd1bufr sndrd3 g11 sndrD3_g11 0.0 1 0 - gsnd1bufr sndrd4 g11 sndrD4_g11 0.0 1 0 - gsnd1bufr sndrd1 g13 sndrD1_g13 0.0 1 0 - gsnd1bufr sndrd2 g13 sndrD2_g13 0.0 1 0 - gsnd1bufr sndrd3 g13 sndrD3_g13 0.0 1 0 - gsnd1bufr sndrd4 g13 sndrD4_g13 0.0 1 0 - iasibufr iasi metop-a iasi_metop-a 0.0 1 1 - gomebufr gome metop-a gome_metop-a 0.0 2 0 - omibufr omi aura omi_aura 0.0 2 0 - sbuvbufr sbuv2 n19 sbuv8_n19 0.0 0 0 - hirs4bufr hirs4 n19 hirs4_n19 0.0 1 1 - amsuabufr amsua n19 amsua_n19 0.0 1 1 - mhsbufr mhs n19 mhs_n19 0.0 1 1 - tcvitl tcp null tcp 0.0 0 0 - seviribufr seviri m08 seviri_m08 0.0 1 0 - seviribufr seviri m09 seviri_m09 0.0 1 0 - seviribufr seviri m10 seviri_m10 0.0 1 0 - seviribufr seviri m11 seviri_m11 0.0 1 0 - hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 1 1 - amsuabufr amsua metop-b amsua_metop-b 0.0 1 1 - mhsbufr mhs metop-b mhs_metop-b 0.0 1 1 - iasibufr iasi metop-b iasi_metop-b 0.0 1 1 - gomebufr gome metop-b gome_metop-b 0.0 2 0 - atmsbufr atms npp atms_npp 0.0 1 1 - atmsbufr atms n20 atms_n20 0.0 1 1 - crisbufr cris npp cris_npp 0.0 1 0 - crisfsbufr cris-fsr npp cris-fsr_npp 0.0 1 0 - crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 1 0 - gsnd1bufr sndrd1 g14 sndrD1_g14 0.0 1 0 - gsnd1bufr sndrd2 g14 sndrD2_g14 0.0 1 0 - gsnd1bufr sndrd3 g14 sndrD3_g14 0.0 1 0 - gsnd1bufr sndrd4 g14 sndrD4_g14 0.0 1 0 - gsnd1bufr sndrd1 g15 sndrD1_g15 0.0 1 0 - gsnd1bufr sndrd2 g15 sndrD2_g15 0.0 1 0 - gsnd1bufr sndrd3 g15 sndrD3_g15 0.0 1 0 - gsnd1bufr sndrd4 g15 sndrD4_g15 0.0 1 0 - oscatbufr uv null uv 0.0 0 0 - mlsbufr mls30 aura mls30_aura 0.0 0 0 - avhambufr avhrr metop-a avhrr3_metop-a 0.0 1 0 - avhpmbufr avhrr n18 avhrr3_n18 0.0 1 0 - avhambufr avhrr metop-b avhrr3_metop-b 0.0 1 0 - avhpmbufr avhrr n19 avhrr3_n19 0.0 1 0 - amsr2bufr amsr2 gcom-w1 amsr2_gcom-w1 0.0 3 0 - gmibufr gmi gpm gmi_gpm 0.0 3 0 - saphirbufr saphir meghat saphir_meghat 0.0 3 0 - ahibufr ahi himawari8 ahi_himawari8 0.0 1 0 - abibufr abi g16 abi_g16 0.0 1 0 - abibufr abi g17 abi_g17 0.0 1 0 - rapidscatbufr uv null uv 0.0 0 0 - ompsnpbufr ompsnp npp ompsnp_npp 0.0 0 0 - ompstcbufr ompstc8 npp ompstc8_npp 0.0 2 0 - amsuabufr amsua metop-c amsua_metop-c 0.0 1 1 - mhsbufr mhs metop-c mhs_metop-c 0.0 1 1 - iasibufr iasi metop-c iasi_metop-c 0.0 1 1 - ompslpbufr ompslp npp ompslp_npp 0.0 1 1 - abibufr abi g18 abi_g18 0.0 1 0 - ahibufr ahi himawari9 ahi_himawari9 0.0 1 0 - atmsbufr atms n21 atms_n21 0.0 1 1 - crisfsbufr cris-fsr n21 cris-fsr_n21 0.0 1 0 - sstviirs viirs-m j2 viirs-m_j2 0.0 4 0 - ompsnpbufr ompsnp n21 ompsnp_n21 0.0 0 0 - ompstcbufr ompstc8 n21 ompstc8_n21 0.0 2 0 - gomebufr gome metop-c gome_metop-c 0.0 2 0 -:: - &SUPEROB_RADAR - $SUPERRAD - / - &LAG_DATA - $LAGDATA - / - &HYBRID_ENSEMBLE - l_hyb_ens=.true.,n_ens=20,beta_s0=0.125,readin_beta=.false.,s_ens_h=800,s_ens_v=-0.8,generate_ens=.false.,uv_hyb_ens=.true.,jcap_ens=190, - nlat_ens=194,nlon_ens=384,aniso_a_en=.false.,jcap_ens_test=62,oz_univ_static=.false.,readin_localization=.true.,ensemble_path='./ensemble_data/', - ens_fast_read=.true.,write_ens_sprd=.false., - $HYBRID_ENSEMBLE - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - - / - &SINGLEOB_TEST - maginnov=0.1,magoberr=0.1,oneob_type='t', - oblat=45.,oblon=180.,obpres=1000.,obdattim=${global_4denvar_T670_adate}, - obhourset=0., - $SINGLEOB - / - &NST - nst_gsi=3,nstinfo=4,fac_dtl=1,fac_tsl=1,zsea1=0,zsea2=0, - $NST - / -" -;; - - RTMA) - -# Define namelist for RTMA runs - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=10,niter(2)=10, - write_diag(1)=.true.,write_diag(2)=.true.,write_diag(3)=.true., - gencode=78,qoption=1,tsensible=.true. - factqmin=1.0,factqmax=1.0,factv=0.0,factcldch=0.0,factw10m=1.0,deltim=$DELTIM, - iguess=-1, - oneobtest=.false.,retrieval=.false., - diag_rad=.false.,diag_pcp=.false.,diag_ozone=.false.,diag_aero=.false., - nhr_assimilation=6,min_offset=180,use_compress=.false.,lrun_subdirs=.true., - use_similarity_2dvar=.true., - neutral_stability_windfact_2dvar=.false., - use_prepb_satwnd=.false., - $SETUP - / - &GRIDOPTS - JCAP=$JCAP,JCAP_B=$JCAP_B,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS, - wrf_nmm_regional=.false.,wrf_mass_regional=.false.,twodvar_regional=.true., - diagnostic_reg=.false., - filled_grid=.false.,half_grid=.true.,netcdf=.false., - / - &BKGERR - hzscl=1.414,1.000,0.707, - vs=0.5,bw=0.0, - / - &ANBKGERR - anisotropic=.true.,an_vs=0.5,ngauss=1, - an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., - ifilt_ord=2,npass=3,normal=-200,grid_ratio=1.,nord_f2a=4, - rtma_subdomain_option=.true.,triad4=.true.,nsmooth=0,nsmooth_shapiro=0,lreadnorm=.true., - / - &JCOPTS - / - &STRONGOPTS - nstrong=1,nvmodes_keep=20,period_max=3., - baldiag_full=.true.,baldiag_inc=.true., - / - &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.true.,c_varqc=0.02,vadfile='prepbufr',hilbert_curve=.true., - buddycheck_t=.false.,buddydiag_save=.false.,oberrflg=.true.,njqc=.true.,vqc=.false., - $OBSQC - / - &OBS_INPUT - dmesh(1)=60.0,dmesh(2)=60.0,dmesh(3)=60.0,dmesh(4)=60.0,time_window_max=3.0, - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 1.0 0 0 - prepbufr t null t 1.0 0 0 - prepbufr q null q 1.0 0 0 - prepbufr uv null uv 1.0 0 0 - satwndbufr uv null uv 1.0 0 0 - prepbufr spd null spd 1.0 0 0 - prepbufr wspd10m null wspd10m 1.0 0 0 - satwnd wspd10m null wspd10m 1.0 0 0 - prepbufr uwnd10m null uwnd10m 1.0 0 0 - satwnd uwnd10m null uwnd10m 1.0 0 0 - prepbufr vwnd10m null vwnd10m 1.0 0 0 - satwnd vwnd10m null vwnd10m 1.0 0 0 - prepbufr gust null gust 1.0 0 0 - prepbufr vis null vis 1.0 0 0 - prepbufr td2m null td2m 1.0 0 0 - mxtmdat mxtm null mxtm 1.0 0 0 - mitmdat mitm null mitm 1.0 0 0 - prepbufr mxtm null mxtm 1.0 0 0 - prepbufr mitm null mitm 1.0 0 0 - prepbufr pmsl null pmsl 1.0 0 0 - prepbufr howv null howv 1.0 0 0 - satmar howv null howv 1.0 0 0 - prepbufr tcamt null tcamt 1.0 0 0 - goessky tcamt null tcamt 1.0 0 0 - prepbufr cldch null cldch 1.0 0 0 -:: - &SUPEROB_RADAR - / - &LAG_DATA - / - &HYBRID_ENSEMBLE - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - l_closeobs=.true. + dfi_radar_latent_heat_time_period=20.0, + metar_impact_radius=10.0, + metar_impact_radius_lowCloud=4.0, + l_gsd_terrain_match_surfTobs=.true., + l_sfcobserror_ramp_t=.true., + l_sfcobserror_ramp_q=.true., + l_PBL_pseudo_SurfobsT=.false., + l_PBL_pseudo_SurfobsQ=.false., + l_PBL_pseudo_SurfobsUV=.false., + pblH_ration=0.4, + pps_press_incr=40.0, + l_gsd_limit_ocean_q=.true., + l_pw_hgt_adjust=.true., + l_limit_pw_innov=.true., + max_innov_pct=0.1, + l_cleanSnow_WarmTs=.true., + r_cleanSnow_WarmTs_threshold=5.0, + l_conserve_thetaV=.true., + i_conserve_thetaV_iternum=3, + l_gsd_soilTQ_nudge=.false., + l_cld_bld=.true., + l_numconc=.true., + l_closeobs=.true., + cld_bld_hgt=1200.0, + build_cloud_frac_p=0.50, + clear_cloud_frac_p=0.10, + iclean_hydro_withRef_allcol=1, + i_use_2mQ4B=2, + i_use_2mT4B=1, + i_gsdcldanal_type=0, + i_gsdsfc_uselist=1, + i_lightpcp=1, + i_sfct_gross=1, + i_coastline=3, + i_gsdqc=2, / &CHEM / - &SINGLEOB_TEST - maginnov=0.1,magoberr=0.1,oneob_type='t', - oblat=36.,oblon=260.,obpres=1000.,obdattim=${adate}, - obhourset=0., - / &NST / -" -;; - - arw_binary) - -# Define namelist for arw binary run - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=50,niter(2)=50, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - gencode=78,qoption=2, - factqmin=0.0,factqmax=0.0,deltim=$DELTIM, - iguess=-1, - oneobtest=.false.,retrieval=.false., - nhr_assimilation=3,l_foto=.false., - use_pbl=.false.,use_compress=.false.,nsig_ext=13,gpstop=30., - lrun_subdirs=.true., - $SETUP - / - &GRIDOPTS - JCAP=$JCAP,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS, - wrf_nmm_regional=.false.,wrf_mass_regional=.true.,diagnostic_reg=.false., - filled_grid=.false.,half_grid=.true.,netcdf=$NETCDF, - / - &BKGERR - hzscl=0.373,0.746,1.50, - vs=1.0,bw=0.,fstat=.true., - / - &ANBKGERR - anisotropic=.false.,an_vs=1.0,ngauss=1, - an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., - ifilt_ord=2,npass=3,normal=-200,grid_ratio=4.,nord_f2a=4, - / - &JCOPTS - / - &STRONGOPTS - nstrong=0,nvmodes_keep=20,period_max=3., - baldiag_full=.true.,baldiag_inc=.true., - / - &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.true.,c_varqc=0.02,vadfile='prepbufr',oberrflg=.false.,njqc=.false.,vqc=.true., - / - &OBS_INPUT - dmesh(1)=120.0,dmesh(2)=60.0,dmesh(3)=60.0,dmesh(4)=60.0,dmesh(5)=120,time_window_max=1.5, - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 1.0 0 0 - prepbufr t null t 1.0 0 0 - prepbufr q null q 1.0 0 0 - prepbufr uv null uv 1.0 0 0 - satwndbufr uv null uv 1.0 0 0 - prepbufr spd null spd 1.0 0 0 - radarbufr rw null l3rw 1.0 0 0 - l2rwbufr rw null l2rw 1.0 0 0 - prepbufr dw null dw 1.0 0 0 - prepbufr sst null sst 1.0 0 0 - prepbufr pw null pw 1.0 0 0 - gpsrobufr $gps_dtype null gps 1.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 1.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 1.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 1.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 1.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 1.0 0 0 - omi omi aura omi_aura 1.0 6 0 - hirs2bufr hirs2 n14 hirs2_n14 6.0 1 1 - hirs3bufr hirs3 n16 hirs3_n16 0.0 1 1 - hirs3bufr hirs3 n17 hirs3_n17 6.0 1 1 - hirs4bufr hirs4 n18 hirs4_n18 0.0 1 1 - hirs4bufr hirs4 metop-a hirs4_metop-a 6.0 1 1 - gsndrbufr sndr g11 sndr_g11 0.0 1 0 - gsndrbufr sndr g12 sndr_g12 0.0 1 0 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 20.0 1 1 - msubufr msu n14 msu_n14 2.0 2 1 - amsuabufr amsua n15 amsua_n15 10.0 2 1 - amsuabufr amsua n16 amsua_n16 0.0 2 1 - amsuabufr amsua n17 amsua_n17 0.0 2 1 - amsuabufr amsua n18 amsua_n18 10.0 2 1 - amsuabufr amsua metop-a amsua_metop-a 10.0 2 1 - airsbufr amsua aqua amsua_aqua 5.0 2 1 - amsubbufr amsub n15 amsub_n15 3.0 3 1 - amsubbufr amsub n16 amsub_n16 3.0 3 1 - amsubbufr amsub n17 amsub_n17 3.0 3 1 - mhsbufr mhs n18 mhs_n18 3.0 3 1 - mhsbufr mhs metop-a mhs_metop-a 3.0 3 1 - ssmitbufr ssmi f13 ssmi_f13 0.0 4 0 - ssmitbufr ssmi f15 ssmi_f15 0.0 4 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 4 1 - amsrebufr amsre_mid aqua amsre_aqua 0.0 4 1 - amsrebufr amsre_hig aqua amsre_aqua 0.0 4 1 - ssmisbufr ssmis f16 ssmis_f16 0.0 4 1 - gsnd1bufr sndrd1 g12 sndrD1_g12 1.5 5 0 - gsnd1bufr sndrd2 g12 sndrD2_g12 1.5 5 0 - gsnd1bufr sndrd3 g12 sndrD3_g12 1.5 5 0 - gsnd1bufr sndrd4 g12 sndrD4_g12 1.5 5 0 - gsnd1bufr sndrd1 g11 sndrD1_g11 1.5 5 0 - gsnd1bufr sndrd2 g11 sndrD2_g11 1.5 5 0 - gsnd1bufr sndrd3 g11 sndrD3_g11 1.5 5 0 - gsnd1bufr sndrd4 g11 sndrD4_g11 1.5 5 0 - gsnd1bufr sndrd1 g13 sndrD1_g13 1.5 5 0 - gsnd1bufr sndrd2 g13 sndrD2_g13 1.5 5 0 - gsnd1bufr sndrd3 g13 sndrD3_g13 1.5 5 0 - gsnd1bufr sndrd4 g13 sndrD4_g13 1.5 5 0 - iasibufr iasi metop-a iasi_metop-a 20.0 1 1 - gomebufr gome metop-a gome_metop-a 1.0 6 0 - mlsbufr mls30 aura mls30_aura 1.0 0 0 - oscatbufr uv null uv 1.0 0 0 - ompsnpbufr ompsnp npp ompsnp_npp 1.0 0 0 - ompstcbufr ompstc8 npp ompstc8_npp 1.0 6 0 -:: - &SUPEROB_RADAR - del_azimuth=5.,del_elev=.25,del_range=5000.,del_time=.5,elev_angle_max=5.,minnum=50,range_max=100000., - l2superob_only=.false., - / - &LAG_DATA - / - &HYBRID_ENSEMBLE - l_hyb_ens=${HYBENS_REGIONAL}, - n_ens=${ENSEMBLE_SIZE_REGIONAL}, - uv_hyb_ens=${HYBENS_UV_REGIONAL}, - beta_s0=${BETA_S0_REGIONAL}, - readin_beta=.false., - s_ens_h=${HYBENS_HOR_SCALE_REGIONAL}, - s_ens_v=${HYBENS_VER_SCALE_REGIONAL}, - generate_ens=${GENERATE_ENS_REGIONAL}, - aniso_a_en=${HYBENS_ANISO_REGIONAL}, - nlon_ens=${NLON_ENS_REGIONAL}, - nlat_ens=${NLAT_ENS_REGIONAL}, - jcap_ens=${JCAP_ENS_REGIONAL}, - jcap_ens_test=${JCAP_ENS_TEST_REGIONAL}, - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - / &SINGLEOB_TEST - maginnov=0.1,magoberr=0.1,oneob_type='t', - oblat=45.,oblon=270.,obpres=850.,obdattim=${adate}, + maginnov=1.0,magoberr=0.8,oneob_type='t', + oblat=38.,oblon=279.,obpres=500.,obdattim=2020040500, obhourset=0., / - &NST - / " ;; - - arw_netcdf) - -# Define namelist for arw netcdf run - + hafs_envar) +# Define namelist for hafs 3denvar run with global ensembles export gsi_namelist=" &SETUP - miter=2,niter(1)=50,niter(2)=50, + miter=2,niter(1)=5,niter(2)=5, + niter_no_qc(1)=2,niter_no_qc(2)=0, write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - gencode=78,qoption=2, - factqmin=0.0,factqmax=0.0,deltim=$DELTIM, + qoption=2, + gencode=78,deltim=1200, + factqmin=0.0,factqmax=0.0, iguess=-1, - oneobtest=.false.,retrieval=.false., - nhr_assimilation=3,l_foto=.false., - use_pbl=.false.,use_compress=.false.,nsig_ext=13,gpstop=30., + aircraft_recon=.true., + oneobtest=.false.,retrieval=.false.,l_foto=.false., + nhr_assimilation=6, + use_pbl=.true.,use_compress=.false.,nsig_ext=14,gpstop=50., + use_gfs_nemsio=.false.,use_gfs_ncio=.true., + print_diag_pcg=.true.,l2rwthin=.false.,hurricane_radar=.true., + use_gfs_ozone=.false.,l4densvar=${l4densvar},nhr_obsbin=${nhr_obsbin}, lrun_subdirs=.true., - $SETUP + netcdf_diag=.true.,binary_diag=.false., + newpc4pred=.true., adp_anglebc=.true., angord=4, + passive_bc=.false., use_edges=.false., emiss_bc=.true., + diag_precon=.true., step_start=1.e-3, upd_pred(1)=0, + upd_pred(2)=0,upd_pred(3)=0,upd_pred(4)=0, + upd_pred(5)=0,upd_pred(6)=0,upd_pred(7)=0, + upd_pred(8)=0,upd_pred(9)=0,upd_pred(10)=0, + upd_pred(11)=0,upd_pred(12)=0, + lread_obs_save=.false., + lread_obs_skip=.false., + ens_nstarthr=6, + lwrite_predterms=.false.,lwrite_peakwt=.false.,reduce_diag=.false., / &GRIDOPTS - JCAP=$JCAP,JCAP_B=$JCAP_B,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS, - wrf_nmm_regional=.false.,wrf_mass_regional=.true.,diagnostic_reg=.false., - filled_grid=.false.,half_grid=.true.,netcdf=$NETCDF, + fv3_regional=.true.,grid_ratio_fv3_regional=1,nvege_type=20, / &BKGERR - hzscl=0.373,0.746,1.50, - vs=1.0,bw=0.,fstat=.true., - / + vs=1.0, + hzscl=0.2,0.4,0.8, + bw=0., + fstat=.false., +/ &ANBKGERR anisotropic=.false.,an_vs=1.0,ngauss=1, an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., @@ -1276,309 +574,209 @@ export gsi_namelist=" &JCOPTS / &STRONGOPTS - nstrong=0,nvmodes_keep=20,period_max=3., - baldiag_full=.true.,baldiag_inc=.true., - / - &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.true.,c_varqc=0.02,vadfile='prepbufr',oberrflg=.false.,njqc=.false.,vqc=.true., - / - &OBS_INPUT - dmesh(1)=120.0,dmesh(2)=60.0,dmesh(3)=60.0,dmesh(4)=60.0,dmesh(5)=120,time_window_max=1.5, - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 1.0 0 0 - prepbufr t null t 1.0 0 0 - prepbufr q null q 1.0 0 0 - prepbufr uv null uv 1.0 0 0 - satwndbufr uv null uv 1.0 0 0 - prepbufr spd null spd 1.0 0 0 - radarbufr rw null l3rw 1.0 0 0 - l2rwbufr rw null l2rw 1.0 0 0 - prepbufr dw null dw 1.0 0 0 - prepbufr sst null sst 1.0 0 0 - prepbufr pw null pw 1.0 0 0 - gpsrobufr $gps_dtype null gps 1.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 1.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 1.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 1.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 1.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 1.0 0 0 - omi omi aura omi_aura 1.0 6 0 - hirs2bufr hirs2 n14 hirs2_n14 6.0 1 1 - hirs3bufr hirs3 n16 hirs3_n16 0.0 1 1 - hirs3bufr hirs3 n17 hirs3_n17 6.0 1 1 - hirs4bufr hirs4 n18 hirs4_n18 0.0 1 1 - hirs4bufr hirs4 metop-a hirs4_metop-a 6.0 1 1 - gsndrbufr sndr g11 sndr_g11 0.0 1 0 - gsndrbufr sndr g12 sndr_g12 0.0 1 0 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 20.0 1 1 - msubufr msu n14 msu_n14 2.0 2 1 - amsuabufr amsua n15 amsua_n15 10.0 2 1 - amsuabufr amsua n16 amsua_n16 0.0 2 1 - amsuabufr amsua n17 amsua_n17 0.0 2 1 - amsuabufr amsua n18 amsua_n18 10.0 2 1 - amsuabufr amsua metop-a amsua_metop-a 10.0 2 1 - airsbufr amsua aqua amsua_aqua 5.0 2 1 - amsubbufr amsub n15 amsub_n15 3.0 3 1 - amsubbufr amsub n16 amsub_n16 3.0 3 1 - amsubbufr amsub n17 amsub_n17 3.0 3 1 - mhsbufr mhs n18 mhs_n18 3.0 3 1 - mhsbufr mhs metop-a mhs_metop-a 3.0 3 1 - ssmitbufr ssmi f13 ssmi_f13 0.0 4 0 - ssmitbufr ssmi f15 ssmi_f15 0.0 4 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 4 1 - amsrebufr amsre_mid aqua amsre_aqua 0.0 4 1 - amsrebufr amsre_hig aqua amsre_aqua 0.0 4 1 - ssmisbufr ssmis f16 ssmis_f16 0.0 4 1 - gsnd1bufr sndrd1 g12 sndrD1_g12 1.5 5 0 - gsnd1bufr sndrd2 g12 sndrD2_g12 1.5 5 0 - gsnd1bufr sndrd3 g12 sndrD3_g12 1.5 5 0 - gsnd1bufr sndrd4 g12 sndrD4_g12 1.5 5 0 - gsnd1bufr sndrd1 g11 sndrD1_g11 1.5 5 0 - gsnd1bufr sndrd2 g11 sndrD2_g11 1.5 5 0 - gsnd1bufr sndrd3 g11 sndrD3_g11 1.5 5 0 - gsnd1bufr sndrd4 g11 sndrD4_g11 1.5 5 0 - gsnd1bufr sndrd1 g13 sndrD1_g13 1.5 5 0 - gsnd1bufr sndrd2 g13 sndrD2_g13 1.5 5 0 - gsnd1bufr sndrd3 g13 sndrD3_g13 1.5 5 0 - gsnd1bufr sndrd4 g13 sndrD4_g13 1.5 5 0 - iasibufr iasi metop-a iasi_metop-a 20.0 1 1 - gomebufr gome metop-a gome_metop-a 1.0 6 0 - mlsbufr mls30 aura mls30_aura 1.0 0 0 - oscatbufr uv null uv 1.0 0 0 - ompsnpbufr ompsnp npp ompsnp_npp 1.0 0 0 - ompstcbufr ompstc8 npp ompstc8_npp 1.0 6 0 -:: - &SUPEROB_RADAR - del_azimuth=5.,del_elev=.25,del_range=5000.,del_time=.5,elev_angle_max=5.,minnum=50,range_max=100000., - l2superob_only=.false., - / - &LAG_DATA - / - &HYBRID_ENSEMBLE - l_hyb_ens=${HYBENS_REGIONAL}, - n_ens=${ENSEMBLE_SIZE_REGIONAL}, - uv_hyb_ens=${HYBENS_UV_REGIONAL}, - beta_s0=${BETA_S0_REGIONAL}, - readin_beta=.false., - s_ens_h=${HYBENS_HOR_SCALE_REGIONAL}, - s_ens_v=${HYBENS_VER_SCALE_REGIONAL}, - generate_ens=${GENERATE_ENS_REGIONAL}, - aniso_a_en=${HYBENS_ANISO_REGIONAL}, - nlon_ens=${NLON_ENS_REGIONAL}, - nlat_ens=${NLAT_ENS_REGIONAL}, - jcap_ens=${JCAP_ENS_REGIONAL}, - jcap_ens_test=${JCAP_ENS_TEST_REGIONAL}, - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - / - &SINGLEOB_TEST - maginnov=0.1,magoberr=0.1,oneob_type='t', - oblat=45.,oblon=270.,obpres=850.,obdattim=${adate}, - obhourset=0., - / - &NST - / -" -;; - - rrfs_3denvar_glbens) - -# Define namelist for rrfs 3d hybrid envar run with global ensembles - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=25,niter(2)=25, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - qoption=2,print_obs_para=.true.,diag_radardbz=.false., - if_model_dbz=.false., static_gsi_nopcp_dbz=0.0, - rmesh_dbz=4.0,rmesh_vr=4.0,zmesh_dbz=1000.0,zmesh_vr=1000.0, - missing_to_nopcp=.false.,radar_no_thinning=.true., - gencode=78,factqmin=0.0,factqmax=0.0, - iguess=-1, - lread_obs_save=.false.,lread_obs_skip=.false., - oneobtest=.false.,retrieval=.false., - nhr_assimilation=3,l_foto=.false., - use_pbl=.false.,use_prepb_satwnd=.false., - newpc4pred=.true.,adp_anglebc=.true.,angord=4, - passive_bc=.true.,use_edges=.false.,emiss_bc=.true., - diag_precon=.true.,step_start=1.e-3, - l4densvar=.false.,nhr_obsbin=3, - use_gfs_nemsio=.false.,use_gfs_ncio=.true.,reset_bad_radbc=.true., - netcdf_diag=.false.,binary_diag=.true., - l_obsprvdiag=.false., - / - &GRIDOPTS - fv3_regional=.true.,grid_ratio_fv3_regional=2.0,nvege_type=20, - fv3_io_layout_y=1, - / - &BKGERR - vs=1.0, - hzscl=0.7,1.4,2.80, - bw=0.,fstat=.true., - usenewgfsberror=.true., -/ - &ANBKGERR - anisotropic=.false., - / - &JCOPTS - / - &STRONGOPTS + tlnmc_option=0,reg_tlnmc_type=1,nstrong=1,nvmodes_keep=8,period_max=6., + period_width=1.5,baldiag_full=.false.,baldiag_inc=.false., / &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.false.,c_varqc=0.02,vadfile='prepbufr', - vadwnd_l2rw_qc=.true., + dfact=0.75,dfact1=3.0,erradar_inflate=1.0,tdrerr_inflate=.true., + noiqc=.true.,c_varqc=0.03333,vadfile='prepbufr',njqc=.false.,vqc=.true.,vadwnd_l2rw_qc=.false., + q_doe_a_136=0.65, + q_doe_b_136=0.0003, + q_doe_a_137=0.75, + q_doe_b_137=0.0003, + t_doe_a_136=0.75, + t_doe_b_136=0.2, + t_doe_a_137=0.7, + t_doe_b_137=0.2, + uv_doe_a_236=0.5, + uv_doe_b_236=0.85, + uv_doe_a_237=0.5, + uv_doe_b_237=0.85, + uv_doe_a_213=0.4, + uv_doe_b_213=1.0, / &OBS_INPUT - dmesh(1)=120.0,dmesh(2)=60.0,dmesh(3)=30,time_window_max=1.5,time_window_rad=1.0,ext_sonde=.true., + dmesh(1)=90.0,dmesh(2)=45.0,dmesh(3)=45.0,dmesh(4)=45.0,dmesh(5)=90,time_window_max=3.0,l_foreaft_thin=.false., / OBS_INPUT:: ! dfile dtype dplat dsis dval dthin dsfcalc - dbzobs.nc dbz null dbz 1.0 0 0 - prepbufr ps null ps 1.0 0 0 - prepbufr t null t 1.0 0 0 - prepbufr q null q 1.0 0 0 - prepbufr pw null pw 1.0 0 0 - satwndbufr uv null uv 1.0 0 0 - prepbufr uv null uv 1.0 0 0 - prepbufr spd null spd 1.0 0 0 - prepbufr dw null dw 1.0 0 0 - l2rwbufr rw null l2rw 1.0 0 0 - prepbufr sst null sst 1.0 0 0 - gpsrobufr gps_ref null gps 1.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 1.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 1.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 - hirs3bufr hirs3 n16 hirs3_n16 0.0 1 0 - hirs3bufr hirs3 n17 hirs3_n17 0.0 1 0 - hirs4bufr hirs4 metop-a hirs4_metop-a 0.0 2 0 - hirs4bufr hirs4 n18 hirs4_n18 0.0 1 0 - hirs4bufr hirs4 n19 hirs4_n19 0.0 2 0 - hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 2 0 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 0.0 2 0 - amsuabufr amsua n15 amsua_n15 0.0 2 0 - amsuabufr amsua n18 amsua_n18 0.0 2 0 - amsuabufr amsua n19 amsua_n19 0.0 2 0 - amsuabufr amsua metop-a amsua_metop-a 0.0 2 0 - amsuabufr amsua metop-b amsua_metop-b 0.0 2 0 - airsbufr amsua aqua amsua_aqua 0.0 2 0 - amsubbufr amsub n17 amsub_n17 0.0 1 0 - mhsbufr mhs n18 mhs_n18 0.0 2 0 - mhsbufr mhs n19 mhs_n19 0.0 2 0 - mhsbufr mhs metop-a mhs_metop-a 0.0 2 0 - mhsbufr mhs metop-b mhs_metop-b 0.0 2 0 - ssmitbufr ssmi f13 ssmi_f13 0.0 2 0 - ssmitbufr ssmi f14 ssmi_f14 0.0 2 0 - ssmitbufr ssmi f15 ssmi_f15 0.0 2 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 2 0 - amsrebufr amsre_mid aqua amsre_aqua 0.0 2 0 - amsrebufr amsre_hig aqua amsre_aqua 0.0 2 0 - ssmisbufr ssmis f16 ssmis_f16 0.0 2 0 - ssmisbufr ssmis f17 ssmis_f17 0.0 2 0 - ssmisbufr ssmis f18 ssmis_f18 0.0 2 0 - ssmisbufr ssmis f19 ssmis_f19 0.0 2 0 - gsnd1bufr sndrd1 g12 sndrD1_g12 0.0 1 0 - gsnd1bufr sndrd2 g12 sndrD2_g12 0.0 1 0 - gsnd1bufr sndrd3 g12 sndrD3_g12 0.0 1 0 - gsnd1bufr sndrd4 g12 sndrD4_g12 0.0 1 0 - gsnd1bufr sndrd1 g11 sndrD1_g11 0.0 1 0 - gsnd1bufr sndrd2 g11 sndrD2_g11 0.0 1 0 - gsnd1bufr sndrd3 g11 sndrD3_g11 0.0 1 0 - gsnd1bufr sndrd4 g11 sndrD4_g11 0.0 1 0 - gsnd1bufr sndrd1 g13 sndrD1_g13 0.0 1 0 - gsnd1bufr sndrd2 g13 sndrD2_g13 0.0 1 0 - gsnd1bufr sndrd3 g13 sndrD3_g13 0.0 1 0 - gsnd1bufr sndrd4 g13 sndrD4_g13 0.0 1 0 - gsnd1bufr sndrd1 g15 sndrD1_g15 0.0 2 0 - gsnd1bufr sndrd2 g15 sndrD2_g15 0.0 2 0 - gsnd1bufr sndrd3 g15 sndrD3_g15 0.0 2 0 - gsnd1bufr sndrd4 g15 sndrD4_g15 0.0 2 0 - iasibufr iasi metop-a iasi_metop-a 0.0 2 0 - gomebufr gome metop-a gome_metop-a 0.0 2 0 - atmsbufr atms npp atms_npp 0.0 2 0 - atmsbufr atms n20 atms_n20 0.0 2 0 - crisbufr cris npp cris_npp 0.0 2 0 - crisfsbufr cris-fsr npp cris-fsr_npp 0.0 2 0 - crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 2 0 - abibufr abi g16 abi_g16 0.0 2 0 - mlsbufr mls30 aura mls30_aura 0.0 0 0 - oscatbufr uv null uv 0.0 0 0 - prepbufr mta_cld null mta_cld 1.0 0 0 - prepbufr gos_ctp null gos_ctp 1.0 0 0 - refInGSI rad_ref null rad_ref 1.0 0 0 - lghtInGSI lghtn null lghtn 1.0 0 0 - larcInGSI larccld null larccld 1.0 0 0 + prepbufr ps null ps 0.0 0 0 + prepbufr t null t 0.0 0 0 + prepbufr_profl t null t 0.0 0 0 + prepbufr q null q 0.0 0 0 + prepbufr_profl q null q 0.0 0 0 + prepbufr pw null pw 0.0 0 0 + prepbufr uv null uv 0.0 0 0 + prepbufr_profl uv null uv 0.0 0 0 + satwndbufr uv null uv 0.0 0 0 + satwhrbufr uv null uv 0.0 0 0 + prepbufr spd null spd 0.0 0 0 + prepbufr dw null dw 0.0 0 0 + radarbufr rw null rw 0.0 0 0 + prepbufr sst null sst 0.0 0 0 + tcvitl tcp null tcp 0.0 0 0 + tldplrbufr rw null rw 0.0 0 0 + l2rwbufr rw null l2rw 0.0 0 0 + hdobbufr uv null uv 0.0 0 0 + hdobbufr t null t 0.0 0 0 + hdobbufr q null q 0.0 0 0 + hdobbufr spd null spd 0.0 0 0 + gpsrobufr gps_bnd null gps 0.0 0 0 + ssmirrbufr pcp_ssmi dmsp pcp_ssmi 0.0 -1 0 + tmirrbufr pcp_tmi trmm pcp_tmi 0.0 -1 0 + sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 + sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 + sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 + hirs3bufr hirs3 n17 hirs3_n17 0.0 1 0 + hirs4bufr hirs4 metop-a hirs4_metop-a 0.0 1 1 + gimgrbufr goes_img g11 imgr_g11 0.0 1 0 + gimgrbufr goes_img g12 imgr_g12 0.0 1 0 + airsbufr airs aqua airs_aqua 0.0 1 1 + amsuabufr amsua n15 amsua_n15 0.0 2 1 + amsuabufr amsua n18 amsua_n18 0.0 2 1 + amsuabufr amsua metop-a amsua_metop-a 0.0 2 1 + airsbufr amsua aqua amsua_aqua 0.0 2 1 + amsubbufr amsub n17 amsub_n17 0.0 3 1 + mhsbufr mhs n18 mhs_n18 0.0 3 1 + mhsbufr mhs metop-a mhs_metop-a 0.0 3 1 + ssmitbufr ssmi f15 ssmi_f15 0.0 1 0 + amsrebufr amsre_low aqua amsre_aqua 0.0 4 0 + amsrebufr amsre_mid aqua amsre_aqua 0.0 4 0 + amsrebufr amsre_hig aqua amsre_aqua 0.0 4 0 + ssmisbufr ssmis f16 ssmis_f16 0.0 4 0 + ssmisbufr ssmis f17 ssmis_f17 0.0 4 0 + ssmisbufr ssmis f18 ssmis_f18 0.0 4 0 + ssmisbufr ssmis f19 ssmis_f19 0.0 4 0 + gsnd1bufr sndrd1 g12 sndrD1_g12 0.0 5 0 + gsnd1bufr sndrd2 g12 sndrD2_g12 0.0 5 0 + gsnd1bufr sndrd3 g12 sndrD3_g12 0.0 5 0 + gsnd1bufr sndrd4 g12 sndrD4_g12 0.0 5 0 + gsnd1bufr sndrd1 g11 sndrD1_g11 0.0 5 0 + gsnd1bufr sndrd2 g11 sndrD2_g11 0.0 5 0 + gsnd1bufr sndrd3 g11 sndrD3_g11 0.0 5 0 + gsnd1bufr sndrd4 g11 sndrD4_g11 0.0 5 0 + gsnd1bufr sndrd1 g13 sndrD1_g13 0.0 5 0 + gsnd1bufr sndrd2 g13 sndrD2_g13 0.0 5 0 + gsnd1bufr sndrd3 g13 sndrD3_g13 0.0 5 0 + gsnd1bufr sndrd4 g13 sndrD4_g13 0.0 5 0 + iasibufr iasi metop-a iasi_metop-a 0.0 1 1 + gomebufr gome metop-a gome_metop-a 0.0 2 0 + omibufr omi aura omi_aura 0.0 2 0 + sbuvbufr sbuv2 n19 sbuv8_n19 0.0 0 0 + hirs4bufr hirs4 n19 hirs4_n19 0.0 1 1 + amsuabufr amsua n19 amsua_n19 0.0 2 1 + mhsbufr mhs n19 mhs_n19 0.0 3 1 + seviribufr seviri m08 seviri_m08 0.0 1 0 + seviribufr seviri m09 seviri_m09 0.0 1 0 + seviribufr seviri m10 seviri_m10 0.0 1 0 + hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 1 0 + amsuabufr amsua metop-b amsua_metop-b 0.0 2 0 + mhsbufr mhs metop-b mhs_metop-b 0.0 3 0 + iasibufr iasi metop-b iasi_metop-b 0.0 1 0 + gomebufr gome metop-b gome_metop-b 0.0 2 0 + atmsbufr atms npp atms_npp 0.0 2 0 + atmsbufr atms n20 atms_n20 0.0 2 0 + crisbufr cris npp cris_npp 0.0 1 0 + crisfsbufr cris-fsr npp cris-fsr_npp 0.0 1 0 + crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 1 0 + gsnd1bufr sndrd1 g14 sndrD1_g14 0.0 5 0 + gsnd1bufr sndrd2 g14 sndrD2_g14 0.0 5 0 + gsnd1bufr sndrd3 g14 sndrD3_g14 0.0 5 0 + gsnd1bufr sndrd4 g14 sndrD4_g14 0.0 5 0 + gsnd1bufr sndrd1 g15 sndrD1_g15 0.0 5 0 + gsnd1bufr sndrd2 g15 sndrD2_g15 0.0 5 0 + gsnd1bufr sndrd3 g15 sndrD3_g15 0.0 5 0 + gsnd1bufr sndrd4 g15 sndrD4_g15 0.0 5 0 + oscatbufr uv null uv 0.0 0 0 + mlsbufr mls30 aura mls30_aura 0.0 0 0 + amsr2bufr amsr2 gcom-w1 amsr2_gcom-w1 0.0 3 0 + gmibufr gmi gpm gmi_gpm 0.0 3 0 + saphirbufr saphir meghat saphir_meghat 0.0 3 0 + ahibufr ahi himawari8 ahi_himawari8 0.0 3 0 :: &SUPEROB_RADAR - del_azimuth=5.,del_elev=.25,del_range=5000.,del_time=.5,elev_angle_max=5.,minnum=50,range_max=100000., l2superob_only=.false., - / + del_azimuth=5.,del_elev=.25,del_range=10000.,del_time=1.0,elev_angle_max=5.,minnum=1,range_max=200000., + l2superob_only=.false.,radar_sites=.false., + radar_box=.true.,radar_rmesh=10,radar_zmesh=500, + / +SUPEROB_RADAR:: + KBRO 1 + KCRP 1 + KEWX 1 + KGRX 1 + KDFX 1 + KHGX 1 + KLCH 1 + KLIX 1 + KPOE 1 + KSHV 1 + KDGX 1 + KMOB 1 + KEVX 1 + KEOX 1 + KMXX 1 + KBMX 1 + KTLH 1 + KTBW 1 + KBYX 1 + KAMX 1 + KMLB 1 + KJAX 1 + KVAX 1 + KJGX 1 + KFFC 1 + KCLX 1 + KCAE 1 + KGSP 1 + KLTX 1 + KMHX 1 + KRAX 1 + KAKQ 1 + KFCX 1 + KLWX 1 + KDOX 1 + KCCX 1 + KDIX 1 + KOKX 1 + KENX 1 + KBGM 1 + KCXX 1 + KBOX 1 + KGYX 1 + KCBW 1 + TJUA 1 + PHWA 1 + PHKI 1 + PHMO 1 + PHKM 1 +:: +/ &LAG_DATA / &HYBRID_ENSEMBLE - l_hyb_ens=${ifhyb}, + l_hyb_ens=.true., + n_ens=${N_ENS}, uv_hyb_ens=.true., - q_hyb_ens=.false., - aniso_a_en=.false.,generate_ens=.false., - n_ens=${nummem}, - beta_s0=0.15,s_ens_h=110,s_ens_v=3, - regional_ensemble_option=1, - pseudo_hybens = .false., - grid_ratio_ens = 3, - l_ens_in_diff_time=.true., - ensemble_path='', - i_en_perts_io=1, - jcap_ens=574, - fv3sar_bg_opt=0, - readin_localization=.true., - ens_fast_read=.false., + beta_s0=${BETA_S0}, + s_ens_h=150, + s_ens_v=-0.5, + readin_localization=.false., + generate_ens=.false., + regional_ensemble_option=${REGIONAL_ENSEMBLE_OPTION}, + grid_ratio_ens=${GRID_RATIO_ENS}, + pseudo_hybens=.false., + merge_two_grid_ensperts=F, + pwgtflg=F, + aniso_a_en=.false., + nlon_ens=387, + nlat_ens=777, + write_ens_sprd=F, + l_both_fv3sar_gfs_ens=${l_both_fv3sar_gfs_ens}, + n_ens_gfs=${n_ens_gfs}, + n_ens_fv3sar=${n_ens_fv3sar}, / &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=20.0, - metar_impact_radius=10.0, - metar_impact_radius_lowCloud=4.0, - l_gsd_terrain_match_surfTobs=.true., - l_sfcobserror_ramp_t=.true., - l_sfcobserror_ramp_q=.true., - l_PBL_pseudo_SurfobsT=.false., - l_PBL_pseudo_SurfobsQ=.false., - l_PBL_pseudo_SurfobsUV=.false., - pblH_ration=0.4, - pps_press_incr=40.0, - l_gsd_limit_ocean_q=.true., - l_pw_hgt_adjust=.true., - l_limit_pw_innov=.true., - max_innov_pct=0.1, - l_cleanSnow_WarmTs=.true., - r_cleanSnow_WarmTs_threshold=5.0, - l_conserve_thetaV=.true., - i_conserve_thetaV_iternum=3, - l_gsd_soilTQ_nudge=.false., - l_cld_bld=.true., - l_numconc=.true., - l_closeobs=.true., - cld_bld_hgt=1200.0, - build_cloud_frac_p=0.50, - clear_cloud_frac_p=0.10, - iclean_hydro_withRef_allcol=1, - i_use_2mQ4B=2, - i_use_2mT4B=1, - i_gsdcldanal_type=0, - i_gsdsfc_uselist=1, - i_lightpcp=1, - i_sfct_gross=1, - i_coastline=3, - i_gsdqc=2, + dfi_radar_latent_heat_time_period=30.0, / &CHEM / @@ -1598,7 +796,7 @@ OBS_INPUT:: export gsi_namelist=" &SETUP - miter=2,niter(1)=50,niter(2)=50,niter_no_qc(1)=20, + miter=2,niter(1)=5,niter(2)=5,niter_no_qc(1)=2, write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., qoption=2, factqmin=0.0,factqmax=0.0,deltim=$DELTIM, @@ -1724,428 +922,6 @@ OBS_INPUT:: / " ;; - - cmaq_binary) - -# Define namelist for cmaq binary run - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=50,niter(2)=50, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - gencode=78,qoption=2, - factqmin=0.0,factqmax=0.0,deltim=$DELTIM, - iguess=-1, - oneobtest=.false.,retrieval=.false., - nhr_assimilation=3,l_foto=.false., - use_pbl=.false.,use_compress=.false., - diag_conv=.true.,lrun_subdirs=.true., - $SETUP - / - &GRIDOPTS - JCAP=$JCAP,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS, - wrf_nmm_regional=.false.,wrf_mass_regional=.false., - cmaq_regional=.true.,diagnostic_reg=.false., - filled_grid=.false.,half_grid=.true.,netcdf=.false., - / - &BKGERR - hzscl=0.373,0.746,1.50, - vs=1.0,bw=0.,fstat=.true., - / - &ANBKGERR - anisotropic=.false.,an_vs=1.0,ngauss=1, - an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., - ifilt_ord=2,npass=3,normal=-200,grid_ratio=4.,nord_f2a=4, - / - &JCOPTS - / - &STRONGOPTS - nstrong=0,nvmodes_keep=20, - period_max=3.,baldiag_full=.true.,baldiag_inc=.true., - / - &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.true.,c_varqc=0.02,vadfile='prepbufr',oberrflg=.false.,njqc=.false.,vqc=.true., - / - &OBS_INPUT - dmesh(1)=120.0,dmesh(2)=60.0,dmesh(3)=60.0,dmesh(4)=60.0, - dmesh(5)=120,time_window_max=1.5, - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - anowbufr pm2_5 null TEOM 1.0 0 0 - / -!max name length for dfile=13 -!max name length for dtype=10 - &SUPEROB_RADAR - del_azimuth=5.,del_elev=.25,del_range=5000.,del_time=.5,elev_angle_max=5.,minnum=50,range_max=100000., - l2superob_only=.false., -:: - &LAG_DATA - / - &HYBRID_ENSEMBLE - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - berror_chem=.true., - oneobtest_chem=.false., - maginnov_chem=60,magoberr_chem=2.,oneob_type_chem='pm2_5', - oblat_chem=45.,oblon_chem=270.,obpres_chem=1000., - diag_incr=.true.,elev_tolerance=500.,tunable_error=0.5, - in_fname="\""${cmaq_input}"\"",out_fname="\""${cmaq_output}"\"", - incr_fname="\""${chem_increment}"\"", -!diag_incr for diagnostic increment output - / - &SINGLEOB_TEST - maginnov=5,magoberr=0.1,oneob_type='t', - oblat=45.,oblon=270.,obpres=1000.,obdattim=${adate}, - obhourset=0., - / - &NST - / -" -;; - - hwrf_nmm_d2) - -# Define namelist for hwrf nmm d2 run - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=50,niter(2)=50,niter_no_qc(1)=20,niter_no_qc(2)=0, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - gencode=78,qoption=2, - factqmin=0.0,factqmax=0.0,deltim=$DELTIM, - iguess=-1, - oneobtest=.false.,retrieval=.false., - nhr_assimilation=6,l_foto=.false., - use_pbl=.true.,use_compress=.false., - print_diag_pcg=.true., - use_gfs_stratosphere=$USE_GFS_STRATOSPHERE, - use_gfs_ozone=$USE_GFS_OZONE, - regional_ozone=$REGIONAL_OZONE, - nsig_ext=12,gpstop=50., - $SETUP - / - &GRIDOPTS - JCAP=$JCAP,JCAP_B=$JCAP_B,NLAT=$NLAT,NLON=$NLON,nsig=$LEVS, - wrf_nmm_regional=.true.,wrf_mass_regional=.false., - diagnostic_reg=.false., - filled_grid=.false.,half_grid=.true.,netcdf=$NETCDF, - / - &BKGERR - hzscl=0.25,0.5,1.0, - vs=0.6,bw=0.,fstat=.false., - / - &ANBKGERR - anisotropic=.false.,an_vs=1.0,ngauss=1, - an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., - ifilt_ord=2,npass=3,normal=-200,grid_ratio=4.,nord_f2a=4, - / - &JCOPTS - / - &STRONGOPTS - tlnmc_option=0,reg_tlnmc_type=1,nstrong=1,nvmodes_keep=8,period_max=6., - period_width=1.5,baldiag_full=.false.,baldiag_inc=.false., - / - &OBSQC - dfact=0.75,dfact1=3.0,erradar_inflate=1.0,tdrerr_inflate=.true., - noiqc=.true.,c_varqc=0.02,vadfile='prepbufr',oberrflg=.false.,njqc=.false.,vqc=.true., - / - &OBS_INPUT - dmesh(1)=90.0,dmesh(2)=45.0,dmesh(3)=45.0,dmesh(4)=45.0,dmesh(5)=90,time_window_max=3.0,l_foreaft_thin=.false., - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 0.0 0 0 - prepbufr t null t 0.0 0 0 - prepbufr q null q 0.0 0 0 - prepbufr pw null pw 0.0 0 0 - prepbufr uv null uv 0.0 0 0 - satwndbufr uv null uv 0.0 0 0 - prepbufr spd null spd 0.0 0 0 - prepbufr dw null dw 0.0 0 0 - radarbufr rw null l3rw 0.0 0 0 - l2rwbufr rw null l2rw 0.0 0 0 - prepbufr sst null sst 0.0 0 0 - tcvitl tcp null tcp 0.0 0 0 - tldplrbufr rw null rw 0.0 0 0 - hdobbufr uv null uv 0.0 0 0 - hdobbufr t null t 0.0 0 0 - hdobbufr q null q 0.0 0 0 - hdobbufr spd null spd 0.0 0 0 - gpsrobufr gps_bnd null gps 0.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 0.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 0.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 - hirs3bufr hirs3 n17 hirs3_n17 0.0 1 0 - hirs4bufr hirs4 metop-a hirs4_metop-a 0.0 1 1 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 0.0 1 1 - amsuabufr amsua n15 amsua_n15 0.0 2 1 - amsuabufr amsua n18 amsua_n18 0.0 2 1 - amsuabufr amsua metop-a amsua_metop-a 0.0 2 1 - airsbufr amsua aqua amsua_aqua 0.0 2 1 - amsubbufr amsub n17 amsub_n17 0.0 3 1 - mhsbufr mhs n18 mhs_n18 0.0 3 1 - mhsbufr mhs metop-a mhs_metop-a 0.0 3 1 - ssmitbufr ssmi f15 ssmi_f15 0.0 1 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 4 0 - amsrebufr amsre_mid aqua amsre_aqua 0.0 4 0 - amsrebufr amsre_hig aqua amsre_aqua 0.0 4 0 - ssmisbufr ssmis f16 ssmis_f16 0.0 4 0 - ssmisbufr ssmis f17 ssmis_f17 0.0 4 0 - ssmisbufr ssmis f18 ssmis_f18 0.0 4 0 - ssmisbufr ssmis f19 ssmis_f19 0.0 4 0 - gsnd1bufr sndrd1 g12 sndrD1_g12 0.0 5 0 - gsnd1bufr sndrd2 g12 sndrD2_g12 0.0 5 0 - gsnd1bufr sndrd3 g12 sndrD3_g12 0.0 5 0 - gsnd1bufr sndrd4 g12 sndrD4_g12 0.0 5 0 - gsnd1bufr sndrd1 g11 sndrD1_g11 0.0 5 0 - gsnd1bufr sndrd2 g11 sndrD2_g11 0.0 5 0 - gsnd1bufr sndrd3 g11 sndrD3_g11 0.0 5 0 - gsnd1bufr sndrd4 g11 sndrD4_g11 0.0 5 0 - gsnd1bufr sndrd1 g13 sndrD1_g13 0.0 5 0 - gsnd1bufr sndrd2 g13 sndrD2_g13 0.0 5 0 - gsnd1bufr sndrd3 g13 sndrD3_g13 0.0 5 0 - gsnd1bufr sndrd4 g13 sndrD4_g13 0.0 5 0 - iasibufr iasi metop-a iasi_metop-a 0.0 1 1 - gomebufr gome metop-a gome_metop-a 0.0 2 0 - omibufr omi aura omi_aura 0.0 2 0 - sbuvbufr sbuv2 n19 sbuv8_n19 0.0 0 0 - hirs4bufr hirs4 n19 hirs4_n19 0.0 1 1 - amsuabufr amsua n19 amsua_n19 0.0 2 1 - mhsbufr mhs n19 mhs_n19 0.0 3 1 - seviribufr seviri m08 seviri_m08 0.0 1 0 - seviribufr seviri m09 seviri_m09 0.0 1 0 - seviribufr seviri m10 seviri_m10 0.0 1 0 - seviribufr seviri m11 seviri_m11 0.0 1 0 - hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 1 0 - amsuabufr amsua metop-b amsua_metop-b 0.0 2 0 - mhsbufr mhs metop-b mhs_metop-b 0.0 3 0 - iasibufr iasi metop-b iasi_metop-b 0.0 1 0 - gomebufr gome metop-b gome_metop-b 0.0 2 0 - atmsbufr atms npp atms_npp 0.0 2 0 - atmsbufr atms n20 atms_n20 0.0 2 0 - crisbufr cris npp cris_npp 0.0 1 0 - crisfsbufr cris-fsr npp cris-fsr_npp 0.0 1 0 - crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 1 0 - gsnd1bufr sndrd1 g14 sndrD1_g14 0.0 5 0 - gsnd1bufr sndrd2 g14 sndrD2_g14 0.0 5 0 - gsnd1bufr sndrd3 g14 sndrD3_g14 0.0 5 0 - gsnd1bufr sndrd4 g14 sndrD4_g14 0.0 5 0 - gsnd1bufr sndrd1 g15 sndrD1_g15 0.0 5 0 - gsnd1bufr sndrd2 g15 sndrD2_g15 0.0 5 0 - gsnd1bufr sndrd3 g15 sndrD3_g15 0.0 5 0 - gsnd1bufr sndrd4 g15 sndrD4_g15 0.0 5 0 - ompsnpbufr ompsnp npp ompsnp_npp 0.0 0 0 - ompstcbufr ompstc8 npp ompstc8_npp 0.0 2 0 -:: - &SUPEROB_RADAR - del_azimuth=5.,del_elev=.25,del_range=5000.,del_time=.5,elev_angle_max=5.,minnum=50,range_max=100000., - l2superob_only=.false., - / - &LAG_DATA - / - &HYBRID_ENSEMBLE - l_hyb_ens=.true.,n_ens=10,uv_hyb_ens=.true.,beta_s0=0.2, - readin_beta=.true., - s_ens_h=300,s_ens_v=-0.5,readin_localization=.false., - generate_ens=.false.,regional_ensemble_option=1,grid_ratio_ens=1, - pseudo_hybens=.false.,merge_two_grid_ensperts=.false., - pwgtflg=.false.,aniso_a_en=.false., - nlon_ens=165,nlat_ens=335,jcap_ens=0,jcap_ens_test=0, - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - / - &SINGLEOB_TEST - maginnov=1.0,magoberr=0.8,oneob_type='t', - oblat=38.,oblon=279.,obpres=500.,obdattim=${adate}, - obhourset=0., - / - &NST - / -" -;; - - hwrf_nmm_d3) - -# Define namelist for hwrf nmm d3 run - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=50,niter(2)=50,niter_no_qc(1)=20,niter_no_qc(2)=0, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - gencode=78,qoption=2, - factqmin=0.0,factqmax=0.0,deltim=$DELTIM, - iguess=-1, - oneobtest=.false.,retrieval=.false., - nhr_assimilation=6,l_foto=.false., - use_pbl=.true.,use_compress=.false., - print_diag_pcg=.true., - use_gfs_stratosphere=$USE_GFS_STRATOSPHERE, - use_gfs_ozone=$USE_GFS_OZONE, - regional_ozone=$REGIONAL_OZONE, - nsig_ext=12,gpstop=50., - $SETUP - / - &GRIDOPTS - JCAP=$JCAP,JCAP_B=$JCAP_B,NLAT=$NLAT,NLON=$NLON,nsig=$LEVS, - wrf_nmm_regional=.true.,wrf_mass_regional=.false., - diagnostic_reg=.false., - filled_grid=.false.,half_grid=.true.,netcdf=$NETCDF, - / - &BKGERR - hzscl=0.2,0.4,0.8, - vs=0.6,bw=0.,fstat=.false., - / - &ANBKGERR - anisotropic=.false.,an_vs=1.0,ngauss=1, - an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., - ifilt_ord=2,npass=3,normal=-200,grid_ratio=4.,nord_f2a=4, - / - &JCOPTS - / - &STRONGOPTS - tlnmc_option=0,reg_tlnmc_type=1,nstrong=1,nvmodes_keep=8,period_max=6., - period_width=1.5,baldiag_full=.false.,baldiag_inc=.false., - / - &OBSQC - dfact=0.75,dfact1=3.0,erradar_inflate=1.0,tdrerr_inflate=.true., - noiqc=.true.,c_varqc=0.02,vadfile='prepbufr',oberrflg=.false.,njqc=.false.,vqc=.true., - / - &OBS_INPUT - dmesh(1)=90.0,dmesh(2)=45.0,dmesh(3)=45.0,dmesh(4)=45.0,dmesh(5)=90,time_window_max=3.0,l_foreaft_thin=.false., - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 0.0 0 0 - prepbufr t null t 0.0 0 0 - prepbufr q null q 0.0 0 0 - prepbufr pw null pw 0.0 0 0 - prepbufr uv null uv 0.0 0 0 - satwndbufr uv null uv 0.0 0 0 - prepbufr spd null spd 0.0 0 0 - prepbufr dw null dw 0.0 0 0 - radarbufr rw null l3rw 0.0 0 0 - l2rwbufr rw null l2rw 0.0 0 0 - prepbufr sst null sst 0.0 0 0 - tcvitl tcp null tcp 0.0 0 0 - tldplrbufr rw null rw 0.0 0 0 - hdobbufr uv null uv 0.0 0 0 - hdobbufr t null t 0.0 0 0 - hdobbufr q null q 0.0 0 0 - hdobbufr spd null spd 0.0 0 0 - gpsrobufr gps_bnd null gps 0.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 0.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 0.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 - hirs3bufr hirs3 n17 hirs3_n17 0.0 1 0 - hirs4bufr hirs4 metop-a hirs4_metop-a 0.0 1 1 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 0.0 1 1 - amsuabufr amsua n15 amsua_n15 0.0 2 1 - amsuabufr amsua n18 amsua_n18 0.0 2 1 - amsuabufr amsua metop-a amsua_metop-a 0.0 2 1 - airsbufr amsua aqua amsua_aqua 0.0 2 1 - amsubbufr amsub n17 amsub_n17 0.0 3 1 - mhsbufr mhs n18 mhs_n18 0.0 3 1 - mhsbufr mhs metop-a mhs_metop-a 0.0 3 1 - ssmitbufr ssmi f15 ssmi_f15 0.0 1 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 4 0 - amsrebufr amsre_mid aqua amsre_aqua 0.0 4 0 - amsrebufr amsre_hig aqua amsre_aqua 0.0 4 0 - ssmisbufr ssmis f16 ssmis_f16 0.0 4 0 - ssmisbufr ssmis f17 ssmis_f17 0.0 4 0 - ssmisbufr ssmis f18 ssmis_f18 0.0 4 0 - ssmisbufr ssmis f19 ssmis_f19 0.0 4 0 - gsnd1bufr sndrd1 g12 sndrD1_g12 0.0 5 0 - gsnd1bufr sndrd2 g12 sndrD2_g12 0.0 5 0 - gsnd1bufr sndrd3 g12 sndrD3_g12 0.0 5 0 - gsnd1bufr sndrd4 g12 sndrD4_g12 0.0 5 0 - gsnd1bufr sndrd1 g11 sndrD1_g11 0.0 5 0 - gsnd1bufr sndrd2 g11 sndrD2_g11 0.0 5 0 - gsnd1bufr sndrd3 g11 sndrD3_g11 0.0 5 0 - gsnd1bufr sndrd4 g11 sndrD4_g11 0.0 5 0 - gsnd1bufr sndrd1 g13 sndrD1_g13 0.0 5 0 - gsnd1bufr sndrd2 g13 sndrD2_g13 0.0 5 0 - gsnd1bufr sndrd3 g13 sndrD3_g13 0.0 5 0 - gsnd1bufr sndrd4 g13 sndrD4_g13 0.0 5 0 - iasibufr iasi metop-a iasi_metop-a 0.0 1 1 - gomebufr gome metop-a gome_metop-a 0.0 2 0 - omibufr omi aura omi_aura 0.0 2 0 - sbuvbufr sbuv2 n19 sbuv8_n19 0.0 0 0 - hirs4bufr hirs4 n19 hirs4_n19 0.0 1 1 - amsuabufr amsua n19 amsua_n19 0.0 2 1 - mhsbufr mhs n19 mhs_n19 0.0 3 1 - seviribufr seviri m08 seviri_m08 0.0 1 0 - seviribufr seviri m09 seviri_m09 0.0 1 0 - seviribufr seviri m10 seviri_m10 0.0 1 0 - seviribufr seviri m11 seviri_m11 0.0 1 0 - hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 1 0 - amsuabufr amsua metop-b amsua_metop-b 0.0 2 0 - mhsbufr mhs metop-b mhs_metop-b 0.0 3 0 - iasibufr iasi metop-b iasi_metop-b 0.0 1 0 - gomebufr gome metop-b gome_metop-b 0.0 2 0 - atmsbufr atms npp atms_npp 0.0 2 0 - atmsbufr atms n20 atms_n20 0.0 2 0 - crisbufr cris npp cris_npp 0.0 1 0 - crisfsbufr cris-fsr npp cris-fsr_npp 0.0 1 0 - crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 1 0 - gsnd1bufr sndrd1 g14 sndrD1_g14 0.0 5 0 - gsnd1bufr sndrd2 g14 sndrD2_g14 0.0 5 0 - gsnd1bufr sndrd3 g14 sndrD3_g14 0.0 5 0 - gsnd1bufr sndrd4 g14 sndrD4_g14 0.0 5 0 - gsnd1bufr sndrd1 g15 sndrD1_g15 0.0 5 0 - gsnd1bufr sndrd2 g15 sndrD2_g15 0.0 5 0 - gsnd1bufr sndrd3 g15 sndrD3_g15 0.0 5 0 - gsnd1bufr sndrd4 g15 sndrD4_g15 0.0 5 0 - ompsnpbufr ompsnp npp ompsnp_npp 0.0 0 0 - ompstcbufr ompstc8 npp ompstc8_npp 0.0 2 0 -:: - &SUPEROB_RADAR - del_azimuth=5.,del_elev=.25,del_range=5000.,del_time=.5,elev_angle_max=5.,minnum=50,range_max=100000., - l2superob_only=.false., - / - &LAG_DATA - / - &HYBRID_ENSEMBLE - l_hyb_ens=.true.,n_ens=10,uv_hyb_ens=.true.,beta_s0=0.2, - readin_beta=.true., - s_ens_h=150,s_ens_v=-0.5,readin_localization=.false., - generate_ens=.false.,regional_ensemble_option=1,grid_ratio_ens=1, - pseudo_hybens=.false.,merge_two_grid_ensperts=.false., - pwgtflg=.false.,aniso_a_en=.false., - nlon_ens=249,nlat_ens=499,jcap_ens=0,jcap_ens_test=0, - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - / - &SINGLEOB_TEST - maginnov=1.0,magoberr=0.8,oneob_type='t', - oblat=38.,oblon=279.,obpres=500.,obdattim=${adate}, - obhourset=0., - / - &NST - / -" -;; - global_enkf) # Define namelist for global enkf run diff --git a/regression/regression_namelists_db.sh b/regression/regression_namelists_db.sh index 59962a587b..1558779e3e 100755 --- a/regression/regression_namelists_db.sh +++ b/regression/regression_namelists_db.sh @@ -2,173 +2,7 @@ job_name=$1 case $job_name in -global_3dvar) - -# Define namelist for global run (pcgsoi minimization) - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=2,niter(2)=1, - niter_no_qc(1)=1,niter_no_qc(2)=0, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - gencode=82,qoption=2,cwoption=3, - factqmin=5.0,factqmax=5.0,deltim=$DELTIM, - iguess=-1, - oneobtest=.false.,retrieval=.false.,l_foto=.false., - use_pbl=.false.,use_compress=.true.,nsig_ext=12,gpstop=50., - use_gfs_nemsio=.false.,lrun_subdirs=.true., - $SETUP - / - &GRIDOPTS - JCAP=$JCAP,JCAP_B=$JCAP_B,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS, - regional=.false.,nlayers(63)=3,nlayers(64)=6, - $GRIDOPTS - / - &BKGERR - vs=0.7, - hzscl=1.7,0.8,0.5, - hswgt=0.45,0.3,0.25, - bw=0.0,norsp=4, - bkgv_flowdep=.true.,bkgv_rewgtfct=1.5, - $BKGVERR - / - &ANBKGERR - anisotropic=.false., - $ANBKGERR - / - &JCOPTS - ljcdfi=.false.,alphajc=0.0,ljcpdry=.true.,bamp_jcpdry=5.0e7, - $JCOPTS - / - &STRONGOPTS - tlnmc_option=1,nstrong=1,nvmodes_keep=8,period_max=6.,period_width=1.5, - baldiag_full=.true.,baldiag_inc=.true., - $STRONGOPTS - / - &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.true.,oberrflg=.false.,c_varqc=0.02, - use_poq7=.true.,njqc=.false.,vqc=.true., - $OBSQC - / - &OBS_INPUT - dmesh(1)=1450.0,dmesh(2)=1500.0,time_window_max=0.5, - $OBSINPUT - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 0.0 0 0 - prepbufr t null t 0.0 0 0 - prepbufr q null q 0.0 0 0 - prepbufr pw null pw 0.0 0 0 - prepbufr uv null uv 0.0 0 0 - satwndbufr uv null uv 0.0 0 0 - prepbufr spd null spd 0.0 0 0 - prepbufr dw null dw 0.0 0 0 - radarbufr rw null rw 0.0 0 0 - prepbufr sst null sst 0.0 0 0 - gpsrobufr $gps_dtype null gps 0.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 0.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 0.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 - hirs3bufr hirs3 n17 hirs3_n17 0.0 1 1 - hirs4bufr_skip hirs4 metop-a hirs4_metop-a 0.0 1 1 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 0.0 1 1 - amsuabufr_skip amsua n15 amsua_n15 0.0 1 1 - amsuabufr_skip amsua n18 amsua_n18 0.0 1 1 - amsuabufr_skip amsua metop-a amsua_metop-a 0.0 1 1 - airsbufr_skip amsua aqua amsua_aqua 0.0 1 1 - amsubbufr amsub n17 amsub_n17 0.0 1 1 - mhsbufr_skip mhs n18 mhs_n18 0.0 1 1 - mhsbufr_skip mhs metop-a mhs_metop-a 0.0 1 1 - ssmitbufr ssmi f15 ssmi_f15 0.0 1 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 1 0 - amsrebufr amsre_mid aqua amsre_aqua 0.0 1 0 - amsrebufr amsre_hig aqua amsre_aqua 0.0 1 0 - ssmisbufr ssmis_las f16 ssmis_f16 0.0 1 0 - ssmisbufr ssmis_uas f16 ssmis_f16 0.0 1 0 - ssmisbufr ssmis_img f16 ssmis_f16 0.0 1 0 - ssmisbufr ssmis_env f16 ssmis_f16 0.0 1 0 - gsnd1bufr_skip sndrd1 g12 sndrD1_g12 0.0 1 0 - gsnd1bufr_skip sndrd2 g12 sndrD2_g12 0.0 1 0 - gsnd1bufr_skip sndrd3 g12 sndrD3_g12 0.0 1 0 - gsnd1bufr_skip sndrd4 g12 sndrD4_g12 0.0 1 0 - gsnd1bufr_skip sndrd1 g11 sndrD1_g11 0.0 1 0 - gsnd1bufr_skip sndrd2 g11 sndrD2_g11 0.0 1 0 - gsnd1bufr sndrd3 g11 sndrD3_g11 0.0 1 0 - gsnd1bufr_skip sndrd4 g11 sndrD4_g11 0.0 1 0 - gsnd1bufr_skip sndrd1 g13 sndrD1_g13 0.0 1 0 - gsnd1bufr_skip sndrd2 g13 sndrD2_g13 0.0 1 0 - gsnd1bufr_skip sndrd3 g13 sndrD3_g13 0.0 1 0 - gsnd1bufr_skip sndrd4 g13 sndrD4_g13 0.0 1 0 - iasibufr iasi metop-a iasi_metop-a 0.0 1 1 - gomebufr gome metop-a gome_metop-a 0.0 2 0 - omibufr omi aura omi_aura 0.0 2 0 - sbuvbufr sbuv2 n19 sbuv8_n19 0.0 0 0 - hirs4bufr hirs4 n19 hirs4_n19 0.0 1 1 - amsuabufr amsua n19 amsua_n19 0.0 1 1 - mhsbufr mhs n19 mhs_n19 0.0 1 1 - tcvitl tcp null tcp 0.0 0 0 - mlsbufr mls30 aura mls30_aura 1.0 0 0 - seviribufr seviri m08 seviri_m08 0.0 1 0 - seviribufr seviri m09 seviri_m09 0.0 1 0 - seviribufr seviri m10 seviri_m10 0.0 1 0 - seviribufr seviri m11 seviri_m11 0.0 1 0 - hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 1 0 - amsuabufr amsua metop-b amsua_metop-b 0.0 1 0 - mhsbufr mhs metop-b mhs_metop-b 0.0 1 0 - iasibufr iasi metop-b iasi_metop-b 0.0 1 0 - gomebufr gome metop-b gome_metop-b 0.0 2 0 - atmsbufr atms npp atms_npp 0.0 1 0 - atmsbufr atms n20 atms_n20 0.0 1 0 - crisbufr cris npp cris_npp 0.0 1 0 - crisfsbufr cris-fsr npp cris-fsr_npp 0.0 1 0 - crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 1 0 - ompsnpbufr ompsnp npp ompsnp_npp 0.0 0 0 - ompstcbufr ompstc8 npp ompstc8_npp 0.0 2 0 -:: - / - &SUPEROB_RADAR - $SUPERRAD - / - &LAG_DATA - / - &HYBRID_ENSEMBLE - l_hyb_ens=${HYBENS_GLOBAL}, - n_ens=${ENSEMBLE_SIZE_GLOBAL}, - uv_hyb_ens=${HYBENS_UV_GLOBAL}, - beta_s0=${BETA_S0_GLOBAL}, - readin_beta=.false., - s_ens_h=${HYBENS_HOR_SCALE_GLOBAL}, - s_ens_v=${HYBENS_VER_SCALE_GLOBAL}, - generate_ens=${GENERATE_ENS_GLOBAL}, - aniso_a_en=${HYBENS_ANISO_GLOBAL}, - nlon_ens=${LONA}, - nlat_ens=${NLAT}, - jcap_ens=${JCAP}, - jcap_ens_test=${JCAP}, - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - / - &SINGLEOB_TEST - maginnov=0.1,magoberr=0.1,oneob_type='t', - oblat=45.,oblon=180.,obpres=1000.,obdattim=${adate}, - obhourset=0., - $SINGLEOB - / - &NST - / -" -;; - - global_4denvar ) + global_4denvar) # Define namelist for global hybrid run @@ -670,6 +504,274 @@ OBS_INPUT:: obhourset=0., / " +;; + + hafs_envar) + +# Define namelist for hafs 3d hybrid envar run with global ensembles + +export gsi_namelist=" + + &SETUP + miter=1,niter(1)=2,niter(2)=2, + niter_no_qc(1)=1,niter_no_qc(2)=0, + write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., + qoption=2, + gencode=78,deltim=1200, + factqmin=0.0,factqmax=0.0, + iguess=-1, + aircraft_recon=.true., + oneobtest=.false.,retrieval=.false.,l_foto=.false., + nhr_assimilation=6, + use_pbl=.true.,use_compress=.false.,nsig_ext=14,gpstop=50., + use_gfs_nemsio=.false.,use_gfs_ncio=.true., + print_diag_pcg=.true.,l2rwthin=.false.,hurricane_radar=.true., + use_gfs_ozone=.false.,l4densvar=${l4densvar},nhr_obsbin=${nhr_obsbin}, + lrun_subdirs=.true., + netcdf_diag=.true.,binary_diag=.false., + newpc4pred=.true., adp_anglebc=.true., angord=4, + passive_bc=.false., use_edges=.false., emiss_bc=.true., + diag_precon=.true., step_start=1.e-3, upd_pred(1)=0, + upd_pred(2)=0,upd_pred(3)=0,upd_pred(4)=0, + upd_pred(5)=0,upd_pred(6)=0,upd_pred(7)=0, + upd_pred(8)=0,upd_pred(9)=0,upd_pred(10)=0, + upd_pred(11)=0,upd_pred(12)=0, + lread_obs_save=.false., + lread_obs_skip=.false., + ens_nstarthr=6, + lwrite_predterms=.false.,lwrite_peakwt=.false.,reduce_diag=.false., + / + &GRIDOPTS + fv3_regional=.true.,grid_ratio_fv3_regional=1,nvege_type=20, + / + &BKGERR + vs=1.0, + hzscl=0.2,0.4,0.8, + bw=0., + fstat=.false., +/ + &ANBKGERR + anisotropic=.false.,an_vs=1.0,ngauss=1, + an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., + ifilt_ord=2,npass=3,normal=-200,grid_ratio=4.,nord_f2a=4, + / + &JCOPTS + / + &STRONGOPTS + tlnmc_option=0,reg_tlnmc_type=1,nstrong=1,nvmodes_keep=8,period_max=6., + period_width=1.5,baldiag_full=.false.,baldiag_inc=.false., + / + &OBSQC + dfact=0.75,dfact1=3.0,erradar_inflate=1.0,tdrerr_inflate=.true., + noiqc=.true.,c_varqc=0.03333,vadfile='prepbufr',njqc=.false.,vqc=.true.,vadwnd_l2rw_qc=.false., + q_doe_a_136=0.65, + q_doe_b_136=0.0003, + q_doe_a_137=0.75, + q_doe_b_137=0.0003, + t_doe_a_136=0.75, + t_doe_b_136=0.2, + t_doe_a_137=0.7, + t_doe_b_137=0.2, + uv_doe_a_236=0.5, + uv_doe_b_236=0.85, + uv_doe_a_237=0.5, + uv_doe_b_237=0.85, + uv_doe_a_213=0.4, + uv_doe_b_213=1.0, + / + &OBS_INPUT + dmesh(1)=90.0,dmesh(2)=45.0,dmesh(3)=45.0,dmesh(4)=45.0,dmesh(5)=90,time_window_max=3.0,l_foreaft_thin=.false., + / +OBS_INPUT:: +! dfile dtype dplat dsis dval dthin dsfcalc + prepbufr ps null ps 0.0 0 0 + prepbufr t null t 0.0 0 0 + prepbufr_profl t null t 0.0 0 0 + prepbufr q null q 0.0 0 0 + prepbufr_profl q null q 0.0 0 0 + prepbufr pw null pw 0.0 0 0 + prepbufr uv null uv 0.0 0 0 + prepbufr_profl uv null uv 0.0 0 0 + satwndbufr uv null uv 0.0 0 0 + satwhrbufr uv null uv 0.0 0 0 + prepbufr spd null spd 0.0 0 0 + prepbufr dw null dw 0.0 0 0 + radarbufr rw null rw 0.0 0 0 + prepbufr sst null sst 0.0 0 0 + tcvitl tcp null tcp 0.0 0 0 + tldplrbufr rw null rw 0.0 0 0 + l2rwbufr rw null l2rw 0.0 0 0 + hdobbufr uv null uv 0.0 0 0 + hdobbufr t null t 0.0 0 0 + hdobbufr q null q 0.0 0 0 + hdobbufr spd null spd 0.0 0 0 + gpsrobufr gps_bnd null gps 0.0 0 0 + ssmirrbufr pcp_ssmi dmsp pcp_ssmi 0.0 -1 0 + tmirrbufr pcp_tmi trmm pcp_tmi 0.0 -1 0 + sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 + sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 + sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 + hirs3bufr hirs3 n17 hirs3_n17 0.0 1 0 + hirs4bufr hirs4 metop-a hirs4_metop-a 0.0 1 1 + gimgrbufr goes_img g11 imgr_g11 0.0 1 0 + gimgrbufr goes_img g12 imgr_g12 0.0 1 0 + airsbufr airs aqua airs_aqua 0.0 1 1 + amsuabufr amsua n15 amsua_n15 0.0 2 1 + amsuabufr amsua n18 amsua_n18 0.0 2 1 + amsuabufr amsua metop-a amsua_metop-a 0.0 2 1 + airsbufr amsua aqua amsua_aqua 0.0 2 1 + amsubbufr amsub n17 amsub_n17 0.0 3 1 + mhsbufr mhs n18 mhs_n18 0.0 3 1 + mhsbufr mhs metop-a mhs_metop-a 0.0 3 1 + ssmitbufr ssmi f15 ssmi_f15 0.0 1 0 + amsrebufr amsre_low aqua amsre_aqua 0.0 4 0 + amsrebufr amsre_mid aqua amsre_aqua 0.0 4 0 + amsrebufr amsre_hig aqua amsre_aqua 0.0 4 0 + ssmisbufr ssmis f16 ssmis_f16 0.0 4 0 + ssmisbufr ssmis f17 ssmis_f17 0.0 4 0 + ssmisbufr ssmis f18 ssmis_f18 0.0 4 0 + ssmisbufr ssmis f19 ssmis_f19 0.0 4 0 + gsnd1bufr sndrd1 g12 sndrD1_g12 0.0 5 0 + gsnd1bufr sndrd2 g12 sndrD2_g12 0.0 5 0 + gsnd1bufr sndrd3 g12 sndrD3_g12 0.0 5 0 + gsnd1bufr sndrd4 g12 sndrD4_g12 0.0 5 0 + gsnd1bufr sndrd1 g11 sndrD1_g11 0.0 5 0 + gsnd1bufr sndrd2 g11 sndrD2_g11 0.0 5 0 + gsnd1bufr sndrd3 g11 sndrD3_g11 0.0 5 0 + gsnd1bufr sndrd4 g11 sndrD4_g11 0.0 5 0 + gsnd1bufr sndrd1 g13 sndrD1_g13 0.0 5 0 + gsnd1bufr sndrd2 g13 sndrD2_g13 0.0 5 0 + gsnd1bufr sndrd3 g13 sndrD3_g13 0.0 5 0 + gsnd1bufr sndrd4 g13 sndrD4_g13 0.0 5 0 + iasibufr iasi metop-a iasi_metop-a 0.0 1 1 + gomebufr gome metop-a gome_metop-a 0.0 2 0 + omibufr omi aura omi_aura 0.0 2 0 + sbuvbufr sbuv2 n19 sbuv8_n19 0.0 0 0 + hirs4bufr hirs4 n19 hirs4_n19 0.0 1 1 + amsuabufr amsua n19 amsua_n19 0.0 2 1 + mhsbufr mhs n19 mhs_n19 0.0 3 1 + seviribufr seviri m08 seviri_m08 0.0 1 0 + seviribufr seviri m09 seviri_m09 0.0 1 0 + seviribufr seviri m10 seviri_m10 0.0 1 0 + hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 1 0 + amsuabufr amsua metop-b amsua_metop-b 0.0 2 0 + mhsbufr mhs metop-b mhs_metop-b 0.0 3 0 + iasibufr iasi metop-b iasi_metop-b 0.0 1 0 + gomebufr gome metop-b gome_metop-b 0.0 2 0 + atmsbufr atms npp atms_npp 0.0 2 0 + atmsbufr atms n20 atms_n20 0.0 2 0 + crisbufr cris npp cris_npp 0.0 1 0 + crisfsbufr cris-fsr npp cris-fsr_npp 0.0 1 0 + crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 1 0 + gsnd1bufr sndrd1 g14 sndrD1_g14 0.0 5 0 + gsnd1bufr sndrd2 g14 sndrD2_g14 0.0 5 0 + gsnd1bufr sndrd3 g14 sndrD3_g14 0.0 5 0 + gsnd1bufr sndrd4 g14 sndrD4_g14 0.0 5 0 + gsnd1bufr sndrd1 g15 sndrD1_g15 0.0 5 0 + gsnd1bufr sndrd2 g15 sndrD2_g15 0.0 5 0 + gsnd1bufr sndrd3 g15 sndrD3_g15 0.0 5 0 + gsnd1bufr sndrd4 g15 sndrD4_g15 0.0 5 0 + oscatbufr uv null uv 0.0 0 0 + mlsbufr mls30 aura mls30_aura 0.0 0 0 + amsr2bufr amsr2 gcom-w1 amsr2_gcom-w1 0.0 3 0 + gmibufr gmi gpm gmi_gpm 0.0 3 0 + saphirbufr saphir meghat saphir_meghat 0.0 3 0 + ahibufr ahi himawari8 ahi_himawari8 0.0 3 0 +:: + &SUPEROB_RADAR + del_azimuth=5.,del_elev=.25,del_range=10000.,del_time=1.0,elev_angle_max=5.,minnum=1,range_max=200000., + l2superob_only=.false.,radar_sites=.false., + radar_box=.true.,radar_rmesh=10,radar_zmesh=500, + / +SUPEROB_RADAR:: + KBRO 1 + KCRP 1 + KEWX 1 + KGRX 1 + KDFX 1 + KHGX 1 + KLCH 1 + KLIX 1 + KPOE 1 + KSHV 1 + KDGX 1 + KMOB 1 + KEVX 1 + KEOX 1 + KMXX 1 + KBMX 1 + KTLH 1 + KTBW 1 + KBYX 1 + KAMX 1 + KMLB 1 + KJAX 1 + KVAX 1 + KJGX 1 + KFFC 1 + KCLX 1 + KCAE 1 + KGSP 1 + KLTX 1 + KMHX 1 + KRAX 1 + KAKQ 1 + KFCX 1 + KLWX 1 + KDOX 1 + KCCX 1 + KDIX 1 + KOKX 1 + KENX 1 + KBGM 1 + KCXX 1 + KBOX 1 + KGYX 1 + KCBW 1 + TJUA 1 + PHWA 1 + PHKI 1 + PHMO 1 + PHKM 1 +:: +/ + &LAG_DATA + / + &HYBRID_ENSEMBLE + l_hyb_ens=.true., + n_ens=${N_ENS}, + uv_hyb_ens=.true., + beta_s0=${BETA_S0}, + s_ens_h=150, + s_ens_v=-0.5, + readin_localization=.false., + generate_ens=.false., + regional_ensemble_option=${REGIONAL_ENSEMBLE_OPTION}, + grid_ratio_ens=${GRID_RATIO_ENS}, + pseudo_hybens=.false., + merge_two_grid_ensperts=F, + pwgtflg=F, + aniso_a_en=.false., + nlon_ens=387, + nlat_ens=777, + write_ens_sprd=F, + l_both_fv3sar_gfs_ens=${l_both_fv3sar_gfs_ens}, + n_ens_gfs=${n_ens_gfs}, + n_ens_fv3sar=${n_ens_fv3sar}, + / + &RAPIDREFRESH_CLDSURF + dfi_radar_latent_heat_time_period=30.0, + / + &CHEM + / + &NST + / + &SINGLEOB_TEST + maginnov=1.0,magoberr=0.8,oneob_type='t', + oblat=38.,oblon=279.,obpres=500.,obdattim=2020040500, + obhourset=0., + / +" ;; netcdf_fv3_regional) @@ -679,7 +781,7 @@ OBS_INPUT:: export gsi_namelist=" &SETUP - miter=2,niter(1)=50,niter(2)=50,niter_no_qc(1)=20, + miter=2,niter(1)=2,niter(2)=1,niter_no_qc(1)=1, write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., qoption=2, factqmin=0.0,factqmax=0.0,deltim=$DELTIM, @@ -806,358 +908,6 @@ OBS_INPUT:: " ;; -cmaq_binary) - -# Define namelist for cmaq binary run - - export gsi_namelist=" - - &SETUP - miter=2,niter(1)=1,niter(2)=2, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - gencode=78,qoption=2, - factqmin=0.0,factqmax=0.0,deltim=$DELTIM, - iguess=-1, - oneobtest=.false.,retrieval=.false., - nhr_assimilation=3,l_foto=.false., - use_pbl=.false.,use_compress=.false., - diag_conv=.true.,lrun_subdirs=.true., - $SETUP - / - &GRIDOPTS - JCAP=$JCAP,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS, - wrf_nmm_regional=.false.,wrf_mass_regional=.false., - cmaq_regional=.true.,diagnostic_reg=.true., - filled_grid=.false.,half_grid=.true.,netcdf=.false., - / - &BKGERR - hzscl=0.373,0.746,1.50, - vs=1.0,bw=0.,fstat=.true., - / - &ANBKGERR - anisotropic=.false.,an_vs=1.0,ngauss=1, - an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., - ifilt_ord=2,npass=3,normal=-200,grid_ratio=4.,nord_f2a=4, - / - &JCOPTS - / - &STRONGOPTS - tlnmc_option=0,nstrong=0,nvmodes_keep=20, - period_max=3.,baldiag_full=.true.,baldiag_inc=.true., - / - &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.true.,c_varqc=0.02,vadfile='prepbufr',njqc=.false.,vqc=.true., - / - &OBS_INPUT - dmesh(1)=120.0,dmesh(2)=60.0,dmesh(3)=60.0,dmesh(4)=60.0, - dmesh(5)=120,time_window_max=1.5, - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - anowbufr pm2_5 null TEOM 1.0 0 0 -:: -!max name length for dfile=13 -!max name length for dtype=10 - &SUPEROB_RADAR - del_azimuth=5.,del_elev=.25,del_range=5000.,del_time=.5,elev_angle_max=5.,minnum=50,range_max=100000., - l2superob_only=.false., - / - &LAG_DATA - / - &HYBRID_ENSEMBLE - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - berror_chem=.true., - oneobtest_chem=.false., - maginnov_chem=60,magoberr_chem=2.,oneob_type_chem='pm2_5', - oblat_chem=45.,oblon_chem=270.,obpres_chem=1000., - diag_incr=.true.,elev_tolerance=500.,tunable_error=0.5, - in_fname="\""${cmaq_input}"\"",out_fname="\""${cmaq_output}"\"", - incr_fname="\""${chem_increment}"\"", -!diag_incr for diagnostic increment output - / - &SINGLEOB_TEST - maginnov=5,magoberr=0.1,oneob_type='t', - oblat=45.,oblon=270.,obpres=1000.,obdattim=${adate}, - obhourset=0., - / - &NST - / -" -;; - -hwrf_nmm_d2) - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=1,niter(2)=2,niter_no_qc(1)=20, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - gencode=78,qoption=2, - factqmin=0.0,factqmax=0.0,deltim=$DELTIM, - iguess=-1, - oneobtest=.false.,retrieval=.false., - nhr_assimilation=6,l_foto=.false., - use_pbl=.true.,use_compress=.false., - print_diag_pcg=.true., - use_gfs_stratosphere=$USE_GFS_STRATOSPHERE, - use_gfs_ozone=$USE_GFS_OZONE, - regional_ozone=$REGIONAL_OZONE, - nsig_ext=12,gpstop=50., - $SETUP - / - &GRIDOPTS - JCAP=$JCAP,JCAP_B=$JCAP_B,NLAT=$NLAT,NLON=$NLON,nsig=$LEVS, - wrf_nmm_regional=.true.,wrf_mass_regional=.false., - diagnostic_reg=.true., - filled_grid=.false.,half_grid=.true.,netcdf=$NETCDF, - / - &BKGERR - hzscl=0.25,0.5,1.0, - vs=0.6,bw=0.,fstat=.false., - / - &ANBKGERR - anisotropic=.false.,an_vs=1.0,ngauss=1, - an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., - ifilt_ord=2,npass=3,normal=-200,grid_ratio=4.,nord_f2a=4, - / - &JCOPTS - / - &STRONGOPTS - tlnmc_option=0,reg_tlnmc_type=1,nstrong=1,nvmodes_keep=8,period_max=6., - period_width=1.5,baldiag_full=.false.,baldiag_inc=.false., - / - &OBSQC - dfact=0.75,dfact1=3.0,erradar_inflate=1.0,tdrerr_inflate=.true., - noiqc=.true.,c_varqc=0.02,vadfile='prepbufr',njqc=.false.,vqc=.true., - / - &OBS_INPUT - dmesh(1)=90.0,dmesh(2)=45.0,dmesh(3)=45.0,dmesh(4)=45.0,dmesh(5)=90,dmesh(7)=9.0,time_window_max=3.0,l_foreaft_thin=.false., - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 0.0 0 0 - prepbufr t null t 0.0 0 0 - prepbufr q null q 0.0 0 0 - prepbufr pw null pw 0.0 0 0 - prepbufr uv null uv 0.0 0 0 - satwndbufr uv null uv 0.0 0 0 - prepbufr spd null spd 0.0 0 0 - prepbufr dw null dw 0.0 0 0 - radarbufr rw null rw 0.0 0 0 - prepbufr sst null sst 0.0 0 0 - tcvitl tcp null tcp 0.0 0 0 - tldplrbufr rw null rw 0.0 7 0 - hdobbufr uv null uv 0.0 0 0 - hdobbufr t null t 0.0 0 0 - hdobbufr q null q 0.0 0 0 - hdobbufr spd null spd 0.0 0 0 - gpsrobufr gps_bnd null gps 0.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 0.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 0.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 - hirs3bufr_skip hirs3 n17 hirs3_n17 0.0 1 0 - hirs4bufr hirs4 metop-a hirs4_metop-a 0.0 1 1 - gimgrbufr goes_img g11 imgr_g11 0.0 1 0 - gimgrbufr goes_img g12 imgr_g12 0.0 1 0 - airsbufr airs aqua airs_aqua 0.0 1 1 - amsuabufr_skip amsua n15 amsua_n15 0.0 2 1 - amsuabufr_skip amsua n18 amsua_n18 0.0 2 1 - amsuabufr amsua metop-a amsua_metop-a 0.0 2 1 - airsbufr_skip amsua aqua amsua_aqua 0.0 2 1 - amsubbufr amsub n17 amsub_n17 0.0 3 1 - mhsbufr_skip mhs n18 mhs_n18 0.0 3 1 - mhsbufr mhs metop-a mhs_metop-a 0.0 3 1 - ssmitbufr ssmi f15 ssmi_f15 0.0 1 0 - amsrebufr amsre_low aqua amsre_aqua 0.0 4 0 - amsrebufr amsre_mid aqua amsre_aqua 0.0 4 0 - amsrebufr amsre_hig aqua amsre_aqua 0.0 4 0 - ssmisbufr ssmis f16 ssmis_f16 0.0 4 0 - ssmisbufr ssmis f17 ssmis_f17 0.0 4 0 - ssmisbufr ssmis f18 ssmis_f18 0.0 4 0 - ssmisbufr ssmis f19 ssmis_f19 0.0 4 0 - gsnd1bufr_skip sndrd1 g12 sndrD1_g12 0.0 5 0 - gsnd1bufr sndrd2 g12 sndrD2_g12 0.0 5 0 - gsnd1bufr_skip sndrd3 g12 sndrD3_g12 0.0 5 0 - gsnd1bufr_skip sndrd4 g12 sndrD4_g12 0.0 5 0 - gsnd1bufr_skip sndrd1 g11 sndrD1_g11 0.0 5 0 - gsnd1bufr_skip sndrd2 g11 sndrD2_g11 0.0 5 0 - gsnd1bufr_skip sndrd3 g11 sndrD3_g11 0.0 5 0 - gsnd1bufr_skip sndrd4 g11 sndrD4_g11 0.0 5 0 - gsnd1bufr_skip sndrd1 g13 sndrD1_g13 0.0 5 0 - gsnd1bufr_skip sndrd2 g13 sndrD2_g13 0.0 5 0 - gsnd1bufr_skip sndrd3 g13 sndrD3_g13 0.0 5 0 - gsnd1bufr_skip sndrd4 g13 sndrD4_g13 0.0 5 0 - iasibufr iasi metop-a iasi_metop-a 0.0 1 1 - gomebufr gome metop-a gome_metop-a 0.0 2 0 - omibufr omi aura omi_aura 0.0 2 0 - sbuvbufr sbuv2 n19 sbuv8_n19 0.0 0 0 - hirs4bufr hirs4 n19 hirs4_n19 0.0 1 1 - amsuabufr amsua n19 amsua_n19 0.0 2 1 - mhsbufr mhs n19 mhs_n19 0.0 3 1 - seviribufr seviri m08 seviri_m08 0.0 1 0 - seviribufr seviri m09 seviri_m09 0.0 1 0 - seviribufr seviri m10 seviri_m10 0.0 1 0 - seviribufr seviri m11 seviri_m11 0.0 1 0 - hirs4bufr hirs4 metop-b hirs4_metop-b 0.0 1 0 - amsuabufr amsua metop-b amsua_metop-b 0.0 2 0 - mhsbufr mhs metop-b mhs_metop-b 0.0 3 0 - iasibufr iasi metop-b iasi_metop-b 0.0 1 0 - gomebufr gome metop-b gome_metop-b 0.0 2 0 - atmsbufr atms npp atms_npp 0.0 2 0 - atmsbufr atms n20 atms_n20 0.0 2 0 - crisbufr cris npp cris_npp 0.0 1 0 - crisfsbufr cris-fsr npp cris-fsr_npp 0.0 1 0 - crisfsbufr cris-fsr n20 cris-fsr_n20 0.0 1 0 - gsnd1bufr sndrd1 g14 sndrD1_g14 0.0 5 0 - gsnd1bufr sndrd2 g14 sndrD2_g14 0.0 5 0 - gsnd1bufr sndrd3 g14 sndrD3_g14 0.0 5 0 - gsnd1bufr sndrd4 g14 sndrD4_g14 0.0 5 0 - gsnd1bufr sndrd1 g15 sndrD1_g15 0.0 5 0 - gsnd1bufr sndrd2 g15 sndrD2_g15 0.0 5 0 - gsnd1bufr sndrd3 g15 sndrD3_g15 0.0 5 0 - gsnd1bufr sndrd4 g15 sndrD4_g15 0.0 5 0 - ompsnpbufr ompsnp npp ompsnp_npp 0.0 0 0 - ompstcbufr ompstc8 npp ompstc8_npp 0.0 2 0 -:: - &SUPEROB_RADAR - del_azimuth=5.,del_elev=.25,del_range=5000.,del_time=.5,elev_angle_max=5.,minnum=50,range_max=100000., - l2superob_only=.false., - / - &LAG_DATA - / - &HYBRID_ENSEMBLE - l_hyb_ens=.true.,n_ens=10,uv_hyb_ens=.true.,beta_s0=0.2, - readin_beta=.true., - s_ens_h=300,s_ens_v=-0.5,readin_localization=.false., - generate_ens=.false.,regional_ensemble_option=1,grid_ratio_ens=1, - pseudo_hybens=.false.,merge_two_grid_ensperts=.false., - pwgtflg=.false.,aniso_a_en=.false., - nlon_ens=165,nlat_ens=335,jcap_ens=0,jcap_ens_test=0, - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - / - &SINGLEOB_TEST - maginnov=1.0,magoberr=0.8,oneob_type='t', - oblat=38.,oblon=279.,obpres=500.,obdattim=${adate}, - obhourset=0., - / - &NST - / -" -;; - -hwrf_nmm_d3) - -export gsi_namelist=" - - &SETUP - miter=2,niter(1)=1,niter(2)=2,niter_no_qc(1)=20, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - gencode=78,qoption=2, - factqmin=0.0,factqmax=0.0,deltim=$DELTIM, - iguess=-1, - oneobtest=.false.,retrieval=.false., - nhr_assimilation=6,l_foto=.false., - use_pbl=.true.,use_compress=.false., - print_diag_pcg=.true., - use_gfs_stratosphere=$USE_GFS_STRATOSPHERE, - use_gfs_ozone=$USE_GFS_OZONE, - regional_ozone=$REGIONAL_OZONE, - nsig_ext=12,gpstop=50., - $SETUP - / - &GRIDOPTS - JCAP=$JCAP,JCAP_B=$JCAP_B,NLAT=$NLAT,NLON=$NLON,nsig=$LEVS, - wrf_nmm_regional=.true.,wrf_mass_regional=.false., - diagnostic_reg=.true., - filled_grid=.false.,half_grid=.true.,netcdf=$NETCDF, - / - &BKGERR - hzscl=0.2,0.4,0.8, - vs=0.6,bw=0.,fstat=.false., - / - &ANBKGERR - anisotropic=.false.,an_vs=1.0,ngauss=1, - an_flen_u=-5.,an_flen_t=3.,an_flen_z=-200., - ifilt_ord=2,npass=3,normal=-200,grid_ratio=4.,nord_f2a=4, - / - &JCOPTS - / - &STRONGOPTS - tlnmc_option=0,reg_tlnmc_type=1,nstrong=1,nvmodes_keep=8,period_max=6., - period_width=1.5,baldiag_full=.false.,baldiag_inc=.false., - / - &OBSQC - dfact=0.75,dfact1=3.0,erradar_inflate=1.0,tdrerr_inflate=.true., - noiqc=.true.,c_varqc=0.02,vadfile='prepbufr',njqc=.false.,vqc=.true., - / - &OBS_INPUT - dmesh(1)=90.0,dmesh(2)=45.0,dmesh(3)=45.0,dmesh(4)=45.0,dmesh(5)=90,dmesh(7)=9.0,time_window_max=3.0,l_foreaft_thin=.false., - / -OBS_INPUT:: -! dfile dtype dplat dsis dval dthin dsfcalc - prepbufr ps null ps 0.0 0 0 - prepbufr t null t 0.0 0 0 - prepbufr q null q 0.0 0 0 - prepbufr pw null pw 0.0 0 0 - prepbufr uv null uv 0.0 0 0 - satwndbufr uv null uv 0.0 0 0 - prepbufr spd null spd 0.0 0 0 - prepbufr dw null dw 0.0 0 0 - radarbufr rw null rw 0.0 0 0 - prepbufr sst null sst 0.0 0 0 - tcvitl tcp null tcp 0.0 0 0 - tldplrbufr rw null rw 0.0 7 0 - hdobbufr uv null uv 0.0 0 0 - hdobbufr t null t 0.0 0 0 - hdobbufr q null q 0.0 0 0 - hdobbufr spd null spd 0.0 0 0 - gpsrobufr gps_bnd null gps 0.0 0 0 - ssmirrbufr pcp_ssmi dmsp pcp_ssmi 0.0 -1 0 - tmirrbufr pcp_tmi trmm pcp_tmi 0.0 -1 0 - sbuvbufr sbuv2 n16 sbuv8_n16 0.0 0 0 - sbuvbufr sbuv2 n17 sbuv8_n17 0.0 0 0 - sbuvbufr sbuv2 n18 sbuv8_n18 0.0 0 0 -:: - &SUPEROB_RADAR - del_azimuth=5.,del_elev=.25,del_range=5000.,del_time=.5,elev_angle_max=5.,minnum=50,range_max=100000., - l2superob_only=.false., - / - &LAG_DATA - / - &HYBRID_ENSEMBLE - l_hyb_ens=.true.,n_ens=10,uv_hyb_ens=.true.,beta_s0=0.2, - readin_beta=.true., - s_ens_h=150,s_ens_v=-0.5,readin_localization=.false., - generate_ens=.false.,regional_ensemble_option=1,grid_ratio_ens=1, - pseudo_hybens=.false.,merge_two_grid_ensperts=.false., - pwgtflg=.false.,aniso_a_en=.false., - nlon_ens=249,nlat_ens=499,jcap_ens=0,jcap_ens_test=0, - / - &RAPIDREFRESH_CLDSURF - dfi_radar_latent_heat_time_period=30.0, - / - &CHEM - / - &SINGLEOB_TEST - maginnov=1.0,magoberr=0.8,oneob_type='t', - oblat=38.,oblon=279.,obpres=500.,obdattim=${adate}, - obhourset=0., - / - &NST - / -" -;; - *) # EXIT out for unresolved job_name diff --git a/regression/regression_param.sh b/regression/regression_param.sh index ea27521251..87a21dc0f1 100755 --- a/regression/regression_param.sh +++ b/regression/regression_param.sh @@ -51,125 +51,106 @@ export maxmem=$((($memnode*1024*1024)/$numcore)) # Kb / core case $regtest in - global_3dvar) + global_4denvar) if [[ "$machine" = "Hera" ]]; then - topts[1]="0:15:00" ; popts[1]="12/5/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="12/9/" ; ropts[2]="/2" + topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1" + topts[2]="0:10:00" ; popts[2]="12/10/" ; ropts[2]="/2" elif [[ "$machine" = "Orion" ]]; then - topts[1]="0:15:00" ; popts[1]="12/5/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="12/9/" ; ropts[2]="/2" + topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1" + topts[2]="0:10:00" ; popts[2]="12/12/" ; ropts[2]="/2" elif [[ "$machine" = "Jet" ]]; then - topts[1]="0:15:00" ; popts[1]="12/5/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="12/9/" ; ropts[2]="/2" + topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1" + topts[2]="0:10:00" ; popts[2]="12/10/" ; ropts[2]="/2" + elif [[ "$machine" = "Discover" ]]; then + topts[1]="0:30:00" ; popts[1]="48/2" ; ropts[1]="/1" + topts[2]="0:30:00" ; popts[2]="60/3" ; ropts[2]="/2" elif [[ "$machine" = "Cheyenne" ]]; then - topts[1]="0:15:00" ; popts[1]="16/2/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="16/4/" ; ropts[2]="/2" + topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1" + topts[2]="0:10:00" ; popts[2]="12/10/" ; ropts[2]="/2" elif [[ "$machine" = "Gaea" ]]; then - topts[1]="0:15:00" ; popts[1]="18/2/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="18/4/" ; ropts[2]="/2" + topts[1]="0:10:00" ; popts[1]="18/8/" ; ropts[1]="/1" + topts[2]="0:10:00" ; popts[2]="18/10/" ; ropts[2]="/2" elif [[ "$machine" = "wcoss2" ]]; then - topts[1]="0:15:00" ; popts[1]="12/5/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="12/9/" ; ropts[2]="/2" - elif [[ "$machine" = "Discover" ]]; then - topts[1]="0:30:00" ; popts[1]="36/2" ; ropts[1]="/1" - topts[2]="0:30:00" ; popts[2]="72/3" ; ropts[2]="/2" + topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1" + topts[2]="0:10:00" ; popts[2]="12/10/" ; ropts[2]="/2" fi if [ "$debug" = ".true." ] ; then - topts[1]="0:45:00" + topts[1]="1:30:00" fi scaling[1]=10; scaling[2]=8; scaling[3]=4 ;; - global_4dvar) + rrfs_3denvar_glbens) if [[ "$machine" = "Hera" ]]; then - topts[1]="0:15:00" ; popts[1]="12/3/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="12/5/" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/1" elif [[ "$machine" = "Orion" ]]; then - topts[1]="0:15:00" ; popts[1]="12/3/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="12/5/" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/1" elif [[ "$machine" = "Jet" ]]; then - topts[1]="0:15:00" ; popts[1]="12/3/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="12/5/" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/1" elif [[ "$machine" = "Cheyenne" ]]; then - topts[1]="0:15:00" ; popts[1]="12/3/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="12/5/" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/2" elif [[ "$machine" = "Gaea" ]]; then - topts[1]="0:15:00" ; popts[1]="18/2/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="18/4/" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="18/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="18/2/" ; ropts[2]="/1" elif [[ "$machine" = "wcoss2" ]]; then - topts[1]="0:15:00" ; popts[1]="28/2/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="28/4/" ; ropts[2]="/2" - elif [[ "$machine" = "Discover" ]]; then - topts[1]="2:00:00" ; popts[1]="48/2" ; ropts[1]="/1" - topts[2]="2:00:00" ; popts[2]="60/3" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="64/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="128/2/" ; ropts[2]="/1" fi if [ "$debug" = ".true." ] ; then - topts[1]="0:45:00" - if [[ "$machine" = "Hera" ]]; then - popts[1]="12/5/" - elif [[ "$machine" = "Orion" ]]; then - popts[1]="12/5/" - elif [[ "$machine" = "Jet" ]]; then - popts[1]="12/5/" - elif [[ "$machine" = "Gaea" ]]; then - popts[1]="18/5/" - elif [[ "$machine" = "wcoss2" ]]; then - popts[1]="28/4/" - topts[1]="3:00:00" - fi + topts[1]="0:30:00" fi - scaling[1]=5; scaling[2]=8; scaling[3]=2 + scaling[1]=2; scaling[2]=10; scaling[3]=4 ;; - global_4denvar) + hafs_3denvar_hybens) if [[ "$machine" = "Hera" ]]; then - topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1" - topts[2]="0:10:00" ; popts[2]="12/10/" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/1" elif [[ "$machine" = "Orion" ]]; then - topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1" - topts[2]="0:10:00" ; popts[2]="12/12/" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/1" elif [[ "$machine" = "Jet" ]]; then - topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1" - topts[2]="0:10:00" ; popts[2]="12/10/" ; ropts[2]="/2" - elif [[ "$machine" = "Discover" ]]; then - topts[1]="0:30:00" ; popts[1]="48/2" ; ropts[1]="/1" - topts[2]="0:30:00" ; popts[2]="60/3" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/1" elif [[ "$machine" = "Cheyenne" ]]; then - topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1" - topts[2]="0:10:00" ; popts[2]="12/10/" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/2" elif [[ "$machine" = "Gaea" ]]; then - topts[1]="0:10:00" ; popts[1]="18/8/" ; ropts[1]="/1" - topts[2]="0:10:00" ; popts[2]="18/10/" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="18/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="18/2/" ; ropts[2]="/1" elif [[ "$machine" = "wcoss2" ]]; then - topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1" - topts[2]="0:10:00" ; popts[2]="12/10/" ; ropts[2]="/2" + topts[1]="0:15:00" ; popts[1]="64/1/" ; ropts[1]="/1" + topts[2]="0:15:00" ; popts[2]="128/2/" ; ropts[2]="/1" fi if [ "$debug" = ".true." ] ; then - topts[1]="1:30:00" + topts[1]="0:30:00" fi - scaling[1]=10; scaling[2]=8; scaling[3]=4 + scaling[1]=2; scaling[2]=10; scaling[3]=4 ;; - rrfs_3denvar_glbens) - + hafs_4denvar_glbens) if [[ "$machine" = "Hera" ]]; then topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/1" elif [[ "$machine" = "Orion" ]]; then - topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/1" + topts[1]="0:20:00" ; popts[1]="20/1/" ; ropts[1]="/1" + topts[2]="0:20:00" ; popts[2]="20/2/" ; ropts[2]="/1" elif [[ "$machine" = "Jet" ]]; then topts[1]="0:15:00" ; popts[1]="20/1/" ; ropts[1]="/1" topts[2]="0:15:00" ; popts[2]="20/2/" ; ropts[2]="/1" @@ -185,10 +166,10 @@ case $regtest in fi if [ "$debug" = ".true." ] ; then - topts[1]="0:30:00" + topts[1]="0:45:00" fi - scaling[1]=2; scaling[2]=10; scaling[3]=4 + scaling[1]=10; scaling[2]=8; scaling[3]=4 ;; @@ -252,36 +233,6 @@ case $regtest in ;; - hwrf_nmm_d2 | hwrf_nmm_d3) - - if [[ "$machine" = "Hera" ]]; then - topts[1]="0:20:00" ; popts[1]="6/6/" ; ropts[1]="/1" - topts[2]="0:20:00" ; popts[2]="8/8/" ; ropts[2]="/1" - elif [[ "$machine" = "Orion" ]]; then - topts[1]="0:20:00" ; popts[1]="6/6/" ; ropts[1]="/1" - topts[2]="0:20:00" ; popts[2]="8/8/" ; ropts[2]="/1" - elif [[ "$machine" = "Jet" ]]; then - topts[1]="0:20:00" ; popts[1]="6/6/" ; ropts[1]="/1" - topts[2]="0:20:00" ; popts[2]="8/8/" ; ropts[2]="/1" - elif [[ "$machine" = "Cheyenne" ]]; then - topts[1]="0:20:00" ; popts[1]="6/6/" ; ropts[1]="/1" - topts[2]="0:20:00" ; popts[2]="8/8/" ; ropts[2]="/1" - elif [[ "$machine" = "Gaea" ]]; then - topts[1]="0:20:00" ; popts[1]="6/6/" ; ropts[1]="/1" - topts[2]="0:20:00" ; popts[2]="8/8/" ; ropts[2]="/1" - elif [[ "$machine" = "wcoss2" ]]; then - topts[1]="0:15:00" ; popts[1]="10/10/" ; ropts[1]="/1" - topts[2]="0:15:00" ; popts[2]="14/14/" ; ropts[2]="/2" - fi - - if [ "$debug" = ".true." ] ; then - topts[1]="1:00:00" - fi - - scaling[1]=5; scaling[2]=10; scaling[3]=2 - - ;; - global_enkf) if [[ "$machine" = "Hera" ]]; then diff --git a/regression/regression_test.sh b/regression/regression_test.sh index 0bcb9f4d90..263761052a 100755 --- a/regression/regression_test.sh +++ b/regression/regression_test.sh @@ -33,7 +33,6 @@ cd $tmpdir # Other required constants for regression testing maxtime=1200 -maxmem=${maxmem:-3400000} # set in regression_param # Copy stdout and fort.220 files # from $savdir to $tmpdir @@ -182,24 +181,6 @@ fi } >> $output - # Next, maximum residence set size (both harware limitation and percent difference) - # First, hardware limitation - - { - - if [[ $(awk '{ print $8 }' memory.$exp1.txt) -gt $maxmem ]]; then - echo 'The memory for '$exp1' is '$(awk '{ print $8 }' memory.$exp1.txt)' KBs. This has exceeded maximum allowable hardware memory limit of '$maxmem' KBs,' - echo 'resulting in Failure maxmem of the regression test.' - echo - failed_test=1 - else - echo 'The memory for '$exp1' is '$(awk '{ print $8 }' memory.$exp1.txt)' KBs and is within the maximum allowable hardware memory limit of '$maxmem' KBs,' - echo 'continuing with regression test.' - echo - fi - - } >> $output - # Next, maximum residence set size { @@ -348,7 +329,7 @@ fi } >> $output fi - elif [[ `expr substr $exp1 1 4` = "rrfs" ]]; then + elif [[ `expr substr $exp1 1 4` = "rrfs" ]] || [[ `expr substr $exp1 1 4` = "hafs" ]]; then { fv3_failed_test=0 if cmp -s fv3_dynvars.${exp1} fv3_dynvars.${exp2} @@ -520,7 +501,7 @@ elif [[ `expr substr $exp1 1 6` = "global" ]]; then fi -elif [[ `expr substr $exp1 1 4` = "rrfs" ]]; then +elif [[ `expr substr $exp1 1 4` = "rrfs" ]] || [[ `expr substr $exp1 1 4` = "hafs" ]]; then { fv3_failed_test=0 if cmp -s fv3_dynvars.${exp1} fv3_dynvars.${exp3} @@ -556,21 +537,6 @@ elif [[ `expr substr $exp1 1 4` = "rrfs" ]]; then fi - # Finally, scalability - - { - - timelogic=$( echo "$scale1thresh >= $scale2" | bc ) - if [[ "$timelogic" = 1 ]]; then - echo 'The case has passed the scalability regression test.' - echo 'The slope for the update ('$scale1thresh' seconds per node) is greater than or equal to that for the control ('$scale2' seconds per node).' - else - echo 'The case has Failed the scalability test.' - echo 'The slope for the update ('$scale1thresh' seconds per node) is less than that for the control ('$scale2' seconds per node).' - fi - - } >> $output - # Copy select results to $savdir mkdir -p $vfydir diff --git a/regression/regression_test_enkf.sh b/regression/regression_test_enkf.sh index f52a5d451f..38ee20ce99 100755 --- a/regression/regression_test_enkf.sh +++ b/regression/regression_test_enkf.sh @@ -31,8 +31,6 @@ cd $tmpdir # Other required constants for regression testing maxtime=1200 -maxmem=${maxmem:-3400000} # set in regression_param -maxmem=$((${memnode:-64}*1024*1024)) # Copy stdout and incr files # from $savdir to $tmpdir @@ -177,20 +175,6 @@ fi # Next, maximum residence set size (both harware limitation and percent difference) # First, hardware limitation - { - - if [[ $(awk '{ print $8 }' memory.$exp1.txt) -gt $maxmem ]]; then - echo 'The memory for '$exp1' is '$(awk '{ print $8 }' memory.$exp1.txt)' KBs. This has exceeded maximum allowable hardware memory limit of '$maxmem' KBs,' - echo 'resulting in Failure maxmem of the regression test.' - echo - failed_test=1 - else - echo 'The memory for '$exp1' is '$(awk '{ print $8 }' memory.$exp1.txt)' KBs and is within the maximum allowable hardware memory limit of '$maxmem' KBs,' - echo 'continuing with regression test.' - echo - fi - - } >> $output # Next, maximum residence set size @@ -397,21 +381,6 @@ else fi fi - # Finally, scalability - - { - - timelogic=$( echo "$scale1thresh >= $scale2" | bc ) - if [[ "$timelogic" = 1 ]]; then - echo 'The case has passed the scalability regression test.' - echo 'The slope for the update ('$scale1thresh' seconds per node) is greater than or equal to that for the control ('$scale2' seconds per node).' - else - echo 'The case has Failed the scalability test.' - echo 'The slope for the update ('$scale1thresh' seconds per node) is less than that for the control ('$scale2' seconds per node).' - fi - - } >> $output - # Copy select results to $savdir mkdir -p $vfydir diff --git a/regression/regression_var.sh b/regression/regression_var.sh index 3176372a3b..7403d89ec0 100755 --- a/regression/regression_var.sh +++ b/regression/regression_var.sh @@ -199,21 +199,23 @@ export JCAP="62" # Case Study analysis dates export global_adate="2022110900" export rtma_adate="2020022420" -export hwrf_nmm_adate="2012102812" export fv3_netcdf_adate="2017030100" export rrfs_3denvar_glbens_adate="2021072518" +export hafs_envar_adate="2020082512" # Paths for canned case data. export global_data="$casesdir/gfs/prod" export rtma_obs="$casesdir/regional/rtma_binary/$rtma_adate" export rtma_ges="$casesdir/regional/rtma_binary/$rtma_adate" -export hwrf_nmm_obs="$casesdir/regional/hwrf_nmm/$hwrf_nmm_adate" -export hwrf_nmm_ges="$casesdir/regional/hwrf_nmm/$hwrf_nmm_adate" export fv3_netcdf_obs="$casesdir/regional/fv3_netcdf/$fv3_netcdf_adate" export fv3_netcdf_ges="$casesdir/regional/fv3_netcdf/$fv3_netcdf_adate" export rrfs_3denvar_glbens_obs="$casesdir/regional/rrfs/$rrfs_3denvar_glbens_adate/obs" export rrfs_3denvar_glbens_ges="$casesdir/regional/rrfs/$rrfs_3denvar_glbens_adate/ges" export rrfs_3denvar_glbens_ens="$casesdir/regional/rrfs/$rrfs_3denvar_glbens_adate/ens" +export hafs_envar_obs="$casesdir/regional/hafs_RTdata/$hafs_envar_adate/obs" +export hafs_envar_ges="$casesdir/regional/hafs_RTdata/$hafs_envar_adate/ges" +export hafs_envar_ens="$casesdir/regional/hafs_RTdata/$hafs_envar_adate/ens" + # Define type of GPSRO data to be assimilated (refractivity or bending angle) export gps_dtype="gps_bnd" @@ -224,7 +226,7 @@ export regression_vfydir="$noscrub/regression" # Define debug variable - If you want to run the debug tests, set this variable to .true. Default is .false. export debug=".false." -# Define parameters for global_3dvar, global_4dvar, global_4denvar +# Define parameters for global_4denvar export minimization="lanczos" # If "lanczos", use sqrtb lanczos minimization algorithm. Otherwise use "pcgsoi". export nhr_obsbin="6" # Time window for observation binning. Use "6" for 3d4dvar test. Otherwise use "1" From acfe56d095319e962342d98a59b681c2858aeac4 Mon Sep 17 00:00:00 2001 From: hongli-wang <53354098+hongli-wang@users.noreply.github.com> Date: Tue, 31 Oct 2023 09:47:19 -0600 Subject: [PATCH 11/13] Add FED EnVar DA Capability (#632) - This PR supports RRFS_B GSI FED assimilation. - This PR adds a new GSI EnVar FED assimilation capability. The summary of the changes: - Read FED background and ensemble from restart phy files - Add new control/state variable of fed ( in anavinfo, section: metguess, state and control variable) - Create intfed.f90 and sfpfed.f90 for minimization. - Other related codes. For example, update hydrometers when either dbz or fed is assimilated, or both are assimilated. Previously the update of hydrometers is done only when dbz is assimilated. Please see Fixes #622 This PR was tested with: - One FED obs DA test - Real FED DA with pseudo ensemble for code development and debug - Real FED DA with real ensemble --------- Co-authored-by: David Dowell --- src/gsi/cplr_get_fv3_regional_ensperts.f90 | 235 ++++++++--- src/gsi/gsi_fedOper.F90 | 10 + src/gsi/gsi_files.cmake | 2 + src/gsi/gsi_rfv3io_mod.f90 | 89 +++-- src/gsi/gsimod.F90 | 39 +- src/gsi/intfed.f90 | 187 +++++++++ src/gsi/m_berror_stats_reg.f90 | 13 +- src/gsi/obsmod.F90 | 22 +- src/gsi/read_dbz_netcdf.f90 | 3 +- src/gsi/read_fed.f90 | 445 ++++++++------------- src/gsi/setupfed.f90 | 229 ++++++----- src/gsi/stpfed.f90 | 171 ++++++++ src/gsi/wrf_vars_mod.f90 | 39 +- 13 files changed, 997 insertions(+), 487 deletions(-) create mode 100644 src/gsi/intfed.f90 create mode 100644 src/gsi/stpfed.f90 diff --git a/src/gsi/cplr_get_fv3_regional_ensperts.f90 b/src/gsi/cplr_get_fv3_regional_ensperts.f90 index 2645723c62..2382ff1286 100644 --- a/src/gsi/cplr_get_fv3_regional_ensperts.f90 +++ b/src/gsi/cplr_get_fv3_regional_ensperts.f90 @@ -74,7 +74,7 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar) use netcdf , only: nf90_open, nf90_close,nf90_nowrite,nf90_inquire,nf90_format_netcdf4 use netcdf_mod , only: nc_check use gsi_rfv3io_mod, only: fv3lam_io_phymetvars3d_nouv - use obsmod, only: if_model_dbz + use obsmod, only: if_model_dbz,if_model_fed implicit none @@ -85,10 +85,10 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar) real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2,grd_ens%nsig):: u,v,tv,oz,rh real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2):: ps - real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2,grd_ens%nsig)::w,ql,qi,qr,qg,qs,qnr,dbz + real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2,grd_ens%nsig)::w,ql,qi,qr,qg,qs,qnr,dbz,fed real(r_kind),dimension(:,:,:),allocatable :: gg_u,gg_v,gg_tv,gg_rh real(r_kind),dimension(:,:,:),allocatable :: gg_w,gg_dbz,gg_qr,gg_qs, & - gg_qi,gg_qg,gg_oz,gg_cwmr + gg_qi,gg_qg,gg_oz,gg_cwmr,gg_fed real(r_kind),dimension(:,:),allocatable :: gg_ps real(r_single),pointer,dimension(:,:,:):: w3 =>NULL() @@ -117,6 +117,8 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar) type(type_fv3regfilenameg)::fv3_filename integer(i_kind):: imem_start,n_fv3sar + integer(i_kind):: i_caseflag + if(n_ens/=(n_ens_gfs+n_ens_fv3sar)) then write(6,*)'wrong, the sum of n_ens_gfs and n_ens_fv3sar not equal n_ens, stop' write(6,*)"n_ens, n_ens_gfs and n_ens_fv3sar are",n_ens, n_ens_gfs , n_ens_fv3sar @@ -317,7 +319,6 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar) fv3_filename%sfcdata=trim(ensfilenam_str)//"-fv3_sfcdata" fv3_filename%couplerres=trim(ensfilenam_str)//"-coupler.res" - if( mype==iope) then allocate(gg_u(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) allocate(gg_v(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) @@ -325,20 +326,35 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar) allocate(gg_rh(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) allocate(gg_oz(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) allocate(gg_ps(grd_ens%nlat,grd_ens%nlon)) - if ( .not. if_model_dbz ) then - call this%general_read_fv3_regional_parallel_over_ens(iope,fv3_filename,gg_ps,gg_u,gg_v,gg_tv,gg_rh,gg_oz) - else + + if ( if_model_dbz .or. if_model_fed ) then allocate(gg_w(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) - allocate(gg_dbz(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) allocate(gg_qr(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) allocate(gg_qs(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) allocate(gg_qi(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) allocate(gg_qg(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) allocate(gg_cwmr(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) - call this%general_read_fv3_regional_parallel_over_ens(iope,fv3_filename,gg_ps,gg_u,gg_v,gg_tv,gg_rh,gg_oz, & - g_ql=gg_cwmr,g_qi=gg_qi,g_qr=gg_qr,g_qs=gg_qs,g_qg=gg_qg,g_w=gg_w,g_dbz=gg_dbz) end if - end if + if ( if_model_dbz) then + allocate(gg_dbz(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) + end if + if ( if_model_fed) then + allocate(gg_fed(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig)) + end if + + if ( if_model_dbz .and. if_model_fed) then + call this%general_read_fv3_regional_parallel_over_ens(iope,fv3_filename,gg_ps,gg_u,gg_v,gg_tv,gg_rh,gg_oz,& + g_ql=gg_cwmr,g_qi=gg_qi,g_qr=gg_qr,g_qs=gg_qs,g_qg=gg_qg,g_w=gg_w,g_dbz=gg_dbz,g_fed=gg_fed) + elseif ( if_model_dbz ) then + call this%general_read_fv3_regional_parallel_over_ens(iope,fv3_filename,gg_ps,gg_u,gg_v,gg_tv,gg_rh,gg_oz,& + g_ql=gg_cwmr,g_qi=gg_qi,g_qr=gg_qr,g_qs=gg_qs,g_qg=gg_qg,g_w=gg_w,g_dbz=gg_dbz) + elseif ( if_model_fed ) then + call this%general_read_fv3_regional_parallel_over_ens(iope,fv3_filename,gg_ps,gg_u,gg_v,gg_tv,gg_rh,gg_oz,& + g_ql=gg_cwmr,g_qi=gg_qi,g_qr=gg_qr,g_qs=gg_qs,g_qg=gg_qg,g_w=gg_w,g_fed=gg_fed) + else + call this%general_read_fv3_regional_parallel_over_ens(iope,fv3_filename,gg_ps,gg_u,gg_v,gg_tv,gg_rh,gg_oz) + end if + end if !mype end do if(mype==0) then write(6,'(I0,A)') mype,': reading ensemble data in parallel is done (parallelization_over_ensmembers=.true.)' @@ -390,47 +406,129 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar) endif ! ! READ ENEMBLE MEMBERS DATA + ! + ! There are three options to control the list of variables that + ! will be read in along with the basic variables, ps,u,v,tv,rh,oz. + + ! parallelization_over_ensmembers=.True. only works for cases when l_use_dbz_directDA=.False. + ! Noted that l_use_dbz_directDA and if_modle_dbz couldn't be true at the same time + + ! + ! I_CASEFLAG defination + ! + + ! default: all the three options ( l_use_dbz_directDA, if_model_dbz, if_model_fed) are turned off .i.e., + ! if(.not. (l_use_dbz_directDA .or. if_model_dbz .or. if_model_fed )) + ! read in ps,u,v,tv,rh,oz + i_caseflag=0 + + ! only l_use_dbz_directDA is true + if (l_use_dbz_directDA .and. .not.if_model_dbz .and. .not.if_model_fed) i_caseflag=1 + + ! only if_model_dbz is true + if(.not.l_use_dbz_directDA .and. if_model_dbz .and. .not.if_model_fed) i_caseflag=2 + + ! only if_model_fed is true + if(.not.l_use_dbz_directDA .and. .not.if_model_dbz .and. .not.if_model_fed) i_caseflag=3 + + ! l_use_dbz_directDA=.true. and if_model_fed=.true. + if(l_use_dbz_directDA .and. .not.if_model_dbz .and. if_model_fed) i_caseflag=4 + + ! if_model_dbz=.true. and if_model_fed=.true. + if(.not. l_use_dbz_directDA.and. if_model_dbz .and. if_model_fed) i_caseflag=5 + + + !-------------------------------------------------- + ! When .not. parallelization_over_ensmembers=.True. + ! All the above 6 cases (i_caseflag=0,1,2,3,4,5) are valid in + ! the current applications as of Oct 20 2023. + + !-------------------------------------------- + ! When parallelization_over_ensmembers=.True. + ! Only i_flagcase=0,2,3,5 are vaild choices. + + if( .not. parallelization_over_ensmembers )then if (mype == 0) write(6,'(a,a)') & 'CALL READ_FV3_REGIONAL_ENSPERTS FOR ENS DATA with the filename str : ',trim(ensfilenam_str) - if (.not. (l_use_dbz_directDA .or. if_model_dbz) ) then ! Read additional hydrometers and w for dirZDA - call this%general_read_fv3_regional(fv3_filename,ps,u,v,tv,rh,oz) - else - if( l_use_dbz_directDA ) then - call this%general_read_fv3_regional(fv3_filename,ps,u,v,tv,rh,oz, & - g_ql=ql,g_qi=qi,g_qr=qr,g_qs=qs,g_qg=qg,g_qnr=qnr,g_w=w) - else if( if_model_dbz )then - call this%general_read_fv3_regional(fv3_filename,ps,u,v,tv,rh,oz, & - g_ql=ql,g_qi=qi,g_qr=qr,g_qs=qs,g_qg=qg,g_qnr=qnr,g_w=w,g_dbz=dbz) - end if - end if + + select case (i_caseflag) + case (0) + call this%general_read_fv3_regional(fv3_filename,ps,u,v,tv,rh,oz) + case (1) + call this%general_read_fv3_regional(fv3_filename,ps,u,v,tv,rh,oz, & + g_ql=ql,g_qi=qi,g_qr=qr,g_qs=qs,g_qg=qg,g_qnr=qnr,g_w=w) + case (2) + call this%general_read_fv3_regional(fv3_filename,ps,u,v,tv,rh,oz, & + g_ql=ql,g_qi=qi,g_qr=qr,g_qs=qs,g_qg=qg,g_qnr=qnr,g_w=w,g_dbz=dbz) + case (3) + call this%general_read_fv3_regional(fv3_filename,ps,u,v,tv,rh,oz, & + g_ql=ql,g_qi=qi,g_qr=qr,g_qs=qs,g_qg=qg,g_w=w,g_fed=fed) + case (4) + call this%general_read_fv3_regional(fv3_filename,ps,u,v,tv,rh,oz, & + g_ql=ql,g_qi=qi,g_qr=qr,g_qs=qs,g_qg=qg,g_qnr=qnr,g_w=w,g_fed=fed) + case (5) + call this%general_read_fv3_regional(fv3_filename,ps,u,v,tv,rh,oz, & + g_ql=ql,g_qi=qi,g_qr=qr,g_qs=qs,g_qg=qg,g_qnr=qnr,g_w=w,g_dbz=dbz,g_fed=fed) + end select end if - + if( parallelization_over_ensmembers )then iope=(n_fv3sar-1)*npe/n_ens_fv3sar if(mype==iope) then write(0,'(I0,A,I0,A)') mype,': scatter member ',n_fv3sar,' to other ranks...' - if( if_model_dbz )then - call this%parallel_read_fv3_step2(mype,iope,& + select case (i_caseflag) + case (0) + call this%parallel_read_fv3_step2(mype,iope,& + g_ps=ps,g_u=u,g_v=v,g_tv=tv,g_rh=rh,g_ql=ql,g_oz=oz, & + gg_ps=gg_ps,gg_tv=gg_tv,gg_u=gg_u,gg_v=gg_v,gg_rh=gg_rh) + case (2) + call this%parallel_read_fv3_step2(mype,iope,& g_ps=ps,g_u=u,g_v=v,g_tv=tv,g_rh=rh,g_ql=ql,& g_oz=oz,g_w=w,g_qr=qr,g_qs=qs,g_qi=qi,g_qg=qg,g_dbz=dbz,& gg_ps=gg_ps,gg_tv=gg_tv,gg_u=gg_u,gg_v=gg_v,& gg_rh=gg_rh,gg_w=gg_w,gg_dbz=gg_dbz,gg_qr=gg_qr,& gg_qs=gg_qs,gg_qi=gg_qi,gg_qg=gg_qg,gg_ql=gg_cwmr) - else - call this%parallel_read_fv3_step2(mype,iope,& - g_ps=ps,g_u=u,g_v=v,g_tv=tv,g_rh=rh,g_ql=ql,g_oz=oz, & - gg_ps=gg_ps,gg_tv=gg_tv,gg_u=gg_u,gg_v=gg_v,gg_rh=gg_rh) - end if + case (3) + call this%parallel_read_fv3_step2(mype,iope,& + g_ps=ps,g_u=u,g_v=v,g_tv=tv,g_rh=rh,g_ql=ql,& + g_oz=oz,g_w=w,g_qr=qr,g_qs=qs,g_qi=qi,g_qg=qg,g_fed=fed,& + gg_ps=gg_ps,gg_tv=gg_tv,gg_u=gg_u,gg_v=gg_v,& + gg_rh=gg_rh,gg_w=gg_w,gg_fed=gg_fed,gg_qr=gg_qr,& + gg_qs=gg_qs,gg_qi=gg_qi,gg_qg=gg_qg,gg_ql=gg_cwmr) + case (5) + call this%parallel_read_fv3_step2(mype,iope,& + g_ps=ps,g_u=u,g_v=v,g_tv=tv,g_rh=rh,g_ql=ql,& + g_oz=oz,g_w=w,g_qr=qr,g_qs=qs,g_qi=qi,g_qg=qg,g_dbz=dbz,g_fed=fed,& + gg_ps=gg_ps,gg_tv=gg_tv,gg_u=gg_u,gg_v=gg_v,& + gg_rh=gg_rh,gg_w=gg_w,gg_dbz=gg_dbz,gg_fed=gg_fed,gg_qr=gg_qr,& + gg_qs=gg_qs,gg_qi=gg_qi,gg_qg=gg_qg,gg_ql=gg_cwmr) + case (1,4) + write(6,*)'i_case_flag=1 or 4 is not a valid choice for parallelization_over_ensmembers=.T. Stop(8880) ' + call stop2(8880) + end select else - if( if_model_dbz )then - call this%parallel_read_fv3_step2(mype,iope,& + select case (i_caseflag) + case (0) + call this%parallel_read_fv3_step2(mype,iope,& + g_ps=ps,g_u=u,g_v=v,g_tv=tv,g_rh=rh,g_ql=ql,g_oz=oz) + case (2) + call this%parallel_read_fv3_step2(mype,iope,& g_ps=ps,g_u=u,g_v=v,g_tv=tv,g_rh=rh,g_ql=ql,& g_oz=oz,g_w=w,g_qr=qr,g_qs=qs,g_qi=qi,g_qg=qg,g_dbz=dbz) - else - call this%parallel_read_fv3_step2(mype,iope,& - g_ps=ps,g_u=u,g_v=v,g_tv=tv,g_rh=rh,g_ql=ql,g_oz=oz) - endif + case (3) + call this%parallel_read_fv3_step2(mype,iope,& + g_ps=ps,g_u=u,g_v=v,g_tv=tv,g_rh=rh,g_ql=ql,& + g_oz=oz,g_w=w,g_qr=qr,g_qs=qs,g_qi=qi,g_qg=qg,g_fed=fed) + case (5) + call this%parallel_read_fv3_step2(mype,iope,& + g_ps=ps,g_u=u,g_v=v,g_tv=tv,g_rh=rh,g_ql=ql,& + g_oz=oz,g_w=w,g_qr=qr,g_qs=qs,g_qi=qi,g_qg=qg,g_dbz=dbz,g_fed=fed) + case (1,4) + write(6,*)'i_case_flag=1 or 4 is not a valid choice for parallelization_over_ensmembers=.T. Stop(8880) ' + call stop2(8880) + end select + endif call MPI_Barrier(mpi_comm_world,ierror) @@ -601,6 +699,16 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar) end do end do end do + + case('fed','FED') + do k=1,grd_ens%nsig + do i=1,grd_ens%lon2 + do j=1,grd_ens%lat2 + w3(j,i,k) = fed(j,i,k) + x3(j,i,k)=x3(j,i,k)+fed(j,i,k) + end do + end do + end do end select @@ -709,7 +817,7 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar) end subroutine get_fv3_regional_ensperts_run subroutine general_read_fv3_regional(this,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g_rh,g_oz, & - g_ql,g_qi,g_qr,g_qs,g_qg,g_qnr,g_w,g_dbz) + g_ql,g_qi,g_qr,g_qs,g_qg,g_qnr,g_w,g_dbz,g_fed) !$$$ subprogram documentation block ! first compied from general_read_arw_regional . . . . ! subprogram: general_read_fv3_regional read fv3sar model ensemble members @@ -760,7 +868,7 @@ subroutine general_read_fv3_regional(this,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g use hybrid_ensemble_parameters, only: grd_ens use directDA_radaruse_mod, only: l_use_cvpqx, cvpqx_pval, cld_nt_updt use directDA_radaruse_mod, only: l_cvpnr, cvpnr_pval - use obsmod, only:if_model_dbz + use obsmod, only:if_model_dbz,if_model_fed implicit none @@ -769,7 +877,7 @@ subroutine general_read_fv3_regional(this,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g class(get_fv3_regional_ensperts_class), intent(inout) :: this type (type_fv3regfilenameg) , intent (in) :: fv3_filenameginput real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2,grd_ens%nsig),intent(out)::g_u,g_v,g_tv,g_rh,g_oz - real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2,grd_ens%nsig),optional,intent(out)::g_ql,g_qi,g_qr,g_dbz + real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2,grd_ens%nsig),optional,intent(out)::g_ql,g_qi,g_qr,g_dbz,g_fed real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2,grd_ens%nsig),optional,intent(out)::g_qs,g_qg,g_qnr,g_w real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2),intent(out):: g_ps @@ -857,7 +965,7 @@ subroutine general_read_fv3_regional(this,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g fv3_filenameginput%dynvars,fv3_filenameginput) call gsi_fv3ncdf_read(grd_fv3lam_ens_tracer_io_nouv,gsibundle_fv3lam_ens_tracer_nouv,& fv3_filenameginput%tracers,fv3_filenameginput) - if( if_model_dbz ) then + if( if_model_dbz .or. if_model_fed ) then call gsi_fv3ncdf_read(grd_fv3lam_ens_phyvar_io_nouv,gsibundle_fv3lam_ens_phyvar_nouv,& fv3_filenameginput%phyvars,fv3_filenameginput) end if @@ -869,9 +977,9 @@ subroutine general_read_fv3_regional(this,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g endif ier=0 call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_dynvar_nouv, 'tsen' ,g_tsen ,istatus );ier=ier+istatus - call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_tracer_nouv, 'q' ,g_q ,istatus );ier=ier+istatus - call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_tracer_nouv, 'oz' ,g_oz ,istatus );ier=ier+istatus - if (l_use_dbz_directDA .or. if_model_dbz) then + call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_tracer_nouv, 'q' ,g_q ,istatus );ier=ier+istatus + call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_tracer_nouv, 'oz' ,g_oz ,istatus );ier=ier+istatus + if (l_use_dbz_directDA .or. if_model_dbz .or. if_model_fed) then call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_tracer_nouv, 'ql' ,g_ql ,istatus );ier=ier+istatus call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_tracer_nouv, 'qi' ,g_qi ,istatus );ier=ier+istatus call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_tracer_nouv, 'qr' ,g_qr ,istatus );ier=ier+istatus @@ -882,6 +990,8 @@ subroutine general_read_fv3_regional(this,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_dynvar_nouv, 'w' , g_w ,istatus );ier=ier+istatus if( if_model_dbz )& call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_phyvar_nouv, 'dbz' , g_dbz ,istatus );ier=ier+istatus + if( if_model_fed )& + call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_phyvar_nouv, 'fed' , g_fed, istatus );ier=ier+istatus end if @@ -990,7 +1100,7 @@ subroutine general_read_fv3_regional(this,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g end subroutine general_read_fv3_regional subroutine general_read_fv3_regional_parallel_over_ens(this,iope,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g_rh,g_oz, & - g_ql,g_qi,g_qr,g_qs,g_qg,g_qnr,g_w,g_dbz) + g_ql,g_qi,g_qr,g_qs,g_qg,g_qnr,g_w,g_dbz,g_fed) !$$$ subprogram documentation block ! first compied from general_read_arw_regional . . . . ! subprogram: general_read_fv3_regional read fv3sar model ensemble members @@ -1039,7 +1149,7 @@ subroutine general_read_fv3_regional_parallel_over_ens(this,iope,fv3_filenamegin use gsi_bundlemod, only: gsi_grid use gsi_bundlemod, only: gsi_bundlecreate,gsi_bundledestroy use gsi_bundlemod, only: gsi_bundlegetvar - use obsmod, only: if_model_dbz + use obsmod, only: if_model_dbz,if_model_fed use gsi_rfv3io_mod, only: gsi_fv3ncdf_read_ens_parallel_over_ens,gsi_fv3ncdf_readuv_ens_parallel_over_ens @@ -1051,7 +1161,7 @@ subroutine general_read_fv3_regional_parallel_over_ens(this,iope,fv3_filenamegin integer(i_kind), intent (in) :: iope type (type_fv3regfilenameg) , intent (in) :: fv3_filenameginput real(r_kind),dimension(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig),intent(out)::g_u,g_v,g_tv,g_rh,g_oz - real(r_kind),dimension(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig),optional,intent(out)::g_ql,g_qi,g_qr,g_dbz + real(r_kind),dimension(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig),optional,intent(out)::g_ql,g_qi,g_qr,g_dbz,g_fed real(r_kind),dimension(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig),optional,intent(out)::g_qs,g_qg,g_qnr,g_w real(r_kind),dimension(grd_ens%nlat,grd_ens%nlon),intent(out):: g_ps @@ -1102,11 +1212,17 @@ subroutine general_read_fv3_regional_parallel_over_ens(this,iope,fv3_filenamegin endif if(fv3sar_ensemble_opt == 0) then - if (if_model_dbz) then + if (if_model_dbz .or. if_model_fed) then call gsi_fv3ncdf_read_ens_parallel_over_ens(fv3_filenameginput%dynvars,fv3_filenameginput,delp=g_delp,tsen=g_tsen,w=g_w,iope=iope) call gsi_fv3ncdf_read_ens_parallel_over_ens(fv3_filenameginput%tracers,fv3_filenameginput,q=g_q,oz=g_oz,ql=g_ql,qr=g_qr,& qs=g_qs,qi=g_qi,qg=g_qg,iope=iope) - call gsi_fv3ncdf_read_ens_parallel_over_ens(fv3_filenameginput%phyvars,fv3_filenameginput,dbz=g_dbz,iope=iope) + if(if_model_dbz .and. if_model_fed) then + call gsi_fv3ncdf_read_ens_parallel_over_ens(fv3_filenameginput%phyvars,fv3_filenameginput,dbz=g_dbz,fed=g_fed,iope=iope) + elseif(if_model_dbz) then + call gsi_fv3ncdf_read_ens_parallel_over_ens(fv3_filenameginput%phyvars,fv3_filenameginput,dbz=g_dbz,iope=iope) + elseif(if_model_fed) then + call gsi_fv3ncdf_read_ens_parallel_over_ens(fv3_filenameginput%phyvars,fv3_filenameginput,fed=g_fed,iope=iope) + end if else call gsi_fv3ncdf_read_ens_parallel_over_ens(fv3_filenameginput%dynvars,fv3_filenameginput,delp=g_delp,tsen=g_tsen,iope=iope) call gsi_fv3ncdf_read_ens_parallel_over_ens(fv3_filenameginput%tracers,fv3_filenameginput,q=g_q,oz=g_oz,iope=iope) @@ -1169,8 +1285,8 @@ end subroutine general_read_fv3_regional_parallel_over_ens subroutine parallel_read_fv3_step2(this,mype,iope, & g_ps,g_u,g_v,g_tv,g_rh,g_ql,g_oz,g_w,g_qr,g_qs,g_qi,& - g_qg,g_dbz, & - gg_ps,gg_tv,gg_u,gg_v,gg_rh,gg_w,gg_dbz,gg_qr,& + g_qg,g_dbz,g_fed, & + gg_ps,gg_tv,gg_u,gg_v,gg_rh,gg_w,gg_dbz,gg_fed,gg_qr,& gg_qs,gg_qi,gg_qg,gg_ql) !$$$ subprogram documentation block @@ -1210,7 +1326,7 @@ subroutine parallel_read_fv3_step2(this,mype,iope, & real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2,grd_ens%nsig),intent(out):: & g_u,g_v,g_tv,g_rh,g_ql,g_oz real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2,grd_ens%nsig),intent(out),optional::& - g_w,g_qr,g_qs,g_qi,g_qg,g_dbz + g_w,g_qr,g_qs,g_qi,g_qg,g_dbz,g_fed integer(i_kind), intent(in) :: mype, iope real(r_kind),dimension(grd_ens%lat2,grd_ens%lon2),intent(out):: g_ps @@ -1219,7 +1335,7 @@ subroutine parallel_read_fv3_step2(this,mype,iope, & gg_u,gg_v,gg_tv,gg_rh real(r_kind),optional,dimension(grd_ens%nlat,grd_ens%nlon,grd_ens%nsig) :: & - gg_w,gg_dbz,gg_qr,gg_qs,gg_qi,gg_qg,gg_ql + gg_w,gg_dbz,gg_fed,gg_qr,gg_qs,gg_qi,gg_qg,gg_ql real(r_kind),optional,dimension(grd_ens%nlat,grd_ens%nlon):: gg_ps ! Declare local variables @@ -1250,13 +1366,10 @@ subroutine parallel_read_fv3_step2(this,mype,iope, & if (mype==iope) call this%fill_regional_2d(gg_rh(1,1,k),wrk_send_2d) call mpi_scatterv(wrk_send_2d,grd_ens%ijn_s,grd_ens%displs_s,mpi_rtype, & g_rh(1,1,k),grd_ens%ijn_s(mype+1),mpi_rtype,iope,mpi_comm_world,ierror) - if( present(g_dbz) )then + if( present(g_dbz) .or. present(g_fed) )then if (mype==iope) call this%fill_regional_2d(gg_w(1,1,k),wrk_send_2d) call mpi_scatterv(wrk_send_2d,grd_ens%ijn_s,grd_ens%displs_s,mpi_rtype, & g_w(1,1,k),grd_ens%ijn_s(mype+1),mpi_rtype,iope,mpi_comm_world,ierror) - if (mype==iope) call this%fill_regional_2d(gg_dbz(1,1,k),wrk_send_2d) - call mpi_scatterv(wrk_send_2d,grd_ens%ijn_s,grd_ens%displs_s,mpi_rtype,& - g_dbz(1,1,k),grd_ens%ijn_s(mype+1),mpi_rtype,iope,mpi_comm_world,ierror) if (mype==iope) call this%fill_regional_2d(gg_qr(1,1,k),wrk_send_2d) call mpi_scatterv(wrk_send_2d,grd_ens%ijn_s,grd_ens%displs_s,mpi_rtype,& g_qr(1,1,k),grd_ens%ijn_s(mype+1),mpi_rtype,iope,mpi_comm_world,ierror) @@ -1272,6 +1385,16 @@ subroutine parallel_read_fv3_step2(this,mype,iope, & if (mype==iope) call this%fill_regional_2d(gg_ql(1,1,k),wrk_send_2d) call mpi_scatterv(wrk_send_2d,grd_ens%ijn_s,grd_ens%displs_s,mpi_rtype,& g_ql(1,1,k),grd_ens%ijn_s(mype+1),mpi_rtype,iope,mpi_comm_world,ierror) + if( present(g_dbz)) then + if (mype==iope) call this%fill_regional_2d(gg_dbz(1,1,k),wrk_send_2d) + call mpi_scatterv(wrk_send_2d,grd_ens%ijn_s,grd_ens%displs_s,mpi_rtype,& + g_dbz(1,1,k),grd_ens%ijn_s(mype+1),mpi_rtype,iope,mpi_comm_world,ierror) + end if + if( present(g_fed)) then + if (mype==iope) call this%fill_regional_2d(gg_fed(1,1,k),wrk_send_2d) + call mpi_scatterv(wrk_send_2d,grd_ens%ijn_s,grd_ens%displs_s,mpi_rtype,& + g_fed(1,1,k),grd_ens%ijn_s(mype+1),mpi_rtype,iope,mpi_comm_world,ierror) + end if end if enddo deallocate(wrk_send_2d) diff --git a/src/gsi/gsi_fedOper.F90 b/src/gsi/gsi_fedOper.F90 index b2b2400ff0..e704a1c056 100644 --- a/src/gsi/gsi_fedOper.F90 +++ b/src/gsi/gsi_fedOper.F90 @@ -9,6 +9,7 @@ module gsi_fedOper ! 2023-07-10 D. Dowell - created new module for FED (flash extent ! density); gsi_dbzOper.F90 code used as a ! starting point for developing this new module +! 2023-08-24 H. Wang - Turned on intfed and stpfed ! ! input argument list: see Fortran 90 style document below ! @@ -128,6 +129,7 @@ subroutine setup_(self, lunin, mype, is, nobs, init_pass, last_pass) end subroutine setup_ subroutine intjo1_(self, ibin, rval,sval, qpred,sbias) + use intfedmod, only: intjo => intfed use gsi_bundlemod , only: gsi_bundle use bias_predictors, only: predictors use m_obsNode , only: obsNode @@ -145,9 +147,14 @@ subroutine intjo1_(self, ibin, rval,sval, qpred,sbias) character(len=*),parameter:: myname_=myname//"::intjo1_" class(obsNode),pointer:: headNode + headNode => obsLList_headNode(self%obsLL(ibin)) + call intjo(headNode, rval,sval) + headNode => null() + end subroutine intjo1_ subroutine stpjo1_(self, ibin, dval,xval,pbcjo,sges,nstep,dbias,xbias) + use stpfedmod, only: stpjo => stpfed use gsi_bundlemod, only: gsi_bundle use bias_predictors, only: predictors use m_obsNode , only: obsNode @@ -169,6 +176,9 @@ subroutine stpjo1_(self, ibin, dval,xval,pbcjo,sges,nstep,dbias,xbias) character(len=*),parameter:: myname_=myname//"::stpjo1_" class(obsNode),pointer:: headNode + headNode => obsLList_headNode(self%obsLL(ibin)) + call stpjo(headNode,dval,xval,pbcjo(:),sges,nstep) + headNode => null() end subroutine stpjo1_ end module gsi_fedOper diff --git a/src/gsi/gsi_files.cmake b/src/gsi/gsi_files.cmake index b514e11c1e..5a7d29c208 100644 --- a/src/gsi/gsi_files.cmake +++ b/src/gsi/gsi_files.cmake @@ -274,6 +274,7 @@ intaod.f90 intcldch.f90 intco.f90 intdbz.f90 +intfed.f90 intdw.f90 intgps.f90 intgust.f90 @@ -594,6 +595,7 @@ stpcalc.f90 stpcldch.f90 stpco.f90 stpdbz.f90 +stpfed.f90 stpdw.f90 stpgps.f90 stpgust.f90 diff --git a/src/gsi/gsi_rfv3io_mod.f90 b/src/gsi/gsi_rfv3io_mod.f90 index d0cbd3afbd..e62cc06f2b 100644 --- a/src/gsi/gsi_rfv3io_mod.f90 +++ b/src/gsi/gsi_rfv3io_mod.f90 @@ -97,7 +97,7 @@ module gsi_rfv3io_mod type(sub2grid_info) :: grd_fv3lam_tracersmoke_ionouv type(sub2grid_info) :: grd_fv3lam_phyvar_ionouv type(sub2grid_info) :: grd_fv3lam_uv - integer(i_kind) ,parameter:: ndynvarslist=13, ntracerslist=8, nphyvarslist=1 + integer(i_kind) ,parameter:: ndynvarslist=13, ntracerslist=8, nphyvarslist=2 character(len=max_varname_length), dimension(ndynvarslist), parameter :: & vardynvars = [character(len=max_varname_length) :: & @@ -106,13 +106,13 @@ module gsi_rfv3io_mod vartracers = [character(len=max_varname_length) :: & 'q','oz','ql','qi','qr','qs','qg','qnr',aeronames_cmaq_fv3,'pm25at','pm25ac','pm25co','pm2_5','amassi','amassj','amassk',aeronames_smoke_fv3] character(len=max_varname_length), dimension(nphyvarslist), parameter :: & - varphyvars = [character(len=max_varname_length) :: 'dbz'] - character(len=max_varname_length), dimension(16+naero_cmaq_fv3+7+naero_smoke_fv3), parameter :: & + varphyvars = [character(len=max_varname_length) :: 'dbz','fed'] + character(len=max_varname_length), dimension(16+naero_cmaq_fv3+7+naero_smoke_fv3+1), parameter :: & varfv3name = [character(len=max_varname_length) :: & - 'u','v','W','T','delp','sphum','o3mr','liq_wat','ice_wat','rainwat','snowwat','graupel','rain_nc','ref_f3d','ps','DZ', & + 'u','v','W','T','delp','sphum','o3mr','liq_wat','ice_wat','rainwat','snowwat','graupel','rain_nc','ref_f3d','flash_extent_density','ps','DZ', & aeronames_cmaq_fv3,'pm25at','pm25ac','pm25co','pm2_5','amassi','amassj','amassk',aeronames_smoke_fv3], & vgsiname = [character(len=max_varname_length) :: & - 'u','v','w','tsen','delp','q','oz','ql','qi','qr','qs','qg','qnr','dbz','ps','delzinc', & + 'u','v','w','tsen','delp','q','oz','ql','qi','qr','qs','qg','qnr','dbz','fed','ps','delzinc', & aeronames_cmaq_fv3,'pm25at','pm25ac','pm25co','pm2_5','amassi','amassj','amassk',aeronames_smoke_fv3] character(len=max_varname_length),dimension(:),allocatable:: name_metvars2d character(len=max_varname_length),dimension(:),allocatable:: name_metvars3d @@ -801,7 +801,7 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) use gsi_metguess_mod, only: gsi_metguess_get use netcdf, only:nf90_open,nf90_close,nf90_inquire,nf90_nowrite, nf90_format_netcdf4 use gsi_chemguess_mod, only: gsi_chemguess_get - use obsmod, only: if_model_dbz + use obsmod, only: if_model_dbz,if_model_fed implicit none @@ -809,7 +809,7 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) integer(i_kind) :: it character(len=24),parameter :: myname = 'read_fv3_netcdf_guess' integer(i_kind) k,i,j - integer(i_kind) ier,istatus + integer(i_kind) ier,istatus,ivar real(r_kind),dimension(:,:),pointer::ges_ps=>NULL() real(r_kind),dimension(:,:),pointer::ges_ps_readin=>NULL() real(r_kind),dimension(:,:),pointer::ges_z=>NULL() @@ -833,6 +833,7 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) real(r_kind),dimension(:,:,:),pointer::ges_qnr=>NULL() real(r_kind),dimension(:,:,:),pointer::ges_w=>NULL() real(r_kind),dimension(:,:,:),pointer::ges_dbz=>NULL() + real(r_kind),dimension(:,:,:),pointer::ges_fed=>NULL() real(r_kind),dimension(:,:,:),pointer::ges_aalj=>NULL() real(r_kind),dimension(:,:,:),pointer::ges_acaj=>NULL() @@ -1016,12 +1017,13 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) write(6,*)"the set up for met variable is not as expected, abort" call stop2(222) endif - if ( if_model_dbz ) then - if( nphyvario3d<=0 ) then - write(6,*)"the set up for met variable (phyvar) is not as expected, abort" - call stop2(223) - end if - endif + + ivar=0 ; if (if_model_dbz) ivar=ivar+1; if(if_model_fed) ivar=ivar+1 + if ( ivar > nphyvario3d ) then + write(6,*)"the set up for met variable (dbz and fed in phyvar) is not as expected,abort" + call stop2(223) + end if + if (fv3sar_bg_opt == 0.and.ifindstrloc(name_metvars3d,'delp') <= 0)then ndynvario3d=ndynvario3d+1 ! for delp endif @@ -1217,7 +1219,7 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) ntracerio2d=0 endif - if( if_model_dbz )then + if( allocated(fv3lam_io_phymetvars3d_nouv) )then call gsi_bundlecreate(gsibundle_fv3lam_phyvar_nouv,GSI_MetGuess_Bundle(it)%grid,'gsibundle_fv3lam_phyvar_nouv',istatus, & names3d=fv3lam_io_phymetvars3d_nouv) end if @@ -1311,7 +1313,7 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) endif - if ( if_model_dbz )then + if ( if_model_dbz .or. if_model_fed )then inner_vars=1 numfields=inner_vars*(nphyvario3d*grd_a%nsig) deallocate(lnames,names) @@ -1352,7 +1354,7 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'tv' ,ges_tv ,istatus );ier=ier+istatus call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'q' ,ges_q ,istatus );ier=ier+istatus call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'oz' ,ges_oz ,istatus );ier=ier+istatus - if (l_use_dbz_directDA .or. if_model_dbz) then + if (l_use_dbz_directDA .or. nphyvario3d > 0) then call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'ql' ,ges_ql ,istatus );ier=ier+istatus call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'qi' ,ges_qi ,istatus );ier=ier+istatus call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'qr' ,ges_qr ,istatus );ier=ier+istatus @@ -1365,6 +1367,8 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) end if if(if_model_dbz) & call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'dbz' , ges_dbz ,istatus );ier=ier+istatus + if(if_model_fed) & + call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'fed' , ges_fed ,istatus );ier=ier+istatus end if if (ier/=0) call die(trim(myname),'cannot get pointers for fv3 met-fields, ier =',ier) @@ -1427,7 +1431,7 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) & ,fv3filenamegin(it)%dynvars,fv3filenamegin(it)) call gsi_fv3ncdf_read(grd_fv3lam_tracer_ionouv,gsibundle_fv3lam_tracer_nouv & & ,fv3filenamegin(it)%tracers,fv3filenamegin(it)) - if( if_model_dbz )then + if( nphyvario3d > 0 )then call gsi_fv3ncdf_read(grd_fv3lam_phyvar_ionouv,gsibundle_fv3lam_phyvar_nouv & & ,fv3filenamegin(it)%phyvars,fv3filenamegin(it)) end if @@ -1526,8 +1530,9 @@ subroutine read_fv3_netcdf_guess(fv3filenamegin) if (laeroana_fv3smoke) then call gsi_copy_bundle(gsibundle_fv3lam_tracersmoke_nouv,GSI_ChemGuess_Bundle(it)) endif - - if(if_model_dbz) call gsi_copy_bundle(gsibundle_fv3lam_phyvar_nouv,GSI_MetGuess_Bundle(it)) + if ( nphyvario3d > 0 ) then + call gsi_copy_bundle(gsibundle_fv3lam_phyvar_nouv,GSI_MetGuess_Bundle(it)) + end if call GSI_BundleGetPointer ( gsibundle_fv3lam_dynvar_nouv, 'tsen' ,ges_tsen_readin ,istatus );ier=ier+istatus !! tsen2tv !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! do k=1,nsig @@ -2354,7 +2359,7 @@ subroutine gsi_fv3ncdf_read(grd_ionouv,cstate_nouv,filenamein,fv3filenamegin) countloc=(/nxcase,nycase,1/) ! Variable ref_f3d in phy_data.nc has a smaller domain size than ! dynvariables and tracers as well as a reversed order in vertical - if ( trim(adjustl(varname)) == 'ref_f3d' )then + if ( trim(adjustl(varname)) == 'ref_f3d' .or. trim(adjustl(varname)) == 'flash_extent_density' )then iret=nf90_inquire_dimension(gfile_loc,1,name,len) if(trim(name)=='xaxis_1') nx_phy=len if( nx_phy == nxcase )then @@ -2380,7 +2385,7 @@ subroutine gsi_fv3ncdf_read(grd_ionouv,cstate_nouv,filenamein,fv3filenamegin) enddo else iret=nf90_inq_varid(gfile_loc,trim(adjustl(varname)),var_id) - if ( trim(adjustl(varname)) == 'ref_f3d' )then + if ( trim(adjustl(varname)) == 'ref_f3d'.or. trim(adjustl(varname)) == 'flash_extent_density' )then uu2d = 0.0_r_kind iret=nf90_get_var(gfile_loc,var_id,uu2d_tmp,start=startloc_tmp,count=countloc_tmp) where(uu2d_tmp < 0.0_r_kind) @@ -2845,7 +2850,7 @@ subroutine gsi_fv3ncdf_readuv_v1(grd_uv,ges_u,ges_v,fv3filenamegin) end subroutine gsi_fv3ncdf_readuv_v1 subroutine gsi_fv3ncdf_read_ens_parallel_over_ens(filenamein,fv3filenamegin, & - delp,tsen,w,q,oz,ql,qr,qs,qi,qg,dbz,iope) + delp,tsen,w,q,oz,ql,qr,qs,qi,qg,dbz,fed,iope) !$$$ subprogram documentation block ! . . . . ! subprogram: gsi_fv3ncdf_read_ens_parallel_over_ens @@ -2887,7 +2892,7 @@ subroutine gsi_fv3ncdf_read_ens_parallel_over_ens(filenamein,fv3filenamegin, & integer(i_kind) ,intent(in ) :: iope real(r_kind),allocatable,dimension(:,:):: uu2d, uu2d_tmp real(r_kind),dimension(nlat,nlon,nsig):: hwork - real(r_kind),dimension(nlat,nlon,nsig),intent(out),optional:: delp,tsen,w,q,oz,ql,qr,qs,qi,qg,dbz + real(r_kind),dimension(nlat,nlon,nsig),intent(out),optional:: delp,tsen,w,q,oz,ql,qr,qs,qi,qg,dbz,fed character(len=max_varname_length) :: varname character(len=max_varname_length) :: name character(len=max_filename_length), allocatable,dimension(:) :: varname_files @@ -2932,11 +2937,18 @@ subroutine gsi_fv3ncdf_read_ens_parallel_over_ens(filenamein,fv3filenamegin, & varname_files = (/'sphum',' o3mr'/) end if end if - if( present(dbz) )then ! phyvars: dbz + if( present(dbz) .and. present(fed) )then ! phyvars: dbz, fed + allocate(varname_files(2)) + varname_files = (/'ref_f3d ','flash_extent_density'/) + elseif( present(dbz) )then ! phyvars: dbz allocate(varname_files(1)) varname_files = (/'ref_f3d'/) + elseif( present(fed) )then ! phyvars: fed + allocate(varname_files(1)) + varname_files = (/'flash_extent_density'/) end if + if(fv3_io_layout_y > 1) then allocate(gfile_loc_layout(0:fv3_io_layout_y-1)) do nio=0,fv3_io_layout_y-1 @@ -2967,7 +2979,7 @@ subroutine gsi_fv3ncdf_read_ens_parallel_over_ens(filenamein,fv3filenamegin, & varname = trim(varname_files(ivar)) ! Variable ref_f3d in phy_data.nc has a smaller domain size than ! dynvariables and tracers as well as a reversed order in vertical - if ( trim(adjustl(varname)) == 'ref_f3d' )then + if ( trim(adjustl(varname)) == 'ref_f3d' .or. trim(adjustl(varname)) == 'flash_extent_density' )then iret=nf90_inquire_dimension(gfile_loc,1,name,len) if(trim(name)=='xaxis_1') nx_phy=len if( nx_phy == nxcase )then @@ -2993,7 +3005,7 @@ subroutine gsi_fv3ncdf_read_ens_parallel_over_ens(filenamein,fv3filenamegin, & enddo else iret=nf90_inq_varid(gfile_loc,trim(adjustl(varname)),var_id) - if ( trim(adjustl(varname)) == 'ref_f3d' )then + if ( trim(adjustl(varname)) == 'ref_f3d' .or. trim(adjustl(varname)) == 'flash_extent_density' )then uu2d = 0.0_r_kind iret=nf90_get_var(gfile_loc,var_id,uu2d_tmp,start=startloc_tmp,count=countloc_tmp) where(uu2d_tmp < 0.0_r_kind) @@ -3041,8 +3053,13 @@ subroutine gsi_fv3ncdf_read_ens_parallel_over_ens(filenamein,fv3filenamegin, & end if end if end if - if( present(dbz) )then ! phyvars: dbz + if( present(dbz) .and. present(fed) )then ! phyvars: dbz,fed + if(ivar == 1) dbz = hwork + if(ivar == 2) fed = hwork + elseif( present(dbz) )then ! phyvars: dbz dbz = hwork + elseif( present(fed) )then ! phyvars: fed + fed = hwork end if end do @@ -3271,7 +3288,7 @@ subroutine wrfv3_netcdf(fv3filenamegin) use directDA_radaruse_mod, only: l_cvpnr, cvpnr_pval use gridmod, only: eta1_ll,eta2_ll use constants, only: one - use obsmod, only: if_model_dbz + use obsmod, only: if_model_dbz,if_model_fed implicit none @@ -3299,6 +3316,7 @@ subroutine wrfv3_netcdf(fv3filenamegin) real(r_kind),pointer,dimension(:,:,:):: ges_qnr =>NULL() real(r_kind),pointer,dimension(:,:,:):: ges_w =>NULL() real(r_kind),pointer,dimension(:,:,:):: ges_dbz =>NULL() + real(r_kind),pointer,dimension(:,:,:):: ges_fed =>NULL() real(r_kind),pointer,dimension(:,:,:):: ges_delzinc =>NULL() real(r_kind),pointer,dimension(:,:,:):: ges_delp =>NULL() real(r_kind),dimension(:,: ),allocatable:: ges_ps_write @@ -3388,7 +3406,7 @@ subroutine wrfv3_netcdf(fv3filenamegin) call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'u' , ges_u ,istatus);ier=ier+istatus call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'v' , ges_v ,istatus);ier=ier+istatus call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'q' ,ges_q ,istatus);ier=ier+istatus - if (l_use_dbz_directDA .or. if_model_dbz) then + if (l_use_dbz_directDA .or. if_model_dbz .or.if_model_fed) then call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'ql' ,ges_ql ,istatus);ier=ier+istatus call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'qi' ,ges_qi ,istatus);ier=ier+istatus call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'qr' ,ges_qr ,istatus);ier=ier+istatus @@ -3399,6 +3417,8 @@ subroutine wrfv3_netcdf(fv3filenamegin) call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'w' , ges_w ,istatus);ier=ier+istatus if( if_model_dbz )& call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'dbz' , ges_dbz ,istatus);ier=ier+istatus + if( if_model_fed )& + call GSI_BundleGetPointer ( GSI_MetGuess_Bundle(it), 'fed' , ges_fed ,istatus);ier=ier+istatus end if if(i_use_2mq4b > 0 .and. i_use_2mt4b > 0 ) then call GSI_BundleGetPointer (GSI_MetGuess_Bundle(it),'q2m',ges_q2m,istatus); ier=ier+istatus @@ -3532,7 +3552,7 @@ subroutine wrfv3_netcdf(fv3filenamegin) call gsi_copy_bundle(GSI_MetGuess_Bundle(it),gsibundle_fv3lam_dynvar_nouv) call gsi_copy_bundle(GSI_MetGuess_Bundle(it),gsibundle_fv3lam_tracer_nouv) - if( if_model_dbz ) call gsi_copy_bundle(GSI_MetGuess_Bundle(it),gsibundle_fv3lam_phyvar_nouv) + if( if_model_dbz .or. if_model_fed ) call gsi_copy_bundle(GSI_MetGuess_Bundle(it),gsibundle_fv3lam_phyvar_nouv) if (laeroana_fv3cmaq) then call gsi_copy_bundle(GSI_ChemGuess_Bundle(it),gsibundle_fv3lam_tracerchem_nouv) end if @@ -3581,10 +3601,11 @@ subroutine wrfv3_netcdf(fv3filenamegin) add_saved,fv3filenamegin%dynvars,fv3filenamegin) call gsi_fv3ncdf_write(grd_fv3lam_tracer_ionouv,gsibundle_fv3lam_tracer_nouv, & add_saved,fv3filenamegin%tracers,fv3filenamegin) - if( if_model_dbz ) then + if( if_model_dbz .or. if_model_fed ) then call gsi_fv3ncdf_write(grd_fv3lam_phyvar_ionouv,gsibundle_fv3lam_phyvar_nouv,& add_saved,fv3filenamegin%phyvars,fv3filenamegin) end if + call gsi_fv3ncdf_writeuv(grd_fv3lam_uv,ges_u,ges_v,add_saved,fv3filenamegin) if (laeroana_fv3cmaq) then call gsi_fv3ncdf_write(grd_fv3lam_tracerchem_ionouv,gsibundle_fv3lam_tracerchem_nouv, & @@ -4343,7 +4364,7 @@ subroutine gsi_fv3ncdf_write(grd_ionouv,cstate_nouv,add_saved,filenamein,fv3file work_a=hwork(1,:,:,ilevtot) - if( trim(varname) == 'ref_f3d' )then + if( trim(varname) == 'ref_f3d' .or. trim(adjustl(varname)) == 'flash_extent_density' )then iret=nf90_inquire_dimension(gfile_loc,1,name,len) if(trim(name)=='xaxis_1') nx_phy=len if( nx_phy == nxcase )then @@ -4386,7 +4407,7 @@ subroutine gsi_fv3ncdf_write(grd_ionouv,cstate_nouv,add_saved,filenamein,fv3file deallocate(work_b_layout) enddo else - if( trim(varname) == 'ref_f3d' )then + if( trim(varname) == 'ref_f3d' .or. trim(varname) == 'flash_extent_density' )then work_b = 0.0_r_kind call check( nf90_get_var(gfile_loc,VarId,work_b_tmp,start = startloc_tmp, count = countloc_tmp) ) where(work_b_tmp < 0.0_r_kind) @@ -4419,7 +4440,7 @@ subroutine gsi_fv3ncdf_write(grd_ionouv,cstate_nouv,add_saved,filenamein,fv3file deallocate(work_b_layout) enddo else - if( trim(varname) == 'ref_f3d' )then + if( trim(varname) == 'ref_f3d' .or. trim(varname) == 'flash_extent_density' )then if(phy_smaller_domain)then work_b_tmp = work_b(4:nxcase-3,4:nycase-3) else diff --git a/src/gsi/gsimod.F90 b/src/gsi/gsimod.F90 index d0ca1c0fbf..5a06eff27a 100644 --- a/src/gsi/gsimod.F90 +++ b/src/gsi/gsimod.F90 @@ -23,12 +23,13 @@ module gsimod use gsi_dbzOper, only: diag_radardbz use gsi_fedOper, only: diag_fed - use obsmod, only: doradaroneob,oneoblat,oneoblon,oneobheight,oneobvalue,oneobddiff,oneobradid,& + use obsmod, only: doradaroneob,dofedoneob,oneoblat,oneoblon,oneobheight,oneobvalue,oneobddiff,oneobradid,& radar_no_thinning,ens_hx_dbz_cut,static_gsi_nopcp_dbz,rmesh_dbz,& - rmesh_vr,zmesh_dbz,zmesh_vr,if_vterminal, if_model_dbz,if_vrobs_raw,if_use_w_vr,& + rmesh_vr,zmesh_dbz,zmesh_vr,if_vterminal, if_model_dbz,if_model_fed,innov_use_model_fed,if_vrobs_raw,if_use_w_vr,& minobrangedbz,maxobrangedbz,maxobrangevr,maxtiltvr,missing_to_nopcp,& ntilt_radarfiles,whichradar,& - minobrangevr,maxtiltdbz,mintiltvr,mintiltdbz,l2rwthin,hurricane_radar + minobrangevr,maxtiltdbz,mintiltvr,mintiltdbz,l2rwthin,hurricane_radar,& + r_hgt_fed use obsmod, only: lwrite_predterms, & lwrite_peakwt,use_limit,lrun_subdirs,l_foreaft_thin,lobsdiag_forenkf,& @@ -202,7 +203,7 @@ module gsimod use gsi_nstcouplermod, only: gsi_nstcoupler_init_nml use gsi_nstcouplermod, only: nst_gsi,nstinfo,zsea1,zsea2,fac_dtl,fac_tsl use ncepnems_io, only: init_nems,imp_physics,lupp - use wrf_vars_mod, only: init_wrf_vars + use wrf_vars_mod, only: init_wrf_vars,fed_exist,dbz_exist use gsi_rfv3io_mod,only : fv3sar_bg_opt use radarz_cst, only: mphyopt, MFflg use radarz_iface, only: init_mphyopt @@ -510,6 +511,15 @@ module gsimod ! 2023-07-30 Zhao - added namelist options for analysis of significant wave height ! (aka howv in GSI code): corp_howv, hwllp_howv ! (in namelist session rapidrefresh_cldsurf) +! +! 2023-09-14 H. Wang - add namelist option for FED EnVar DA. +! - if_model_fed=.true. : FED in background and ens. If +! perform FED DA, this has to be true along with fed in +! control/analysis and metguess vectors. If only run GSI observer, +! it can be false. +! - innov_use_model_fed=.true. : Use FED from BG to calculate innovation. +! this requires if_model_fed=.true. +! it works either an EnVar DA run or a GSI observer run. ! !EOP !------------------------------------------------------------------------- @@ -770,16 +780,17 @@ module gsimod use_sp_eqspace,lnested_loops,lsingleradob,thin4d,use_readin_anl_sfcmask,& luse_obsdiag,id_drifter,id_ship,verbose,print_obs_para,lsingleradar,singleradar,lnobalance, & missing_to_nopcp,minobrangedbz,minobrangedbz,maxobrangedbz,& - maxobrangevr,maxtiltvr,whichradar,doradaroneob,oneoblat,& + maxobrangevr,maxtiltvr,whichradar,doradaroneob,dofedoneob,oneoblat,& oneoblon,oneobheight,oneobvalue,oneobddiff,oneobradid,& rmesh_vr,zmesh_dbz,zmesh_vr, ntilt_radarfiles, whichradar,& radar_no_thinning,ens_hx_dbz_cut,static_gsi_nopcp_dbz,rmesh_dbz,& minobrangevr, maxtiltdbz, mintiltvr,mintiltdbz,if_vterminal,if_vrobs_raw,if_use_w_vr,& - if_model_dbz,imp_physics,lupp,netcdf_diag,binary_diag,l_wcp_cwm,aircraft_recon,diag_version,& + if_model_dbz,if_model_fed,innov_use_model_fed,imp_physics,lupp,netcdf_diag,binary_diag,l_wcp_cwm,aircraft_recon,diag_version,& write_fv3_incr,incvars_to_zero,incvars_zero_strat,incvars_efold,diag_version,& cao_check,lcalc_gfdl_cfrac,tau_fcst,efsoi_order,lupdqc,lqcoef,cnvw_option,l2rwthin,hurricane_radar,& l_reg_update_hydro_delz, l_obsprvdiag,& - l_use_dbz_directDA, l_use_rw_columntilt, ta2tb, optconv + l_use_dbz_directDA, l_use_rw_columntilt, ta2tb, optconv, & + r_hgt_fed ! GRIDOPTS (grid setup variables,including regional specific variables): ! jcap - spectral resolution @@ -1978,6 +1989,20 @@ subroutine gsimain_initialize endif endif + if (innov_use_model_fed .and. .not.if_model_fed) then + if(mype==0) write(6,*)' GSIMOD: invalid innov_use_model_fed=.true. but if_model_fed=.false.' + call die(myname_,'invalid innov_use_model_fed,if_model_fed, check namelist settings',330) + end if + + if (.not. (miter == 0 .or. lobserver) .and. if_model_fed .and. .not. fed_exist) then + if(mype==0) write(6,*)' GSIMOD: .not. (miter == 0 .or. lobserver) and if_model_fed=.true. but fed is not in anavinfo file' + call die(myname_,'Please check namelist parameters and/or add fed in anavinfo (contro/state_vector and met_guess) when miter > 0 and if_model_fed=.true.',332) + end if + + if (.not. (miter == 0 .or. lobserver) .and. if_model_dbz .and. .not. dbz_exist) then + if(mype==0) write(6,*)' GSIMOD: .not. (miter == 0 .or. lobserver) and if_model_dbz=.true. but dbz is not in anavinfo file' + call die(myname_,'Please check namelist parameters and/or add dbz in anavinfo (contro/state_vector and met_guess) when miter > 0 and if_model_fed=.true.',334) + end if ! Ensure valid number of horizontal scales if (nhscrf<0 .or. nhscrf>3) then diff --git a/src/gsi/intfed.f90 b/src/gsi/intfed.f90 new file mode 100644 index 0000000000..8cb16eba10 --- /dev/null +++ b/src/gsi/intfed.f90 @@ -0,0 +1,187 @@ +module intfedmod +!$$$ module documentation block +! . . . . +! module: intfedmod module for intfed and its tangent linear intfed_tl +! prgmmr: +! +! abstract: module for intfed and its tangent linear intfed_tl +! +! program history log: +! 2023-08-24 H. Wang - add tangent linear of fed operator to directly assimilate FED +! +! subroutines included: +! sub intfed_ +! +! variable definitions: +! +! attributes: +! language: f90 +! machine: +! +!$$$ end documentation block + +use m_obsNode, only: obsNode +use m_fedNode, only: fedNode +use m_fedNode, only: fedNode_typecast +use m_fedNode, only: fedNode_nextcast +use m_obsdiagNode, only: obsdiagNode_set +implicit none + +PRIVATE +PUBLIC intfed + +interface intfed; module procedure & + intfed_ +end interface + +contains + +subroutine intfed_(fedhead,rval,sval) +!$$$ subprogram documentation block +! . . . . +! subprogram: intfed apply nonlin qc operator for GLM FED +! +! abstract: apply observation operator for radar winds +! with nonlinear qc operator +! +! program history log: +! 2023-08-24 H.Wang - modified based on intdbz.f90 +! - using tangent linear fed operator + +! +! input argument list: +! fedhead - obs type pointer to obs structure +! sfed - current fed solution increment +! +! output argument list: +! rfed - fed results from fed observation operator +! +! attributes: +! language: f90 +! machine: ibm RS/6000 SP +! +!$$$ + use kinds, only: r_kind,i_kind + use constants, only: half,one,tiny_r_kind,cg_term,r3600 + use obsmod, only: lsaveobsens,l_do_adjoint,luse_obsdiag + use qcmod, only: nlnqc_iter,varqc_iter + use jfunc, only: jiter + use gsi_bundlemod, only: gsi_bundle + use gsi_bundlemod, only: gsi_bundlegetpointer + use gsi_4dvar, only: ladtest_obs + use wrf_vars_mod, only : fed_exist + implicit none + +! Declare passed variables + class(obsNode), pointer, intent(in ) :: fedhead + type(gsi_bundle), intent(in ) :: sval + type(gsi_bundle), intent(inout) :: rval + +! Declare local variables + integer(i_kind) j1,j2,j3,j4,j5,j6,j7,j8,ier,istatus +! real(r_kind) penalty + real(r_kind) val,w1,w2,w3,w4,w5,w6,w7,w8,valfed + real(r_kind) cg_fed,p0,grad,wnotgross,wgross,pg_fed + real(r_kind),pointer,dimension(:) :: sfed + real(r_kind),pointer,dimension(:) :: rfed + type(fedNode), pointer :: fedptr + +! If no fed obs type data return + if(.not. associated(fedhead))return + +! Retrieve pointers +! Simply return if any pointer not found + ier=0 + if(fed_exist)then + call gsi_bundlegetpointer(sval,'fed',sfed,istatus);ier=istatus+ier + call gsi_bundlegetpointer(rval,'fed',rfed,istatus);ier=istatus+ier + else + return + end if + + if(ier/=0)return + + + fedptr => fedNode_typecast(fedhead) + do while (associated(fedptr)) + j1=fedptr%ij(1) + j2=fedptr%ij(2) + j3=fedptr%ij(3) + j4=fedptr%ij(4) + j5=fedptr%ij(5) + j6=fedptr%ij(6) + j7=fedptr%ij(7) + j8=fedptr%ij(8) + w1=fedptr%wij(1) + w2=fedptr%wij(2) + w3=fedptr%wij(3) + w4=fedptr%wij(4) + w5=fedptr%wij(5) + w6=fedptr%wij(6) + w7=fedptr%wij(7) + w8=fedptr%wij(8) + + +! Forward model + if( fed_exist )then + val = w1* sfed(j1)+w2* sfed(j2)+w3* sfed(j3)+w4* sfed(j4)+ & + w5* sfed(j5)+w6* sfed(j6)+w7* sfed(j7)+w8* sfed(j8) + end if + + if(luse_obsdiag)then + if (lsaveobsens) then + grad = val*fedptr%raterr2*fedptr%err2 + !-- fedptr%diags%obssen(jiter) = grad + call obsdiagNode_set(fedptr%diags,jiter=jiter,obssen=grad) + + else + !-- if (fedptr%luse) fedptr%diags%tldepart(jiter)=val + if (fedptr%luse) call obsdiagNode_set(fedptr%diags,jiter=jiter,tldepart=val) + endif + endif + + if (l_do_adjoint) then + if (.not. lsaveobsens) then + if( .not. ladtest_obs ) val=val-fedptr%res + +! gradient of nonlinear operator + if (nlnqc_iter .and. fedptr%pg > tiny_r_kind .and. & + fedptr%b > tiny_r_kind) then + pg_fed=fedptr%pg*varqc_iter + cg_fed=cg_term/fedptr%b + wnotgross= one-pg_fed + wgross = pg_fed*cg_fed/wnotgross + p0 = wgross/(wgross+exp(-half*fedptr%err2*val**2)) + val = val*(one-p0) + endif + + if( ladtest_obs) then + grad = val + else + grad = val*fedptr%raterr2*fedptr%err2 + end if + + endif + +! Adjoint + if(fed_exist)then + valfed = grad + rfed(j1)=rfed(j1)+w1*valfed + rfed(j2)=rfed(j2)+w2*valfed + rfed(j3)=rfed(j3)+w3*valfed + rfed(j4)=rfed(j4)+w4*valfed + rfed(j5)=rfed(j5)+w5*valfed + rfed(j6)=rfed(j6)+w6*valfed + rfed(j7)=rfed(j7)+w7*valfed + rfed(j8)=rfed(j8)+w8*valfed + end if + + endif + + !fedptr => fedptr%llpoint + fedptr => fedNode_nextcast(fedptr) + end do + return +end subroutine intfed_ + +end module intfedmod diff --git a/src/gsi/m_berror_stats_reg.f90 b/src/gsi/m_berror_stats_reg.f90 index bf9fb20674..8730e56c3b 100644 --- a/src/gsi/m_berror_stats_reg.f90 +++ b/src/gsi/m_berror_stats_reg.f90 @@ -400,7 +400,7 @@ subroutine berror_read_wgt_reg(msig,mlat,corz,corp,hwll,hwllp,vz,rlsig,varq,qopt integer(i_kind) :: nrf2_td2m,nrf2_mxtm,nrf2_mitm,nrf2_pmsl,nrf2_howv,nrf2_tcamt,nrf2_lcbas,nrf2_cldch integer(i_kind) :: nrf2_uwnd10m,nrf2_vwnd10m integer(i_kind) :: nrf3_sfwter,nrf3_vpwter - integer(i_kind) :: nrf3_dbz + integer(i_kind) :: nrf3_dbz,nrf3_fed integer(i_kind) :: nrf3_ql,nrf3_qi,nrf3_qr,nrf3_qs,nrf3_qg,nrf3_qnr,nrf3_w integer(i_kind) :: inerr,istat integer(i_kind) :: nsigstat,nlatstat,isig @@ -624,6 +624,7 @@ subroutine berror_read_wgt_reg(msig,mlat,corz,corp,hwll,hwllp,vz,rlsig,varq,qopt nrf3_sf =getindex(cvars3d,'sf') nrf3_vp =getindex(cvars3d,'vp') nrf3_dbz=getindex(cvars3d,'dbz') + nrf3_fed=getindex(cvars3d,'fed') nrf2_sst=getindex(cvars2d,'sst') nrf2_gust=getindex(cvars2d,'gust') nrf2_vis=getindex(cvars2d,'vis') @@ -671,6 +672,16 @@ subroutine berror_read_wgt_reg(msig,mlat,corz,corp,hwll,hwllp,vz,rlsig,varq,qopt vz(:,:,nrf3_dbz)=vz(:,:,nrf3_t) endif + if( nrf3_fed>0 )then + if(.not. nrf3_t>0) then + write(6,*)'not as expect,stop' + stop + endif + corz(:,:,nrf3_fed)=10.0_r_kind + hwll(:,:,nrf3_fed)=hwll(:,:,nrf3_t) + vz(:,:,nrf3_fed)=vz(:,:,nrf3_t) + endif + if (nrf3_oz>0) then factoz = 0.0002_r_kind*r25 corz(:,:,nrf3_oz)=factoz diff --git a/src/gsi/obsmod.F90 b/src/gsi/obsmod.F90 index 633bde91ab..c43a23c1e6 100644 --- a/src/gsi/obsmod.F90 +++ b/src/gsi/obsmod.F90 @@ -161,6 +161,7 @@ module obsmod ! observation provider and sub-provider information into ! obsdiags files (used for AutoObsQC) ! 2023-07-10 Y. Wang, D. Dowell - add variables for flash extent density +! 2023-10-10 H. Wang (GSL) - add variables for flash extent density EnVar DA ! ! Subroutines Included: ! sub init_obsmod_dflts - initialize obs related variables to default values @@ -188,6 +189,12 @@ module obsmod ! def diag_radardbz- namelist logical to compute/write (=true) radar ! reflectiivty diag files ! def diag_fed - namelist logical to compute/write (=true) flash extent density diag files +! def innov_use_model_fed - namelist logical. True: use (the FEB in background to calculate innovation +! False: calculate innvation use +! the obs operator in GSI +! def if_model_fed - namelist logical. True: Read in FED from background +! including from ensemble. +! def r_hgt_fed - height of fed observations ! def reduce_diag - namelist logical to produce reduced radiance diagnostic files ! def use_limit - parameter set equal to -1 if diag files produced or 0 if not diag files or reduce_diag ! def obs_setup - prefix for files passing pe relative obs data to setup routines @@ -487,7 +494,12 @@ module obsmod public :: iout_dbz, mype_dbz ! --- DBZ DA --- + ! ==== FED DA === + public :: if_model_fed, innov_use_model_fed + public :: r_hgt_fed public :: iout_fed, mype_fed + public :: dofedoneob + ! --- FED DA --- public :: obsmod_init_instr_table public :: obsmod_final_instr_table @@ -577,7 +589,7 @@ module obsmod real(r_kind) perturb_fact,time_window_max,time_offset,time_window_rad real(r_kind),dimension(50):: dmesh - + real(r_kind) r_hgt_fed integer(i_kind) nchan_total,ianldate integer(i_kind) ndat,ndat_types,ndat_times,nprof_gps integer(i_kind) lunobs_obs,nloz_v6,nloz_v8,nobskeep,nloz_omi @@ -621,8 +633,8 @@ module obsmod integer(i_kind) ntilt_radarfiles,tcp_posmatch,tcp_box logical :: ta2tb - logical :: doradaroneob - logical :: vr_dealisingopt, if_vterminal, if_model_dbz, inflate_obserr, if_vrobs_raw, if_use_w_vr, l2rwthin + logical :: doradaroneob,dofedoneob + logical :: vr_dealisingopt, if_vterminal, if_model_dbz,if_model_fed, innov_use_model_fed,inflate_obserr, if_vrobs_raw, if_use_w_vr, l2rwthin character(4) :: whichradar,oneobradid real(r_kind) :: oneoblat,oneoblon,oneobddiff,oneobvalue,oneobheight logical :: radar_no_thinning @@ -755,11 +767,15 @@ subroutine init_obsmod_dflts if_vrobs_raw=.false. if_use_w_vr=.true. if_model_dbz=.false. + if_model_fed=.false. + innov_use_model_fed=.false. inflate_obserr=.false. whichradar="KKKK" oneobradid="KKKK" doradaroneob=.false. + r_hgt_fed=6500_r_kind + dofedoneob=.false. oneoblat=-999_r_kind oneoblon=-999_r_kind oneobddiff=-999_r_kind diff --git a/src/gsi/read_dbz_netcdf.f90 b/src/gsi/read_dbz_netcdf.f90 index ecfb9169c4..845660168a 100644 --- a/src/gsi/read_dbz_netcdf.f90 +++ b/src/gsi/read_dbz_netcdf.f90 @@ -526,7 +526,8 @@ subroutine read_dbz_mrms_netcdf(nread,ndata,nodata,infile,obstype,lunout,sis,nob if(thislon>=r360) thislon=thislon-r360 if(thislon=r360 .or. thislat >90.0_r_kind) cycle + !-Convert back to radians thislat = thislat*deg2rad diff --git a/src/gsi/read_fed.f90 b/src/gsi/read_fed.f90 index c478b3d93f..3d3d098b08 100644 --- a/src/gsi/read_fed.f90 +++ b/src/gsi/read_fed.f90 @@ -9,6 +9,12 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) ! 2019-09-20 Yaping Wang (CIMMS/OU) ! 2021-07-01 David Dowell (DCD; NOAA GSL) - added maximum flashes/min for observed FED ! +! 2023-10-18 Hongli Wang (NOAA GSL) +! - cleanup code, removed hardcoded obs height (6500m) +! - use height fron obs file if they are avaiable, otherwise +! use default value or value from namelist variable r_hgt_fed +! - return if NetCDF file open status /= nf90_noerror +! ! input argument list: ! infile - unit from which to read observation information file ! obstype - observation type to process @@ -29,13 +35,13 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) !_____________________________________________________________________ ! use kinds, only: r_kind,r_double,i_kind - use constants, only: zero,one,deg2rad + use constants, only: zero,one,deg2rad,r60inv use convinfo, only: nconvtype,ctwind,icuse,ioctype - use gsi_4dvar, only: l4dvar,l4densvar,winlen + use gsi_4dvar, only: iwinbgn use gridmod, only: tll2xy use mod_wrfmass_to_a, only: wrfmass_obs_to_a8 use mpimod, only: npe - use obsmod, only: perturb_obs,iadatemn + use obsmod, only: perturb_obs,iadatemn,dofedoneob,oneoblat,oneoblon,r_hgt_fed use netcdf implicit none @@ -72,7 +78,6 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) real(r_kind),allocatable,dimension(:,:):: cdata_out real(r_kind) :: federr, thiserr real(r_kind) :: hgt_fed(1) - data hgt_fed / 6500.0 / real(r_kind) :: i_maxloc,j_maxloc,k_maxloc integer(i_kind) :: kint_maxloc @@ -80,70 +85,55 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) integer(i_kind) :: ndata2 integer(i_kind) :: ppp -! -! for read in bufr -! - real(r_kind) :: hdr(5),obs(1,3) - character(80):: hdrstr='SID XOB YOB DHR TYP' - character(80):: obsstr='FED' - - character(8) subset - character(8) station_id - real(r_double) :: rstation_id - equivalence(rstation_id,station_id) - integer(i_kind) :: lunin,idate - integer(i_kind) :: ireadmg,ireadsb + character(8) station_id + real(r_double) :: rstation_id + equivalence(rstation_id,station_id) - integer(i_kind) :: maxlvl - integer(i_kind) :: numlvl,numfed,nmsgmax,maxobs - integer(i_kind) :: k,iret - integer(i_kind) :: nmsg,ntb + integer(i_kind) :: maxlvl + integer(i_kind) :: numlvl,numfed,nmsgmax,maxobs + integer(i_kind) :: k,iret - real(r_kind),allocatable,dimension(:,:) :: fed3d_column ! 3D fed in column - real(r_kind),allocatable,dimension(:) :: utime ! time + real(r_kind),allocatable,dimension(:,:) :: fed3d_column ! 3D fed in column + real(r_kind),allocatable,dimension(:) :: fed3d_hgt ! fed height + real(r_kind),allocatable,dimension(:) :: utime ! time - integer(i_kind) :: ikx - real(r_kind) :: timeo,t4dv + integer(i_kind) :: ikx - character*128 :: myname='read_fed' + character*128 :: myname='read_fed' - real(r_kind) :: dlat, dlon ! rotated corrdinate - real(r_kind) :: dlat_earth, dlon_earth ! in unit of degree - real(r_kind) :: rlat00, rlon00 ! in unit of rad + real(r_kind) :: dlat, dlon ! rotated corrdinate + real(r_kind) :: dlat_earth, dlon_earth ! in unit of degree + real(r_kind) :: rlat00, rlon00 ! in unit of rad - logical :: l_psot_fed - logical :: l_latlon_fedobs - logical :: outside - integer :: unit_table + logical :: l_psot_fed + logical :: l_latlon_fedobs + logical :: outside ! for read netcdf - integer(i_kind) :: sec70,mins_an - integer(i_kind) :: varID, ncdfID, status - real(r_kind) :: timeb,twindm,rmins_an,rmins_ob - + integer(i_kind) :: sec70,mins_an + integer(i_kind) :: varID, ncdfID, status + real(r_kind) :: timeb,twindm,rmins_an,rmins_ob - unit_table = 23 -!********************************************************************** -! -! END OF DECLARATIONS....start of program -! - write(6,*) "r_kind=",r_kind - l_psot_fed = .FALSE. - l_latlon_fedobs = .TRUE. - - fedob = obstype == 'fed' - if(fedob) then - nreal=25 - else - write(6,*) ' illegal obs type in read_fed : obstype=',obstype - call stop2(94) - end if - if(perturb_obs .and. fedob)nreal=nreal+1 - write(6,*)'read_fed: nreal=',nreal - fedobs = .false. - ikx=0 - do i=1,nconvtype + hgt_fed = r_hgt_fed + + write(6,*) "r_kind=",r_kind + l_psot_fed = .FALSE. + l_latlon_fedobs = .TRUE. + + fedob = obstype == 'fed' + if (fedob) then + nreal=25 + else + write(6,*) ' illegal obs type in read_fed : obstype=',obstype + call stop2(94) + end if + if(perturb_obs .and. fedob)nreal=nreal+1 + write(6,*)'read_fed: nreal=',nreal + + fedobs = .false. + ikx=0 + do i=1,nconvtype if(trim(obstype) == trim(ioctype(i)) .and. abs(icuse(i))== 1) then fedobs=.true. ikx=i @@ -156,150 +146,24 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) write(6,*) 'read_fed: abort read_fed !' return endif - end do - write(6,'(1x,A,A30,I4,A15,F7.3,A7)') & + end do + write(6,'(1x,A,A30,I4,A15,F7.3,A7)') & trim(myname),': fed in convinfo-->ikx=',ikx,' fed ob err:',thiserr," (fed)" - nread=0 - ndata=0 - nchanl=0 - ifn = 15 + nread=0 + ndata=0 + nchanl=0 + ifn = 15 - if(fedobs) then - maxlvl= 1 ! fed only has one level + if (fedobs) then + maxlvl= 1 ! fed only has one level - if(trim(infile) .eq. "fedbufr") then ! prebufr or netcdf format - !! get message and subset counts - ! nmsgmax and maxobs are read in from BUFR data file, not pre-set. - call getcount_bufr(infile,nmsgmax,maxobs) - write(6,*)'read_fed: nmsgmax=',nmsgmax,' maxobs=',maxobs - -! read in fed obs in bufr code format - lunin = 10 - allocate(fed3d_column(maxlvl+2+2,maxobs)) - - open ( unit = lunin, file = trim(infile),form='unformatted',err=200) - call openbf ( lunin, 'IN', lunin ) - open(unit_table,file='prepobs_kr.bufrtable') !temporily dump the bufr table, which is already saved in file - call dxdump(lunin,unit_table) - call datelen ( 10 ) - - nmsg=0 - ntb = 0 - - ndata =0 - ppp = 0 - msg_report: do while (ireadmg(lunin,subset,idate) == 0) - nmsg=nmsg+1 - if (nmsg>nmsgmax) then - write(6,*)'read_fed: messages exceed maximum ',nmsgmax - call stop2(50) - endif - loop_report: do while (ireadsb(lunin) == 0) - ntb = ntb+1 - if (ntb>maxobs) then - write(6,*)'read_fed: reports exceed maximum ',maxobs - call stop2(50) - endif - - ! Extract type, date, and location information from BUFR file - call ufbint(lunin,hdr,5,1,iret,hdrstr) - if(hdr(3) .gt. r90 ) write(6,*) "Inside read_fed.f90, hdr(2)=",hdr(2),"hdr(3)=",hdr(3) - if ( l_latlon_fedobs ) then - if(abs(hdr(3))>r90 .or. abs(hdr(2))>r360) cycle loop_report - if(hdr(2)== r360)hdr(2)=hdr(2)-r360 - if(hdr(2) < zero)hdr(2)=hdr(2)+r360 - end if - -! check time window in subset - if (l4dvar.or.l4densvar) then - t4dv=hdr(4) - if (t4dvwinlen) then - write(6,*)'read_fed: time outside window ',& - t4dv,' skip this report' - cycle loop_report - endif - else - timeo=hdr(4) - if (abs(timeo)>ctwind(ikx) .or. abs(timeo) > twind) then - write(6,*)'read_fed: time outside window ',& - timeo,' skip this report' - cycle loop_report - endif - endif -! read in observations - call ufbint(lunin,obs,1,3,iret,obsstr) !Single level bufr data, Rong Kong - if(obs(1,1) .gt. 5 ) write(6,*) "Inside read_fed.f90, obs(1,1)=",obs(1,1) - numlvl=min(iret,maxlvl) - if (numlvl .ne. maxlvl) then - write(6,*)' read_fed: numlvl is not equalt to maxlvl:',numlvl,maxlvl - end if - if(hdr(3) .gt. 90) write(6,*) "hdr(3)=",hdr(3) - if ( l_latlon_fedobs ) then - if(hdr(2)>= r360)hdr(2)=hdr(2)-r360 - if(hdr(2) < zero)hdr(2)=hdr(2)+r360 - fed3d_column(1,ntb)=hdr(2) ! observation location, earth lon - fed3d_column(2,ntb)=hdr(3) ! observation location, earth lat -! write(6,*) "Inside read_fed.f90, fed3d_column(1,ntb)=",fed3d_column(1,ntb),"fed3d_column(2,ntb)=",fed3d_column(2,ntb) - else - fed3d_column(1,ntb)=hdr(2)*10.0_r_kind ! observation location, grid index i - fed3d_column(2,ntb)=hdr(3)*10.0_r_kind ! observation location, grid index j - end if - - if (l_psot_fed .and. .NOT. l_latlon_fedobs ) then - do k=1,numlvl - if (NINT(fed3d_column(1,ntb)) .eq. 175 .and. NINT(fed3d_column(2,ntb)) .eq. 105 .and. & - NINT(hgt_fed(k)) .ge. 100 ) then - write(6,*) 'read_fed: single point/column obs run on grid: 175 105' - write(6,*) 'read_fed: found the pseudo single(column) fed obs:',fed3d_column(1:2,ntb),hgt_fed(k) - else - obs(1,1) = -999.0 - end if - end do - end if - - fed3d_column(3,ntb)=obs(1,1) - fed3d_column(4,ntb)=obs(1,2) - fed3d_column(5,ntb)=obs(1,3) - if (obs(1,1) == fed_lowbnd .or. obs(1,1) >= fed_lowbnd2 ) then - if (obs(1,1) == 0.0) then - ppp = ppp + 1 - endif - ndata = ndata + 1 - endif - - enddo loop_report - enddo msg_report - - write(6,*)'read_fed: messages/reports = ',nmsg,'/',ntb - print*,'number of Z that is less than 0 is ppp = ', ppp - numfed=ntb - -! - Finished reading fed observations from BUFR format data file -! - call closbf(lunin) - close(lunin) - - else ! NETCDF format !!!! Start reading fed observations from NETCDF format data file - ! CHECK IF DATA FILE EXISTS - + ! CHECK IF DATA FILE EXISTS ! OPEN NETCDF FILE status = nf90_open(TRIM(infile), NF90_NOWRITE, ncdfID) print*, '*** OPENING GOES FED OBS NETCDF FILE: ', infile, status - - - !------------------------ - ! Get date information - !------------------------- - ! status = nf90_get_att( ncdfID, nf90_global, 'year', idate5s(1) ) - ! print*, 'year ',status - ! status = nf90_get_att( ncdfID, nf90_global, 'month', idate5s(2) ) - ! status = nf90_get_att( ncdfID, nf90_global, 'day', idate5s(3) ) - ! status = nf90_get_att( ncdfID, nf90_global, 'hour', idate5s(4) ) - ! status = nf90_get_att( ncdfID, nf90_global, 'minute', idate5s(5) ) - ! read(idate5s(:) , *) idate5(:) - ! print*, idate5 + if(status/=nf90_noerr)return !------------------------ ! Get Dimension Info (1-D) @@ -307,72 +171,75 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) status = nf90_inq_varid( ncdfID, 'numobs', varID ) status = nf90_get_var( ncdfID, varID, maxobs ) - !------------------------ - ! Allocate data arrays - !------------------------- - ALLOCATE( fed3d_column( 5, maxobs ) ) - ALLOCATE( utime( 1 ) ) ! seconds since from 2000-01-01 12:00 - - !------------------------ - ! Get useful data arrays - !------------------------- - ! LON - status = nf90_inq_varid( ncdfID, 'lon', varID ) - status = nf90_get_var( ncdfID, varID, fed3d_column(1, :) ) - ! LAT - status = nf90_inq_varid( ncdfID, 'lat', varID ) - status = nf90_get_var( ncdfID, varID, fed3d_column(2, :) ) - ! FED value - status = nf90_inq_varid( ncdfID, 'value', varID ) - status = nf90_get_var( ncdfID, varID, fed3d_column(3, :) ) - ! TIME - status = nf90_inq_varid( ncdfID, 'time', varID ) - status = nf90_get_var( ncdfID, varID, utime ) - - ! CLOSE NETCDF FILE - status = nf90_close( ncdfID ) - - - !-Obtain analysis time in minutes since reference date - sec70 = 694267200.0 ! seconds since from 1978-01-01 00:00 to 2000-01-01 12:00 - ! because the official GOES prescribed epoch time for GLM data is 2000-01-01 12:00:00 - - call w3fs21(iadatemn,mins_an) !mins_an -integer number of mins snce 01/01/1978 - rmins_an=mins_an !convert to real number - - ! SINCE ALL OBS WILL HAVE THE SAME TIME, CHECK TIME HERE: - rmins_ob = ( utime(1) + sec70 )/60 !Convert to Minutes from seconds - twindm = twind*60. !Convert to Minutes from hours - timeb = rmins_ob-rmins_an - - if(abs(timeb) > abs(twindm)) then + !------------------------ + ! Allocate data arrays + !------------------------- + ALLOCATE( fed3d_column( 5, maxobs ) ) + allocate( fed3d_hgt(maxobs) ) + ALLOCATE( utime( 1 ) ) ! seconds since from 2000-01-01 12:00 + fed3d_hgt = -999.0_r_kind + + !------------------------ + ! Get useful data arrays + !------------------------- + ! LON + status = nf90_inq_varid( ncdfID, 'lon', varID ) + status = nf90_get_var( ncdfID, varID, fed3d_column(1, :) ) + ! LAT + status = nf90_inq_varid( ncdfID, 'lat', varID ) + status = nf90_get_var( ncdfID, varID, fed3d_column(2, :) ) + ! FED value + status = nf90_inq_varid( ncdfID, 'value', varID ) + status = nf90_get_var( ncdfID, varID, fed3d_column(3, :) ) + ! TIME + status = nf90_inq_varid( ncdfID, 'time', varID ) + status = nf90_get_var( ncdfID, varID, utime ) + + ! FED height, optional variable + status = nf90_inq_varid( ncdfID, 'height', varID ) + if(status==nf90_noerr)& + status = nf90_get_var( ncdfID, varID, fed3d_hgt ) + + ! CLOSE NETCDF FILE + status = nf90_close( ncdfID ) + + + !-Obtain analysis time in minutes since reference date + sec70 = 694267200.0 ! seconds since from 1978-01-01 00:00 to 2000-01-01 12:00 + ! because the official GOES prescribed epoch time for GLM data is 2000-01-01 12:00:00 + + call w3fs21(iadatemn,mins_an) !mins_an -integer number of mins snce 01/01/1978 + rmins_an=mins_an !convert to real number + + ! SINCE ALL OBS WILL HAVE THE SAME TIME, CHECK TIME HERE: + rmins_ob = ( utime(1) + sec70 )/60 !Convert to Minutes from seconds + twindm = twind*60. !Convert to Minutes from hours + timeb = rmins_ob-rmins_an + + if(abs(timeb) > abs(twindm)) then print*, 'WARNING: ALL FED OBSERVATIONS OUTSIDE ASSIMILATION TIME WINDOW: ', timeb, twindm - ! goto 314 - endif - numfed = maxobs - do i=1,numfed + endif + + !time relative to the beginning of the da time window + timeb=real(rmins_ob-iwinbgn,r_kind) + + numfed = maxobs + do i=1,numfed if (fed3d_column( 3, i ) >= fed_lowbnd2 .or. fed3d_column( 3, i ) == fed_lowbnd ) then ndata = ndata + 1 end if - end do - end if ! end if prebufr or netcdf format + end do write(6,*)'read_fed: total no. of obs = ',ndata nread=ndata nodata=ndata !!! - Finished reading fed observations from NETCDF format data file - - allocate(cdata_out(nreal,ndata)) -! ! do i=1,numfed do k=1,maxlvl - -! DCD 1 July 2021 if (fed3d_column(k+2,i) .gt. fed_highbnd) fed3d_column(k+2,i) = fed_highbnd - end do end do @@ -382,38 +249,56 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) write(6,*) k,maxval(fed3d_column(k+2,:)),minval(fed3d_column(k+2,:)) end do - i_maxloc=-1.0 j_maxloc=-1.0 k_maxloc=-1.0 kint_maxloc=-1 fed_max=-999.99 ndata2=0 + + ILOOP : & do i=1,numfed + if(fed3d_hgt(i) > 0.0_r_kind)then + hgt_fed=fed3d_hgt(i) + else + hgt_fed = r_hgt_fed + end if do k=1,maxlvl - if( fed3d_column(k+2,i) >= fed_lowbnd2 .or. fed3d_column(k+2,i) == fed_lowbnd) then !Rong Kong + if( fed3d_column(k+2,i) >= fed_lowbnd2 .or. fed3d_column(k+2,i) == fed_lowbnd .or. dofedoneob) then !Rong Kong dlon_earth = fed3d_column(1,i) ! longitude (degrees) of observation ! ilone=18 ! index of longitude (degrees) dlat_earth = fed3d_column(2,i) ! latitude (degrees) of observation ! ilate=19 ! index of latitude (degrees) - !-Check format of longitude and correct if necessary - if(dlon_earth>=r360) dlon_earth=dlon_earth-r360 - if(dlon_earth=r360 .or. dlat_earth >90.0_r_kind) cycle - !-Convert back to radians + if (dofedoneob) then + dlat_earth=oneoblat + dlon_earth=oneoblon + endif + + !-Check format of longitude and correct if necessary + if(dlon_earth>=r360) dlon_earth=dlon_earth-r360 + if(dlon_earth=r360 .or. dlat_earth >90.0_r_kind) cycle + + !-Convert back to radians rlon00 = dlon_earth*deg2rad rlat00 = dlat_earth*deg2rad call tll2xy(rlon00,rlat00,dlon,dlat,outside) + if (dofedoneob) then + if (outside) then + write(6,*)'READ_FED: ONE OB OUTSIDE; STOP2(61) ',dlat_earth,dlon_earth + call stop2(61) + end if + end if if (outside) cycle - !If observation is outside the domain - ! then cycle, but don't increase - ! range right away. - ! Domain could be rectangular, so ob - ! may be out of - ! range at one end, but not the - ! other. + !If observation is outside the domain + ! then cycle, but don't increase + ! range right away. + ! Domain could be rectangular, so ob + ! may be out of + ! range at one end, but not the + ! other. ndata2=ndata2+1 cdata_out( 1,ndata2) = thiserr ! obs error (flashes/min) - inflated/adjusted @@ -425,11 +310,11 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) cdata_out( 4,ndata2) = hgt_fed(k) ! obs absolute height (m) above MSL ! ipres=4 ! index of pressure cdata_out( 5,ndata2) = fed3d_column(k+2,i) ! FED value - ! idbzob=5 ! index of dbz observation + cdata_out( 6,ndata2) = rstation_id ! station id (charstring equivalent to real double) ! id=6 ! index of station id - cdata_out( 7,ndata2) = 0.0_r_kind ! observation time in data array + cdata_out( 7,ndata2) = timeb*r60inv ! observation time in data array ! itime=7 ! index of observation time in data array cdata_out( 8,ndata2) = ikx ! ob type ! ikxx=8 ! index of ob type @@ -472,7 +357,9 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) cdata_out(26,ndata2) = 1.0_r_kind ! obs perturbation ! iptrb=26 ! index of q perturbation end if -! print*,'cdata_out(:,ndata2)=',cdata_out(:,ndata2) + + if( dofedoneob ) exit ILOOP + if(fed3d_column(k+2,i) > fed_max)then kint_maxloc=k k_maxloc=real(k,r_kind) @@ -480,29 +367,27 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) i_maxloc=fed3d_column(1,i) fed_max =fed3d_column(k+2,i) end if + endif - enddo - enddo + enddo ! k + enddo ILOOP ! i !---all looping done now print diagnostic output - write(6,*)'READ_FED: Reached eof on FED file' - write(6,*)'READ_FED: # read in obs. number =',nread - write(6,*)'READ_FED: # read in obs. number for further processing =',ndata2 - ! write(6,*)'READ_FED: dlon_earth', cdata_out(18,10:15) + write(6,*)'READ_FED: Reached eof on FED file' + write(6,*)'READ_FED: # read in obs. number =',nread + write(6,*)'READ_FED: # read in obs. number for further processing =',ndata2 +! write(6,*)'READ_FED: dlon_earth', cdata_out(18,10:15) ilon=2 ! array index for longitude ilat=3 ! array index for latitude in obs information array ndata=ndata2 nodata=ndata2 - !---Write observations to scratch file---! +!---Write observations to scratch file---! -! if(ndata > 0 ) then - call count_obs(ndata,nreal,ilat,ilon,cdata_out,nobs) - write(lunout) obstype,sis,nreal,nchanl,ilat,ilon,ndata - write(lunout) ((cdata_out(k,i),k=1,nreal),i=1,ndata) - ! print*,'cdata_out',cdata_out -! endif + call count_obs(ndata,nreal,ilat,ilon,cdata_out,nobs) + write(lunout) obstype,sis,nreal,nchanl,ilat,ilon,ndata + write(lunout) ((cdata_out(k,i),k=1,nreal),i=1,ndata) deallocate(cdata_out) if (allocated(fed3d_column)) deallocate(fed3d_column) @@ -511,15 +396,9 @@ subroutine read_fed(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs) 'read_fed: max fed =',fed_max, '@ i j k =', & i_maxloc,j_maxloc,k_maxloc,kint_maxloc - end if -! close(lunout) ! ???? - return - -200 continue - write(6,*) 'read_fed, Warning : cannot find or open bufr fed data file: ', trim(infile) + end if + return -314 continue -print* ,'FINISHED WITH READ_FED' end subroutine read_fed ! ! diff --git a/src/gsi/setupfed.f90 b/src/gsi/setupfed.f90 index cf6334e567..dbb2f56111 100644 --- a/src/gsi/setupfed.f90 +++ b/src/gsi/setupfed.f90 @@ -17,7 +17,9 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa ! - added a second option (tanh) for observation operator, based on the ! work of Sebok and Back (2021, unpublished) ! - capped maximum model FED -! +! Hongli Wang NOAA GSL 2023-09-14 +! - Add option to use fed from background file to calculate fed innov +! - cleanup code, removed hardcoded obs height (6500m) ! use mpeu_util, only: die,perr use kinds, only: r_kind,r_single,r_double,i_kind @@ -30,6 +32,7 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa use obsmod, only: rmiss_single,& lobsdiagsave,nobskeep,lobsdiag_allocated,time_offset use obsmod, only: oberror_tune + use obsmod, only: if_model_fed,innov_use_model_fed,dofedoneob,oneobddiff,oneobvalue use m_obsNode, only: obsNode use m_fedNode, only: fedNode use m_fedNode, only: fedNode_appendto @@ -93,7 +96,6 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa real(r_kind),parameter:: d_coeff = -1.215e9_r_kind ! d (kg) in tanh operator real(r_kind),parameter:: fed_highbnd = 8.0_r_kind ! DCD: Back (2023, unpublished) for FV3 - real(r_kind),parameter:: fed_height = 6500.0_r_kind ! assumed height (m) of FED observations real(r_kind),parameter:: r0_001 = 0.001_r_kind real(r_kind),parameter:: r8 = 8.0_r_kind real(r_kind),parameter:: ten = 10.0_r_kind @@ -135,7 +137,7 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa real(r_kind),allocatable,dimension(:,:,: ) :: ges_ps real(r_kind),allocatable,dimension(:,:,:,:) :: ges_q real(r_kind),allocatable,dimension(:,:,:,:) :: ges_qg,ges_qg_mask - + real(r_kind),allocatable,dimension(:,:,:,:) :: ges_fed real(r_kind) :: presq real(r_kind) :: T1D,RHO real(r_kind) :: glmcoeff = 2.088_r_kind*10.0**(-8.0) ! Allen et al. (2016,MWR) @@ -230,6 +232,10 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa muse(i)=nint(data(iuse,i)) <= jiter end do + if (dofedoneob) then + muse=.true. + end if + numequal=0 numnotequal=0 @@ -293,10 +299,10 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa print*, 'nsig = ', nsig print*, 'lon2 = ', lon2 print*, 'lat2 = ', lat2 - + if (.not. innov_use_model_fed .or. .not. if_model_fed) then ! compute graupel mass, in kg per 15 km x 15 km column - do jj=1,nfldsig - do k=1,nsig + do jj=1,nfldsig + do k=1,nsig do i=1,lon2 do j=1,lat2 !How to handle MPI???? do igx=1,2*ngx+1 !horizontal integration of qg around point to calculate FED @@ -312,12 +318,12 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa end do !jgy end do !j end do !i - end do !k - end do !jj + end do !k + end do !jj ! compute FED, in flashes/min - do jj=1,nfldsig - do i=1,lon2 + do jj=1,nfldsig + do i=1,lon2 do j=1,lat2 if (fed_obs_ob_shape .eq. 1) then rp(j,i,jj) = CM * glmcoeff * rp(j,i,jj) @@ -331,9 +337,8 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa end if if (rp(j,i,jj) .gt. fed_highbnd) rp(j,i,jj) = fed_highbnd end do !j - end do !i - end do !jj - + end do !i + end do !jj !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! write(6,*) 'fed_obs_ob_shape=',fed_obs_ob_shape if (fed_obs_ob_shape .eq. 2) then @@ -344,7 +349,7 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa end if write(6,*) 'fed_highbnd=',fed_highbnd write(6,*) 'maxval(ges_qg)=',maxval(ges_qg),'pe=',mype - + end if ! .not. innov_use_model_fed .or. .not. if_model_fed !============================================================================================ @@ -352,28 +357,21 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa nlon_ll=size(ges_qg,2) nsig_ll=size(ges_qg,3) nfld_ll=size(ges_qg,4) - -! - Observation times are checked in read routine - comment out for now - -! call dtime_setup() - -!print*,"maxval(data(ifedob,:)),mmaxval(data(ilat,:))=",minval(data(ifedob,:)),maxval(data(ifedob,:)),maxval(data(ilat,:)) -!write(6,*) "OKOKOKOKOK, nobs=", nobs do i=1,nobs - dtime=data(itime,i) - dlat=data(ilat,i) - dlon=data(ilon,i) - - dlon8km=data(iprvd,i) !iprvd=23 - dlat8km=data(isprvd,i) !isprvd=24 - - dpres=data(ipres,i) ! from rdararef_mosaic2: this height abv MSL - ikx = nint(data(ikxx,i)) - error=data(ier2,i) - slat=data(ilate,i)*deg2rad ! needed when converting geophgt to - dlon_earth = data(ilone,i) !the lontitude and latitude on the obs pts. - dlat_earth = data(ilate,i) + dtime=data(itime,i) + dlat=data(ilat,i) + dlon=data(ilon,i) + + dlon8km=data(iprvd,i) !iprvd=23 + dlat8km=data(isprvd,i) !isprvd=24 + + dpres=data(ipres,i) ! from rdararef_mosaic2: this height abv MSL + ikx = nint(data(ikxx,i)) + error=data(ier2,i) + slat=data(ilate,i)*deg2rad ! needed when converting geophgt to + dlon_earth = data(ilone,i) !the lontitude and latitude on the obs pts. + dlat_earth = data(ilate,i) ! geometric hgh (hges --> zges below) if (nobs_bins>1) then @@ -382,7 +380,7 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa ibin = 1 end if - IF (ibin<1.OR.ibin>nobs_bins) write(6,*)mype,'Error nobs_bins,ibin= ',nobs_bins,ibin + if (ibin<1.or.ibin>nobs_bins) write(6,*)mype,'Error nobs_bins,ibin= ',nobs_bins,ibin if (luse_obsdiag) my_diagLL => odiagLL(ibin) @@ -402,28 +400,28 @@ subroutine setupfed(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,fed_diagsa end if ! Interpolate terrain height(model elevation) to obs location. - call tintrp2a11(ges_z,zsges,dlat,dlon,dtime,hrdifsig,& - mype,nfldsig) + call tintrp2a11(ges_z,zsges,dlat,dlon,dtime,hrdifsig,& + mype,nfldsig) ! print*,'i,after tintrp2all',i,mype,dlat,zsges ! 1. dpres (MRMS obs height is height above MSL) is adjusted by zsges, so it ! is changed to height relative to model elevation (terrain). ! because in GSI, geop_hgtl is the height relative to terrain (ges_z) ! (subroutine guess_grids) - dpres=dpres-zsges - if (dpres 0_r_kind) then + data(ifedob,i) = oneobvalue + ddiff = data(ifedob,i) - FEDMdiag(i) + else + ddiff = oneobddiff + data(ifedob,i) = FEDMdiag(i)+ddiff + oneobvalue = data(ifedob,i) + endif + write(6,*)"FED_ONEOB: O_Val,B_Val= ",data(ifedob,i),FEDMdiag(i) + write(6,*)"FED_ONEOB: Innov,Error= ",ddiff,magoberr + else + data(ifedob,i) = oneobvalue + ddiff = data(ifedob,i) - FEDMdiag(i) + end if + end if !oneob ! Gross error checks obserror = one/max(ratio_errors*error,tiny_r_kind) obserrlm = max(cermin(ikx),min(cermax(ikx),obserror)) - residual = abs(ddiff) != y-H(xb) ratio = residual/obserrlm != y-H(xb)/sqrt(R) @@ -782,7 +788,7 @@ end subroutine check_vars_ subroutine init_vars_ ! use radaremul_cst, only: mphyopt - + use obsmod, only: if_model_fed real(r_kind),dimension(:,: ),pointer:: rank2=>NULL() real(r_kind),dimension(:,:,:),pointer:: rank3=>NULL() character(len=5) :: varname @@ -822,6 +828,28 @@ subroutine init_vars_ call gsi_bundlegetpointer(gsi_metguess_bundle(ifld),trim(varname),rank2,istatus) ges_z(:,:,ifld)=rank2 end do + + if(if_model_fed)then + ! get fed .... + varname='fed' + call gsi_bundlegetpointer(gsi_metguess_bundle(1),trim(varname),rank3,istatus) + if (istatus==0) then + if(allocated(ges_fed))then + write(6,*) trim(myname), ': ', trim(varname), ' already incorrectly alloc ' + call stop2(999) + endif + allocate(ges_fed(size(rank3,1),size(rank3,2),size(rank3,3),nfldsig)) + ges_fed(:,:,:,1)=rank3 + do ifld=2,nfldsig + call gsi_bundlegetpointer(gsi_metguess_bundle(ifld),trim(varname),rank3,istatus) + ges_fed(:,:,:,ifld)=rank3 + enddo + else + write(6,*) trim(myname),': ', trim(varname), ' not found in met bundle, ier= ',istatus + call stop2(999) + endif + endif + else write(6,*) trim(myname),': ', trim(varname), ' not found in met bundle, ier= ',istatus call stop2(999) @@ -938,7 +966,7 @@ subroutine contents_binary_diag_(odiag) rdiagbuf(5,ii) = data(istnelv,i) ! station elevation (meters) rdiagbuf(6,ii) = presq ! observation pressure (hPa) - rdiagbuf(7,ii) = fed_height ! observation height (meters) + rdiagbuf(7,ii) = data(iobshgt,i) ! observation height (meters) rdiagbuf(8,ii) = (dtime*r60)-time_offset ! obs time (sec relative to analysis time) rdiagbuf(9,ii) = data(iqc,i) ! input prepbufr qc or event mark rdiagbuf(10,ii) = rmiss_single ! setup qc or event mark @@ -1006,7 +1034,7 @@ subroutine contents_netcdf_diag_(odiag) call nc_diag_metadata("Longitude", sngl(data(ilone,i)) ) call nc_diag_metadata("Station_Elevation", sngl(data(istnelv,i)) ) call nc_diag_metadata("Pressure", sngl(presq) ) - call nc_diag_metadata("Height", sngl(fed_height) ) + call nc_diag_metadata("Height", sngl(data(iobshgt,i)) ) call nc_diag_metadata("Time", sngl(dtime*r60-time_offset)) call nc_diag_metadata("Prep_QC_Mark", sngl(data(iqc,i)) ) call nc_diag_metadata("Prep_Use_Flag", sngl(data(iuse,i)) ) @@ -1048,6 +1076,7 @@ subroutine final_vars_ ! if(allocated(ges_tv)) deallocate(ges_tv) if(allocated(ges_ps)) deallocate(ges_ps) if(allocated(ges_qg)) deallocate(ges_qg) + if(allocated(ges_fed)) deallocate(ges_fed) end subroutine final_vars_ subroutine init_qcld(t_cld, qxmin_cld, icat_cld, t_dpnd) diff --git a/src/gsi/stpfed.f90 b/src/gsi/stpfed.f90 new file mode 100644 index 0000000000..2a69dd08ec --- /dev/null +++ b/src/gsi/stpfed.f90 @@ -0,0 +1,171 @@ +module stpfedmod + +!$$$ module documentation block +! . . . . +! module: stpfedmod module for stpfed and its tangent linear stpfed_tl +! prgmmr: +! +! abstract: module for stpfed and its tangent linear stpfed_tl +! +! program history log: +! 2023-08-23 H. Wang - Modified based on sftdbzmod +! - add adjoint of fed operator +! +! subroutines included: +! sub stpfed +! +! attributes: +! language: f90 +! machine: +! +!$$$ end documentation block + +implicit none + +PRIVATE +PUBLIC stpfed + +contains + +subroutine stpfed(fedhead,rval,sval,out,sges,nstep) +!$$$ subprogram documentation block +! . . . . +! subprogram: stpfed calculate penalty and contribution to +! stepsize with nonlinear qc added. +! prgmmr: derber org: np23 date: 1991-02-26 +! +! +! program history log: +! 2019-08-23 H.Wang - added for FED DA +! input argument list: +! fedhead +! sges - step size estimates (nstep) +! nstep - number of step sizes (== 0 means use outer iteration value) +! +! output argument list - output for step size calculation +! out(1:nstep) - penalty from fed sges(1:nstep) +! +! attributes: +! language: f90 +! machine: ibm RS/6000 SP +! +!$$$ + use kinds, only: r_kind,i_kind,r_quad + use qcmod, only: nlnqc_iter,varqc_iter + use constants, only: half,one,two,tiny_r_kind,cg_term,zero_quad,r3600 + use gsi_bundlemod, only: gsi_bundle + use gsi_bundlemod, only: gsi_bundlegetpointer + use gridmod, only: wrf_mass_regional, fv3_regional + use wrf_vars_mod, only : fed_exist + use m_obsNode, only: obsNode + use m_fedNode , only: fedNode + use m_fedNode , only: fedNode_typecast + use m_fedNode , only: fedNode_nextcast +! use directDA_radaruse_mod, only: l_use_fed_directDA + use radarz_cst, only: mphyopt + + implicit none + +! Declare passed variables + class(obsNode), pointer ,intent(in ) :: fedhead + integer(i_kind) ,intent(in ) :: nstep + real(r_quad),dimension(max(1,nstep)),intent(inout) :: out + type(gsi_bundle) ,intent(in ) :: rval,sval + real(r_kind),dimension(max(1,nstep)),intent(in ) :: sges + +! Declare local variables + integer(i_kind) ier,istatus + integer(i_kind) j1,j2,j3,j4,j5,j6,j7,j8,kk + real(r_kind) w1,w2,w3,w4,w5,w6,w7,w8 + real(r_kind) valfed + real(r_kind) fedcur + real(r_kind) cg_fed,fed,wgross,wnotgross + real(r_kind),dimension(max(1,nstep))::pen + real(r_kind) pg_fed + real(r_kind),pointer,dimension(:) :: sfed + real(r_kind),pointer,dimension(:) :: rfed + type(fedNode), pointer :: fedptr + + out=zero_quad + +! If no fed data return + if(.not. associated(fedhead))return + +! Retrieve pointers +! Simply return if any pointer not found + ier=0 + if(fed_exist)then + call gsi_bundlegetpointer(sval,'fed',sfed,istatus);ier=istatus+ier + call gsi_bundlegetpointer(rval,'fed',rfed,istatus);ier=istatus+ier + else + return + end if + + if(ier/=0)return + + fedptr => fedNode_typecast(fedhead) + do while (associated(fedptr)) + if(fedptr%luse)then + if(nstep > 0)then + j1=fedptr%ij(1) + j2=fedptr%ij(2) + j3=fedptr%ij(3) + j4=fedptr%ij(4) + j5=fedptr%ij(5) + j6=fedptr%ij(6) + j7=fedptr%ij(7) + j8=fedptr%ij(8) + w1=fedptr%wij(1) + w2=fedptr%wij(2) + w3=fedptr%wij(3) + w4=fedptr%wij(4) + w5=fedptr%wij(5) + w6=fedptr%wij(6) + w7=fedptr%wij(7) + w8=fedptr%wij(8) + + if( fed_exist )then + valfed= w1* rfed(j1)+w2*rfed(j2)+w3*rfed(j3)+w4*rfed(j4)+ & + w5* rfed(j5)+w6*rfed(j6)+w7*rfed(j7)+w8*rfed(j8) + + fedcur= w1* sfed(j1)+w2* sfed(j2)+w3* sfed(j3)+w4*sfed(j4)+ & + w5* sfed(j5)+w6* sfed(j6)+w7* sfed(j7)+w8* sfed(j8)- & + fedptr%res + end if + + + do kk=1,nstep + fed=fedcur+sges(kk)*valfed + pen(kk)=fed*fed*fedptr%err2 + end do + else + pen(1)=fedptr%res*fedptr%res*fedptr%err2 + end if + +! Modify penalty term if nonlinear QC + if (nlnqc_iter .and. fedptr%pg > tiny_r_kind .and. & + fedptr%b > tiny_r_kind) then + + pg_fed=fedptr%pg*varqc_iter + cg_fed=cg_term/fedptr%b + wnotgross= one-pg_fed + wgross = pg_fed*cg_fed/wnotgross + do kk=1,max(1,nstep) + pen(kk)= -two*log((exp(-half*pen(kk)) + wgross)/(one+wgross)) + end do + end if + + out(1) = out(1)+pen(1)*fedptr%raterr2 + kk=1 + do kk=2,nstep + out(kk) = out(kk)+(pen(kk)-pen(1))*fedptr%raterr2 + end do + end if + + fedptr => fedNode_nextcast(fedptr) + + end do + return +end subroutine stpfed + +end module stpfedmod diff --git a/src/gsi/wrf_vars_mod.f90 b/src/gsi/wrf_vars_mod.f90 index 97c36c43cf..f7a5e6c83d 100644 --- a/src/gsi/wrf_vars_mod.f90 +++ b/src/gsi/wrf_vars_mod.f90 @@ -39,6 +39,8 @@ module wrf_vars_mod use mpimod, only: mype use control_vectors, only: nc3d,cvars3d use kinds, only: i_kind +use gsi_metguess_mod, only: gsi_metguess_get +use constants, only: max_varname_length implicit none private ! public methods @@ -46,21 +48,54 @@ module wrf_vars_mod ! common block variables public :: w_exist public :: dbz_exist +public :: fed_exist -logical,save :: w_exist, dbz_exist +logical,save :: w_exist, dbz_exist, fed_exist contains subroutine init_wrf_vars -integer(i_kind) ii +integer(i_kind) ii,istatus +character(max_varname_length),allocatable,dimension(:) :: cloud +integer(i_kind) ncloud +logical :: dbz_cloud_exist,fed_cloud_exist w_exist=.false. dbz_exist=.false. +fed_exist=.false. +dbz_cloud_exist=.false. +fed_cloud_exist=.false. + do ii=1,nc3d if(mype == 0 ) write(6,*)"anacv cvars3d is ",cvars3d(ii) if(trim(cvars3d(ii)) == 'w'.or.trim(cvars3d(ii))=='W') w_exist=.true. if(trim(cvars3d(ii))=='dbz'.or.trim(cvars3d(ii))=='DBZ') dbz_exist=.true. + if(trim(cvars3d(ii))=='fed'.or.trim(cvars3d(ii))=='FED') fed_exist=.true. enddo +! Inquire about clouds + +call gsi_metguess_get('clouds::3d',ncloud,istatus) +if (ncloud>0) then + allocate(cloud(ncloud)) + call gsi_metguess_get('clouds::3d',cloud,istatus) +endif + +do ii=1,ncloud + if(mype == 0 ) write(6,*)"metguess cloud3d is ",cloud(ii) + if(trim(cloud(ii))=='fed'.or.trim(cloud(ii))=='FED')fed_cloud_exist=.true. + if(trim(cloud(ii))=='dbz'.or.trim(cloud(ii))=='DBZ')dbz_cloud_exist=.true. +end do + +if(.not.fed_exist .or. .not.fed_cloud_exist )then + fed_exist=.false. +endif + +if(.not.dbz_exist .or. .not.dbz_cloud_exist )then + dbz_exist=.false. +endif + +if(ncloud>0) deallocate(cloud) + end subroutine init_wrf_vars end module wrf_vars_mod From a3e13da942572e7a819182d7c3401df22d3dcf49 Mon Sep 17 00:00:00 2001 From: daviddowellNOAA <72174157+daviddowellNOAA@users.noreply.github.com> Date: Tue, 7 Nov 2023 09:08:22 -0600 Subject: [PATCH 12/13] Modified observation errors for radar-reflectivity observations in precipitation (#650) This PR addresses issue 649: Reflectivity high bias resulting from EnVar radar-reflectivity data assimilation. Observation errors for radar-reflectivity observations are changed as follows: (1) Increase default observation error standard deviation from 5.0 dBZ to 10.0 dBZ for reflectivity observations in precipitation (i.e., observations >= 5 dBZ). For non-precipitation observations (< 5 dBZ), keep the existing 5.0 dBZ error standard deviation. (2) For reflectivity observations in precipitation, further inflate the error for observations that fail the gross error check by a factor of 1.0-2.0. This change will be combined with a stricter gross error check, implemented through a separate PR to the regional workflow. Also, the gross error check won't be applied to non-precipitation reflectivity observations. The changes described above were initially discussed by David Dowell, Jacob Carley, and Sho Yokota in emails on 11 August 2023. The proposed changes were tested in a prototype CONUS RRFSv1 for a summer 2022 retrospective period. --- src/gsi/gsimod.F90 | 8 ++++++-- src/gsi/obsmod.F90 | 8 +++++--- src/gsi/read_dbz_nc.f90 | 12 +++++++++--- src/gsi/setupdbz.f90 | 9 ++++++--- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/gsi/gsimod.F90 b/src/gsi/gsimod.F90 index 5a06eff27a..c24c485ce1 100644 --- a/src/gsi/gsimod.F90 +++ b/src/gsi/gsimod.F90 @@ -26,7 +26,7 @@ module gsimod use obsmod, only: doradaroneob,dofedoneob,oneoblat,oneoblon,oneobheight,oneobvalue,oneobddiff,oneobradid,& radar_no_thinning,ens_hx_dbz_cut,static_gsi_nopcp_dbz,rmesh_dbz,& rmesh_vr,zmesh_dbz,zmesh_vr,if_vterminal, if_model_dbz,if_model_fed,innov_use_model_fed,if_vrobs_raw,if_use_w_vr,& - minobrangedbz,maxobrangedbz,maxobrangevr,maxtiltvr,missing_to_nopcp,& + minobrangedbz,maxobrangedbz,maxobrangevr,maxtiltvr,inflate_dbz_obserr,missing_to_nopcp,& ntilt_radarfiles,whichradar,& minobrangevr,maxtiltdbz,mintiltvr,mintiltdbz,l2rwthin,hurricane_radar,& r_hgt_fed @@ -744,6 +744,10 @@ module gsimod ! optconv - downweighting option for iasi and cris for moisture channels to ! improve convergence. default 0.0 (no change). Larger number improves ! convergence. +! inflate_dbz_obserr - logical that controls inflation of reflectivity ob error +! for obs that exceed gross error magnitude +! if true, inflate ob error +! if false, reject ob ! ! NOTE: for now, if in regional mode, then iguess=-1 is forced internally. ! add use of guess file later for regional mode. @@ -779,7 +783,7 @@ module gsimod use_gfs_stratosphere,pblend0,pblend1,step_start,diag_precon,lrun_subdirs,& use_sp_eqspace,lnested_loops,lsingleradob,thin4d,use_readin_anl_sfcmask,& luse_obsdiag,id_drifter,id_ship,verbose,print_obs_para,lsingleradar,singleradar,lnobalance, & - missing_to_nopcp,minobrangedbz,minobrangedbz,maxobrangedbz,& + inflate_dbz_obserr,missing_to_nopcp,minobrangedbz,minobrangedbz,maxobrangedbz,& maxobrangevr,maxtiltvr,whichradar,doradaroneob,dofedoneob,oneoblat,& oneoblon,oneobheight,oneobvalue,oneobddiff,oneobradid,& rmesh_vr,zmesh_dbz,zmesh_vr, ntilt_radarfiles, whichradar,& diff --git a/src/gsi/obsmod.F90 b/src/gsi/obsmod.F90 index c43a23c1e6..4f1a8c76bf 100644 --- a/src/gsi/obsmod.F90 +++ b/src/gsi/obsmod.F90 @@ -480,7 +480,8 @@ module obsmod ! ==== DBZ DA === public :: ntilt_radarfiles public :: whichradar - public :: vr_dealisingopt, if_vterminal, if_model_dbz, inflate_obserr, if_vrobs_raw, if_use_w_vr, l2rwthin + public :: vr_dealisingopt, if_vterminal, if_model_dbz, if_vrobs_raw, if_use_w_vr, l2rwthin + public :: inflate_dbz_obserr public :: doradaroneob,oneoblat,oneoblon public :: oneobddiff,oneobvalue,oneobheight,oneobradid @@ -634,7 +635,8 @@ module obsmod logical :: ta2tb logical :: doradaroneob,dofedoneob - logical :: vr_dealisingopt, if_vterminal, if_model_dbz,if_model_fed, innov_use_model_fed,inflate_obserr, if_vrobs_raw, if_use_w_vr, l2rwthin + logical :: vr_dealisingopt, if_vterminal, if_model_dbz,if_model_fed, innov_use_model_fed, if_vrobs_raw, if_use_w_vr, l2rwthin + logical :: inflate_dbz_obserr character(4) :: whichradar,oneobradid real(r_kind) :: oneoblat,oneoblon,oneobddiff,oneobvalue,oneobheight logical :: radar_no_thinning @@ -769,7 +771,7 @@ subroutine init_obsmod_dflts if_model_dbz=.false. if_model_fed=.false. innov_use_model_fed=.false. - inflate_obserr=.false. + inflate_dbz_obserr=.false. whichradar="KKKK" oneobradid="KKKK" diff --git a/src/gsi/read_dbz_nc.f90 b/src/gsi/read_dbz_nc.f90 index 7f8604b9d2..f4bf288c9a 100644 --- a/src/gsi/read_dbz_nc.f90 +++ b/src/gsi/read_dbz_nc.f90 @@ -412,9 +412,15 @@ subroutine read_dbz_nc(nread,ndata,nodata,infile,lunout,obstype,sis,hgtl_full,no ! changed to hard-coded value for now; dbznoise used for two different purposes in this subroutine: ! (1) threshold for lowest reflectivity value considered to be an observation and ! (2) ob error - thiserr = 5.0_r_kind - - + +! Specify a larger error standard deviation for reflectivity observations in precipitation +! than for reflectivity observations that indicate a lack of preciptation. + if( dbzQC(i,j,k) < 5.0_r_kind ) then + thiserr = 5.0_r_kind + else + thiserr = 10.0_r_kind + end if + nread = nread + 1 !#################### Data thinning ################### diff --git a/src/gsi/setupdbz.f90 b/src/gsi/setupdbz.f90 index 453c4a5f8d..90b7d183b6 100644 --- a/src/gsi/setupdbz.f90 +++ b/src/gsi/setupdbz.f90 @@ -150,7 +150,7 @@ subroutine setupdbz(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,radardbz_d use convinfo, only: nconvtype,cermin,cermax,cgross,cvar_b,cvar_pg,ictype use convinfo, only: icsubtype use m_dtime, only: dtime_setup, dtime_check - use obsmod, only : if_model_dbz, inflate_obserr + use obsmod, only : if_model_dbz, inflate_dbz_obserr use setupdbz_lib, only:hx_dart,jqr_dart,jqs_dart,jqg_dart use gridmod, only: wrf_mass_regional,nems_nmmb_regional, fv3_regional use sparsearr, only: sparr2, new, size, writearray, fullarray @@ -1260,8 +1260,11 @@ subroutine setupdbz(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,radardbz_d end if else - if (ratio > cgross(ikx) .or. ratio_errors < tiny_r_kind) then - if ( inflate_obserr .and. (ratio-cgross(ikx)) <= cgross(ikx) .and. ratio_errors >= tiny_r_kind) then + +! Apply gross error check only to reflectivity observations in precipitation (>= 5 dBZ). + if ( ( (data(idbzob,i) >= 5_r_kind) .and. (ratio > cgross(ikx)) ) .or. (ratio_errors < tiny_r_kind) ) then + + if ( inflate_dbz_obserr .and. (ratio-cgross(ikx)) <= cgross(ikx) .and. ratio_errors >= tiny_r_kind) then ! Since radar reflectivity can be very different from the model background ! good observations may be rejected during this QC step. However, if these observations ! are allowed through, they can yield problems with convergence. Therefore the error From 382914b063ee4336a4e087724ddb6f4022f29a29 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 8 Nov 2023 07:11:44 -0600 Subject: [PATCH 13/13] Update Orion modulefiles to spack-stack/1.5.1. --- modulefiles/gsi_common.lua | 8 ++++---- modulefiles/gsi_orion.lua | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/modulefiles/gsi_common.lua b/modulefiles/gsi_common.lua index c4779fcf65..d3365a98dc 100644 --- a/modulefiles/gsi_common.lua +++ b/modulefiles/gsi_common.lua @@ -7,16 +7,16 @@ local netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0" local bufr_ver=os.getenv("bufr_ver") or "11.7.0" local bacio_ver=os.getenv("bacio_ver") or "2.4.1" -local w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +local w3emc_ver=os.getenv("w3emc_ver") or "2.10.0" local sp_ver=os.getenv("sp_ver") or "2.3.3" -local ip_ver=os.getenv("ip_ver") or "3.3.3" +local ip_ver=os.getenv("ip_ver") or "4.3.0" local sigio_ver=os.getenv("sigio_ver") or "2.3.2" local sfcio_ver=os.getenv("sfcio_ver") or "1.4.1" -local nemsio_ver=os.getenv("nemsio_ver") or "2.5.2" +local nemsio_ver=os.getenv("nemsio_ver") or "2.5.4" local wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0" local ncio_ver=os.getenv("ncio_ver") or "1.1.2" local crtm_ver=os.getenv("crtm_ver") or "2.4.0" -local ncdiag_ver=os.getenv("ncdiag_ver") or "1.1.1" +local ncdiag_ver=os.getenv("ncdiag_ver") or "1.1.2" load(pathJoin("netcdf-c", netcdf_c_ver)) load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) diff --git a/modulefiles/gsi_orion.lua b/modulefiles/gsi_orion.lua index 1fa2eb24f1..80ec342c93 100644 --- a/modulefiles/gsi_orion.lua +++ b/modulefiles/gsi_orion.lua @@ -1,10 +1,9 @@ help([[ ]]) -prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/spack-stack-1.4.1/envs/unified-env/install/modulefiles/Core") -prepend_path("MODULEPATH", "/work/noaa/da/role-da/spack-stack/modulefiles") +prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") -local stack_python_ver=os.getenv("stack_python_ver") or "3.9.7" +local stack_python_ver=os.getenv("python_ver") or "3.10.8" local stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2" local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" local cmake_ver=os.getenv("cmake_ver") or "3.23.1" @@ -12,11 +11,11 @@ local prod_util_ver=os.getenv("prod_util_ver") or "1.2.2" load(pathJoin("stack-intel", stack_intel_ver)) load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) -load(pathJoin("stack-python", stack_python_ver)) +load(pathJoin("python", stack_python_ver)) load(pathJoin("cmake", cmake_ver)) load("gsi_common") -load(pathJoin("prod-util", prod_util_ver)) +load(pathJoin("prod_util", prod_util_ver)) pushenv("CFLAGS", "-xHOST") pushenv("FFLAGS", "-xHOST")