Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Issue #540 Modify to assimilate radar reflectivity and convent…
Browse files Browse the repository at this point in the history
…ional data simultaneously without side effects in EnVar
Sho Yokota authored and Sho Yokota committed Apr 17, 2023
1 parent 8857995 commit d66e1d2
Showing 5 changed files with 19 additions and 15 deletions.
14 changes: 8 additions & 6 deletions src/gsi/gsimod.F90
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ module gsimod

use obsmod, only: doradaroneob,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,&
rmesh_vr,zmesh_dbz,zmesh_vr,if_vterminal, if_model_dbz,if_vrobs_raw,if_use_w_vr,&
minobrangedbz,maxobrangedbz,maxobrangevr,maxtiltvr,missing_to_nopcp,&
ntilt_radarfiles,whichradar,&
minobrangevr,maxtiltdbz,mintiltvr,mintiltdbz,l2rwthin,hurricane_radar
@@ -765,7 +765,7 @@ module gsimod
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,&
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,&
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,&
@@ -2038,15 +2038,17 @@ subroutine gsimain_initialize
baldiag_inc =.false.
end if

! If reflectivity is intended to be assimilated, beta_s0 should be zero.
! Warning of reflectivity assimilation with static B
if ( beta_s0 > 0.0_r_kind )then
! skipped in case of direct reflectivity DA because it works in Envar and hybrid
if ( l_use_rw_columntilt .or. l_use_dbz_directDA) then
do i=1,ndat
if ( if_model_dbz .and. (index(dtype(i), 'dbz') /= 0) )then
write(6,*)'beta_s0 needs to be set to zero in this GSI version, when reflectivity is directly assimilated. &
Static B extended for radar reflectivity assimilation will be included in future version.'
call stop2(8888)
if (mype==0) then
write(6,*)'GSIMOD: ***WARNING*** static B for reflectivity is regarded as zero in this GSI version &
even though beta_s0 =',beta_s0
write(6,*)'Static B extended for radar reflectivity assimilation will be included in future version.'
end if
end if
end do
end if
6 changes: 3 additions & 3 deletions src/gsi/intrw.f90
Original file line number Diff line number Diff line change
@@ -96,7 +96,7 @@ subroutine intrw_(rwhead,rval,sval)
!$$$
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 obsmod, only: lsaveobsens,l_do_adjoint,luse_obsdiag,if_use_w_vr
use qcmod, only: nlnqc_iter,varqc_iter
use jfunc, only: jiter
use gsi_bundlemod, only: gsi_bundle
@@ -128,15 +128,15 @@ subroutine intrw_(rwhead,rval,sval)
call gsi_bundlegetpointer(sval,'u',su,istatus);ier=istatus+ier
call gsi_bundlegetpointer(sval,'v',sv,istatus);ier=istatus+ier
call gsi_bundlegetpointer(sval,'w',sw,istatus)
if (istatus==0) then
if (if_use_w_vr.and.istatus==0) then
include_w=.true.
else
include_w=.false.
end if
call gsi_bundlegetpointer(rval,'u',ru,istatus);ier=istatus+ier
call gsi_bundlegetpointer(rval,'v',rv,istatus);ier=istatus+ier
call gsi_bundlegetpointer(rval,'w',rw,istatus)
if (istatus==0) then
if (if_use_w_vr.and.istatus==0) then
include_w=.true.
else
include_w=.false.
5 changes: 3 additions & 2 deletions src/gsi/obsmod.F90
Original file line number Diff line number Diff line change
@@ -470,7 +470,7 @@ module obsmod
! ==== DBZ DA ===
public :: ntilt_radarfiles
public :: whichradar
public :: vr_dealisingopt, if_vterminal, if_model_dbz, inflate_obserr, if_vrobs_raw, l2rwthin
public :: vr_dealisingopt, if_vterminal, if_model_dbz, inflate_obserr, if_vrobs_raw, if_use_w_vr, l2rwthin

public :: doradaroneob,oneoblat,oneoblon
public :: oneobddiff,oneobvalue,oneobheight,oneobradid
@@ -617,7 +617,7 @@ module obsmod

logical :: ta2tb
logical :: doradaroneob
logical :: vr_dealisingopt, if_vterminal, if_model_dbz, inflate_obserr, if_vrobs_raw, l2rwthin
logical :: vr_dealisingopt, if_vterminal, if_model_dbz, 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
@@ -747,6 +747,7 @@ subroutine init_obsmod_dflts
if_vterminal=.false.
l2rwthin =.false.
if_vrobs_raw=.false.
if_use_w_vr=.true.
if_model_dbz=.false.
inflate_obserr=.false.
whichradar="KKKK"
4 changes: 2 additions & 2 deletions src/gsi/setuprw.f90
Original file line number Diff line number Diff line change
@@ -114,7 +114,7 @@ subroutine setuprw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa
use obsmod, only: rmiss_single,lobsdiag_forenkf,&
lobsdiagsave,nobskeep,lobsdiag_allocated,time_offset,&
if_vterminal, ens_hx_dbz_cut, if_model_dbz, &
doradaroneob,oneobddiff,oneobvalue, if_vrobs_raw
doradaroneob,oneobddiff,oneobvalue, if_vrobs_raw, if_use_w_vr
use obsmod, only: netcdf_diag, binary_diag, dirname,ianldate
use nc_diag_write_mod, only: nc_diag_init, nc_diag_header, nc_diag_metadata, &
nc_diag_write, nc_diag_data2d
@@ -972,7 +972,7 @@ subroutine check_vars_ (proceed, include_w)
call gsi_metguess_get ('var::v' , ivar, istatus )
proceed=proceed.and.ivar>0
call gsi_metguess_get ('var::w' , ivar, istatus )
if (ivar>0) then
if (if_use_w_vr.and.ivar>0) then
include_w=.true.
if(if_vterminal)then
if( .not. if_model_dbz ) then
5 changes: 3 additions & 2 deletions src/gsi/stprw.f90
Original file line number Diff line number Diff line change
@@ -83,6 +83,7 @@ subroutine stprw(rwhead,rval,sval,out,sges,nstep)
!
!$$$
use kinds, only: r_kind,i_kind,r_quad
use obsmod, only: if_use_w_vr
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
@@ -124,15 +125,15 @@ subroutine stprw(rwhead,rval,sval,out,sges,nstep)
call gsi_bundlegetpointer(sval,'u',su,istatus);ier=istatus+ier
call gsi_bundlegetpointer(sval,'v',sv,istatus);ier=istatus+ier
call gsi_bundlegetpointer(sval,'w',sw,istatus)
if (istatus==0) then
if (if_use_w_vr.and.istatus==0) then
include_w=.true.
else
include_w=.false.
end if
call gsi_bundlegetpointer(rval,'u',ru,istatus);ier=istatus+ier
call gsi_bundlegetpointer(rval,'v',rv,istatus);ier=istatus+ier
call gsi_bundlegetpointer(rval,'w',rw,istatus)
if (istatus==0) then
if (if_use_w_vr.and.istatus==0) then
include_w=.true.
else
include_w=.false.

0 comments on commit d66e1d2

Please sign in to comment.