Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dual-resolution EnVar capability for HAFS ensemble #652

Merged
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