Skip to content

Commit

Permalink
GitHub Issue NOAA-EMC#450 Using global and regional ensembles simult…
Browse files Browse the repository at this point in the history
…aneously for fv3-lam GSI EnVar (add l_both_fv3sar_gfs_ens option)
  • Loading branch information
TingLei-daprediction authored and Sho Yokota committed Aug 30, 2022
1 parent 49d9822 commit 6eac6d7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/gsi/cplr_get_fv3_regional_ensperts.f90
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar)
type(type_fv3regfilenameg)::fv3_filename
integer(i_kind):: imem_start,n_fv3sar

if(n_ens.ne.(n_ens_gfs+n_ens_fv3sar)) then
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
call stop2(222)
Expand Down Expand Up @@ -252,6 +252,7 @@ subroutine get_fv3_regional_ensperts_run(this,en_perts,nelen,ps_bar)
call stop2(9991)
endif
enddo ! for m


! print info message for dirZDA
if(mype==0)then
Expand Down
13 changes: 7 additions & 6 deletions src/gsi/get_gefs_for_regional.f90
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ subroutine get_gefs_for_regional
fv3_regional
use hybrid_ensemble_parameters, only: region_lat_ens,region_lon_ens
use hybrid_ensemble_parameters, only: en_perts,ps_bar,nelen
use hybrid_ensemble_parameters, only: n_ens,grd_ens,grd_a1,grd_e1,p_e2a,uv_hyb_ens,dual_res
use hybrid_ensemble_parameters, only: n_ens_gfs
use hybrid_ensemble_parameters, only: n_ens_gfs,grd_ens,grd_a1,grd_e1,p_e2a,uv_hyb_ens,dual_res
use hybrid_ensemble_parameters, only: full_ensemble,q_hyb_ens,l_ens_in_diff_time,write_ens_sprd
use hybrid_ensemble_parameters, only: ntlevs_ens,ensemble_path,jcap_ens
!use hybrid_ensemble_parameters, only: add_bias_perturbation
use control_vectors, only: cvars2d,cvars3d,nc2d,nc3d
use gsi_bundlemod, only: gsi_bundlecreate
use gsi_bundlemod, only: gsi_bundle
Expand Down Expand Up @@ -231,9 +229,12 @@ subroutine get_gefs_for_regional
read(10,'(a)',err=20,end=40)filename
enddo
40 n_ens_temp=n-1
n_ens_gfs=n_ens_temp
write(6,*)'the number of ensemble members in the filelist is ',n_ens_temp
write(6,*)'The n_ens_gfs is adjusted to ',n_ens_gfs
if(n_ens_gfs/=n_ens_temp) then
n_ens_gfs=n_ens_temp
if(mype == 0) then
write(6,*)'the n_ens_gfs is adjusted to the actual number of ensemble members ',n_ens_temp
endif
endif

! set n_ens_temp depending on if we want to add bias perturbation to the ensemble

Expand Down
13 changes: 7 additions & 6 deletions src/gsi/gsimod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ module gsimod
readin_beta,use_localization_grid,use_gfs_ens,q_hyb_ens,i_en_perts_io, &
l_ens_in_diff_time,ensemble_path,ens_fast_read,sst_staticB, &
ntotensgrp,nsclgrp,naensgrp,ngvarloc,ntlevs_ens,naensloc, &
i_ensloccov4tim,i_ensloccov4var,i_ensloccov4scl,l_timloc_opt, &
l_both_fv3sar_gfs_ens,n_ens_gfs,n_ens_fv3sar
i_ensloccov4tim,i_ensloccov4var,i_ensloccov4scl,l_timloc_opt
use hybrid_ensemble_parameters,only : l_both_fv3sar_gfs_ens,n_ens_gfs,n_ens_fv3sar
use rapidrefresh_cldsurf_mod, only: init_rapidrefresh_cldsurf, &
dfi_radar_latent_heat_time_period,metar_impact_radius,&
metar_impact_radius_lowcloud,l_gsd_terrain_match_surftobs, &
Expand Down Expand Up @@ -1752,12 +1752,13 @@ subroutine gsimain_initialize
endif
else
if (regional_ensemble_option==5) then
n_ens_gfs=0
n_ens_fv3sar=n_ens
n_ens_gfs=0
n_ens_fv3sar=n_ens
elseif (regional_ensemble_option==1) then
n_ens_gfs=n_ens
n_ens_gfs=n_ens
n_ens_fv3sar=0
else
write(6,*)'n_ens_gfs and n_ens_fv3sar won"t be used if not regional_ensemble_option==5'
write(6,*)'n_ens_gfs and n_ens_fv3sar won"t be used if not regional_ensemble_option==5'
endif

endif
Expand Down

0 comments on commit 6eac6d7

Please sign in to comment.