Skip to content

Commit

Permalink
Squashed changes to add the dual-resolution EnVar capability for HAFS…
Browse files Browse the repository at this point in the history
… ensemble.

From Xu Lu, OU ([email protected]) and POC: [email protected]
  • Loading branch information
BinLiu-NOAA committed Nov 3, 2023
1 parent acfe56d commit 42dd1fe
Show file tree
Hide file tree
Showing 6 changed files with 894 additions and 60 deletions.
1 change: 1 addition & 0 deletions src/gsi/constants.f90
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module constants
! 2016-02-15 Johnson, Y. Wang, X. Wang - define additional constant values for
! radar DA, POC: [email protected]
! 2019-09-25 X.Su - put stndrd_atmos_ps constant values
! 2022-03-01 X.Lu & X.Wang - increased max_varname_length for HAFS dual ens. POC: [email protected]
!
! Subroutines Included:
! sub init_constants_derived - compute derived constants
Expand Down
17 changes: 9 additions & 8 deletions src/gsi/cplr_get_fv3_regional_ensperts.f90
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar)
!
! 2021-08-10 lei - modify for fv3-lam ensemble spread output
! 2021-11-01 lei - modify for fv3-lam parallel IO
! 2022-03-01 X.Lu & X.Wang - modify for hafs dual ens. POC: [email protected]
! input argument list:
!
! output argument list:
Expand Down Expand Up @@ -848,7 +849,7 @@ subroutine general_read_fv3_regional(this,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g
use gridmod, only: eta1_ll,eta2_ll
use constants, only: zero,one,fv,zero_single,one_tenth,h300
use hybrid_ensemble_parameters, only: grd_ens,q_hyb_ens
use hybrid_ensemble_parameters, only: fv3sar_ensemble_opt
use hybrid_ensemble_parameters, only: fv3sar_ensemble_opt,dual_res

use mpimod, only: mpi_comm_world,mpi_rtype
use gsi_rfv3io_mod,only: type_fv3regfilenameg
Expand Down Expand Up @@ -956,24 +957,24 @@ subroutine general_read_fv3_regional(this,fv3_filenameginput,g_ps,g_u,g_v,g_tv,g


if(fv3sar_ensemble_opt == 0 ) then
call gsi_fv3ncdf_readuv(grd_fv3lam_ens_uv,g_u,g_v,fv3_filenameginput)
call gsi_fv3ncdf_readuv(grd_fv3lam_ens_uv,g_u,g_v,fv3_filenameginput,dual_res)
else
call gsi_fv3ncdf_readuv_v1(grd_fv3lam_ens_uv,g_u,g_v,fv3_filenameginput)
call gsi_fv3ncdf_readuv_v1(grd_fv3lam_ens_uv,g_u,g_v,fv3_filenameginput,dual_res)
endif
if(fv3sar_ensemble_opt == 0) then
call gsi_fv3ncdf_read(grd_fv3lam_ens_dynvar_io_nouv,gsibundle_fv3lam_ens_dynvar_nouv,&
fv3_filenameginput%dynvars,fv3_filenameginput)
fv3_filenameginput%dynvars,fv3_filenameginput,dual_res)
call gsi_fv3ncdf_read(grd_fv3lam_ens_tracer_io_nouv,gsibundle_fv3lam_ens_tracer_nouv,&
fv3_filenameginput%tracers,fv3_filenameginput)
fv3_filenameginput%tracers,fv3_filenameginput,dual_res)
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)
fv3_filenameginput%phyvars,fv3_filenameginput,dual_res)
end if
else
call gsi_fv3ncdf_read_v1(grd_fv3lam_ens_dynvar_io_nouv,gsibundle_fv3lam_ens_dynvar_nouv,&
fv3_filenameginput%dynvars,fv3_filenameginput)
fv3_filenameginput%dynvars,fv3_filenameginput,dual_res)
call gsi_fv3ncdf_read_v1(grd_fv3lam_ens_tracer_io_nouv,gsibundle_fv3lam_ens_tracer_nouv,&
fv3_filenameginput%tracers,fv3_filenameginput)
fv3_filenameginput%tracers,fv3_filenameginput,dual_res)
endif
ier=0
call GSI_Bundlegetvar ( gsibundle_fv3lam_ens_dynvar_nouv, 'tsen' ,g_tsen ,istatus );ier=ier+istatus
Expand Down
6 changes: 5 additions & 1 deletion src/gsi/gridmod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ module gridmod
! 2019-09-23 martin - add use_gfs_ncio to read global first guess from netCDF file
! 2020-12-18 Hu - add grid_type_fv3_regional
! 2021-12-30 Hu - add fv3_io_layout_y
! 2022-03-01 X.Lu & X.Wang - add corresponding variables for dual ens for HAFS. POC: [email protected]
!
!
!
Expand Down Expand Up @@ -146,6 +147,7 @@ module gridmod
public :: regional_fhr,region_dyi,coeffx,region_dxi,coeffy,nsig_hlf,regional_fmin
public :: nsig2,wgtlats,corlats,rbs2,ncepgfs_headv,regional_time,wgtfactlats
public :: nlat_regional,nlon_regional,update_regsfc,half_grid,gencode
public :: nlat_regionalens,nlon_regionalens
public :: diagnostic_reg,nmmb_reference_grid,filled_grid
public :: grid_ratio_nmmb,isd_g,isc_g,dx_gfs,lpl_gfs,nsig5,nmmb_verttype
public :: grid_ratio_fv3_regional,fv3_io_layout_y,fv3_regional,fv3_cmaq_regional,grid_type_fv3_regional
Expand Down Expand Up @@ -329,7 +331,7 @@ module gridmod
real(r_kind) rlon_min_dd,rlon_max_dd,rlat_min_dd,rlat_max_dd
real(r_kind) dt_ll,pdtop_ll,pt_ll

integer(i_kind) nlon_regional,nlat_regional
integer(i_kind) nlon_regional,nlat_regional,nlon_regionalens,nlat_regionalens
real(r_kind) regional_fhr,regional_fmin
integer(i_kind) regional_time(6)
integer(i_kind) jcap_gfs,nlat_gfs,nlon_gfs
Expand Down Expand Up @@ -485,6 +487,8 @@ subroutine init_grid
update_regsfc = .false.
nlon_regional = 0
nlat_regional = 0
nlon_regionalens = 0
nlat_regionalens = 0

msig = nsig
do k=1,size(nlayers)
Expand Down
Loading

0 comments on commit 42dd1fe

Please sign in to comment.