Changeset 3242 for LMDZ6/branches/IPSLCM6.0.15/libf
- Timestamp:
- Mar 7, 2018, 10:59:04 AM (7 years ago)
- Location:
- LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp
- Files:
-
- 6 edited
- 16 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp/cosp_output_mod.F90
r2955 r3242 12 12 numMODISReffLiqBins, reffLIQ_binCenters 13 13 14 IMPLICIT NONE 14 15 ! cosp_output_mod 15 16 INTEGER, PRIVATE :: i -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp/cosp_output_write_mod.F90
r3191 r3242 6 6 USE cosp_output_mod 7 7 8 IMPLICIT NONE 9 8 10 INTEGER, SAVE :: itau_iocosp 9 11 !$OMP THREADPRIVATE(itau_iocosp) … … 29 31 USE xios, only: xios_update_calendar, xios_field_is_active 30 32 #endif 31 33 IMPLICIT NONE 32 34 !!! Variables d'entree 33 35 integer :: itap, Nlevlmdz, Ncolumns, Npoints … … 45 47 46 48 !!! Variables locales 47 integer :: icl 49 integer :: icl,k,ip 48 50 logical :: ok_sync 49 51 integer :: itau_wcosp … … 78 80 ! On n'ecrit pas quand itap=1 (cosp) 79 81 80 if (prt_level >= 10) then81 WRITE(lunout,*)'DO iinit=1, iinitend ',iinitend82 endif82 ! if (prt_level >= 10) then 83 ! WRITE(lunout,*)'DO iinit=1, iinitend ',iinitend 84 ! endif 83 85 84 86 !!#ifdef CPP_XIOS … … 97 99 !!!! Sorties Calipso 98 100 if (cfg%Llidar_sim) then 99 ! Pb des valeurs indefinies, on les met a 0100 ! A refaire proprement101 ! do k = 1,Nlevout102 ! do ip = 1,Npoints103 ! if(stlidar%lidarcld(ip,k).eq.R_UNDEF)then104 ! stlidar%lidarcld(ip,k)=missing_val105 ! endif106 ! if(stlidar%proftemp(ip,k).eq.R_UNDEF)then !TIBO107 ! stlidar%proftemp(ip,k)=missing_val !TIBO108 ! endif !TIBO109 ! enddo110 111 ! do ii= 1,Ncolumns !TIBO112 ! do ip = 1,Npoints !TIBO113 !! if(stlidar%profSR(ip,ii,k).eq.R_UNDEF)then !TIBO114 !! stlidar%profSR(ip,ii,k)=missing_val !TIBO115 ! if(stlidar%profSR(ip,k,ii).eq.R_UNDEF)then !TIBO2116 ! stlidar%profSR(ip,k,ii)=missing_val !TIBO2117 ! endif !TIBO118 ! enddo !TIBO119 ! enddo !TIBO120 ! enddo121 122 ! do ip = 1,Npoints123 ! do k = 1,Nlevlmdz124 ! if(sglidar%beta_mol(ip,k).eq.R_UNDEF)then125 ! sglidar%beta_mol(ip,k)=missing_val126 ! endif127 128 ! do ii= 1,Ncolumns129 ! if(sglidar%beta_tot(ip,ii,k).eq.R_UNDEF)then130 ! sglidar%beta_tot(ip,ii,k)=missing_val131 ! endif132 ! enddo133 134 ! enddo !k = 1,Nlevlmdz135 ! enddo !ip = 1,Npoints136 137 ! do k = 1,LIDAR_NCAT138 ! do ip = 1,Npoints139 ! if(stlidar%cldlayer(ip,k).eq.R_UNDEF)then140 ! stlidar%cldlayer(ip,k)=missing_val141 ! endif142 ! enddo143 ! enddo144 145 ! do k = 1,LIDAR_NTYPE !OPAQ146 ! do ip = 1,Npoints !OPAQ147 ! if(stlidar%cldtype(ip,k).eq.R_UNDEF)then !OPAQ148 ! stlidar%cldtype(ip,k)=missing_val !OPAQ149 ! endif !OPAQ150 ! enddo !OPAQ151 ! enddo !OPAQ152 153 101 !!! AI 02 2018 154 102 ! Traitement missing_val … … 278 226 !!! Sorties Isccp 279 227 if (cfg%Lisccp_sim) then 280 ! Traitement des valeurs indefinies281 ! do ip = 1,Npoints282 ! if(isccp%totalcldarea(ip).eq.R_UNDEF)then283 ! isccp%totalcldarea(ip)=missing_val284 ! endif285 ! if(isccp%meanptop(ip).eq.R_UNDEF)then286 ! isccp%meanptop(ip)=missing_val287 ! endif288 ! if(isccp%meantaucld(ip).eq.R_UNDEF)then289 ! isccp%meantaucld(ip)=missing_val290 ! endif291 ! if(isccp%meanalbedocld(ip).eq.R_UNDEF)then292 ! isccp%meanalbedocld(ip)=missing_val293 ! endif294 ! if(isccp%meantb(ip).eq.R_UNDEF)then295 ! isccp%meantb(ip)=missing_val296 ! endif297 ! if(isccp%meantbclr(ip).eq.R_UNDEF)then298 ! isccp%meantbclr(ip)=missing_val299 ! endif300 301 ! do k=1,7302 ! do ii=1,7303 ! if(isccp%fq_isccp(ip,ii,k).eq.R_UNDEF)then304 ! isccp%fq_isccp(ip,ii,k)=missing_val305 ! endif306 ! enddo307 ! enddo308 309 ! do ii=1,Ncolumns310 ! if(isccp%boxtau(ip,ii).eq.R_UNDEF)then311 ! isccp%boxtau(ip,ii)=missing_val312 ! endif313 ! enddo314 315 ! do ii=1,Ncolumns316 ! if(isccp%boxptop(ip,ii).eq.R_UNDEF)then317 ! isccp%boxptop(ip,ii)=missing_val318 ! endif319 ! enddo320 ! enddo321 228 where(isccp%totalcldarea == R_UNDEF) isccp%totalcldarea = missing_val 322 229 where(isccp%meanptop == R_UNDEF) isccp%meanptop = missing_val … … 349 256 !!! MISR simulator 350 257 if (cfg%Lmisr_sim) then 351 ! do ip=1,Npoints352 ! do ii=1,7353 ! do k=1,MISR_N_CTH354 ! if(misr%fq_MISR(ip,ii,k).eq.R_UNDEF)then355 ! misr%fq_MISR(ip,ii,k)=missing_val356 ! endif357 ! enddo358 ! enddo359 ! enddo360 258 where(misr%fq_MISR == R_UNDEF) misr%fq_MISR = missing_val 361 259 … … 400 298 modis%Ice_Water_Path_Mean = missing_val 401 299 402 ! de ip=1,Npoints403 ! if(modis%Cloud_Fraction_Low_Mean(ip).eq.R_UNDEF)then404 ! modis%Cloud_Fraction_Low_Mean(ip)=missing_val405 ! endif406 ! if(modis%Cloud_Fraction_High_Mean(ip).eq.R_UNDEF)then407 ! modis%Cloud_Fraction_High_Mean(ip)=missing_val408 ! endif409 ! if(modis%Cloud_Fraction_Mid_Mean(ip).eq.R_UNDEF)then410 ! modis%Cloud_Fraction_Mid_Mean(ip)=missing_val411 ! endif412 ! if(modis%Cloud_Fraction_Total_Mean(ip).eq.R_UNDEF)then413 ! modis%Cloud_Fraction_Total_Mean(ip)=missing_val414 ! endif415 ! if(modis%Cloud_Fraction_Water_Mean(ip).eq.R_UNDEF)then416 ! modis%Cloud_Fraction_Water_Mean(ip)=missing_val417 ! endif418 ! if(modis%Cloud_Fraction_Ice_Mean(ip).eq.R_UNDEF)then419 ! modis%Cloud_Fraction_Ice_Mean(ip)=missing_val420 ! endif421 ! if(modis%Optical_Thickness_Total_Mean(ip).eq.R_UNDEF)then422 ! modis%Optical_Thickness_Total_Mean(ip)=missing_val423 ! endif424 ! if(modis%Optical_Thickness_Water_Mean(ip).eq.R_UNDEF)then425 ! modis%Optical_Thickness_Water_Mean(ip)=missing_val426 ! endif427 ! if(modis%Optical_Thickness_Ice_Mean(ip).eq.R_UNDEF)then428 ! modis%Optical_Thickness_Ice_Mean(ip)=missing_val429 ! endif430 ! if(modis%Cloud_Particle_Size_Water_Mean(ip).eq.R_UNDEF)then431 ! modis%Cloud_Particle_Size_Water_Mean(ip)=missing_val432 ! endif433 ! if(modis%Cloud_Particle_Size_Ice_Mean(ip).eq.R_UNDEF)then434 ! modis%Cloud_Particle_Size_Ice_Mean(ip)=missing_val435 ! endif436 ! if(modis%Cloud_Top_Pressure_Total_Mean(ip).eq.R_UNDEF)then437 ! modis%Cloud_Top_Pressure_Total_Mean(ip)=missing_val438 ! endif439 ! if(modis%Liquid_Water_Path_Mean(ip).eq.R_UNDEF)then440 ! modis%Liquid_Water_Path_Mean(ip)=missing_val441 ! endif442 ! if(modis%Ice_Water_Path_Mean(ip).eq.R_UNDEF)then443 ! modis%Ice_Water_Path_Mean(ip)=missing_val444 ! endif445 ! enddo446 447 300 where(modis%Optical_Thickness_Total_LogMean == R_UNDEF) & 448 301 modis%Optical_Thickness_Total_LogMean = missing_val … … 472 325 CALL histwrite2d_cosp(o_iwpmodis,modis%Ice_Water_Path_Mean) 473 326 474 ! do ip=1,Npoints475 ! do ii=1,7476 ! do k=1,7477 ! if(modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k).eq.R_UNDEF)then478 ! modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k)=missing_val479 ! endif480 ! enddo481 ! enddo482 ! enddo483 327 where(modis%Optical_Thickness_vs_Cloud_Top_Pressure == R_UNDEF) & 484 328 modis%Optical_Thickness_vs_Cloud_Top_Pressure = missing_val -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp/lidar_simulator.F90
r2428 r3242 121 121 !--------------------------------------------------------------------------------- 122 122 123 USE MOD_COSP_CONSTANTS, only : ok_debug_cosp 123 124 IMPLICIT NONE 124 125 REAL :: SRsat … … 201 202 REAL pnorm_perp_liq(npoints,nlev) ! perpendicular lidar backscattered signal power for liq 202 203 204 REAL :: seuil 205 203 206 ! Output variable 204 207 REAL pnorm_perp_tot (npoints,nlev) ! perpendicular lidar backscattered signal power … … 235 238 Gamma = 0.009 236 239 240 if (ok_debug_cosp) then 241 seuil=1.e-15 242 else 243 seuil=0.0 244 endif 237 245 !------------------------------------------------------------ 238 246 !---- 1. Preliminary definitions and calculations : … … 494 502 495 503 DO k= nlev, 1, -1 496 497 504 pnorm_perp_ice(:,k) = Alpha * pnorm_ice(:,k) ! Ice particles 505 pnorm_perp_liq(:,k) = 1000*Beta * pnorm_liq(:,k)**2 + Gamma * pnorm_liq(:,k) ! Liquid particles 498 506 ENDDO 499 507 … … 523 531 tautot_lay_liq(:) = tautot_liq(:,k)-tautot_liq(:,k+1) 524 532 WHERE (tautot_lay_liq(:).GT.0.) 525 beta_perp_liq(:,k) = pnorm_perp_liq(:,k)/ EXP(-2.0*tautot_liq(:,k+1)) * (2.*tautot_lay_liq(:)) &526 & / (1.-exp(-2.0*tautot_lay_liq(:)))533 beta_perp_liq(:,k) = pnorm_perp_liq(:,k)/ max(seuil,EXP(-2.0*tautot_liq(:,k+1))) & 534 & * (2.*tautot_lay_liq(:)) / (1.-exp(-2.0*tautot_lay_liq(:))) 527 535 528 536 ELSEWHERE -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp/m_mrgrnk.F90
r3241 r3242 1 1 Module m_mrgrnk 2 IMPLICIT NONE 2 3 Integer, Parameter :: kdp = selected_real_kind(15) 3 4 public :: mrgrnk -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp/mod_cosp_constants.F90
r3241 r3242 38 38 39 39 character(len=32) :: COSP_VERSION='COSP v1.4' 40 41 ! Mode debug ou prod (AI 0302018) 42 logical :: ok_debug_cosp = .false. 40 43 41 44 ! Indices to address arrays of LS and CONV hydrometeors -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp/mod_cosp_utils.F90
r3241 r3242 61 61 integer :: i,j,k 62 62 real :: sigma,one_over_xip1,xi,rho0,rho,lambda_x,gamma_4_3_2,delta 63 63 real :: seuil 64 65 if (ok_debug_cosp) then 66 seuil=1.e-15 67 else 68 seuil=0.0 69 endif 70 64 71 mxratio = 0.0 65 72 … … 80 87 mxratio(i,j,k)=mxratio(i,j,k)/rho 81 88 ! Compute effective radius 82 if ((reff(i,j,k) <= 0.0).and.(flux(i,k) /= 0.0)) then 89 ! if ((reff(i,j,k) <= 0.0).and.(flux(i,k) /= 0.0)) then 90 if ((reff(i,j,k) <= 0.0).and.(flux(i,k) > seuil)) then 83 91 lambda_x = (a_x*c_x*((rho0/rho)**g_x)*n_ax*gamma1/flux(i,k))**(1./delta) 84 92 reff(i,j,k) = gamma_4_3_2/lambda_x -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp/mod_modis_sim.F90
r3241 r3242 52 52 ! 53 53 module mod_modis_sim 54 USE MOD_COSP_TYPES, only: R_UNDEF 54 USE MOD_COSP_TYPES, only: R_UNDEF, ok_debug_cosp 55 55 implicit none 56 56 ! ------------------------------ … … 384 384 liquid_opticalThickness, ice_opticalThickness, tauLiquidFraction 385 385 386 real :: seuil 386 387 ! --------------------------------------------------- 387 388 389 if (ok_debug_cosp) then 390 seuil=1.e-9 391 else 392 seuil=0.0 393 endif 394 388 395 where(cloudIce(:, :) <= 0.) 389 396 tauLiquidFraction(:, :) = 1. … … 395 402 ! Geometic optics limit - tau as LWP/re (proportional to LWC/re) 396 403 ! 397 tauLiquidFraction(:, :) = (cloudWater(:, :)/waterSize(:, :)) / & 398 (cloudWater(:, :)/waterSize(:, :) + cloudIce(:, :)/(ice_density * iceSize(:, :)) ) 404 ! Modif AI 02 2018 405 tauLiquidFraction(:, :) = (cloudWater(:, :)/max(waterSize(:, :), seuil) ) / & 406 (cloudWater(:, :)/max(waterSize(:, :), seuil) + & 407 cloudIce(:, :)/(ice_density * max(iceSize(:, :), seuil)) ) 399 408 end where 400 409 end where … … 502 511 ! Compute mean optical thickness. 503 512 ! ######################################################################################## 504 Optical_Thickness_Total_Mean(1:nPoints) = sum(optical_thickness, mask = cloudMask, dim = 2) / & 505 Cloud_Fraction_Total_Mean(1:nPoints) 506 Optical_Thickness_Water_Mean(1:nPoints) = sum(optical_thickness, mask = waterCloudMask, dim = 2) / & 507 Cloud_Fraction_Water_Mean(1:nPoints) 508 Optical_Thickness_Ice_Mean(1:nPoints) = sum(optical_thickness, mask = iceCloudMask, dim = 2) / & 509 Cloud_Fraction_Ice_Mean(1:nPoints) 510 513 where (Cloud_Fraction_Total_Mean == 0) 514 Optical_Thickness_Total_Mean = R_UNDEF 515 elsewhere 516 Optical_Thickness_Total_Mean(1:nPoints) = sum(optical_thickness, mask = cloudMask, dim = 2) / & 517 Cloud_Fraction_Total_Mean(1:nPoints) 518 endwhere 519 where (Cloud_Fraction_Water_Mean == 0) 520 Optical_Thickness_Water_Mean = R_UNDEF 521 elsewhere 522 Optical_Thickness_Water_Mean(1:nPoints) = sum(optical_thickness, mask = waterCloudMask, dim = 2) / & 523 Cloud_Fraction_Water_Mean(1:nPoints) 524 endwhere 525 where (Cloud_Fraction_Ice_Mean == 0) 526 Optical_Thickness_Ice_Mean = R_UNDEF 527 elsewhere 528 Optical_Thickness_Ice_Mean(1:nPoints) = sum(optical_thickness, mask = iceCloudMask, dim = 2) / & 529 Cloud_Fraction_Ice_Mean(1:nPoints) 530 endwhere 531 511 532 ! ######################################################################################## 512 533 ! We take the absolute value of optical thickness here to satisfy compilers that complains … … 514 535 ! the sum. 515 536 ! ######################################################################################## 516 Optical_Thickness_Total_MeanLog10(1:nPoints) = sum(log10(abs(optical_thickness)), mask = cloudMask, & 517 dim = 2) / Cloud_Fraction_Total_Mean(1:nPoints) 518 Optical_Thickness_Water_MeanLog10(1:nPoints) = sum(log10(abs(optical_thickness)), mask = waterCloudMask,& 519 dim = 2) / Cloud_Fraction_Water_Mean(1:nPoints) 520 Optical_Thickness_Ice_MeanLog10(1:nPoints) = sum(log10(abs(optical_thickness)), mask = iceCloudMask,& 521 dim = 2) / Cloud_Fraction_Ice_Mean(1:nPoints) 522 Cloud_Particle_Size_Water_Mean(1:nPoints) = sum(particle_size, mask = waterCloudMask, dim = 2) / & 523 Cloud_Fraction_Water_Mean(1:nPoints) 524 Cloud_Particle_Size_Ice_Mean(1:nPoints) = sum(particle_size, mask = iceCloudMask, dim = 2) / & 525 Cloud_Fraction_Ice_Mean(1:nPoints) 526 Cloud_Top_Pressure_Total_Mean(1:nPoints) = sum(cloud_top_pressure, mask = cloudMask, dim = 2) / & 527 max(1, count(cloudMask, dim = 2)) 528 Liquid_Water_Path_Mean(1:nPoints) = LWP_conversion*sum(particle_size*optical_thickness, & 529 mask=waterCloudMask,dim=2)/Cloud_Fraction_Water_Mean(1:nPoints) 530 Ice_Water_Path_Mean(1:nPoints) = LWP_conversion * ice_density*sum(particle_size*optical_thickness,& 531 mask=iceCloudMask,dim = 2) /Cloud_Fraction_Ice_Mean(1:nPoints) 532 537 where (Cloud_Fraction_Total_Mean == 0) 538 Optical_Thickness_Total_MeanLog10 = R_UNDEF 539 elsewhere 540 Optical_Thickness_Total_MeanLog10(1:nPoints) = sum(log10(abs(optical_thickness)), mask = cloudMask, & 541 dim = 2) / Cloud_Fraction_Total_Mean(1:nPoints) 542 endwhere 543 where (Cloud_Fraction_Water_Mean == 0) 544 Optical_Thickness_Water_MeanLog10 = R_UNDEF 545 elsewhere 546 Optical_Thickness_Water_MeanLog10(1:nPoints) = sum(log10(abs(optical_thickness)), mask = waterCloudMask,& 547 dim = 2) / Cloud_Fraction_Water_Mean(1:nPoints) 548 endwhere 549 where (Cloud_Fraction_Ice_Mean == 0) 550 Optical_Thickness_Ice_MeanLog10 = R_UNDEF 551 elsewhere 552 Optical_Thickness_Ice_MeanLog10(1:nPoints) = sum(log10(abs(optical_thickness)), mask = iceCloudMask,& 553 dim = 2) / Cloud_Fraction_Ice_Mean(1:nPoints) 554 endwhere 555 where (Cloud_Fraction_Water_Mean == 0) 556 Cloud_Particle_Size_Water_Mean = R_UNDEF 557 elsewhere 558 Cloud_Particle_Size_Water_Mean(1:nPoints) = sum(particle_size, mask = waterCloudMask, dim = 2) / & 559 Cloud_Fraction_Water_Mean(1:nPoints) 560 endwhere 561 where (Cloud_Fraction_Ice_Mean == 0) 562 Cloud_Particle_Size_Ice_Mean = R_UNDEF 563 elsewhere 564 Cloud_Particle_Size_Ice_Mean(1:nPoints) = sum(particle_size, mask = iceCloudMask, dim = 2) / & 565 Cloud_Fraction_Ice_Mean(1:nPoints) 566 endwhere 567 where (Cloud_Fraction_Total_Mean == 0) 568 Cloud_Top_Pressure_Total_Mean = R_UNDEF 569 elsewhere 570 Cloud_Top_Pressure_Total_Mean(1:nPoints) = sum(cloud_top_pressure, mask = cloudMask, dim = 2) / & 571 max(1, count(cloudMask, dim = 2)) 572 endwhere 573 where (Cloud_Fraction_Water_Mean == 0) 574 Liquid_Water_Path_Mean = R_UNDEF 575 elsewhere 576 Liquid_Water_Path_Mean(1:nPoints) = LWP_conversion*sum(particle_size*optical_thickness, & 577 mask=waterCloudMask,dim=2)/Cloud_Fraction_Water_Mean(1:nPoints) 578 endwhere 579 where (Cloud_Fraction_Ice_Mean == 0) 580 Ice_Water_Path_Mean = R_UNDEF 581 elsewhere 582 Ice_Water_Path_Mean(1:nPoints) = LWP_conversion * ice_density*sum(particle_size*optical_thickness,& 583 mask=iceCloudMask,dim = 2) /Cloud_Fraction_Ice_Mean(1:nPoints) 584 endwhere 533 585 ! ######################################################################################## 534 586 ! Normalize pixel counts to fraction. … … 544 596 ! Set clear-scenes to undefined 545 597 ! ######################################################################################## 546 where (Cloud_Fraction_Total_Mean == 0)547 Optical_Thickness_Total_Mean = R_UNDEF548 Optical_Thickness_Total_MeanLog10 = R_UNDEF549 Cloud_Top_Pressure_Total_Mean = R_UNDEF550 endwhere551 where (Cloud_Fraction_Water_Mean == 0)552 Optical_Thickness_Water_Mean = R_UNDEF553 Optical_Thickness_Water_MeanLog10 = R_UNDEF554 Cloud_Particle_Size_Water_Mean = R_UNDEF555 Liquid_Water_Path_Mean = R_UNDEF556 endwhere557 where (Cloud_Fraction_Ice_Mean == 0)558 Optical_Thickness_Ice_Mean = R_UNDEF559 Optical_Thickness_Ice_MeanLog10 = R_UNDEF560 Cloud_Particle_Size_Ice_Mean = R_UNDEF561 Ice_Water_Path_Mean = R_UNDEF562 endwhere563 598 where (Cloud_Fraction_High_Mean == 0) Cloud_Fraction_High_Mean = R_UNDEF 564 599 where (Cloud_Fraction_Mid_Mean == 0) Cloud_Fraction_Mid_Mean = R_UNDEF -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp/phys_cosp.F90
r3173 r3242 142 142 !$OMP THREADPRIVATE(first_write) 143 143 144 logical, save :: ok_readxiosactive_cosp=.false. 145 !$OMP THREADPRIVATE(ok_readxiosactive_cosp) 144 146 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Input variables from LMDZ-GCM 145 147 integer :: overlaplmdz ! overlap type: 1=max, 2=rand, 3=max/rand ! cosp input (output lmdz) … … 153 155 real :: dtime,freq_cosp 154 156 real,dimension(2) :: time_bnds 157 158 double precision :: d_dtime 159 double precision,dimension(2) :: d_time_bnds 155 160 156 161 namelist/COSP_INPUT/overlap,isccp_topheight,isccp_topheight_direction, & … … 192 197 !!! Ici on modifie les cles logiques selon les champs actives dans les .xml 193 198 #ifdef CPP_XIOS 199 if (ok_readxiosactive_cosp) then 194 200 if ((itap.gt.1).and.(first_write))then 195 ! call read_xiosfieldactive(cfg)196 201 call read_cosp_output_nl(itap,cosp_output_nl,cfg) 197 ! print*,' Dans cosp_write itap first_writ LcfadLidarsr532 =', &198 ! itap, first_write, cfg%LcfadLidarsr532199 202 first_write=.false. 200 203 endif 201 ! print*,' Dans cosp_write itap LcfadLidarsr532 =', & 202 ! itap, cfg%LcfadLidarsr532 204 endif 203 205 #endif 204 206 … … 206 208 time_bnds(1) = dtime-dtime/2. 207 209 time_bnds(2) = dtime+dtime/2. 210 211 d_time_bnds=time_bnds 212 d_dtime=dtime 213 208 214 209 215 ! print*,'Debut phys_cosp itap,dtime,freq_cosp,ecrit_mth,ecrit_day,ecrit_hf ', & … … 225 231 emsfc_lw = 1. 226 232 227 call construct_cosp_gridbox(d time,time_bnds,radar_freq,surface_radar,use_mie_tables,use_gas_abs, &233 call construct_cosp_gridbox(d_dtime,d_time_bnds,radar_freq,surface_radar,use_mie_tables,use_gas_abs, & 228 234 do_ray,melt_lay,k2, & 229 235 Npoints,Nlevels,Ncolumns,N_HYDRO,Nprmts_max_hydro,Naero,Nprmts_max_aero,Npoints_it, & … … 441 447 END SUBROUTINE read_cosp_input 442 448 443 SUBROUTINE read_xiosfieldactive(cfg)444 445 USE MOD_COSP_TYPES446 #ifdef CPP_XIOS447 USE xios, ONLY: xios_field_is_active448 #endif449 type(cosp_config),intent(out) :: cfg450 451 ! VEREFIER LES CHAMPS DEMANDES DANS .XML452 ! 2. Si champs active dans .xml alors mettre la cles de sortie en true453 IF (xios_field_is_active("cllcalipso")) cfg%Lcllcalipso=.TRUE.454 IF (xios_field_is_active("clmcalipso")) cfg%Lclmcalipso=.TRUE.455 IF (xios_field_is_active("clhcalipso")) cfg%Lclhcalipso=.TRUE.456 IF (xios_field_is_active("cltcalipso")) cfg%Lcltcalipso=.TRUE.457 ! IF (xios_field_is_active("pcllcalipso")) cfg%Lcllcalipso=.TRUE.458 ! IF (xios_field_is_active("pclmcalipso")) cfg%Lclmcalipso=.TRUE.459 ! IF (xios_field_is_active("pclhcalipso")) cfg%Lclhcalipso=.TRUE.460 ! IF (xios_field_is_active("pcltcalipso")) cfg%Lcltcalipso=.TRUE.461 IF (xios_field_is_active("cllcalipsoice")) cfg%Lcllcalipsoice=.TRUE.462 IF (xios_field_is_active("clmcalipsoice")) cfg%Lclmcalipsoice=.TRUE.463 IF (xios_field_is_active("clhcalipsoice")) cfg%Lclhcalipsoice=.TRUE.464 IF (xios_field_is_active("cltcalipsoice")) cfg%Lcltcalipsoice=.TRUE.465 IF (xios_field_is_active("cllcalipsoliq")) cfg%Lcllcalipsoliq=.TRUE.466 IF (xios_field_is_active("clmcalipsoliq")) cfg%Lclmcalipsoliq=.TRUE.467 IF (xios_field_is_active("clhcalipsoliq")) cfg%Lclhcalipsoliq=.TRUE.468 IF (xios_field_is_active("cltcalipsoliq")) cfg%Lcltcalipsoliq=.TRUE.469 IF (xios_field_is_active("cllcalipsoun")) cfg%Lcllcalipsoun=.TRUE.470 IF (xios_field_is_active("clmcalipsoun")) cfg%Lclmcalipsoun=.TRUE.471 IF (xios_field_is_active("clhcalipsoun")) cfg%Lclhcalipsoun=.TRUE.472 IF (xios_field_is_active("cltcalipsoun")) cfg%Lcltcalipsoun=.TRUE.473 IF (xios_field_is_active("clcalipso")) cfg%Lclcalipso=.TRUE.474 ! IF (xios_field_is_active("pclcalipso")) cfg%Lclcalipso=.TRUE.475 IF (xios_field_is_active("clcalipsoice")) cfg%Lclcalipsoice=.TRUE.476 IF (xios_field_is_active("clcalipsoliq")) cfg%Lclcalipsoliq=.TRUE.477 IF (xios_field_is_active("clcalipsoun")) cfg%Lclcalipsoun=.TRUE.478 IF (xios_field_is_active("clcalipsotmp")) cfg%Lclcalipsotmp=.TRUE.479 IF (xios_field_is_active("clcalipsotmpice")) cfg%Lclcalipsotmpice=.TRUE.480 IF (xios_field_is_active("clcalipsotmpliq")) cfg%Lclcalipsotmpliq=.TRUE.481 IF (xios_field_is_active("clcalipsotmpun")) cfg%Lclcalipsotmpun=.TRUE.482 IF (xios_field_is_active("parasol_refl")) cfg%LparasolRefl=.TRUE.483 IF (xios_field_is_active("parasol_crefl")) cfg%LparasolRefl=.TRUE.484 IF (xios_field_is_active("Ncrefl")) cfg%LparasolRefl=.TRUE.485 IF (xios_field_is_active("cfad_lidarsr532")) cfg%LcfadLidarsr532=.TRUE.486 IF (xios_field_is_active("atb532")) cfg%Latb532=.TRUE.487 IF (xios_field_is_active("beta_mol532")) cfg%LlidarBetaMol532=.TRUE.488 IF (xios_field_is_active("clopaquecalipso")) cfg%Lclopaquecalipso=.TRUE.489 IF (xios_field_is_active("clthincalipso")) cfg%Lclthincalipso=.TRUE.490 IF (xios_field_is_active("clzopaquecalipso")) cfg%Lclzopaquecalipso=.TRUE.491 IF (xios_field_is_active("clcalipsoopaque")) cfg%Lclcalipsoopaque=.TRUE.492 IF (xios_field_is_active("clcalipsothin")) cfg%Lclcalipsothin=.TRUE.493 IF (xios_field_is_active("clcalipsozopaque")) cfg%Lclcalipsozopaque=.TRUE.494 IF (xios_field_is_active("clcalipsoopacity")) cfg%Lclcalipsoopacity=.TRUE.495 IF (xios_field_is_active("proftemp")) cfg%Lproftemp=.TRUE.496 IF (xios_field_is_active("profSR")) cfg%LprofSR=.TRUE.497 498 IF (xios_field_is_active("cfadDbze94")) cfg%LcfadDbze94=.TRUE.499 IF (xios_field_is_active("dbze94")) cfg%Ldbze94=.TRUE.500 IF (xios_field_is_active("cltlidarradar")) cfg%Lcltlidarradar=.TRUE.501 IF (xios_field_is_active("clcalipso2")) cfg%Lclcalipso2=.TRUE.502 503 IF (xios_field_is_active("clisccp2")) cfg%Lclisccp=.TRUE.504 IF (xios_field_is_active("boxtauisccp")) cfg%Lboxtauisccp=.TRUE.505 IF (xios_field_is_active("boxptopisccp")) cfg%Lboxptopisccp=.TRUE.506 IF (xios_field_is_active("tclisccp")) cfg%Lcltisccp=.TRUE.507 IF (xios_field_is_active("ctpisccp")) cfg%Lpctisccp=.TRUE.508 IF (xios_field_is_active("tauisccp")) cfg%Ltauisccp=.TRUE.509 IF (xios_field_is_active("albisccp")) cfg%Lalbisccp=.TRUE.510 IF (xios_field_is_active("meantbisccp")) cfg%Lmeantbisccp=.TRUE.511 IF (xios_field_is_active("meantbclrisccp")) cfg%Lmeantbclrisccp=.TRUE.512 513 IF (xios_field_is_active("clMISR")) cfg%LclMISR=.TRUE.514 515 IF (xios_field_is_active("cllmodis")) cfg%Lcllmodis=.TRUE.516 IF (xios_field_is_active("clmmodis")) cfg%Lclmmodis=.TRUE.517 IF (xios_field_is_active("clhmodis")) cfg%Lclhmodis=.TRUE.518 IF (xios_field_is_active("cltmodis")) cfg%Lcltmodis=.TRUE.519 IF (xios_field_is_active("clwmodis")) cfg%Lclwmodis=.TRUE.520 IF (xios_field_is_active("climodis")) cfg%Lclimodis=.TRUE.521 IF (xios_field_is_active("tautmodis")) cfg%Ltautmodis=.TRUE.522 IF (xios_field_is_active("tauwmodis")) cfg%Ltauwmodis=.TRUE.523 IF (xios_field_is_active("tauimodis")) cfg%Ltauimodis=.TRUE.524 IF (xios_field_is_active("tautlogmodis")) cfg%Ltautlogmodis=.TRUE.525 IF (xios_field_is_active("tauilogmodis")) cfg%Ltauilogmodis=.TRUE.526 IF (xios_field_is_active("tauwlogmodis")) cfg%Ltauwlogmodis=.TRUE.527 IF (xios_field_is_active("reffclwmodis")) cfg%Lreffclwmodis=.TRUE.528 IF (xios_field_is_active("reffclimodis")) cfg%Lreffclimodis=.TRUE.529 IF (xios_field_is_active("pctmodis")) cfg%Lpctmodis=.TRUE.530 IF (xios_field_is_active("lwpmodis")) cfg%Llwpmodis=.TRUE.531 IF (xios_field_is_active("iwpmodis")) cfg%Liwpmodis=.TRUE.532 IF (xios_field_is_active("clmodis")) cfg%Lclmodis=.TRUE.533 IF (xios_field_is_active("crimodis")) cfg%Lcrimodis=.TRUE.534 IF (xios_field_is_active("crlmodis")) cfg%Lcrlmodis=.TRUE.535 536 ! 2. si champs demande alors activer le simulateur correspondant537 IF (xios_field_is_active("cllcalipso").OR. &538 xios_field_is_active("clmcalipso").OR. &539 xios_field_is_active("clhcalipso").OR. &540 xios_field_is_active("cltcalipso").OR. &541 ! xios_field_is_active("pcllcalipso").OR. &542 ! xios_field_is_active("pclmcalipso").OR. &543 ! xios_field_is_active("pclhcalipso").OR. &544 ! xios_field_is_active("pcltcalipso").OR. &545 xios_field_is_active("cllcalipsoice").OR. &546 xios_field_is_active("clmcalipsoice").OR. &547 xios_field_is_active("clhcalipsoice").OR. &548 xios_field_is_active("cltcalipsoice").OR. &549 xios_field_is_active("cllcalipsoliq").OR. &550 xios_field_is_active("clmcalipsoliq").OR. &551 xios_field_is_active("clhcalipsoliq").OR. &552 xios_field_is_active("cltcalipsoliq").OR. &553 xios_field_is_active("cllcalipsoun").OR. &554 xios_field_is_active("clmcalipsoun").OR. &555 xios_field_is_active("clhcalipsoun").OR. &556 xios_field_is_active("cltcalipsoun").OR. &557 xios_field_is_active("clcalipso").OR. &558 ! xios_field_is_active("pclcalipso").OR. &559 xios_field_is_active("clcalipsoice").OR. &560 xios_field_is_active("clcalipsoliq").OR. &561 xios_field_is_active("clcalipsoun").OR. &562 xios_field_is_active("clcalipsotmp").OR. &563 xios_field_is_active("clcalipsotmpice").OR. &564 xios_field_is_active("clcalipsotmpliq").OR. &565 xios_field_is_active("clcalipsotmpun").OR. &566 xios_field_is_active("parasol_refl").OR. &567 xios_field_is_active("parasol_crefl").OR. &568 xios_field_is_active("Ncrefl").OR. &569 xios_field_is_active("cfad_lidarsr532").OR. &570 xios_field_is_active("atb532").OR. &571 xios_field_is_active("beta_mol532").OR. &572 xios_field_is_active("clopaquecalipso").OR. &573 xios_field_is_active("clthincalipso").OR. &574 xios_field_is_active("clzopaquecalipso").OR. &575 xios_field_is_active("clcalipsoopaque").OR. &576 xios_field_is_active("clcalipsothin").OR. &577 xios_field_is_active("clcalipsozopaque").OR. &578 xios_field_is_active("clcalipsoopacity").OR. &579 xios_field_is_active("proftemp").OR. &580 xios_field_is_active("profSR")) cfg%Llidar_sim=.TRUE.581 582 IF (xios_field_is_active("cfadDbze94").OR. &583 xios_field_is_active("dbze94")) &584 cfg%Lradar_sim=.TRUE.585 586 IF (xios_field_is_active("cltlidarradar").OR. &587 xios_field_is_active("clcalipso2")) THEN588 cfg%Lradar_sim=.TRUE.589 cfg%Llidar_sim=.TRUE.590 ENDIF591 592 IF (xios_field_is_active("clisccp2").OR. &593 xios_field_is_active("boxtauisccp").OR. &594 xios_field_is_active("boxptopisccp").OR. &595 xios_field_is_active("tclisccp").OR. &596 xios_field_is_active("ctpisccp").OR. &597 xios_field_is_active("tauisccp").OR. &598 xios_field_is_active("albisccp").OR. &599 xios_field_is_active("meantbisccp").OR. &600 xios_field_is_active("meantbclrisccp")) cfg%Lisccp_sim=.TRUE.601 602 IF (xios_field_is_active("clMISR")) cfg%Lmisr_sim=.TRUE.603 604 IF (xios_field_is_active("cllmodis").OR. &605 xios_field_is_active("clmmodis").OR. &606 xios_field_is_active("clhmodis").OR. &607 xios_field_is_active("cltmodis").OR. &608 xios_field_is_active("clwmodis").OR. &609 xios_field_is_active("climodis").OR. &610 xios_field_is_active("tautmodis").OR. &611 xios_field_is_active("tauwmodis").OR. &612 xios_field_is_active("tauimodis").OR. &613 xios_field_is_active("tautlogmodis").OR. &614 xios_field_is_active("tauilogmodis").OR. &615 xios_field_is_active("tauwlogmodis").OR. &616 xios_field_is_active("reffclwmodis").OR. &617 xios_field_is_active("reffclimodis").OR. &618 xios_field_is_active("pctmodis").OR. &619 xios_field_is_active("lwpmodis").OR. &620 xios_field_is_active("iwpmodis").OR. &621 xios_field_is_active("clmodis").OR. &622 xios_field_is_active("crimodis").OR. &623 xios_field_is_active("crlmodis")) cfg%Lmodis_sim=.TRUE.624 END SUBROUTINE read_xiosfieldactive625 626 627 449 end subroutine phys_cosp -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp/radar_simulator_types.F90
r2428 r3242 4 4 ! Part of QuickBeam v1.03 by John Haynes 5 5 ! Updated by Roj Marchand June 2010 6 6 implicit none 7 7 integer, parameter :: & 8 8 maxhclass = 20 ,& ! max number of hydrometeor classes -
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/cosp/read_cosp_output_nl.F90
r3173 r3242 10 10 USE xios, ONLY: xios_field_is_active 11 11 #endif 12 12 implicit none 13 13 character(len=*),intent(in) :: cosp_nl 14 14 type(cosp_config),intent(out) :: cfg … … 127 127 CALL bcast(Lmeantbisccp) 128 128 CALL bcast(Lmeantbclrisccp) 129 CALL bcast(Lfrac _out)129 CALL bcast(Lfracout) 130 130 CALL bcast(LlidarBetaMol532) 131 131 CALL bcast(Lcltmodis) … … 239 239 if ((.not.Lradar_sim).and.(.not.Llidar_sim).and. & 240 240 (.not.Lisccp_sim).and.(.not.Lmisr_sim)) then 241 Lfrac _out = .false.241 Lfracout = .false. 242 242 endif 243 243 if (.not.Lmodis_sim) then … … 533 533 cfg%Lcrlmodis=Lcrlmodis 534 534 535 if (itap.gt.1) then 535 #ifdef CPP_XIOS 536 if (itap.gt.1) then 536 537 537 538 ! VEREFIER LES CHAMPS DEMANDES DANS .XML … … 709 710 xios_field_is_active("crlmodis")) cfg%Lmodis_sim=.TRUE. 710 711 711 712 712 endif 713 #endif 713 714 714 715 END SUBROUTINE READ_COSP_OUTPUT_NL
Note: See TracChangeset
for help on using the changeset viewer.