28 , q_lsliq, q_lsice, q_cvliq, q_cvice &
29 , ls_radliq, ls_radice, cv_radliq, cv_radice &
30 , frac_out, ice_type &
31 , pmol, pnorm, tautot, refl )
124 INTEGER INDX_LSLIQ,INDX_LSICE,INDX_CVLIQ,INDX_CVICE
125 parameter(indx_lsliq=1,indx_lsice=2,indx_cvliq=3,indx_cvice=4)
127 INTEGER npoints,nlev,npart,ice_type
130 REAL pres(npoints,nlev)
131 REAL presf(npoints,nlev+1)
132 REAL temp(npoints,nlev)
133 REAL q_lsliq(npoints,nlev), q_lsice(npoints,nlev)
134 REAL q_cvliq(npoints,nlev), q_cvice(npoints,nlev)
135 REAL ls_radliq(npoints,nlev), ls_radice(npoints,nlev)
136 REAL cv_radliq(npoints,nlev), cv_radice(npoints,nlev)
137 REAL frac_out(npoints,nlev)
141 REAL pmol(npoints,nlev)
142 REAL pnorm(npoints,nlev)
143 REAL tautot(npoints,nlev)
144 REAL refl(npoints,nrefl)
148 REAL km, rdiffm, Qscat, Cmol
159 REAL pi, rhopart(npart)
160 REAL polpart(npart,5)
164 REAL rad_part(npoints,nlev,npart)
165 REAL rhoair(npoints,nlev), zheight(npoints,nlev+1)
166 REAL beta_mol(npoints,nlev), alpha_mol(npoints,nlev)
167 REAL kp_part(npoints,nlev,npart)
170 REAL frac_sub(npoints,nlev)
171 REAL qpart(npoints,nlev,npart)
172 REAL alpha_part(npoints,nlev,npart)
173 REAL tau_mol_lay(npoints)
174 REAL tau_mol(npoints,nlev)
175 REAL tau_part(npoints,nlev,npart)
176 REAL betatot(npoints,nlev)
177 REAL tautot_lay(npoints)
179 REAL tautot_S_liq(npoints),tautot_S_ice(npoints)
182 Logical iflag_testlidar
189 if ( npart .ne. 4 )
then
190 print *,
'Error in lidar_simulator, npart should be 4, not',npart
203 polpart(indx_lsliq,1) = 2.6980e-8
204 polpart(indx_lsliq,2) = -3.7701e-6
205 polpart(indx_lsliq,3) = 1.6594e-4
206 polpart(indx_lsliq,4) = -0.0024
207 polpart(indx_lsliq,5) = 0.0626
209 if (ice_type.eq.0)
then
210 polpart(indx_lsice,1) = -1.0176e-8
211 polpart(indx_lsice,2) = 1.7615e-6
212 polpart(indx_lsice,3) = -1.0480e-4
213 polpart(indx_lsice,4) = 0.0019
214 polpart(indx_lsice,5) = 0.0460
217 if (ice_type.eq.1)
then
218 polpart(indx_lsice,1) = 1.3615e-8
219 polpart(indx_lsice,2) = -2.04206e-6
220 polpart(indx_lsice,3) = 7.51799e-5
221 polpart(indx_lsice,4) = 0.00078213
222 polpart(indx_lsice,5) = 0.0182131
225 polpart(indx_cvliq,1) = 2.6980e-8
226 polpart(indx_cvliq,2) = -3.7701e-6
227 polpart(indx_cvliq,3) = 1.6594e-4
228 polpart(indx_cvliq,4) = -0.0024
229 polpart(indx_cvliq,5) = 0.0626
231 if (ice_type.eq.0)
then
232 polpart(indx_cvice,1) = -1.0176e-8
233 polpart(indx_cvice,2) = 1.7615e-6
234 polpart(indx_cvice,3) = -1.0480e-4
235 polpart(indx_cvice,4) = 0.0019
236 polpart(indx_cvice,5) = 0.0460
238 if (ice_type.eq.1)
then
239 polpart(indx_cvice,1) = 1.3615e-8
240 polpart(indx_cvice,2) = -2.04206e-6
241 polpart(indx_cvice,3) = 7.51799e-5
242 polpart(indx_cvice,4) = 0.00078213
243 polpart(indx_cvice,5) = 0.0182131
248 rhoair = pres/(287.04*temp)
251 rhopart(indx_lsliq) = rholiq
252 rhopart(indx_lsice) = rhoice
253 rhopart(indx_cvliq) = rholiq
254 rhopart(indx_cvice) = rhoice
257 rad_part(:,:,indx_lsliq) = ls_radliq(:,:)
258 rad_part(:,:,indx_lsice) = ls_radice(:,:)
259 rad_part(:,:,indx_cvliq) = cv_radliq(:,:)
260 rad_part(:,:,indx_cvice) = cv_radice(:,:)
261 rad_part(:,:,:)=max(rad_part(:,:,:),0.)
262 rad_part(:,:,:)=min(rad_part(:,:,:),70.0e-6)
267 zheight(:,k) = zheight(:,k-1) &
268 -(presf(:,k)-presf(:,k-1))/(rhoair(:,k-1)*9.81)
273 frac_sub = min( frac_out, 1.0 )
279 beta_mol = pres/km/temp * cmol
280 alpha_mol = 8.0*pi/3.0 * beta_mol
288 where ( rad_part(:,:,i).gt.0.0)
290 polpart(i,1)*(rad_part(:,:,i)*1e6)**4 &
291 + polpart(i,2)*(rad_part(:,:,i)*1e6)**3 &
292 + polpart(i,3)*(rad_part(:,:,i)*1e6)**2 &
293 + polpart(i,4)*(rad_part(:,:,i)*1e6) &
301 qpart(:,:,indx_lsliq) = q_lsliq(:,:)
302 qpart(:,:,indx_lsice) = q_lsice(:,:)
303 qpart(:,:,indx_cvliq) = q_cvliq(:,:)
304 qpart(:,:,indx_cvice) = q_cvice(:,:)
308 where ( rad_part(:,:,i).gt.0.0)
309 alpha_part(:,:,i) = 3.0/4.0 * qscat &
310 * rhoair(:,:) * qpart(:,:,i) &
311 / (rhopart(i) * rad_part(:,:,i) )
313 alpha_part(:,:,i) = 0.
323 tau_mol(:,1:nlev) = alpha_mol(:,1:nlev) &
324 & *(zheight(:,2:nlev+1)-zheight(:,1:nlev))
327 tau_mol(:,k) = tau_mol(:,k) + tau_mol(:,k+1)
332 tau_part = rdiffm * alpha_part
335 tau_part(:,:,i) = tau_part(:,:,i) &
336 & * (zheight(:,2:nlev+1)-zheight(:,1:nlev) )
339 tau_part(:,k,i) = tau_part(:,k,i) + tau_part(:,k+1,i)
345 pmol(:,nlev) = beta_mol(:,nlev) / (2.*tau_mol(:,nlev)) &
346 & * (1.-exp(-2.0*tau_mol(:,nlev)))
349 tau_mol_lay(:) = tau_mol(:,k)-tau_mol(:,k+1)
350 WHERE (tau_mol_lay(:).GT.0.)
351 pmol(:,k) = beta_mol(:,k) * exp(-2.0*tau_mol(:,k+1)) / (2.*tau_mol_lay(:)) &
352 & * (1.-exp(-2.0*tau_mol_lay(:)))
355 pmol(:,k) = beta_mol(:,k) * exp(-2.0*tau_mol(:,k+1))
365 betatot(:,:) = beta_mol(:,:)
366 tautot(:,:) = tau_mol(:,:)
368 betatot(:,:) = betatot(:,:) + kp_part(:,:,i)*alpha_part(:,:,i)
369 tautot(:,:) = tautot(:,:) + tau_part(:,:,i)
373 pnorm(:,nlev) = betatot(:,nlev) / (2.*tautot(:,nlev)) &
374 & * (1.-exp(-2.0*tautot(:,nlev)))
377 tautot_lay(:) = tautot(:,k)-tautot(:,k+1)
378 WHERE (tautot_lay(:).GT.0.)
379 pnorm(:,k) = betatot(:,k) * exp(-2.0*tautot(:,k+1)) / (2.*tautot_lay(:)) &
382 & * (1.-exp(-2.0*tautot_lay(:)))
385 pnorm(:,k) = betatot(:,k) * exp(-2.0*tautot(:,k+1))
389 if (iflag_testlidar)
then
395 where ( frac_out(:,:).ge.0.5)
397 pnorm(:,:) = pmol(:,:)*50.
399 pnorm(:,:) = pmol(:,:)
422 tautot_s_liq(:) = tautot_s_liq(:) &
423 + tau_part(:,1,1) + tau_part(:,1,3)
424 tautot_s_ice(:) = tautot_s_ice(:) &
425 + tau_part(:,1,2) + tau_part(:,1,4)
427 call parasol(npoints,nrefl,undef &
428 ,tautot_s_liq,tautot_s_ice &
437 SUBROUTINE parasol(npoints,nrefl,undef &
438 ,tautot_s_liq,tautot_s_ice &
460 REAL tautot_S_liq(npoints)
462 REAL tautot_S_ice(npoints)
464 REAL refl(npoints,nrefl)
467 REAL tautot_S(npoints)
468 REAL frac_taucol_liq(npoints), frac_taucol_ice(npoints)
473 INTEGER ntetas, nbtau
476 REAL aa(ntetas,nbtau-1), ab(ntetas,nbtau-1)
477 REAL ba(ntetas,nbtau-1), bb(ntetas,nbtau-1)
478 REAL tetas(ntetas),tau(nbtau)
480 REAL rlumA(ntetas,nbtau), rlumB(ntetas,nbtau)
481 REAL rlumA_mod(npoints,5), rlumB_mod(npoints,5)
483 DATA tau /0., 1., 5., 10., 20., 50., 100./
484 DATA tetas /0., 20., 40., 60., 80./
487 DATA (rluma(1,ny),ny=1,nbtau) /0.03, 0.090886, 0.283965, &
488 0.480587, 0.695235, 0.908229, 1.0 /
489 DATA (rluma(2,ny),ny=1,nbtau) /0.03, 0.072185, 0.252596, &
490 0.436401, 0.631352, 0.823924, 0.909013 /
491 DATA (rluma(3,ny),ny=1,nbtau) /0.03, 0.058410, 0.224707, &
492 0.367451, 0.509180, 0.648152, 0.709554 /
493 DATA (rluma(4,ny),ny=1,nbtau) /0.03, 0.052498, 0.175844, &
494 0.252916, 0.326551, 0.398581, 0.430405 /
495 DATA (rluma(5,ny),ny=1,nbtau) /0.03, 0.034730, 0.064488, &
496 0.081667, 0.098215, 0.114411, 0.121567 /
499 DATA (rlumb(1,ny),ny=1,nbtau) /0.03, 0.092170, 0.311941, &
500 0.511298, 0.712079 , 0.898243 , 0.976646 /
501 DATA (rlumb(2,ny),ny=1,nbtau) /0.03, 0.087082, 0.304293, &
502 0.490879, 0.673565, 0.842026, 0.912966 /
503 DATA (rlumb(3,ny),ny=1,nbtau) /0.03, 0.083325, 0.285193, &
504 0.430266, 0.563747, 0.685773, 0.737154 /
505 DATA (rlumb(4,ny),ny=1,nbtau) /0.03, 0.084935, 0.233450, &
506 0.312280, 0.382376, 0.446371, 0.473317 /
507 DATA (rlumb(5,ny),ny=1,nbtau) /0.03, 0.054157, 0.089911, &
508 0.107854, 0.124127, 0.139004, 0.145269 /
518 IF ( nrefl.GT. ntetas )
THEN
519 print *,
'Error in lidar_simulator, nrefl should be less then ',ntetas,
' not',nrefl
527 r_norm(:)=1./ cos(pi/180.*tetas(:))
529 tautot_s_liq(:)=max(tautot_s_liq(:),tau(1))
530 tautot_s_ice(:)=max(tautot_s_ice(:),tau(1))
531 tautot_s(:) = tautot_s_ice(:) + tautot_s_liq(:)
534 WHERE (tautot_s(:) .GT. 0.)
535 frac_taucol_liq(:) = tautot_s_liq(:) / tautot_s(:)
536 frac_taucol_ice(:) = tautot_s_ice(:) / tautot_s(:)
538 frac_taucol_liq(:) = 1.
539 frac_taucol_ice(:) = 0.
541 tautot_s(:)=min(tautot_s(:),tau(nbtau))
547 aa(:,ny) = (rluma(:,ny+1)-rluma(:,ny))/(tau(ny+1)-tau(ny))
548 ba(:,ny) = rluma(:,ny) - aa(:,ny)*tau(ny)
550 ab(:,ny) = (rlumb(:,ny+1)-rlumb(:,ny))/(tau(ny+1)-tau(ny))
551 bb(:,ny) = rlumb(:,ny) - ab(:,ny)*tau(ny)
556 WHERE (tautot_s(:).GE.tau(ny).AND.tautot_s(:).LE.tau(ny+1))
557 rluma_mod(:,it) = aa(it,ny)*tautot_s(:) + ba(it,ny)
558 rlumb_mod(:,it) = ab(it,ny)*tautot_s(:) + bb(it,ny)
564 refl(:,it) = frac_taucol_liq(:) * rluma_mod(:,it) &
565 + frac_taucol_ice(:) * rlumb_mod(:,it)
567 refl(:,it) = refl(:,it) * r_norm(it)
subroutine lidar_simulator(npoints, nlev, npart, nrefl, undef, pres, presf, temp, q_lsliq, q_lsice, q_cvliq, q_cvice, ls_radliq, ls_radice, cv_radliq, cv_radice, frac_out, ice_type, pmol, pnorm, tautot, refl)
subroutine parasol(npoints, nrefl, undef, tautot_S_liq, tautot_S_ice, refl)
!$Id itapm1 ENDIF!IM on interpole les champs sur les niveaux STD de pression!IM a chaque pas de temps de la physique c!positionnement de l argument logique a false c!pour ne pas recalculer deux fois la meme chose!c!a cet effet un appel a plevel_new a ete deplace c!a la fin de la serie d appels c!la boucle DO nlevSTD a ete internalisee c!dans d ou la creation de cette routine c c!CALL false
!$Header!integer nvarmx parameter(nfmx=10, imx=200, jmx=150, lmx=200, nvarmx=1000) real xd(imx
!$Id itapm1 ENDIF!IM on interpole les champs sur les niveaux STD de pression!IM a chaque pas de temps de la physique c!positionnement de l argument logique a false c!pour ne pas recalculer deux fois la meme chose!c!a cet effet un appel a plevel_new a ete deplace c!a la fin de la serie d appels c!la boucle DO nlevSTD a ete internalisee c!dans d ou la creation de cette routine c c!CALL ulevSTD CALL &zphi philevSTD CALL &zx_rh rhlevSTD!DO klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon du jour ou toutes les read_climoz CALL true