Changeset 5185 for LMDZ6/branches/Amaury_dev/libf/phylmd/cosp
- Timestamp:
- Sep 11, 2024, 4:27:07 PM (3 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/cosp
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/MISR_simulator.F
r5099 r5185 181 181 ! NOW for MISR .. 182 182 ! if there a cloud ... start the counter ... store this height 183 if(thres_crossed_MISR .eq. 0 . and. dtau .gt. 0.) then183 if(thres_crossed_MISR .eq. 0 .AND. dtau .gt. 0.) then 184 184 185 185 ! first encountered a "cloud" … … 188 188 endif 189 189 190 if( thres_crossed_MISR .lt. 99 . and.190 if( thres_crossed_MISR .lt. 99 .AND. 191 191 & thres_crossed_MISR .gt. 0 ) then 192 192 … … 207 207 ! then MISR will like see a top below the top of the current 208 208 ! layer 209 if( dtau.gt.0 . and. (cloud_dtau-dtau) .lt. 1) then209 if( dtau.gt.0 .AND. (cloud_dtau-dtau) .lt. 1) then 210 210 211 211 if(dtau .lt. 1 .or. ilev.eq.1 .or. ilev.eq.nlev) then … … 228 228 229 229 ! check for a distinctive water layer 230 if(dtau .gt. 1 . and. at(j,ilev).gt.273 ) then230 if(dtau .gt. 1 .AND. at(j,ilev).gt.273 ) then 231 231 232 232 ! must be a water cloud ... … … 292 292 do j=2,npoints-1 293 293 294 if(box_MISR_ztop(j-1,1).gt.0 . and.294 if(box_MISR_ztop(j-1,1).gt.0 .AND. 295 295 & box_MISR_ztop(j+1,1).gt.0 ) then 296 296 297 297 if( abs( box_MISR_ztop(j-1,1) - 298 298 & box_MISR_ztop(j+1,1) ) .lt. 500 299 & . and.299 & .AND. 300 300 & box_MISR_ztop(j,1) .lt. 301 301 & box_MISR_ztop(j+1,1) ) then … … 312 312 do ibox=2,ncol-1 313 313 314 if(box_MISR_ztop(1,ibox-1).gt.0 . and.314 if(box_MISR_ztop(1,ibox-1).gt.0 .AND. 315 315 & box_MISR_ztop(1,ibox+1).gt.0 ) then 316 316 317 317 if( abs( box_MISR_ztop(1,ibox-1) - 318 318 & box_MISR_ztop(1,ibox+1) ) .lt. 500 319 & . and.319 & .AND. 320 320 & box_MISR_ztop(1,ibox) .lt. 321 321 & box_MISR_ztop(1,ibox+1) ) then … … 361 361 itau=1 362 362 else if (tau(j,ibox) .ge. isccp_taumin 363 & . and. tau(j,ibox) .lt. 1.3) then363 & .AND. tau(j,ibox) .lt. 1.3) then 364 364 itau=2 365 365 else if (tau(j,ibox) .ge. 1.3 366 & . and. tau(j,ibox) .lt. 3.6) then366 & .AND. tau(j,ibox) .lt. 3.6) then 367 367 itau=3 368 368 else if (tau(j,ibox) .ge. 3.6 369 & . and. tau(j,ibox) .lt. 9.4) then369 & .AND. tau(j,ibox) .lt. 9.4) then 370 370 itau=4 371 371 else if (tau(j,ibox) .ge. 9.4 372 & . and. tau(j,ibox) .lt. 23.) then372 & .AND. tau(j,ibox) .lt. 23.) then 373 373 itau=5 374 374 else if (tau(j,ibox) .ge. 23. 375 & . and. tau(j,ibox) .lt. 60.) then375 & .AND. tau(j,ibox) .lt. 60.) then 376 376 itau=6 377 377 else if (tau(j,ibox) .ge. 60.) then -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/calc_Re.F90
r5160 r5185 63 63 64 64 ! // if density is constant, set equivalent values for apm and bpm 65 if ((rho_c > 0) . and. (apm < 0)) then65 if ((rho_c > 0) .AND. (apm < 0)) then 66 66 apm = (pi/6)*rho_c 67 67 bpm = 3. … … 70 70 ! Exponential is same as modified gamma with vu =1 71 71 ! if Np is specified then we will just treat as modified gamma 72 if(dtype.eq.2 . and. Np>0) then72 if(dtype.eq.2 .AND. Np>0) then 73 73 local_dtype=1; 74 74 local_p3=1; … … 117 117 118 118 119 if( Np.eq.0 . and. p2+1 > 1E-8) then ! use default value for MEAN diameter as first default119 if( Np.eq.0 .AND. p2+1 > 1E-8) then ! use default value for MEAN diameter as first default 120 120 121 121 dm = p2 ! by definition, should have units of microns … … 231 231 232 232 ! get rg ... 233 if( Np.eq.0 . and. (abs(p2+1) > 1E-8) ) then ! use default value of rg233 if( Np.eq.0 .AND. (abs(p2+1) > 1E-8) ) then ! use default value of rg 234 234 235 235 rg = p2 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/cosp_output_write_mod.F90
r5158 r5185 185 185 DO k=1,PARASOL_NREFL 186 186 DO ip=1, Npoints 187 if (stlidar%cldlayer(ip,4).gt.0.01. and.stlidar%parasolrefl(ip,k).ne.missing_val) then187 if (stlidar%cldlayer(ip,4).gt.0.01.AND.stlidar%parasolrefl(ip,k).ne.missing_val) then 188 188 parasolcrefl(ip,k)=(stlidar%parasolrefl(ip,k)-0.03*(1.-stlidar%cldlayer(ip,4)))/ & 189 189 stlidar%cldlayer(ip,4) … … 240 240 241 241 !!! Sorties combinees Cloudsat et Calipso 242 if (cfg%Llidar_sim . and. cfg%Lradar_sim) then242 if (cfg%Llidar_sim .AND. cfg%Lradar_sim) then 243 243 where(stradar%lidar_only_freq_cloud == R_UNDEF) & 244 244 stradar%lidar_only_freq_cloud = missing_val -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/cosp_read_otputkeys.F90
r5160 r5185 439 439 Ltbrttov = .false. 440 440 endif 441 if ((.not.Lradar_sim). and.(.not.Llidar_sim).and. &442 (.not.Lisccp_sim). and.(.not.Lmisr_sim)) then441 if ((.not.Lradar_sim).AND.(.not.Llidar_sim).AND. & 442 (.not.Lisccp_sim).AND.(.not.Lmisr_sim)) then 443 443 Lfracout = .false. 444 444 Lstats = .false. … … 469 469 470 470 ! Diagnostics that use Radar and Lidar 471 if (((Lclcalipso2).or.(Lcltlidarradar)). and.((Lradar_sim).or.(Llidar_sim))) then471 if (((Lclcalipso2).or.(Lcltlidarradar)).AND.((Lradar_sim).or.(Llidar_sim))) then 472 472 Lclcalipso2 = .true. 473 473 Lcltlidarradar = .true. -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/dsd.F90
r5160 r5185 91 91 92 92 ! // if density is constant, store equivalent values for apm and bpm 93 if ((rho_c > 0) . and. (apm < 0)) then93 if ((rho_c > 0) .AND. (apm < 0)) then 94 94 apm = (pi/6)*rho_c 95 95 bpm = 3. … … 99 99 ! if only Np given then calculate Re 100 100 ! if neigher than use other defaults (p1,p2,p3) following quickbeam documentation 101 if(Re==0 . and. Np>0) then101 if(Re==0 .AND. Np>0) then 102 102 103 103 call calc_Re(Q,Np,rho_a, & … … 270 270 if (tc < -30) then 271 271 bhp = -1.75+0.09*((tc+273)-243.16) 272 elseif ((tc >= -30) . and. (tc < -9)) then272 elseif ((tc >= -30) .AND. (tc < -9)) then 273 273 bhp = -3.25-0.06*((tc+273)-265.66) 274 274 else … … 280 280 if (tc < -35) then 281 281 bhp = -1.75+0.09*((tc+273)-243.16) 282 elseif ((tc >= -35) . and. (tc < -17.5)) then282 elseif ((tc >= -35) .AND. (tc < -17.5)) then 283 283 bhp = -2.65+0.09*((tc+273)-255.66) 284 elseif ((tc >= -17.5) . and. (tc < -9)) then284 elseif ((tc >= -17.5) .AND. (tc < -9)) then 285 285 bhp = -3.25-0.06*((tc+273)-265.66) 286 286 else -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/format_input.F90
r5158 r5185 114 114 ! :: space-based: heights must be descending 115 115 if ( & 116 (sfc_radar == 1 . and. hgt_descending) .or. &117 (sfc_radar == 0 . and. (.not. hgt_descending)) &116 (sfc_radar == 1 .AND. hgt_descending) .or. & 117 (sfc_radar == 0 .AND. (.not. hgt_descending)) & 118 118 ) & 119 119 then -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/icarus.F
r5099 r5185 364 364 do 12 ilev=1,nlev 365 365 do j=1,npoints 366 if (pfull(j,ilev) .lt. 40000. . and.367 & pfull(j,ilev) .gt. 5000. . and.366 if (pfull(j,ilev) .lt. 40000. .AND. 367 & pfull(j,ilev) .gt. 5000. .AND. 368 368 & at(j,ilev) .lt. attropmin(j)) then 369 369 ptrop(j) = pfull(j,ilev) … … 377 377 do 13 ilev=1,nlev 378 378 do j=1,npoints 379 if (at(j,ilev) .gt. atmax(j) . and.379 if (at(j,ilev) .gt. atmax(j) .AND. 380 380 & ilev .ge. itrop(j)) atmax(j)=at(j,ilev) 381 381 enddo … … 811 811 if (top_height .eq. 1) then 812 812 do j=1,npoints 813 if (transmax(j) .gt. 0.001 . and.813 if (transmax(j) .gt. 0.001 .AND. 814 814 & transmax(j) .le. 0.9999999) then 815 815 fluxtopinit(j) = fluxtop(j,ibox) … … 820 820 do j=1,npoints 821 821 if (tau(j,ibox) .gt. (tauchk )) then 822 if (transmax(j) .gt. 0.001 . and.822 if (transmax(j) .gt. 0.001 .AND. 823 823 & transmax(j) .le. 0.9999999) then 824 824 emcld(j,ibox) = 1. - exp(-1. * tauir(j) ) … … 845 845 !at this point in the code 846 846 tb(j,ibox)= 1307.27/ (log(1. + (1./fluxtop(j,ibox)))) 847 if (top_height.eq.1. and.tauir(j).lt.taumin(j)) then847 if (top_height.eq.1.AND.tauir(j).lt.taumin(j)) then 848 848 tb(j,ibox) = attrop(j) - 5. 849 849 tau(j,ibox) = 2.13*taumin(j) … … 930 930 do j=1,npoints 931 931 if (ilev .ge. itrop(j)) then 932 if ((at(j,ilev) .ge. tb(j,ibox) . and.932 if ((at(j,ilev) .ge. tb(j,ibox) .AND. 933 933 & at(j,ilev+1) .le. tb(j,ibox)) .or. 934 & (at(j,ilev) .le. tb(j,ibox) . and.934 & (at(j,ilev) .le. tb(j,ibox) .AND. 935 935 & at(j,ilev+1) .ge. tb(j,ibox))) then 936 936 nmatch(j)=nmatch(j)+1 … … 976 976 do j=1,npoints 977 977 if ((ptop(j,ibox) .eq. 0. ) 978 & . and.(frac_out(j,ibox,ilev) .ne. 0)) then978 & .AND.(frac_out(j,ibox,ilev) .ne. 0)) then 979 979 ptop(j,ibox)=phalf(j,ilev) 980 980 levmatch(j,ibox)=ilev … … 1048 1048 1049 1049 if (tau(j,ibox) .gt. (tauchk ) 1050 & . and. ptop(j,ibox) .gt. 0.) then1050 & .AND. ptop(j,ibox) .gt. 0.) then 1051 1051 box_cloudy(j,ibox)=.true. 1052 1052 endif … … 1098 1098 else if (tau(j,ibox) .ge. isccp_taumin 1099 1099 & 1100 & . and. tau(j,ibox) .lt. 1.3) then1100 & .AND. tau(j,ibox) .lt. 1.3) then 1101 1101 itau(j)=2 1102 1102 else if (tau(j,ibox) .ge. 1.3 1103 & . and. tau(j,ibox) .lt. 3.6) then1103 & .AND. tau(j,ibox) .lt. 3.6) then 1104 1104 itau(j)=3 1105 1105 else if (tau(j,ibox) .ge. 3.6 1106 & . and. tau(j,ibox) .lt. 9.4) then1106 & .AND. tau(j,ibox) .lt. 9.4) then 1107 1107 itau(j)=4 1108 1108 else if (tau(j,ibox) .ge. 9.4 1109 & . and. tau(j,ibox) .lt. 23.) then1109 & .AND. tau(j,ibox) .lt. 23.) then 1110 1110 itau(j)=5 1111 1111 else if (tau(j,ibox) .ge. 23. 1112 & . and. tau(j,ibox) .lt. 60.) then1112 & .AND. tau(j,ibox) .lt. 60.) then 1113 1113 itau(j)=6 1114 1114 else if (tau(j,ibox) .ge. 60.) then … … 1118 1118 !determine cloud top pressure category 1119 1119 if ( ptop(j,ibox) .gt. 0. 1120 & . and.ptop(j,ibox) .lt. 180.) then1120 & .AND.ptop(j,ibox) .lt. 180.) then 1121 1121 ipres(j)=1 1122 1122 else if(ptop(j,ibox) .ge. 180. 1123 & . and.ptop(j,ibox) .lt. 310.) then1123 & .AND.ptop(j,ibox) .lt. 310.) then 1124 1124 ipres(j)=2 1125 1125 else if(ptop(j,ibox) .ge. 310. 1126 & . and.ptop(j,ibox) .lt. 440.) then1126 & .AND.ptop(j,ibox) .lt. 440.) then 1127 1127 ipres(j)=3 1128 1128 else if(ptop(j,ibox) .ge. 440. 1129 & . and.ptop(j,ibox) .lt. 560.) then1129 & .AND.ptop(j,ibox) .lt. 560.) then 1130 1130 ipres(j)=4 1131 1131 else if(ptop(j,ibox) .ge. 560. 1132 & . and.ptop(j,ibox) .lt. 680.) then1132 & .AND.ptop(j,ibox) .lt. 680.) then 1133 1133 ipres(j)=5 1134 1134 else if(ptop(j,ibox) .ge. 680. 1135 & . and.ptop(j,ibox) .lt. 800.) then1135 & .AND.ptop(j,ibox) .lt. 800.) then 1136 1136 ipres(j)=6 1137 1137 else if(ptop(j,ibox) .ge. 800.) then … … 1140 1140 1141 1141 !update frequencies 1142 if(ipres(j) .gt. 0. and.itau(j) .gt. 0) then1142 if(ipres(j) .gt. 0.AND.itau(j) .gt. 0) then 1143 1143 fq_isccp(j,itau(j),ipres(j))= 1144 1144 & fq_isccp(j,itau(j),ipres(j))+ boxarea -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_cosp.F90
r5160 r5185 139 139 ! and reff_zero == .false. Reff use in lidar and set to 0 for radar 140 140 endif 141 if ((.not. gbx%use_reff) . and. (reff_zero)) then ! No Reff in radar. Default in lidar141 if ((.not. gbx%use_reff) .AND. (reff_zero)) then ! No Reff in radar. Default in lidar 142 142 gbx%Reff = DEFAULT_LIDAR_REFF 143 143 PRINT *, '---------- COSP WARNING ------------' -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_cosp_isccp_simulator.F90
r5158 r5185 88 88 89 89 ! Check if there is any value slightly greater than 1 90 where ((y%totalcldarea > 1.0-1.e-5) . and. (y%totalcldarea < 1.0+1.e-5))90 where ((y%totalcldarea > 1.0-1.e-5) .AND. (y%totalcldarea < 1.0+1.e-5)) 91 91 y%totalcldarea = 1.0 92 92 endwhere -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_cosp_radar.F90
r5158 r5185 144 144 145 145 if ( & 146 (gbx%surface_radar == 1 . and. hgt_descending) .or. &147 (gbx%surface_radar == 0 . and. (.not. hgt_descending)) &146 (gbx%surface_radar == 1 .AND. hgt_descending) .or. & 147 (gbx%surface_radar == 0 .AND. (.not. hgt_descending)) & 148 148 ) & 149 149 then -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_cosp_simulator.F90
r5160 r5185 86 86 ! do j=1,gbx%Nlevels 87 87 ! do i=1,gbx%Npoints 88 ! if ((gbx%mr_hydro(i,j,k)>0.0). and.(gbx%Reff(i,j,k)<=0.0)) inconsistent=.true.88 ! if ((gbx%mr_hydro(i,j,k)>0.0).AND.(gbx%Reff(i,j,k)<=0.0)) inconsistent=.true. 89 89 ! enddo 90 90 ! enddo -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_cosp_stats.F90
r5158 r5185 140 140 141 141 !++++++++++++ Lidar-only cloud amount and lidar&radar total cloud mount ++++++++++++++++ 142 if (cfg%Lradar_sim. and.cfg%Llidar_sim) call cosp_lidar_only_cloud(Npoints,Ncolumns,Nlr, &142 if (cfg%Lradar_sim.AND.cfg%Llidar_sim) call cosp_lidar_only_cloud(Npoints,Ncolumns,Nlr, & 143 143 temp_c,betatot_out,betaperptot_out,betamol_c,Ze_out, & 144 144 stradar%lidar_only_freq_cloud,stradar%radar_lidar_tcc) … … 162 162 ,stlidar%parasolrefl,vgrid%z,stlidar%profSR) !OPAQ !TIBO 163 163 !++++++++++++ Lidar-only cloud amount and lidar&radar total cloud mount ++++++++++++++++ 164 if (cfg%Lradar_sim. and.cfg%Llidar_sim) call cosp_lidar_only_cloud(Npoints,Ncolumns,Nlr, &164 if (cfg%Lradar_sim.AND.cfg%Llidar_sim) call cosp_lidar_only_cloud(Npoints,Ncolumns,Nlr, & 165 165 sglidar%temp_tot,sglidar%beta_tot,sglidar%betaperp_tot,sglidar%beta_mol,sgradar%Ze_tot, & 166 166 stradar%lidar_only_freq_cloud,stradar%radar_lidar_tcc) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_cosp_utils.F90
r5160 r5185 85 85 mxratio(i,j,k)=mxratio(i,j,k)/rho 86 86 ! Compute effective radius 87 ! if ((reff(i,j,k) <= 0.0). and.(flux(i,k) /= 0.0)) then88 if ((reff(i,j,k) <= 0.0). and.(flux(i,k) > seuil)) then87 ! if ((reff(i,j,k) <= 0.0).AND.(flux(i,k) /= 0.0)) then 88 if ((reff(i,j,k) <= 0.0).AND.(flux(i,k) > seuil)) then 89 89 lambda_x = (a_x*c_x*((rho0/rho)**g_x)*n_ax*gamma1/flux(i,k))**(1./delta) 90 90 reff(i,j,k) = gamma_4_3_2/lambda_x -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_llnl_stats.F90
r5158 r5185 72 72 if (x(i,k,j) == R_GROUND) then 73 73 cosp_cfad(i,:,j) = R_UNDEF 74 elseif ((x(i,k,j) >= xmin) . and. (x(i,k,j) <= xmax)) then74 elseif ((x(i,k,j) >= xmin) .AND. (x(i,k,j) <= xmax)) then 75 75 ibin = ceiling((x(i,k,j) - bmin)/bwidth) 76 76 if (ibin > Nbins) ibin = Nbins … … 81 81 enddo !k 82 82 enddo !j 83 where ((cosp_cfad /= R_UNDEF). and.(cosp_cfad /= 0.0)) cosp_cfad = cosp_cfad / Ncolumns83 where ((cosp_cfad /= R_UNDEF).AND.(cosp_cfad /= 0.0)) cosp_cfad = cosp_cfad / Ncolumns 84 84 END FUNCTION COSP_CFAD 85 85 … … 117 117 DO j=Nlevels,1,-1 !top->surf 118 118 sc_ratio = beta_tot(pr,i,j)/beta_mol(pr,j) 119 if ((sc_ratio .le. s_att) . and. (flag_sat .eq. 0)) flag_sat = j119 if ((sc_ratio .le. s_att) .AND. (flag_sat .eq. 0)) flag_sat = j 120 120 if (Ze_tot(pr,i,j) .lt. -30.) then !radar can't detect cloud 121 121 if ( (sc_ratio .gt. s_cld) .or. (flag_sat .eq. j) ) then !lidar sense cloud -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_lmd_ipsl_stats.F90
r5160 r5185 146 146 DO ic = 1, ncol 147 147 pnorm_c = pnorm(:,ic,:) 148 where ((pnorm_c.lt.xmax) . and. (pmol.lt.xmax) .and. (pmol.gt. 0.0 ))148 where ((pnorm_c.lt.xmax) .AND. (pmol.lt.xmax) .AND. (pmol.gt. 0.0 )) 149 149 x3d_c = pnorm_c/pmol 150 150 elsewhere … … 273 273 DO i = 1, Npoints 274 274 if (x(i,k,j) /= undef) then 275 if ((x(i,k,j).gt.srbval_ext(ib-1)). and.(x(i,k,j).le.srbval_ext(ib))) &275 if ((x(i,k,j).gt.srbval_ext(ib-1)).AND.(x(i,k,j).le.srbval_ext(ib))) & 276 276 cfad(i,ib,j) = cfad(i,ib,j) + 1.0 277 277 else … … 421 421 422 422 ! cloud detection at subgrid-scale: 423 where ( (x(:,:,k).gt.S_cld) . and. (x(:,:,k).ne. undef) )423 where ( (x(:,:,k).gt.S_cld) .AND. (x(:,:,k).ne. undef) ) 424 424 cldy(:,:,k)=1.0 425 425 elsewhere … … 428 428 429 429 ! number of usefull sub-columns: 430 where ( (x(:,:,k).gt.S_att) . and. (x(:,:,k).ne. undef) )430 where ( (x(:,:,k).gt.S_att) .AND. (x(:,:,k).ne. undef) ) 431 431 srok(:,:,k)=1.0 432 432 elsewhere … … 462 462 ! instead of height, for ice,liquid and all clouds 463 463 DO itemp=1,Ntemp 464 if( (tmp(ip,k).ge.tempmod(itemp)). and.(tmp(ip,k).lt.tempmod(itemp+1)) )then464 if( (tmp(ip,k).ge.tempmod(itemp)).AND.(tmp(ip,k).lt.tempmod(itemp+1)) )then 465 465 lidarcldtempind(ip,itemp)=lidarcldtempind(ip,itemp)+1. 466 466 endif … … 470 470 if (cldy(ip,ic,k).eq.1.) then 471 471 DO itemp=1,Ntemp 472 if( (tmp(ip,k).ge.tempmod(itemp)). and.(tmp(ip,k).lt.tempmod(itemp+1)) )then472 if( (tmp(ip,k).ge.tempmod(itemp)).AND.(tmp(ip,k).lt.tempmod(itemp+1)) )then 473 473 lidarcldtemp(ip,itemp,1)=lidarcldtemp(ip,itemp,1)+1. 474 474 endif … … 478 478 p1 = pplay(ip,k) 479 479 480 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high clouds480 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high clouds 481 481 cldlay3(ip,ic) = MAX(cldlay3(ip,ic), cldy(ip,ic,k)) 482 482 nsublay3(ip,ic) = MAX(nsublay3(ip,ic), srok(ip,ic,k)) 483 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid clouds483 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid clouds 484 484 cldlay2(ip,ic) = MAX(cldlay2(ip,ic), cldy(ip,ic,k)) 485 485 nsublay2(ip,ic) = MAX(nsublay2(ip,ic), srok(ip,ic,k)) … … 513 513 if(srok(ip,ic,k).gt.0.)then 514 514 DO itemp=1,Ntemp 515 if( (tmp(ip,k).ge.tempmod(itemp)). and.(tmp(ip,k).lt.tempmod(itemp+1)) )then515 if( (tmp(ip,k).ge.tempmod(itemp)).AND.(tmp(ip,k).lt.tempmod(itemp+1)) )then 516 516 lidarcldtempind(ip,itemp)=lidarcldtempind(ip,itemp)+1. 517 517 endif … … 521 521 if(cldy(ip,ic,k).eq.1.)then 522 522 DO itemp=1,Ntemp 523 if( (tmp(ip,k).ge.tempmod(itemp)). and.(tmp(ip,k).lt.tempmod(itemp+1)) )then523 if( (tmp(ip,k).ge.tempmod(itemp)).AND.(tmp(ip,k).lt.tempmod(itemp+1)) )then 524 524 lidarcldtemp(ip,itemp,1)=lidarcldtemp(ip,itemp,1)+1. 525 525 endif … … 529 529 iz=1 530 530 p1 = pplay(ip,k) 531 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high clouds531 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high clouds 532 532 iz=3 533 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid clouds533 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid clouds 534 534 iz=2 535 535 endif … … 590 590 591 591 ! Avoid zero values 592 if( (cldy(i,ncol,nlev).eq.1.) . and. (ATBperp(i,ncol,nlev).gt.0.) )then592 if( (cldy(i,ncol,nlev).eq.1.) .AND. (ATBperp(i,ncol,nlev).gt.0.) )then 593 593 ! Computation of the ATBperp along the phase discrimination line 594 594 ATBperp_tmp = (ATB(i,ncol,nlev)**5)*alpha50 + (ATB(i,ncol,nlev)**4)*beta50 + & … … 610 610 ! to classify the phase cloud 611 611 cldlayphase(i,ncol,4,2) = 1. ! tot cloud 612 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud612 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 613 613 cldlayphase(i,ncol,3,2) = 1. 614 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud614 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 615 615 cldlayphase(i,ncol,2,2) = 1. 616 616 else ! low cloud … … 618 618 endif 619 619 cldlayphase(i,ncol,4,5) = 1. ! tot cloud 620 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud620 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 621 621 cldlayphase(i,ncol,3,5) = 1. 622 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud622 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 623 623 cldlayphase(i,ncol,2,5) = 1. 624 624 else ! low cloud … … 631 631 tmpi(i,ncol,nlev)=tmp(i,nlev) 632 632 cldlayphase(i,ncol,4,1) = 1. ! tot cloud 633 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud633 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 634 634 cldlayphase(i,ncol,3,1) = 1. 635 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud635 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 636 636 cldlayphase(i,ncol,2,1) = 1. 637 637 else ! low cloud … … 652 652 tmpl(i,ncol,nlev)=tmp(i,nlev) 653 653 cldlayphase(i,ncol,4,2) = 1. ! tot cloud 654 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud654 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 655 655 cldlayphase(i,ncol,3,2) = 1. 656 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud656 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 657 657 cldlayphase(i,ncol,2,2) = 1. 658 658 else ! low cloud … … 667 667 ! to classify the phase cloud 668 668 cldlayphase(i,ncol,4,4) = 1. ! tot cloud 669 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud669 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 670 670 cldlayphase(i,ncol,3,4) = 1. 671 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud671 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 672 672 cldlayphase(i,ncol,2,4) = 1. 673 673 else ! low cloud … … 675 675 endif 676 676 cldlayphase(i,ncol,4,1) = 1. ! tot cloud 677 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud677 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 678 678 cldlayphase(i,ncol,3,1) = 1. 679 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud679 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 680 680 cldlayphase(i,ncol,2,1) = 1. 681 681 else ! low cloud … … 699 699 p1 = pplay(i,nlev) 700 700 701 if( (cldy(i,ncol,nlev).eq.1.) . and. (ATBperp(i,ncol,nlev).gt.0.) )then701 if( (cldy(i,ncol,nlev).eq.1.) .AND. (ATBperp(i,ncol,nlev).gt.0.) )then 702 702 ! Phase discrimination line : ATBperp = ATB^5*alpha50 + ATB^4*beta50 + ATB^3*gamma50 + ATB^2*delta50 703 703 ! + ATB*epsilon50 + zeta50 … … 719 719 720 720 cldlayphase(i,ncol,4,2) = 1. ! tot cloud 721 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud721 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 722 722 cldlayphase(i,ncol,3,2) = 1. 723 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud723 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 724 724 cldlayphase(i,ncol,2,2) = 1. 725 725 else ! low cloud … … 728 728 729 729 cldlayphase(i,ncol,4,5) = 1. ! tot cloud 730 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud730 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 731 731 cldlayphase(i,ncol,3,5) = 1. 732 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud732 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 733 733 cldlayphase(i,ncol,2,5) = 1. 734 734 else ! low cloud … … 742 742 743 743 cldlayphase(i,ncol,4,1) = 1. ! tot cloud 744 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud744 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 745 745 cldlayphase(i,ncol,3,1) = 1. 746 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud746 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 747 747 cldlayphase(i,ncol,2,1) = 1. 748 748 else ! low cloud … … 764 764 765 765 cldlayphase(i,ncol,4,2) = 1. ! tot cloud 766 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud766 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 767 767 cldlayphase(i,ncol,3,2) = 1. 768 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud768 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 769 769 cldlayphase(i,ncol,2,2) = 1. 770 770 else ! low cloud … … 779 779 780 780 cldlayphase(i,ncol,4,4) = 1. ! tot cloud 781 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud781 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 782 782 cldlayphase(i,ncol,3,4) = 1. 783 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud783 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 784 784 cldlayphase(i,ncol,2,4) = 1. 785 785 else ! low cloud … … 788 788 789 789 cldlayphase(i,ncol,4,1) = 1. ! tot cloud 790 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud790 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 791 791 cldlayphase(i,ncol,3,1) = 1. 792 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud792 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 793 793 cldlayphase(i,ncol,2,1) = 1. 794 794 else ! low cloud … … 826 826 827 827 cldlayphase(i,ncol,4,3) = 1. ! tot cloud 828 if ( p1.gt.0. . and. p1.lt.(440.*100.)) then ! high cloud828 if ( p1.gt.0. .AND. p1.lt.(440.*100.)) then ! high cloud 829 829 cldlayphase(i,ncol,3,3) = 1. 830 else if(p1.ge.(440.*100.) . and. p1.lt.(680.*100.)) then ! mid cloud830 else if(p1.ge.(440.*100.) .AND. p1.lt.(680.*100.)) then ! mid cloud 831 831 cldlayphase(i,ncol,2,3) = 1. 832 832 else ! low cloud … … 939 939 DO itemp=1,Ntemp 940 940 if(tmpi(i,ncol,nlev).gt.0.)then 941 if( (tmpi(i,ncol,nlev).ge.tempmod(itemp)). and.(tmpi(i,ncol,nlev).lt.tempmod(itemp+1)) )then941 if( (tmpi(i,ncol,nlev).ge.tempmod(itemp)).AND.(tmpi(i,ncol,nlev).lt.tempmod(itemp+1)) )then 942 942 lidarcldtemp(i,itemp,2)=lidarcldtemp(i,itemp,2)+1. 943 943 endif 944 944 elseif(tmpl(i,ncol,nlev).gt.0.)then 945 if( (tmpl(i,ncol,nlev).ge.tempmod(itemp)). and.(tmpl(i,ncol,nlev).lt.tempmod(itemp+1)) )then945 if( (tmpl(i,ncol,nlev).ge.tempmod(itemp)).AND.(tmpl(i,ncol,nlev).lt.tempmod(itemp+1)) )then 946 946 lidarcldtemp(i,itemp,3)=lidarcldtemp(i,itemp,3)+1. 947 947 endif 948 948 elseif(tmpu(i,ncol,nlev).gt.0.)then 949 if( (tmpu(i,ncol,nlev).ge.tempmod(itemp)). and.(tmpu(i,ncol,nlev).lt.tempmod(itemp+1)) )then949 if( (tmpu(i,ncol,nlev).ge.tempmod(itemp)).AND.(tmpu(i,ncol,nlev).lt.tempmod(itemp+1)) )then 950 950 lidarcldtemp(i,itemp,4)=lidarcldtemp(i,itemp,4)+1. 951 951 endif … … 1042 1042 DO k=1,Nlevels 1043 1043 ! Cloud detection at subgrid-scale: 1044 where ( (x(:,:,k) .gt. S_cld) . and. (x(:,:,k) .ne. undef) )1044 where ( (x(:,:,k) .gt. S_cld) .AND. (x(:,:,k) .ne. undef) ) 1045 1045 cldy(:,:,k)=1.0 1046 1046 elsewhere … … 1048 1048 endwhere 1049 1049 ! Fully attenuated layer detection at subgrid-scale: 1050 where ( (x(:,:,k) .gt. 0.0) . and. (x(:,:,k) .lt. S_att_opaq) .and. (x(:,:,k) .ne. undef) )1050 where ( (x(:,:,k) .gt. 0.0) .AND. (x(:,:,k) .lt. S_att_opaq) .AND. (x(:,:,k) .ne. undef) ) 1051 1051 cldyopaq(:,:,k)=1.0 1052 1052 elsewhere … … 1055 1055 1056 1056 ! Number of useful sub-column layers: 1057 where ( (x(:,:,k) .gt. S_att) . and. (x(:,:,k) .ne. undef) )1057 where ( (x(:,:,k) .gt. S_att) .AND. (x(:,:,k) .ne. undef) ) 1058 1058 srok(:,:,k)=1.0 1059 1059 elsewhere … … 1061 1061 endwhere 1062 1062 ! Number of useful sub-columns layers for z_opaque 3D fraction: 1063 where ( (x(:,:,k) .gt. 0.0) . and. (x(:,:,k) .ne. undef) )1063 where ( (x(:,:,k) .gt. 0.0) .AND. (x(:,:,k) .ne. undef) ) 1064 1064 srokopaq(:,:,k)=1.0 1065 1065 elsewhere … … 1094 1094 1095 1095 ! Declaring non-opaque cloudy profiles as thin cloud profiles 1096 if ( (cldlay(ip,ic,4) .eq. 1.0) . and. (cldlay(ip,ic,1) .eq. 0.0) ) then1096 if ( (cldlay(ip,ic,4) .eq. 1.0) .AND. (cldlay(ip,ic,1) .eq. 0.0) ) then 1097 1097 cldlay(ip,ic,2) = 1.0 1098 1098 endif … … 1105 1105 DO k=2,Nlevels 1106 1106 ! Declaring opaque cloud fraction and z_opaque altitude for 3D and 2D variables 1107 if ( (cldy(ip,ic,k) .eq. 1.0) . and. (zopac .eq. 0.0) ) then1107 if ( (cldy(ip,ic,k) .eq. 1.0) .AND. (zopac .eq. 0.0) ) then 1108 1108 lidarcldtype(ip,k-1,3) = lidarcldtype(ip,k-1,3) + 1.0 1109 1109 cldlay(ip,ic,3) = vgrid_z(k-1) !z_opaque altitude -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_modis_sim.F90
r5158 r5185 249 249 ! Initialize initial estimates for size retrievals 250 250 251 if(any(cloudMask) . and. .not. useSimpleReScheme) then251 if(any(cloudMask) .AND. .not. useSimpleReScheme) then 252 252 g_w(:) = get_g_nir( phaseIsLiquid, trial_re_w(:)) 253 253 w0_w(:) = get_ssa_nir(phaseIsLiquid, trial_re_w(:)) … … 319 319 end if 320 320 end do 321 where((retrievedSize(:) < 0.). and.(retrievedSize(:) /= R_UNDEF)) retrievedSize(:) = 1.0e-06*re_fill321 where((retrievedSize(:) < 0.).AND.(retrievedSize(:) /= R_UNDEF)) retrievedSize(:) = 1.0e-06*re_fill 322 322 323 323 ! We use the ISCCP-derived CTP for low clouds, since the ISCCP simulator ICARUS … … 325 325 ! Of course, ISCCP cloud top pressures are in mb. 326 326 327 where(cloudMask(:) . and. retrievedCloudTopPressure(:) > CO2Slicing_PressureLimit) &327 where(cloudMask(:) .AND. retrievedCloudTopPressure(:) > CO2Slicing_PressureLimit) & 328 328 retrievedCloudTopPressure(:) = isccpCloudTopPressure * 100. 329 329 … … 475 475 ! ######################################################################################## 476 476 validRetrievalMask(1:nPoints,1:nSubCols) = particle_size(1:nPoints,1:nSubCols) > 0. 477 cloudMask(1:nPoints,1:nSubCols) = phase(1:nPoints,1:nSubCols) /= phaseIsNone . and. &477 cloudMask(1:nPoints,1:nSubCols) = phase(1:nPoints,1:nSubCols) /= phaseIsNone .AND. & 478 478 validRetrievalMask(1:nPoints,1:nSubCols) 479 waterCloudMask(1:nPoints,1:nSubCols) = phase(1:nPoints,1:nSubCols) == phaseIsLiquid . and. &479 waterCloudMask(1:nPoints,1:nSubCols) = phase(1:nPoints,1:nSubCols) == phaseIsLiquid .AND. & 480 480 validRetrievalMask(1:nPoints,1:nSubCols) 481 iceCloudMask(1:nPoints,1:nSubCols) = phase(1:nPoints,1:nSubCols) == phaseIsIce . and. &481 iceCloudMask(1:nPoints,1:nSubCols) = phase(1:nPoints,1:nSubCols) == phaseIsIce .AND. & 482 482 validRetrievalMask(1:nPoints,1:nSubCols) 483 483 … … 488 488 Cloud_Fraction_Water_Mean(1:nPoints) = real(count(waterCloudMask, dim = 2)) 489 489 Cloud_Fraction_Ice_Mean(1:nPoints) = real(count(iceCloudMask, dim = 2)) 490 Cloud_Fraction_High_Mean(1:nPoints) = real(count(cloudMask . and. cloud_top_pressure <= &490 Cloud_Fraction_High_Mean(1:nPoints) = real(count(cloudMask .AND. cloud_top_pressure <= & 491 491 highCloudPressureLimit, dim = 2)) 492 Cloud_Fraction_Low_Mean(1:nPoints) = real(count(cloudMask . and. cloud_top_pressure > &492 Cloud_Fraction_Low_Mean(1:nPoints) = real(count(cloudMask .AND. cloud_top_pressure > & 493 493 lowCloudPressureLimit, dim = 2)) 494 494 Cloud_Fraction_Mid_Mean(1:nPoints) = Cloud_Fraction_Total_Mean(1:nPoints) - Cloud_Fraction_High_Mean(1:nPoints)& … … 653 653 DO ij=2,nbin1+1 654 654 DO ik=2,nbin2+1 655 jointHist(ij-1,ik-1)=count(var1 .ge. bin1(ij-1) . and. var1 .lt. bin1(ij) .and. &656 var2 .ge. bin2(ik-1) . and. var2 .lt. bin2(ik))655 jointHist(ij-1,ik-1)=count(var1 .ge. bin1(ij-1) .AND. var1 .lt. bin1(ij) .AND. & 656 var2 .ge. bin2(ik-1) .AND. var2 .lt. bin2(ik)) 657 657 enddo 658 658 enddo … … 719 719 720 720 validRetrievalMask(:, :) = particle_size(:, :) > 0. 721 cloudMask = phase(:, :) /= phaseIsNone . and. validRetrievalMask(:, :)722 waterCloudMask = phase(:, :) == phaseIsLiquid . and. validRetrievalMask(:, :)723 iceCloudMask = phase(:, :) == phaseIsIce . and. validRetrievalMask(:, :)721 cloudMask = phase(:, :) /= phaseIsNone .AND. validRetrievalMask(:, :) 722 waterCloudMask = phase(:, :) == phaseIsLiquid .AND. validRetrievalMask(:, :) 723 iceCloudMask = phase(:, :) == phaseIsIce .AND. validRetrievalMask(:, :) 724 724 725 725 ! Use these as pixel counts at first … … 729 729 Cloud_Fraction_Ice_Mean(:) = real(count(iceCloudMask, dim = 2)) 730 730 731 Cloud_Fraction_High_Mean(:) = real(count(cloudMask . and. cloud_top_pressure <= highCloudPressureLimit, dim = 2))732 Cloud_Fraction_Low_Mean(:) = real(count(cloudMask . and. cloud_top_pressure > lowCloudPressureLimit, dim = 2))731 Cloud_Fraction_High_Mean(:) = real(count(cloudMask .AND. cloud_top_pressure <= highCloudPressureLimit, dim = 2)) 732 Cloud_Fraction_Low_Mean(:) = real(count(cloudMask .AND. cloud_top_pressure > lowCloudPressureLimit, dim = 2)) 733 733 Cloud_Fraction_Mid_Mean(:) = Cloud_Fraction_Total_Mean(:) - Cloud_Fraction_High_Mean(:) - Cloud_Fraction_Low_Mean(:) 734 734 … … 780 780 DO i = 1, numTauHistogramBins 781 781 where(cloudMask(:, :)) 782 tauMask(:, :, i) = optical_thickness(:, :) >= tauHistogramBoundaries(i) . and. &782 tauMask(:, :, i) = optical_thickness(:, :) >= tauHistogramBoundaries(i) .AND. & 783 783 optical_thickness(:, :) < tauHistogramBoundaries(i+1) 784 784 elsewhere … … 789 789 DO i = 1, numPressureHistogramBins 790 790 where(cloudMask(:, :)) 791 pressureMask(:, :, i) = cloud_top_pressure(:, :) >= pressureHistogramBoundaries(i) . and. &791 pressureMask(:, :, i) = cloud_top_pressure(:, :) >= pressureHistogramBoundaries(i) .AND. & 792 792 cloud_top_pressure(:, :) < pressureHistogramBoundaries(i+1) 793 793 elsewhere … … 799 799 DO j = 1, numTauHistogramBins 800 800 Optical_Thickness_vs_Cloud_Top_Pressure(:, j, i) = & 801 real(count(tauMask(:, :, j) . and. pressureMask(:, :, i), dim = 2)) / real(nSubcols)801 real(count(tauMask(:, :, j) .AND. pressureMask(:, :, i), dim = 2)) / real(nSubcols) 802 802 end do 803 803 end do … … 936 936 937 937 ! DJS2015: Remove unused piece of code 938 ! if(use_two_re_iterations . and. retrieve_re > 0.) then938 ! if(use_two_re_iterations .AND. retrieve_re > 0.) then 939 939 ! re_min = retrieve_re - delta_re 940 940 ! re_max = retrieve_re + delta_re -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/phys_cosp.F90
r5160 r5185 201 201 202 202 !!! Ici on modifie les cles logiques pour les outputs selon les champs actives dans les .xml 203 if ((itap.gt.1). and.(first_write))then203 if ((itap.gt.1).AND.(first_write))then 204 204 205 205 IF (using_xios) call read_xiosfieldactive(cfg) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/prec_scops.F
r5099 r5185 192 192 endif 193 193 enddo ! loop over ncol 194 if ((flag_ls .eq. 0) . and. (ilev .lt. nlev)) then ! possibility THREE194 if ((flag_ls .eq. 0) .AND. (ilev .lt. nlev)) then ! possibility THREE 195 195 do ibox=1,ncol 196 196 if (frac_out(j,ibox,ilev+1) .eq. 1) then … … 229 229 endif 230 230 enddo ! loop over ncol 231 if ((flag_cv .eq. 0) . and. (ilev .lt. nlev)) then ! possibility THREE231 if ((flag_cv .eq. 0) .AND. (ilev .lt. nlev)) then ! possibility THREE 232 232 do ibox=1,ncol 233 233 if (frac_out(j,ibox,ilev+1) .eq. 2) then -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/radar_simulator.F90
r5160 r5185 187 187 hydro = .false. 188 188 DO j=1,hp%nhclass 189 if ((hm_matrix(j,pr,k) > 1E-12) . and. (hp%dtype(j) > 0)) then189 if ((hm_matrix(j,pr,k) > 1E-12) .AND. (hp%dtype(j) > 0)) then 190 190 hydro = .true. 191 191 exit … … 298 298 else 299 299 ! I assume here that water phase droplets are spheres. 300 ! hp%rho should be ~ 1000 or hp%apm=524 . and. hp%bpm=3300 ! hp%rho should be ~ 1000 or hp%apm=524 .AND. hp%bpm=3 301 301 Deq = Di 302 302 endif … … 311 311 ! NOTE: if .not. DO_LUT_TEST, then you are checking the LUT approximation 312 312 ! not just the DSD representation given by Ni 313 if(Np_matrix(tp,pr,k)>0 . and. DO_NP_TEST ) then313 if(Np_matrix(tp,pr,k)>0 .AND. DO_NP_TEST ) then 314 314 Np = path_integral(Ni,Di,1,ns-1)/rho_a*1E6 315 315 ! Note: Representation is not great or small Re < 2 … … 326 326 ! LUT test code 327 327 ! This segment of code compares full calculation to scaling result 328 if ( hp%Z_scale_flag(tp,itt,iRe_type) . and. DO_LUT_TEST ) then328 if ( hp%Z_scale_flag(tp,itt,iRe_type) .AND. DO_LUT_TEST ) then 329 329 scale_factor=rho_a*hm_matrix(tp,pr,k) 330 330 ! if more than 2 dBZe difference print error message/parameters. … … 400 400 g_to_vol(pr,k) = g_to_vol_in(pr,k) 401 401 else 402 if ( (hp%use_gas_abs == 1) .or. ((hp%use_gas_abs == 2) . and. (pr == 1)) ) then402 if ( (hp%use_gas_abs == 1) .or. ((hp%use_gas_abs == 2) .AND. (pr == 1)) ) then 403 403 g_vol(pr,k) = gases(p_matrix(pr,k),t_kelvin,rh_matrix(pr,k),hp%freq) 404 404 if (d_gate==1) then … … 428 428 429 429 ! Compute Rayleigh reflectivity, and full, attenuated reflectivity 430 if ((hp%do_ray == 1) . and. (z_ray(pr,k) > 0)) then430 if ((hp%do_ray == 1) .AND. (z_ray(pr,k) > 0)) then 431 431 Ze_ray(pr,k) = 10*log10(z_ray(pr,k)) 432 432 else -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/scops.F
r5099 r5185 236 236 if (threshold(j,ibox) 237 237 & .lt.min(tca(j,ilev-1),tca(j,ilev)) 238 & . and.(threshold(j,ibox).gt.conv(j,ilev))) then238 & .AND.(threshold(j,ibox).gt.conv(j,ilev))) then 239 239 maxosc(j,ibox)= 1 240 240 else -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/zeff.F90
r5158 r5185 99 99 100 100 correct_for_rho = 0 101 if ((ice == 1) . and. (minval(rho_e) >= 0)) correct_for_rho = 1101 if ((ice == 1) .AND. (minval(rho_e) >= 0)) correct_for_rho = 1 102 102 103 103 ! :: correct refractive index for ice density if needed
Note: See TracChangeset
for help on using the changeset viewer.