1 subroutine da_radzicevar_adj(qvp0,qra0,qsn0,qgr0,qnr0,qns0,qng0,tmk0,prs,dbz, &
2 in0r,in0s,in0g,rn0_r,rn0_s,rn0_g, &
3 rhos,rhog,dtmk,dqvp,dqra,dqsn,dqgr,dqnr,dqns,dqng,zmm,tlopt, &
6 !===================================================================
7 ! Following Jung et al., 2008
8 !===================================================================
12 integer,intent(in) :: in0r,in0s,in0g
13 integer,intent(in) :: tlopt,gropt ! tlopt=0 nonlinear,=1 tl linear; gropt=0 tl linear; >=1 adj
15 integer,parameter :: dualpol_opt=0 ! completed but not yet been tested
17 real :: rn0_r,rn0_s,rn0_g ! intercept parameter 1/m^4
18 real :: qra0,qsn0,qgr0, & ! these are read in background states
22 real :: qra,qvp, & ! clone the background
28 ! above: background, below: increment for tlopt==1 and gropt==0 but adj for tlopt==1 and gropt>=1
36 integer :: i,j,k,ii,jj,kk
38 ! reflectivity operator constant
39 real,parameter :: rdrwave = 107.0 ! unit mm S band
40 real,parameter :: lambda = rdrwave
41 real,parameter :: Kw2 = 0.93
42 real :: pi = 3.1415926
43 real,parameter :: mm3todBZ=1.0E+9
44 real :: rhor = 1000 ! kg m^-3 rainwater density
45 real :: rhos ! kg m^-3 snow density
46 real :: rhog ! kg m^-3 graupel density
47 real :: rhoair ! air density
49 real :: rhows,rhowg ! wet snow, wet graupel
51 ! temporal mixing ratio
52 real :: prain ! pure rain mixing ratio
53 real :: dsnow ! dry snow mixing ratio
54 real :: dgr ! dry graupel mixing ration
55 real :: wsnow ! wet snow mixing ratio
56 real :: wgr ! wet graupel mixing ratio
59 real :: alpha_ra = 4.28e-4
60 real :: alpha_rb = 4.28e-4
61 real :: beta_ra = 3.04
62 real :: beta_rb = 2.77
65 real :: cr = 3.1415926/6
68 real :: para10r ! =(1.-(2.*betarx+1.0)/4.)
69 real :: para14r ! mm3todBZ*(4*lambda**4*alpharx**2/(pi**4*Kw2))
70 ! *(pi*rhor/rhoa)**(p2/4.)**(n0r)**para10r
71 ! *gamma(-(2.*betarx+1.0)*1d0)
73 real :: ronv,gonv,sonv ! intercept parameter
75 ! parameters for snow and graupel/hail
77 integer,parameter :: npara_alpharxa=7
78 real :: para_alpha_rxa(npara_alpharxa,2) ! second dimension: 1 for snow
80 real,save :: para_alpha_rxb(npara_alpharxa,2) ! precalculated coefficients in contribution equations of ice species
81 real :: phimean=0,sigma,ice_abc(3),ice_bac(3) ! A, B, and C in contribution equations of ice species
82 real :: fw ! water fraction
83 real :: pxabk_all(3) !
84 real :: pxkh,pxkv ! the sum of fwx term
85 real :: pxkh_tlr,pxkv_tlr,pxkh_tlx,pxkv_tlx ! particle derivative of pxkh/pxkv for rain (tlr) and ice species (tlx)
86 real :: zsh,zsv,zgh,zgv,zdsh,zdsv,zdgh,zdgv ! contribution from snow/graupel
87 ! (thelast character means horizontal/vertical)
89 real :: para1sg ! para1sg=mm3todBZ*gamma(7)*lambda**4/pi**4/Kw2*(pi*rhox/rhoa)**1.75
91 real :: cs=3.1415926/6
98 real :: alpha_rdsa=0.194*10.**(-4)
99 real :: alpha_rdsb=0.191*10.**(-4)
100 !---------------------------------------------
101 !real :: alpha_rdha=0.191*10.**(-3) ! hail
102 !real :: alpha_rdhb=0.165*10.**(-3) ! hail
103 !--------------------------------------------
104 real :: alpha_rdha=0.105*10.**(-3) ! graupel
105 real :: alpha_rdhb=0.092*10.**(-3) ! graupel
111 REAL,PARAMETER :: sigmahd = 1.0472
112 REAL,PARAMETER :: Ahd = 0.4308
113 REAL,PARAMETER :: Bhd = 0.3192
114 REAL,PARAMETER :: Chd = 0.1250
115 REAL,PARAMETER :: Dhd = 0.3750
116 REAL,PARAMETER :: Ckhd = 0.1116
118 REAL,PARAMETER :: sigmas = 0.3491
119 REAL,PARAMETER :: Asd = 0.8140
120 REAL,PARAMETER :: Bsd = 0.0303
121 REAL,PARAMETER :: Csd = 0.0778
122 REAL,PARAMETER :: Dsd = 0.4221
123 REAL,PARAMETER :: Cksd = 0.7837
125 real :: ice_abc_d(3),ice_bac_d(3)
126 real :: pdfrrs,pdfrrg,pdfsrs,pdfgrg ! partial derivative of F (r&s,r&g) with respect to (r,s,g)
127 real :: pdfrhot,pdfrhoq ! partial derivative of rho for t and qv
129 real :: prain_coef,dsnow_coef,dgr_coef ! coefficient to determine the ratio of
130 !pure rain, dry swno/graupel in total qr and qs/qg, respectively.
133 real :: temr01,temr02,temr03 ! temporary variable for real
134 integer :: temi01,temi02,temi03 ! temporary variable for integer
136 real :: para_pr,para_pdx_dq,para_pdx_df ! for
139 !---------------------------------------------------------------------------------
141 data para_alpha_rxa(:,1)/0.194e-4,7.094e-4,2.135e-4,-5.225e-4,0,0,0/
142 data para_alpha_rxb(:,1)/0.191e-4,6.916e-4,-2.841e-4,-1.160e-4,0,0,0/
143 !----hail--------------
144 !data para_alpha_rxa(:,2)/0.191e-3,2.39e-3,-12.57e-3,38.71e-3,-65.53e-3,56.16e-3, &
146 !data para_alpha_rxb(:,2)/0.165e-3,1.72e-3,-9.92e-3,32.15e-3,-56.0e-3,48.83e-3, &
148 !----graupel-----------
149 data para_alpha_rxa(:,2)/1.05E-04,1.82E-03,-3.77E-03,-7.97E-04,1.63E-02,-2.20E-02, &
151 data para_alpha_rxb(:,2)/9.25E-05,1.93E-03,-9.79E-03,2.92E-02,-4.82E-02,3.93E-02, &
161 ! if(qra0<qthres) qra=qthres
162 ! if(qsn0<qthres) qsn=qthres
163 ! if(qgr0<qthres) qgr=qthres
166 qra=max(qthres*(1+exp(-(tc-5.0)**2/6.25)),qra)
167 qsn=max(qthres*2,qsn)
168 qgr=max(qthres*2,qgr)
170 qra=max(qthres*2,qra)
171 qsn=max(qthres*(1+exp(-(tc-5.0)**2/6.25)),qsn)
172 qgr=max(qthres*(1+exp(-(tc-5.0)**2/6.25)),qgr)
176 if(tlopt>=1.and.gropt>=1) then
198 ! if(qra<qthres.and.qsn<qthres.and.qgr<qthres) then
208 call da_radzicevar_rhoair_tl(tlopt,rhoair,prs,rgas,tmk,qvp,pdfrhot,pdfrhoq)
210 !-------------------------------------------------------
211 ! Calculate variable intercept parameters if wanted
212 !-------------------------------------------------------
213 call da_radzicevar_prepare_interceptpara(in0s,in0g,in0r,rn0_s,rn0_g,rn0_r,sonv,gonv,ronv)
214 !-------------------------------------------------------
215 ! Calculate mixing ratios (pure rain, dry snow/graupel, wet snow/graupel)
216 !-------------------------------------------------------
217 call da_radzicevar_prepare_mixingratios(tlopt,prain_coef,dsnow_coef,dgr_coef, &
218 prain,dsnow,wsnow,dgr,wgr, &
219 qra,qgr,qsn,qthres, &
220 pdfrrs,pdfrrg,pdfsrs,pdfgrg &
223 call da_radzicevar_prepare_zmm_adj(tlopt,gropt,zmm,zmm_ref)
224 ! ==================FOR RAIN=============================
225 call da_radzicevar_parameter_zrx(para10r,para14r,para_pr,rhoair,rhor,prain, &
226 beta_ra,alpha_ra,mm3todBZ,lambda,Kw2,pi, &
230 ! for two moment microphysics scheme, not yet completed
233 if(tlopt>=1.and.gropt>=1) call da_radzicevar_rain_adj(para_pr,dqra,dqsn,dqgr,dtmk,dqvp,rhoair, &
234 prain_coef,zmm_ref,pdfrrs,pdfsrs,pdfgrg, &
235 pdfrhot,pdfrhoq,pdfrrg,qra,prain)
238 if(dualpol_opt==1) then
239 call da_radzicevar_parameter_zrx(para10r,para14r,para_pr,rhoair,rhor,prain, &
240 beta_rb,alpha_rb,mm3todBZ,lambda,Kw2,pi, &
244 ! for two moment microphysics scheme, not yet completed
247 if(tlopt>=1.and.gropt>=1) call da_radzicevar_rain_adj(para_pr,dqra,dqsn,dqgr,dtmk,dqvp,rhoair, &
248 prain_coef,zmm_ref,pdfrrs,pdfsrs,pdfgrg, &
249 pdfrhot,pdfrhoq,pdfrrg,qra,prain)
253 ! ==================FOR snow=============================
255 ! -------------------for wet snow----------------------
257 call da_radzicevar_waterfraction(qra,qsn,fw)
258 rhows=rhos*(1.-fw**2)+rhor*fw**2
260 call da_radzicevar_parameter_zxx(para1sg,para_pdx_dq,para_pdx_df,rhoair,rhows,wsnow,cs,ds,alphas, &
261 mm3todBZ,lambda,Kw2,pi,sonv)
263 call da_radzicevar_sigma_in_abc(qsn,fw,1,sigma) ! for snow
264 call da_radzicevar_calc_ice_abc(phimean,sigma,ice_abc)
266 ice_bac(1)=ice_abc(2)
267 ice_bac(2)=ice_abc(1)
268 ice_bac(3)=ice_abc(3)
275 call da_radzicevar_cal_tl_fw4wetice(1,qsn,pxabk_all,para_alpha_rxa,para_alpha_rxb, &
276 pxkh,pxkv,ice_abc,ice_bac,fw,pxkh_tlr, &
277 pxkv_tlr,pxkh_tlx,pxkv_tlx,qra,tlopt, &
281 ! for two moment microphysics scheme, not yet completed
284 if(tlopt>=1.and.gropt>=1) call da_radzicevar_wetice_adj(para_pdx_dq,para_pdx_df,pxkh,pxkh_tlr, &
285 pxkh_tlx,dqsn,dqra,dtmk,dqvp,qsn,wsnow, &
286 rhoair,dsnow_coef,zmm_ref,pdfsrs, &
287 pdfrrs,pdfrhot,pdfrhoq)
291 if(dualpol_opt==1) then
293 ! for two moment microphysics scheme, not yet completed
296 if(tlopt>=1.and.gropt>=1) call da_radzicevar_wetice_adj(para_pdx_dq,para_pdx_df,pxkv,pxkv_tlr, &
297 pxkv_tlx, dqsn,dqra,dtmk,dqvp,qsn,wsnow, &
298 rhoair,dsnow_coef,zmm_ref,pdfsrs, &
299 pdfrrs,pdfrhot,pdfrhoq)
303 ! -------------------for dry snow----------------------
304 call da_radzicevar_parameter_zxx(para1sg,para_pdx_dq,para_pdx_df,rhoair,rhos,dsnow,cs,ds,alphas, &
305 mm3todBZ,lambda,Kw2,pi,sonv)
312 pxabk_all(1)=alpha_rdsa**2
313 pxabk_all(2)=alpha_rdsb**2
314 pxabk_all(3)=alpha_rdsb*alpha_rdsa
315 call da_radzicevar_pkx(ice_abc_d,pxabk_all,pxkh)
316 call da_radzicevar_pkx(ice_bac_d,pxabk_all,pxkv)
319 ! for two moment microphysics scheme, not yet completed
322 if(tlopt>=1.and.gropt>=1) call da_radzicevar_dryice_adj(para_pdx_dq,pxkh,dqsn,dqra,dtmk,dqvp, &
323 rhoair,dsnow_coef,zmm_ref,dsnow,qsn,pdfsrs, &
324 pdfrrs,pdfrhot,pdfrhoq)
327 if(dualpol_opt==1) then
329 ! for two moment microphysics scheme, not yet completed
332 if(tlopt>=1.and.gropt>=1) call da_radzicevar_dryice_adj(para_pdx_dq,pxkv,dqsn,dqra,dtmk,dqvp, &
333 rhoair,dsnow_coef,zmm_ref,dsnow,qsn,pdfsrs, &
334 pdfrrs,pdfrhot,pdfrhoq)
338 ! ==================FOR graupel==========================
339 ! -------------------for wet graupel---------------------
341 call da_radzicevar_waterfraction(qra,qgr,fw)
342 rhowg=rhog*(1.-fw**2)+rhor*fw**2
344 call da_radzicevar_parameter_zxx(para1sg,para_pdx_dq,para_pdx_df,rhoair,rhowg,wgr,cice,dg,alphag, &
345 mm3todBZ,lambda,Kw2,pi,gonv)
347 call da_radzicevar_sigma_in_abc(qgr,fw,2,sigma) ! for snow
348 call da_radzicevar_calc_ice_abc(phimean,sigma,ice_abc)
350 ice_bac(1)=ice_abc(2)
351 ice_bac(2)=ice_abc(1)
352 ice_bac(3)=ice_abc(3)
359 call da_radzicevar_cal_tl_fw4wetice(2,qgr,pxabk_all,para_alpha_rxa,para_alpha_rxb, &
360 pxkh,pxkv,ice_abc,ice_bac,fw,pxkh_tlr, &
361 pxkv_tlr,pxkh_tlx,pxkv_tlx,qra,tlopt, &
365 ! for two moment microphysics scheme, not yet completed
368 if(tlopt>=1.and.gropt>=1) call da_radzicevar_wetice_adj(para_pdx_dq,para_pdx_df,pxkh,pxkh_tlr, &
369 pxkh_tlx,dqgr,dqra,dtmk,dqvp,qgr,wgr,rhoair, &
370 dgr_coef,zmm_ref,pdfgrg, &
371 pdfrrg,pdfrhot,pdfrhoq)
375 if(dualpol_opt==1) then
377 ! for two moment microphysics scheme, not yet completed
380 if(tlopt>=1.and.gropt>=1) call da_radzicevar_wetice_adj(para_pdx_dq,para_pdx_df,pxkv,pxkv_tlr, &
381 pxkv_tlx,dqgr,dqra,dtmk,dqvp,qgr,wgr, &
382 rhoair,dgr_coef,zmm_ref,pdfgrg, &
383 pdfrrg,pdfrhot,pdfrhoq)
387 ! --------------------------for dry graupel----------------------
389 call da_radzicevar_parameter_zxx(para1sg,para_pdx_dq,para_pdx_df,rhoair,rhog,dgr,cice,dg,alphag, &
390 mm3todBZ,lambda,Kw2,pi,gonv)
398 pxabk_all(1)=alpha_rdha**2
399 pxabk_all(2)=alpha_rdhb**2
400 pxabk_all(3)=alpha_rdhb*alpha_rdha
401 call da_radzicevar_pkx(ice_abc_d,pxabk_all,pxkh)
402 call da_radzicevar_pkx(ice_bac_d,pxabk_all,pxkv)
405 ! for two moment microphysics scheme, not yet completed
408 if(tlopt>=1.and.gropt>=1) call da_radzicevar_dryice_adj(para_pdx_dq,pxkh,dqgr,dqra,dtmk,dqvp, &
409 rhoair,dgr_coef,zmm_ref,dgr,qgr,pdfgrg, &
410 pdfrrg,pdfrhot,pdfrhoq)
413 if(dualpol_opt==1) then
415 ! for two moment microphysics scheme, not yet completed
418 if(tlopt>=1.and.gropt>=1) call da_radzicevar_dryice_adj(para_pdx_dq,pxkv,dqgr,dqra,dtmk,dqvp, &
419 rhoair,dgr_coef,zmm_ref,dgr,qgr,pdfgrg, &
420 pdfrrg,pdfrhot,pdfrhoq)
424 ! ============================done=================================
425 endif !(if rf_noice == 0)
428 end subroutine da_radzicevar_adj