Changeset 5158 for LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2
- Timestamp:
- Aug 2, 2024, 2:12:03 PM (12 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/MISR_simulator.F90
r5095 r5158 78 78 box_MISR_ztop(1:npoints,1:ncol) = 0._wp 79 79 80 doj=1,npoints80 DO j=1,npoints 81 81 82 82 ! Estimate distribution of Model layer tops 83 83 dist_model_layertops(j,:)=0 84 doilev=1,nlev84 DO ilev=1,nlev 85 85 ! Define location of "layer top" 86 86 if(ilev.eq.1 .or. ilev.eq.nlev) then … … 93 93 ! *NOTE* the first MISR level is "no height" level 94 94 iMISR_ztop=2 95 doloop=2,numMISRHgtBins95 DO loop=2,numMISRHgtBins 96 96 if ( ztest .gt. 1000*misr_histHgt(loop+1) ) then 97 97 iMISR_ztop=loop+1 … … 103 103 104 104 ! For each GCM cell or horizontal model grid point 105 doibox=1,ncol105 DO ibox=1,ncol 106 106 ! Compute optical depth as a cummulative distribution in the vertical (nlev). 107 107 tauOUT(j,ibox)=sum(dtau(j,ibox,1:nlev)) 108 108 109 109 thres_crossed_MISR=0 110 doilev=1,nlev110 DO ilev=1,nlev 111 111 ! If there a cloud, start the counter and store this height 112 112 if(thres_crossed_MISR .eq. 0 .and. dtau(j,ibox,ilev) .gt. 0.) then … … 187 187 ! This setup assumes the columns represent a about a 1 to 4 km scale 188 188 ! it will need to be modified significantly, otherwise 189 ! 189 ! ! DS2015: Add loop over gridpoints and index accordingly. 190 190 ! if(ncol.eq.1) then 191 191 ! ! Adjust based on neightboring points. … … 214 214 215 215 ! Fill dark scenes 216 doj=1,numMISRHgtBins216 DO j=1,numMISRHgtBins 217 217 where(sunlit .ne. 1) dist_model_layertops(1:npoints,j) = R_UNDEF 218 218 enddo … … 254 254 tauWRK(1:npoints,1:ncol) = tau(1:npoints,1:ncol) 255 255 box_MISR_ztopWRK(1:npoints,1:ncol) = box_MISR_ztop(1:npoints,1:ncol) 256 doj=1,npoints256 DO j=1,npoints 257 257 258 258 ! Subcolumns that are cloudy(true) and not(false) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp.F90
r5095 r5158 190 190 real(wp),dimension(:),pointer :: & 191 191 isccp_totalcldarea => null(), & ! The fraction of model grid box columns with cloud 192 192 ! somewhere in them. (%) 193 193 isccp_meantb => null(), & ! Mean all-sky 10.5 micron brightness temperature. (K) 194 194 isccp_meantbclr => null(), & ! Mean clear-sky 10.5 micron brightness temperature. (K) … … 203 203 ! the 49 ISCCP D level cloud types. (%) 204 204 205 ! MISR outptus 205 ! MISR outptus 206 206 real(wp),dimension(:,:,:),pointer :: & ! 207 207 misr_fq => null() ! Fraction of the model grid box covered by each of the MISR … … 211 211 real(wp),dimension(:),pointer :: & ! 212 212 misr_meanztop => null(), & ! Mean MISR cloud top height 213 misr_cldarea => null() ! Mean MISR cloud cover area 214 215 ! MODIS outptus 213 misr_cldarea => null() ! Mean MISR cloud cover area 214 215 ! MODIS outptus 216 216 real(wp),pointer,dimension(:) :: & ! 217 217 modis_Cloud_Fraction_Total_Mean => null(), & ! L3 MODIS retrieved cloud fraction (total) … … 233 233 modis_Ice_Water_Path_Mean => null() ! L3 MODIS retrieved ice water path 234 234 real(wp),pointer,dimension(:,:,:) :: & 235 modis_Optical_Thickness_vs_Cloud_Top_Pressure => null(), & ! Tau/Pressure joint histogram 235 modis_Optical_Thickness_vs_Cloud_Top_Pressure => null(), & ! Tau/Pressure joint histogram 236 236 modis_Optical_Thickness_vs_ReffICE => null(), & ! Tau/ReffICE joint histogram 237 237 modis_Optical_Thickness_vs_ReffLIQ => null() ! Tau/ReffLIQ joint histogram … … 239 239 ! RTTOV outputs 240 240 real(wp),pointer :: & 241 rttov_tbs(:,:) => null() ! Brightness Temperature 241 rttov_tbs(:,:) => null() ! Brightness Temperature 242 242 243 243 end type cosp_outputs … … 683 683 allocate(parasolPix_refl(parasolIN%Npoints,parasolIN%Ncolumns,PARASOL_NREFL)) 684 684 ! Call simulator 685 doicol=1,parasolIN%Ncolumns685 DO icol=1,parasolIN%Ncolumns 686 686 call parasol_subcolumn(parasolIN%npoints, PARASOL_NREFL, & 687 687 parasolIN%tautot_S_liq(1:parasolIN%Npoints,icol), & … … 700 700 ! Allocate space for local variables 701 701 allocate(cloudsatDBZe(cloudsatIN%Npoints,cloudsatIN%Ncolumns,cloudsatIN%Nlevels)) 702 doicol=1,cloudsatIN%ncolumns702 DO icol=1,cloudsatIN%ncolumns 703 703 call quickbeam_subcolumn(cloudsatIN%rcfg,cloudsatIN%Npoints,cloudsatIN%Nlevels,& 704 704 cloudsatIN%hgt_matrix/1000._wp, & … … 721 721 modisRetrievedCloudTopPressure(modisIN%nSunlit,modisIN%nColumns)) 722 722 ! Call simulator 723 doi = 1, modisIN%nSunlit723 DO i = 1, modisIN%nSunlit 724 724 call modis_subcolumn(modisIN%Ncolumns,modisIN%Nlevels,modisIN%pres(i,:), & 725 725 modisIN%tau(int(modisIN%sunlit(i)),:,:), & … … 1367 1367 ! Other grid requested. Constant vertical spacing with top at 20 km 1368 1368 if (.not. luseCSATvgrid) zstep = 20000._wp/Nvgrid 1369 doi=1,Nvgrid1369 DO i=1,Nvgrid 1370 1370 vgrid_zl(Nlvgrid-i+1) = (i-1)*zstep 1371 1371 vgrid_zu(Nlvgrid-i+1) = i*zstep … … 1726 1726 endif 1727 1727 1728 1728 ! RTTOV Inputs 1729 1729 if (cospgridIN%zenang .lt. -90. .OR. cospgridIN%zenang .gt. 90) then 1730 1730 nError=nError+1 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_calipso_interface.F90
r3358 r5158 80 80 81 81 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 82 ! 82 ! END MODULE 83 83 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 84 84 END MODULE MOD_COSP_CALIPSO_INTERFACE -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_cloudsat_interface.F90
r3358 r5158 123 123 ! Set up Re bin "structure" for z_scaling 124 124 rcfg%base_list(1)=0 125 doj=1,Re_MAX_BIN125 DO j=1,Re_MAX_BIN 126 126 rcfg%step_list(j)=0.1_wp+0.1_wp*((j-1)**1.5) 127 127 if(rcfg%step_list(j)>Re_BIN_LENGTH) then … … 143 143 144 144 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 145 ! 145 ! END MODULE 146 146 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 147 147 END MODULE MOD_COSP_CLOUDSAT_INTERFACE -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_config.F90
r5133 r5158 177 177 1.0, 0.909013, 0.709554, 0.430405, 0.121567/), & 178 178 shape=(/PARASOL_NREFL,PARASOL_NTAU/)), & 179 ! LUT for ice particles 179 ! LUT for ice particles 180 180 rlumB = reshape(source=(/ 0.03, 0.03, 0.03, 0.03, 0.03, & 181 181 0.092170, 0.087082, 0.083325, 0.084935, 0.054157, & -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_interface_v1p4.F90
r5095 r5158 436 436 end type cosp_modis 437 437 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 438 ! TYPE cosp_misr 438 ! TYPE cosp_misr 439 439 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 440 440 TYPE COSP_MISR … … 445 445 real(wp),dimension(:,:,:),pointer :: & ! 446 446 fq_MISR ! Fraction of the model grid box covered by each of the MISR 447 447 ! cloud types 448 448 real(wp),dimension(:,:),pointer :: & ! 449 449 MISR_dist_model_layertops ! … … 474 474 real(wp),dimension(:),pointer :: & 475 475 totalcldarea, & ! The fraction of model grid box columns with cloud somewhere in 476 476 ! them. 477 477 meantb, & ! Mean all-sky 10.5 micron brightness temperature. 478 478 meantbclr, & ! Mean clear-sky 10.5 micron brightness temperature. … … 485 485 real(wp),dimension(:,:,:),pointer :: & 486 486 fq_isccp ! The fraction of the model grid box covered by each of the 49 487 487 ! ISCCP D level cloud types. 488 488 END TYPE COSP_ISCCP 489 489 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 589 589 ! Outputs from COSP2 590 590 type(cosp_outputs),target :: cospOUT ! NEW derived type output that contains all 591 591 ! simulator information 592 592 ! Local variables 593 593 integer :: i … … 596 596 start_idx, & ! Starting index when looping over points 597 597 end_idx, & ! Ending index when looping over points 598 Nptsperit ! Number of points for current iteration 598 Nptsperit ! Number of points for current iteration 599 599 logical :: & 600 600 lsingle=.true., & ! True if using MMF_v3_single_moment CLOUDSAT microphysical scheme (default) … … 606 606 character(len=256),dimension(100) :: cosp_status 607 607 608 #ifdef MMF_V3_SINGLE_MOMENT 608 #ifdef MMF_V3_SINGLE_MOMENT 609 609 character(len=64) :: & 610 610 cloudsat_micro_scheme = 'MMF_v3_single_moment' … … 680 680 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 681 681 num_chunks = gbx%Npoints/gbx%Npoints_it+1 682 doi=1,num_chunks682 DO i=1,num_chunks 683 683 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 684 684 ! Determine indices for "chunking" (again, if necessary) … … 1011 1011 frac_cv(1:npoints,1:gbx%Nlevels) = 0._wp 1012 1012 prec_cv(1:npoints,1:gbx%Nlevels) = 0._wp 1013 doj=1,npoints,11014 dok=1,gbx%Nlevels,11015 doi=1,gbx%Ncolumns,11013 DO j=1,npoints,1 1014 DO k=1,gbx%Nlevels,1 1015 DO i=1,gbx%Ncolumns,1 1016 1016 if (sgx%frac_out(start_idx+j-1,i,gbx%Nlevels+1-k) == I_LSC) & 1017 1017 frac_ls(j,k) = frac_ls(j,k)+1._wp … … 1050 1050 Reff(:,:,:,:) = 0._wp 1051 1051 Np(:,:,:,:) = 0._wp 1052 dok=1,gbx%Ncolumns1052 DO k=1,gbx%Ncolumns 1053 1053 ! Subcolumn cloud fraction 1054 1054 column_frac_out = sgx%frac_out(start_idx:end_idx,k,:) … … 1096 1096 ! the fraction-based values 1097 1097 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1098 dok=1,gbx%Nlevels1099 doj=1,npoints1098 DO k=1,gbx%Nlevels 1099 DO j=1,npoints 1100 1100 ! Clouds 1101 1101 if (frac_ls(j,k) .ne. 0.) then … … 1238 1238 if (cfg%Lradar_sim) then 1239 1239 allocate(g_vol(nPoints,gbx%Nlevels)) 1240 doij=1,gbx%Ncolumns1240 DO ij=1,gbx%Ncolumns 1241 1241 if (ij .eq. 1) then 1242 1242 cmpGases = .true. … … 1558 1558 trim(hp%scale_LUT_file_name) // '_radar_Z_scale_LUT.dat' 1559 1559 1560 doi=1,maxhclass1561 doj=1,mt_ntt1562 dok=1,nRe_types1560 DO i=1,maxhclass 1561 DO j=1,mt_ntt 1562 DO k=1,nRe_types 1563 1563 ind = i+(j-1)*maxhclass+(k-1)*(nRe_types*mt_ntt) 1564 1564 if(.not.LUT_file_exists .or. hp%Z_scale_added_flag(i,j,k)) then … … 1592 1592 ! Local variables 1593 1593 integer :: i 1594 real:: zstep1594 REAL :: zstep 1595 1595 1596 1596 x%use_vgrid = use_vgrid … … 1629 1629 zstep = 20000.0/x%Nlvgrid 1630 1630 endif 1631 doi=1,x%Nlvgrid1631 DO i=1,x%Nlvgrid 1632 1632 x%zl(i) = (i-1)*zstep 1633 1633 x%zu(i) = i*zstep … … 1858 1858 1859 1859 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1860 ! 1860 ! SUBROUTINE construct_cosp_misr 1861 1861 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1862 1862 SUBROUTINE CONSTRUCT_COSP_MISR(Npoints,x) … … 1968 1968 END SUBROUTINE destroy_cosp_modis 1969 1969 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1970 ! 1970 ! SUBROUTINE construct_cosp_rttov 1971 1971 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1972 1972 SUBROUTINE CONSTRUCT_COSP_RTTOV(Npoints,Nchan,x) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_isccp_interface.F90
r3358 r5158 67 67 68 68 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 69 ! 69 ! SUBROUTINE cosp_isccp_init 70 70 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 71 71 SUBROUTINE COSP_ISCCP_INIT(top_height,top_height_direction) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_misr_interface.F90
r3358 r5158 36 36 37 37 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 38 ! 38 ! TYPE misr_in 39 39 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 40 40 type misr_IN … … 56 56 57 57 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 58 ! 58 ! SUBROUTINE cosp_misr_init 59 59 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 60 60 SUBROUTINE COSP_MISR_INIT() … … 63 63 64 64 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 65 ! 65 ! END MODULE 66 66 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 67 67 END MODULE MOD_COSP_MISR_INTERFACE -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_optics.F90
r5095 r5158 69 69 70 70 varOUT(1:dim1,1:dim2,1:dim3) = 0._wp 71 doj=1,dim271 DO j=1,dim2 72 72 where(flag(:,j,:) .eq. 1) 73 73 varOUT(:,j,:) = varIN2 … … 133 133 134 134 135 doi=1,npoints135 DO i=1,npoints 136 136 where(cloudIce(i,:, :) <= 0.) 137 137 fracL(:, :) = 1._wp … … 168 168 w0(1:nPoints,1:nSubCols,1:nLevels) = 0._wp 169 169 170 doj =1,nPoints171 doi=1,nSubCols170 DO j =1,nPoints 171 DO i=1,nSubCols 172 172 water_g(1:nLevels) = get_g_nir( phaseIsLiquid, sizeLIQ(j,i,1:nLevels)) 173 173 water_w0(1:nLevels) = get_ssa_nir(phaseIsLiquid, sizeLIQ(j,i,1:nLevels)) … … 187 187 188 188 ! Compute the total optical thickness and the proportion due to liquid in each cell 189 doi=1,npoints189 DO i=1,npoints 190 190 where(tauLIQ(i,1:nSubCols,1:nLevels) + tauICE(i,1:nSubCols,1:nLevels) > 0.) 191 191 fracLIQ(i,1:nSubCols,1:nLevels) = tauLIQ(i,1:nSubCols,1:nLevels)/ & … … 317 317 ! Altitude at half pressure levels: 318 318 zheight(1:npoints,nlev+1) = 0._wp 319 dok=nlev,1,-1319 DO k=nlev,1,-1 320 320 zheight(1:npoints,k) = zheight(1:npoints,k+1) & 321 321 -(presf(1:npoints,k)-presf(1:npoints,k+1))/(rhoair(1:npoints,k)*grav) … … 349 349 ! ############################################################################## 350 350 ! Polynomials kp_lidar derived from Mie theory 351 doi = 1, npart351 DO i = 1, npart 352 352 where (rad_part(1:npoints,1:nlev,i) .gt. 0.0) 353 353 kp_part(1:npoints,1:nlev,i) = & … … 363 363 364 364 ! Loop over all subcolumns 365 doicol=1,ncolumns365 DO icol=1,ncolumns 366 366 ! ############################################################################## 367 367 ! Mixing ratio particles in each subcolum … … 376 376 ! ############################################################################## 377 377 ! Alpha of particles in each subcolumn: 378 doi = 1, npart378 DO i = 1, npart 379 379 where (rad_part(1:npoints,1:nlev,i) .gt. 0.0) 380 380 alpha_part(1:npoints,icol,1:nlev,i) = 3._wp/4._wp * Qscat & … … 388 388 ! Optical thicknes 389 389 tau_part(1:npoints,icol,1:nlev,1:npart) = rdiffm * alpha_part(1:npoints,icol,1:nlev,1:npart) 390 doi = 1, npart390 DO i = 1, npart 391 391 ! Optical thickness of each layer (particles) 392 392 tau_part(1:npoints,icol,1:nlev,i) = tau_part(1:npoints,icol,1:nlev,i) & 393 393 & * (zheight(1:npoints,1:nlev)-zheight(1:npoints,2:nlev+1) ) 394 394 ! Optical thickness from TOA to layer k (particles) 395 dok=2,nlev395 DO k=2,nlev 396 396 tau_part(1:npoints,icol,k,i) = tau_part(1:npoints,icol,k,i) + tau_part(1:npoints,icol,k-1,i) 397 397 enddo … … 434 434 tautot_S_liq(1:npoints,1:ncolumns) = 0._wp 435 435 tautot_S_ice(1:npoints,1:ncolumns) = 0._wp 436 do icol=1,ncolumns436 DO icol=1,ncolumns 437 437 tautot_S_liq(1:npoints,icol) = tautot_S_liq(1:npoints,icol)+tau_part(1:npoints,icol,nlev,1)+tau_part(1:npoints,icol,nlev,3) 438 438 tautot_S_ice(1:npoints,icol) = tautot_S_ice(1:npoints,icol)+tau_part(1:npoints,icol,nlev,2)+tau_part(1:npoints,icol,nlev,4) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_output_mod.F90
r5157 r5158 75 75 "clmcalipsoice", "CALIPSO Ice-Phase Mid Level Cloud Fraction", "%", (/ ('', i=1, 3) /)) 76 76 TYPE(ctrl_outcosp), SAVE :: o_clmcalipsoliq = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), & 77 "clmcalipsoliq", "CALIPSO Liq-Phase Mid Level Cloud Fraction", "%", (/ ('', i=1, 3) /)) 77 "clmcalipsoliq", "CALIPSO Liq-Phase Mid Level Cloud Fraction", "%", (/ ('', i=1, 3) /)) 78 78 TYPE(ctrl_outcosp), SAVE :: o_clhcalipsoice = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), & 79 79 "clhcalipsoice", "CALIPSO Ice-Phase High Level Cloud Fraction", "%", (/ ('', i=1, 3) /)) … … 83 83 "cltcalipsoice", "CALIPSO Ice-Phase Tot Level Cloud Fraction", "%", (/ ('', i=1, 3) /)) 84 84 TYPE(ctrl_outcosp), SAVE :: o_cltcalipsoliq = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), & 85 "cltcalipsoliq", "CALIPSO Liq-Phase Tot Level Cloud Fraction", "%", (/ ('', i=1, 3) /)) 85 "cltcalipsoliq", "CALIPSO Liq-Phase Tot Level Cloud Fraction", "%", (/ ('', i=1, 3) /)) 86 86 TYPE(ctrl_outcosp), SAVE :: o_cllcalipsoun = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), & 87 87 "cllcalipsoun", "CALIPSO Undefined-Phase Low Level Cloud Fraction", "%", (/ ('', i=1, 3) /)) … … 97 97 "clcalipsoliq", "Lidar Liq-Phase Cloud Fraction", "%", (/ ('', i=1, 3) /)) 98 98 TYPE(ctrl_outcosp), SAVE :: o_clcalipsoun = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), & 99 "clcalipsoun", "Lidar Undef-Phase Cloud Fraction", "%", (/ ('', i=1, 3) /)) 99 "clcalipsoun", "Lidar Undef-Phase Cloud Fraction", "%", (/ ('', i=1, 3) /)) 100 100 TYPE(ctrl_outcosp), SAVE :: o_clcalipsotmpice = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), & 101 101 "clcalipsotmpice", "Lidar Ice-Phase Cloud Fraction", "%", (/ ('', i=1, 3) /)) … … 118 118 "clcalipsothin", "Lidar Thin profile Cloud Fraction", "%", (/ ('', i=1, 3) /)) !OPAQ 119 119 TYPE(ctrl_outcosp), SAVE :: o_clcalipsozopaque = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), & !OPAQ 120 "clcalipsozopaque", "Lidar z_opaque Fraction", "%", (/ ('', i=1, 3) /)) 120 "clcalipsozopaque", "Lidar z_opaque Fraction", "%", (/ ('', i=1, 3) /)) !OPAQ 121 121 TYPE(ctrl_outcosp), SAVE :: o_clcalipsoopacity = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), & !OPAQ 122 "clcalipsoopacity", "Lidar opacity Fraction", "%", (/ ('', i=1, 3) /)) 122 "clcalipsoopacity", "Lidar opacity Fraction", "%", (/ ('', i=1, 3) /)) !OPAQ 123 123 124 124 TYPE(ctrl_outcosp), SAVE :: o_proftemp = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), & !TIBO … … 254 254 integer :: Nlevlmdz, Ncolumns ! Number of levels 255 255 real,dimension(Nlevlmdz) :: presnivs 256 real :: dtime, freq_cosp, ecrit_day, ecrit_hf, ecrit_mth256 REAL :: dtime, freq_cosp, ecrit_day, ecrit_hf, ecrit_mth 257 257 logical :: use_vgrid 258 258 logical :: ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, ok_all_xml … … 262 262 !!! Variables locales 263 263 integer :: idayref, iff, ii 264 real:: zjulian,zjulian_start264 REAL :: zjulian,zjulian_start 265 265 real(wp),dimension(Ncolumns) :: column_ax 266 266 real(wp),dimension(DBZE_BINS) :: dbze_ax … … 283 283 284 284 !! Definition valeurs axes 285 doii=1,Ncolumns285 DO ii=1,Ncolumns 286 286 column_ax(ii) = real(ii) 287 287 enddo 288 288 289 doi=1,DBZE_BINS289 DO i=1,DBZE_BINS 290 290 dbze_ax(i) = CFAD_ZE_MIN + CFAD_ZE_WIDTH*(i - 0.5) 291 291 enddo -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_output_write_mod.F90
r5157 r5158 41 41 !!! Variables d'entree 42 42 integer :: itap, Nlevlmdz, Ncolumns, Npoints 43 real:: freq_COSP, dtime, missing_val, missing_cosp43 REAL :: freq_COSP, dtime, missing_val, missing_cosp 44 44 type(cosp_config) :: cfg ! Control outputs 45 45 type(cosp_gridbox) :: gbx ! Gridbox information. Input for COSP … … 172 172 IF (using_xios) THEN 173 173 174 doicl=1,SR_BINS174 DO icl=1,SR_BINS 175 175 tmp_fi4da_cfadL(:,:,icl)=stlidar%cfad_sr(:,icl,:) 176 176 enddo … … 180 180 ELSE 181 181 if (cfg%LcfadLidarsr532) then 182 doicl=1,SR_BINS182 DO icl=1,SR_BINS 183 183 CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl) 184 184 enddo … … 194 194 195 195 if (cfg%LparasolRefl) then 196 dok=1,PARASOL_NREFL197 doip=1, Npoints196 DO k=1,PARASOL_NREFL 197 DO ip=1, Npoints 198 198 if (stlidar%cldlayer(ip,4).gt.1.and.stlidar%parasolrefl(ip,k).ne.missing_val) then 199 199 parasolcrefl(ip,k)=(stlidar%parasolrefl(ip,k)-0.03*(1.-stlidar%cldlayer(ip,4)/100.))/ & … … 215 215 ELSE 216 216 if (cfg%Latb532) then 217 do icl=1,Ncolumns217 DO icl=1,Ncolumns 218 218 CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl) 219 219 enddo … … 230 230 where(stradar%cfad_ze == R_UNDEF) stradar%cfad_ze = missing_val 231 231 IF (using_xios) THEN 232 doicl=1,DBZE_BINS232 DO icl=1,DBZE_BINS 233 233 tmp_fi4da_cfadR(:,:,icl)=stradar%cfad_ze(:,icl,:) 234 234 enddo … … 238 238 ELSE 239 239 if (cfg%Ldbze94) then 240 doicl=1,Ncolumns240 DO icl=1,Ncolumns 241 241 CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvert,icl) 242 242 enddo 243 243 endif 244 244 if (cfg%LcfadDbze94) then 245 doicl=1,DBZE_BINS245 DO icl=1,DBZE_BINS 246 246 CALL histwrite3d_cosp(o_cfadDbze94,stradar%cfad_ze(:,icl,:),nvert,icl) 247 247 enddo … … 278 278 ELSE 279 279 if (cfg%Lclisccp) then 280 doicl=1,7280 DO icl=1,7 281 281 CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl) 282 282 enddo … … 299 299 300 300 IF (using_xios) THEN 301 doicl=1,numMISRHgtBins301 DO icl=1,numMISRHgtBins 302 302 tmp_fi4da_misr(:,icl,:)=misr%fq_MISR(:,:,icl) 303 303 enddo … … 306 306 ELSE 307 307 if (cfg%LclMISR) then 308 do icl=1,7308 DO icl=1,7 309 309 CALL histwrite3d_cosp(o_clMISR,misr%fq_MISR(:,icl,:),nvertmisr,icl) 310 310 enddo … … 379 379 ELSE 380 380 if (cfg%Lclmodis) then 381 doicl=1,7381 DO icl=1,7 382 382 CALL histwrite3d_cosp(o_clmodis, & 383 383 modis%Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl) … … 397 397 ELSE 398 398 if (cfg%Lclmodis) then 399 doicl=1,7399 DO icl=1,7 400 400 CALL histwrite3d_cosp(o_crimodis, & 401 401 modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl) … … 403 403 endif 404 404 if (cfg%Lclmodis) then 405 do icl=1,7405 DO icl=1,7 406 406 CALL histwrite3d_cosp(o_crlmodis, & 407 407 modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_parasol_interface.F90
r3358 r5158 35 35 36 36 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 37 ! 37 ! TYPE cosp_parasol 38 38 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 39 39 TYPE PARASOL_SGX … … 63 63 END TYPE COSP_PARASOL 64 64 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 65 ! 65 ! TYPE parasol_in 66 66 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 67 67 TYPE parasol_IN … … 86 86 87 87 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 88 ! 88 ! END MODULE 89 89 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 90 90 end module MOD_COSP_PARASOL_INTERFACE -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_read_otputkeys.F90
r5133 r5158 29 29 30 30 31 doi=1,7831 DO i=1,78 32 32 cfg%out_list(i)='' 33 33 enddo … … 132 132 133 133 134 doi=1,78134 DO i=1,78 135 135 cfg%out_list(i)='' 136 136 enddo … … 271 271 LprofSR,Lproftemp !TIBO (2) 272 272 273 doi=1,78273 DO i=1,78 274 274 cfg%out_list(i)='' 275 275 enddo … … 780 780 IF (using_xios) THEN 781 781 782 doi=1,78782 DO i=1,78 783 783 cfg%out_list(i)='' 784 784 enddo -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_stats.F90
r5095 r5158 80 80 r = 0._wp 81 81 82 doi=1,Npoints82 DO i=1,Npoints 83 83 ! Calculate tops and bottoms of new and old grids 84 84 oldgrid_bot = zhalf(i,:) … … 87 87 l = 0 ! Index of level in the old grid 88 88 ! Loop over levels in the new grid 89 dok = 1,Nglevels89 DO k = 1,Nglevels 90 90 Nw = 0 ! Number of weigths 91 91 wt = 0._wp ! Sum of weights 92 92 ! Loop over levels in the old grid and accumulate total for weighted average 93 do93 DO 94 94 l = l + 1 95 95 w = 0.0 ! Initialise weight to 0 … … 118 118 Nw = Nw + 1 119 119 wt = wt + w 120 doj=1,Ncolumns120 DO j=1,Ncolumns 121 121 if (lunits) then 122 122 if (y(i,j,l) /= R_UNDEF) then … … 137 137 ! Calculate average in new grid 138 138 if (Nw > 0) then 139 doj=1,Ncolumns139 DO j=1,Ncolumns 140 140 r(i,j,k) = r(i,j,k)/wt 141 141 enddo … … 145 145 146 146 ! Set points under surface to R_UNDEF, and change to dBZ if necessary 147 dok=1,Nglevels148 doj=1,Ncolumns149 doi=1,Npoints147 DO k=1,Nglevels 148 DO j=1,Ncolumns 149 DO i=1,Npoints 150 150 if (newgrid_top(k) > zhalf(i,1)) then ! Level above model bottom level 151 151 if (lunits) then … … 197 197 lidar_only_freq_cloud = 0._wp 198 198 tcc = 0._wp 199 dopr=1,Npoints200 doi=1,Ncolumns199 DO pr=1,Npoints 200 DO i=1,Ncolumns 201 201 flag_sat = 0 202 202 flag_cld = 0 203 doj=1,Nlevels203 DO j=1,Nlevels 204 204 sc_ratio = beta_tot(pr,i,j)/beta_mol(pr,j) 205 205 if ((sc_ratio .le. s_att) .and. (flag_sat .eq. 0)) flag_sat = j … … 244 244 integer :: ij 245 245 246 do ij=2,Nbins+1246 DO ij=2,Nbins+1 247 247 hist1D(ij-1) = count(var .ge. bins(ij-1) .and. var .lt. bins(ij)) 248 248 if (count(var .eq. R_GROUND) .ge. 1) hist1D(ij-1)=R_UNDEF … … 276 276 integer :: ij,ik 277 277 278 doij=2,nbin1+1279 doik=2,nbin2+1278 DO ij=2,nbin1+1 279 DO ik=2,nbin2+1 280 280 jointHist(ij-1,ik-1)=count(var1 .ge. bin1(ij-1) .and. var1 .lt. bin1(ij) .and. & 281 281 var2 .ge. bin2(ik-1) .and. var2 .lt. bin2(ik)) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp_utils.F90
r3358 r5158 67 67 delta = (alpha_x + b_x + d_x - n_bx + 1._wp) 68 68 69 dok=1,Nlevels70 doj=1,Ncolumns71 doi=1,Npoints69 DO k=1,Nlevels 70 DO j=1,Ncolumns 71 DO i=1,Npoints 72 72 if ((prec_frac(i,j,k)==prec_type).or.(prec_frac(i,j,k)==3.)) then 73 73 rho = p(i,k)/(287.05_wp*T(i,k)) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/icarus.F90
r5095 r5158 135 135 136 136 if (debugcol.ne.0) then 137 doj=1,npoints,debugcol137 DO j=1,npoints,debugcol 138 138 139 139 ! Produce character output 140 doilev=1,nlev140 DO ilev=1,nlev 141 141 acc(ilev,1:ncol)=frac_out(j,1:ncol,ilev)*2 142 142 where(levmatch(j,1:ncol) .eq. ilev) acc(ilev,1:ncol)=acc(ilev,1:ncol)+1 … … 151 151 write(9,'(a1)') ' ' 152 152 153 doibox=1,ncol153 DO ibox=1,ncol 154 154 write(9,'(40(a1),1x,40(a1))') & 155 155 (cchar_realtops(acc(ilev,ibox)+1),ilev=1,nlev),& … … 231 231 itrop(1:npoints) = 1 232 232 233 doilev=1,nlev233 DO ilev=1,nlev 234 234 where(pfull(1:npoints,ilev) .lt. 40000. .and. & 235 235 pfull(1:npoints,ilev) .gt. 5000. .and. & … … 242 242 enddo 243 243 244 doilev=1,nlev244 DO ilev=1,nlev 245 245 atmax(1:npoints) = merge(at(1:npoints,ilev),atmax(1:npoints),& 246 246 at(1:npoints,ilev) .gt. atmax(1:npoints) .and. ilev .ge. itrop(1:npoints)) … … 256 256 ! at a wavenumber of 955 cm-1, or 10.47 microns 257 257 ! ############################################################################ 258 doilev=1,nlev258 DO ilev=1,nlev 259 259 press(1:npoints) = pfull(1:npoints,ilev)*10._wp 260 260 dpress(1:npoints) = (phalf(1:npoints,ilev+1)-phalf(1:npoints,ilev))*10 … … 273 273 fluxtop_clrsky(1:npoints) = 0._wp 274 274 trans_layers_above_clrsky(1:npoints) = 1._wp 275 doilev=1,nlev275 DO ilev=1,nlev 276 276 ! Black body emission at temperature of the layer 277 277 bb(1:npoints) = 1._wp / ( exp(1307.27_wp/at(1:npoints,ilev)) - 1._wp ) … … 300 300 fluxtop(1:npoints,1:ncol) = 0._wp 301 301 trans_layers_above(1:npoints,1:ncol) = 1._wp 302 doilev=1,nlev302 DO ilev=1,nlev 303 303 ! Black body emission at temperature of the layer 304 304 bb=1._wp/(exp(1307.27_wp/at(1:npoints,ilev)) - 1._wp) 305 305 306 doibox=1,ncol306 DO ibox=1,ncol 307 307 ! Emissivity 308 308 dem(1:npoints,ibox) = merge(dem_wv(1:npoints,ilev), & … … 320 320 ! Add in surface emission 321 321 bb(1:npoints)=1._wp/( exp(1307.27_wp/skt(1:npoints)) - 1._wp ) 322 doibox=1,ncol322 DO ibox=1,ncol 323 323 fluxtop(1:npoints,ibox) = fluxtop(1:npoints,ibox) + emsfc_lw*bb(1:npoints)*trans_layers_above(1:npoints,ibox) 324 324 end do … … 344 344 btcmin(1:npoints) = 1._wp / ( exp(1307.27_wp/(attrop(1:npoints)-5._wp)) - 1._wp ) 345 345 346 doibox=1,ncol346 DO ibox=1,ncol 347 347 transmax(1:npoints) = (fluxtop(1:npoints,ibox)-btcmin) /(fluxtop_clrsky(1:npoints)-btcmin(1:npoints)) 348 348 tauir(1:npoints) = tau(1:npoints,ibox)/2.13_wp 349 349 taumin(1:npoints) = -log(max(min(transmax(1:npoints),0.9999999_wp),0.001_wp)) 350 350 if (isccp_top_height .eq. 1) then 351 do j=1,npoints351 DO j=1,npoints 352 352 if (transmax(j) .gt. 0.001 .and. transmax(j) .le. 0.9999999) then 353 353 fluxtopinit(j) = fluxtop(j,ibox) … … 355 355 endif 356 356 enddo 357 doicycle=1,2358 do j=1,npoints357 DO icycle=1,2 358 DO j=1,npoints 359 359 if (tau(j,ibox) .gt. (tauchk)) then 360 360 if (transmax(j) .gt. 0.001 .and. transmax(j) .le. 0.9999999) then … … 397 397 ! pressure (isccp_top_height = 1 or 3) 398 398 ! #################################################################################### 399 doibox=1,ncol399 DO ibox=1,ncol 400 400 !segregate according to optical thickness 401 401 if (isccp_top_height .eq. 1 .or. isccp_top_height .eq. 3) then … … 403 403 ! Find level whose temperature most closely matches brightness temperature 404 404 nmatch(1:npoints)=0 405 dok1=1,nlev-1405 DO k1=1,nlev-1 406 406 ilev = merge(nlev-k1,k1,isccp_top_height_direction .eq. 2) 407 do j=1,npoints407 DO j=1,npoints 408 408 if (ilev .ge. itrop(j) .and. & 409 409 ((at(j,ilev) .ge. tb(j,ibox) .and. & … … 417 417 enddo 418 418 419 do j=1,npoints419 DO j=1,npoints 420 420 if (nmatch(j) .ge. 1) then 421 421 k1 = match(j,nmatch(j)) … … 440 440 else 441 441 ptop(1:npoints,ibox)=0. 442 doilev=1,nlev442 DO ilev=1,nlev 443 443 where((ptop(1:npoints,ibox) .eq. 0. ) .and.(frac_out(1:npoints,ibox,ilev) .ne. 0)) 444 444 ptop(1:npoints,ibox)=phalf(1:npoints,ilev) … … 458 458 boxtau(1:npoints,1:ncol) = output_missing_value 459 459 boxptop(1:npoints,1:ncol) = output_missing_value 460 doibox=1,ncol461 do j=1,npoints460 DO ibox=1,ncol 461 DO j=1,npoints 462 462 if (tau(j,ibox) .gt. (tauchk) .and. ptop(j,ibox) .gt. 0.) then 463 463 if (sunlit(j).eq.1 .or. isccp_top_height .eq. 3) then … … 532 532 ! Reset frequencies 533 533 !fq_isccp = spread(spread(merge(0._wp,output_missing_value,sunlit .eq. 1 .or. isccp_top_height .eq. 3),2,7),2,7) 534 doilev=1,7535 doilev2=1,7536 do j=1,npoints !534 DO ilev=1,7 535 DO ilev2=1,7 536 DO j=1,npoints ! 537 537 if (sunlit(j).eq.1 .or. isccp_top_height .eq. 3) then 538 538 fq_isccp(j,ilev,ilev2)= 0. 539 else 539 else 540 540 fq_isccp(j,ilev,ilev2)= output_missing_value 541 541 end if … … 559 559 560 560 ! Compute column quantities and joint-histogram 561 do j=1,npoints561 DO j=1,npoints 562 562 ! Subcolumns that are cloudy(true) and not(false) 563 563 box_cloudy2(1:ncol) = merge(.true.,.false.,boxtau(j,1:ncol) .gt. tauchk .and. boxptop(j,1:ncol) .gt. 0.) … … 633 633 634 634 varOUT(1:dim1,1:dim2,1:dim3) = 0._wp 635 doj=1,dim2635 DO j=1,dim2 636 636 where(flag(:,j,:) .eq. 1) 637 637 varOUT(:,j,:) = varIN2 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/lidar_simulator.F90
r5095 r5158 142 142 ! PLANE PARRALLEL FIELDS 143 143 ! #################################################################################### 144 doicol=1,ncolumns144 DO icol=1,ncolumns 145 145 ! ################################################################################# 146 146 ! *) Total Backscatter signal … … 165 165 ! PERDENDICULAR FIELDS 166 166 ! #################################################################################### 167 doicol=1,ncolumns167 DO icol=1,ncolumns 168 168 169 169 ! ################################################################################# … … 172 172 ! Computation of ATBperp,ice/liq from ATBice/liq including the multiple scattering 173 173 ! contribution (Cesana and Chepfer 2013, JGR) 174 dok=1,nlev174 DO k=1,nlev 175 175 ! Ice particles 176 176 pnorm_perp_ice(1:npoints,icol,k) = Alpha * pnorm_ice(1:npoints,icol,k) … … 208 208 209 209 ! Other layers 210 dok=2,nlev210 DO k=2,nlev 211 211 ! Optical thickness of layer k 212 212 tautot_lay(1:npoints) = tautot(1:npoints,icol,k)-tautot(1:npoints,icol,k-1) … … 316 316 ! Compute LIDAR scattering ratio 317 317 if (use_vgrid) then 318 doic = 1, ncol318 DO ic = 1, ncol 319 319 pnorm_c = pnormFlip(:,ic,:) 320 320 where ((pnorm_c .lt. xmax) .and. (betamolFlip(:,1,:) .lt. xmax) .and. & … … 331 331 lidarcld,cldlayer,lidarcldphase,cldlayerphase,lidarcldtmp) 332 332 else 333 doic = 1, ncol333 DO ic = 1, ncol 334 334 pnorm_c = pnorm(:,ic,:) 335 335 where ((pnorm_c.lt.xmax) .and. (pmol.lt.xmax) .and. (pmol.gt. 0.0 )) … … 349 349 if (ok_lidar_cfad) then 350 350 ! CFADs of subgrid-scale lidar scattering ratios 351 doi=1,Npoints352 doj=1,llm351 DO i=1,Npoints 352 DO j=1,llm 353 353 cfad2(i,:,j) = hist1D(ncol,x3d(i,:,j),SR_BINS,calipso_histBsct) 354 354 enddo … … 387 387 388 388 ! Other layers 389 dok=2,nlev389 DO k=2,nlev 390 390 tautot_lay(:) = tau(:,k)-tau(:,k-1) 391 391 WHERE ( EXP(-2._wp*tau(:,k-1)) .gt. 0. ) … … 416 416 417 417 beta(:,1) = pnorm(:,1) * (2._wp*tau(:,1))/(1._wp-exp(-2._wp*tau(:,1))) 418 dok=2,nlev418 DO k=2,nlev 419 419 tautot_lay(:) = tau(:,k)-tau(:,k-1) 420 420 WHERE ( EXP(-2._wp*tau(:,k-1)) .gt. 0. ) … … 458 458 zeta50 = -9.4776e-07_wp ! 459 459 460 460 ! Inputs 461 461 integer,intent(in) :: & 462 462 Npoints, & ! Number of gridpoints … … 465 465 Ncat, & ! Number of cloud layer types 466 466 Nphase ! Number of cloud layer phase types 467 467 ! [ice,liquid,undefined,false ice,false liquid,Percent of ice] 468 468 real(wp),intent(in) :: & 469 469 S_att, & ! … … 479 479 pplay ! Pressure 480 480 481 481 ! Outputs 482 482 real(wp),intent(out),dimension(Npoints,Ntemp,5) :: & 483 483 lidarcldtemp ! 3D Temperature 1=tot,2=ice,3=liq,4=undef,5=ice/ice+liq … … 514 514 515 515 ! #################################################################################### 516 ! 1) Initialize 516 ! 1) Initialize 517 517 ! #################################################################################### 518 518 lidarcld = 0._wp … … 537 537 ! 2) Cloud detection 538 538 ! #################################################################################### 539 dok=1,Nlevels539 DO k=1,Nlevels 540 540 ! Cloud detection at subgrid-scale: 541 541 where ((x(:,:,k) .gt. S_cld) .and. (x(:,:,k) .ne. undef) ) … … 560 560 cldlay = 0._wp 561 561 nsublay = 0._wp 562 dok=1,Nlevels563 doic = 1, Ncolumns564 doip = 1, Npoints562 DO k=1,Nlevels 563 DO ic = 1, Ncolumns 564 DO ip = 1, Npoints 565 565 566 566 ! Computation of the cloud fraction as a function of the temperature instead 567 567 ! of height, for ice,liquid and all clouds 568 568 if(srok(ip,ic,k).gt.0.)then 569 doitemp=1,Ntemp569 DO itemp=1,Ntemp 570 570 if( (tmp(ip,k).ge.tempmod(itemp)).and.(tmp(ip,k).lt.tempmod(itemp+1)) )then 571 571 lidarcldtempind(ip,itemp)=lidarcldtempind(ip,itemp)+1._wp … … 575 575 576 576 if(cldy(ip,ic,k).eq.1.)then 577 do itemp=1,Ntemp577 DO itemp=1,Ntemp 578 578 if( (tmp(ip,k) .ge. tempmod(itemp)).and.(tmp(ip,k) .lt. tempmod(itemp+1)) )then 579 579 lidarcldtemp(ip,itemp,1)=lidarcldtemp(ip,itemp,1)+1._wp … … 612 612 cldlayer = 0._wp 613 613 nsublayer = 0._wp 614 doiz = 1, Ncat615 doic = 1, Ncolumns614 DO iz = 1, Ncat 615 DO ic = 1, Ncolumns 616 616 cldlayer(:,iz) = cldlayer(:,iz) + cldlay(:,ic,iz) 617 617 nsublayer(:,iz) = nsublayer(:,iz) + nsublay(:,ic,iz) … … 631 631 ! 4.1) For Cloudy pixels with 8.16km < z < 19.2km 632 632 ! #################################################################################### 633 doncol=1,Ncolumns634 do i=1,Npoints635 donlev=1,23 ! from 19.2km until 8.16km633 DO ncol=1,Ncolumns 634 DO i=1,Npoints 635 DO nlev=1,23 ! from 19.2km until 8.16km 636 636 p1 = pplay(1,nlev) 637 637 … … 745 745 ! ############################################################################## 746 746 toplvlsat = 0 747 donlev=24,Nlevels! from 8.16km until 0km747 DO nlev=24,Nlevels! from 8.16km until 0km 748 748 p1 = pplay(i,nlev) 749 749 … … 868 868 ! ############################################################################## 869 869 if(toplvlsat.ne.0) then 870 donlev = toplvlsat,Nlevels870 DO nlev = toplvlsat,Nlevels 871 871 p1 = pplay(i,nlev) 872 872 if(cldy(i,ncol,nlev).eq.1.)then … … 920 920 921 921 ! Compute Phase low mid high cloud fractions 922 doiz = 1, Ncat923 doi=1,Nphase-3924 doic = 1, Ncolumns922 DO iz = 1, Ncat 923 DO i=1,Nphase-3 924 DO ic = 1, Ncolumns 925 925 cldlayerphase(:,iz,i) = cldlayerphase(:,iz,i) + cldlayphase(:,ic,iz,i) 926 926 cldlayerphasesum(:,iz) = cldlayerphasesum(:,iz) + cldlayphase(:,ic,iz,i) … … 928 928 enddo 929 929 enddo 930 doiz = 1, Ncat931 doi=4,5932 doic = 1, Ncolumns930 DO iz = 1, Ncat 931 DO i=4,5 932 DO ic = 1, Ncolumns 933 933 cldlayerphase(:,iz,i) = cldlayerphase(:,iz,i) + cldlayphase(:,ic,iz,i) 934 934 enddo … … 944 944 ENDWHERE 945 945 946 doi=1,Nphase-1946 DO i=1,Nphase-1 947 947 WHERE ( cldlayerphasesum(:,:).gt.0.0 ) 948 948 cldlayerphase(:,:,i) = (cldlayerphase(:,:,i)/cldlayerphasesum(:,:)) * cldlayer(:,:) … … 950 950 enddo 951 951 952 doi=1,Npoints953 doiz=1,Ncat952 DO i=1,Npoints 953 DO iz=1,Ncat 954 954 checkcldlayerphase=0. 955 955 checkcldlayerphase2=0. 956 956 if (cldlayerphasesum(i,iz) .gt. 0.0 )then 957 doic=1,Nphase-3957 DO ic=1,Nphase-3 958 958 checkcldlayerphase = checkcldlayerphase+cldlayerphase(i,iz,ic) 959 959 enddo … … 964 964 enddo 965 965 966 doi=1,Nphase-1966 DO i=1,Nphase-1 967 967 WHERE (nsublayer(:,:) .eq. 0.0) 968 968 cldlayerphase(:,:,i) = undef … … 971 971 972 972 ! Compute Phase 3D as a function of temperature 973 donlev=1,Nlevels974 doncol=1,Ncolumns975 doi=1,Npoints976 doitemp=1,Ntemp973 DO nlev=1,Nlevels 974 DO ncol=1,Ncolumns 975 DO i=1,Npoints 976 DO itemp=1,Ntemp 977 977 if(tmpi(i,ncol,nlev).gt.0.)then 978 978 if((tmpi(i,ncol,nlev) .ge. tempmod(itemp)) .and. (tmpi(i,ncol,nlev) .lt. tempmod(itemp+1)) )then … … 994 994 995 995 ! Check temperature cloud fraction 996 doi=1,Npoints997 doitemp=1,Ntemp996 DO i=1,Npoints 997 DO itemp=1,Ntemp 998 998 checktemp=lidarcldtemp(i,itemp,2)+lidarcldtemp(i,itemp,3)+lidarcldtemp(i,itemp,4) 999 999 !if(checktemp .NE. lidarcldtemp(i,itemp,1))then … … 1013 1013 ENDWHERE 1014 1014 1015 doi=1,41015 DO i=1,4 1016 1016 WHERE(lidarcldtempind(:,:) .gt. 0.) 1017 1017 lidarcldtemp(:,:,i) = lidarcldtemp(:,:,i)/lidarcldtempind(:,:) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/math_lib.F90
r5095 r5158 96 96 else 97 97 sumo = 0._wp 98 doj=i1,i298 DO j=i1,i2 99 99 deltah = abs(s(i1+1)-s(i1)) 100 100 sumo = sumo + f(j)*deltah … … 204 204 end if 205 205 206 doi = 2, ntab206 DO i = 2, ntab 207 207 if ( xtab(i) <= xtab(i-1) ) then 208 208 lerror = .true. … … 239 239 ihi = ntab 240 240 241 doi = 1, ntab241 DO i = 1, ntab 242 242 if ( a <= xtab(i) ) then 243 243 exit … … 249 249 ilo = min ( ilo, ntab - 1 ) 250 250 251 doi = 1, ntab251 DO i = 1, ntab 252 252 if ( xtab(i) <= b ) then 253 253 exit … … 263 263 !ds sum1 = 0.0D+00 264 264 265 doi = ilo, ihi265 DO i = ilo, ihi 266 266 267 267 x1 = xtab(i-1) … … 371 371 ga=1._wp 372 372 m1=x-1 373 dok=2,m1373 DO k=2,m1 374 374 ga=ga*k 375 375 enddo … … 382 382 m=int(z) 383 383 r=1._wp 384 dok=1,m384 DO k=1,m 385 385 r=r*(z-k) 386 386 enddo … … 390 390 endif 391 391 gr=g(26) 392 dok=25,1,-1392 DO k=25,1,-1 393 393 gr=gr*z+g(k) 394 394 enddo -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/modis_simulator.F90
r5095 r5158 163 163 cloudMask = retrievedTau(1:nSubCols) >= min_OpticalThickness 164 164 165 doi = 1, nSubCols165 DO i = 1, nSubCols 166 166 if(cloudMask(i)) then 167 167 ! ################################################################################## … … 380 380 reffIceWRK(1:nPoints,1:nSubCols) = merge(particle_size,R_UNDEF,iceCloudMask) 381 381 reffLiqWRK(1:nPoints,1:nSubCols) = merge(particle_size,R_UNDEF,waterCloudMask) 382 doj=1,nPoints382 DO j=1,nPoints 383 383 384 384 ! Fill clear and optically thin subcolumns with fill … … 439 439 ! layers and use the trapezoidal rule. 440 440 totalTau = 0._wp; totalProduct = 0._wp 441 doi = 2, size(tauIncrement)441 DO i = 2, size(tauIncrement) 442 442 if(totalTau + tauIncrement(i) > tauLimit) then 443 443 deltaX = tauLimit - totalTau … … 479 479 ! Find the extinction-weighted value of f(tau), assuming constant f within each layer 480 480 totalTau = 0._wp; totalProduct = 0._wp 481 doi = 1, size(tauIncrement)481 DO i = 1, size(tauIncrement) 482 482 if(totalTau + tauIncrement(i) > tauLimit) then 483 483 deltaX = tauLimit - totalTau … … 713 713 cloudMask(1:nLevels) = tau(1:nLevels) > 0. 714 714 cloudIndicies = pack((/ (i, i = 1, nLevels) /), mask = cloudMask) 715 doi = 1, size(cloudIndicies)715 DO i = 1, size(cloudIndicies) 716 716 call two_stream(tau(cloudIndicies(i)), g(cloudIndicies(i)), w0(cloudIndicies(i)), Refl(i), Trans(i)) 717 717 end do … … 893 893 Tran_cumulative(1) = Tran(1) 894 894 895 doi=2, npts895 DO i=2, npts 896 896 ! place (add) previous combined layer(s) reflectance on top of layer i, w/black surface (or ignoring surface): 897 897 Refl_cumulative(i) = Refl_cumulative(i-1) + Refl(i)*(Tran_cumulative(i-1)**2)/(1._wp - Refl_cumulative(i-1) * Refl(i)) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/optics_lib.F90
r5095 r5158 539 539 if (alam < cutice) then 540 540 ! Region from 0.045 microns to 167.0 microns - no temperature depend 541 doi=2,nwl541 DO i=2,nwl 542 542 if(alam < wl(i)) continue 543 543 enddo … … 557 557 if(tk > temref(1)) tk=temref(1) 558 558 if(tk < temref(4)) tk=temref(4) 559 doi=2,4559 DO i=2,4 560 560 if(tk.ge.temref(i)) go to 12 561 561 enddo 562 562 12 lt1 = i 563 563 lt2 = i-1 564 doi=2,nwlt564 DO i=2,nwlt 565 565 if(alam.le.wlt(i)) go to 14 566 566 enddo -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/parasol.F90
r5095 r5158 159 159 ! Compute grid-box averaged Parasol reflectances 160 160 parasolrefl(:,:) = 0._wp 161 dok = 1, nrefl162 doic = 1, ncol161 DO k = 1, nrefl 162 DO ic = 1, ncol 163 163 parasolrefl(:,k) = parasolrefl(:,k) + refl(:,ic,k) 164 164 enddo 165 165 enddo 166 166 167 dok = 1, nrefl167 DO k = 1, nrefl 168 168 parasolrefl(:,k) = parasolrefl(:,k) / float(ncol) 169 169 ! if land=1 -> parasolrefl=R_UNDEF -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/phys_cosp2.F90
r5133 r5158 44 44 ! mr_ozone, !Concentration ozone (Kg/Kg) 45 45 ! dem_s !Cloud optical emissivity 46 ! dtau_s 47 ! emsfc_lw = 1. 46 ! dtau_s !Cloud optical thickness 47 ! emsfc_lw = 1. !Surface emissivity dans radlwsw.F90 48 48 49 49 !!! Outputs : … … 159 159 ! Declaration necessaires pour les sorties IOIPSL 160 160 integer :: ii 161 real:: ecrit_day,ecrit_hf,ecrit_mth, missing_val161 REAL :: ecrit_day,ecrit_hf,ecrit_mth, missing_val 162 162 logical :: ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, ok_all_xml 163 163 … … 177 177 real,dimension(Nlevlmdz) :: presnivs 178 178 integer :: itap,k,ip 179 real:: dtime,freq_cosp179 REAL :: dtime,freq_cosp 180 180 real,dimension(2) :: time_bnds 181 181 … … 312 312 313 313 zlev_half(:,1) = phis(:)/9.81 314 dok = 2, Nlevels315 doip = 1, Npoints314 DO k = 2, Nlevels 315 DO ip = 1, Npoints 316 316 zlev_half(ip,k) = phi(ip,k)/9.81 + & 317 317 (phi(ip,k)-phi(ip,k-1))/9.81 * (ph(ip,k)-p(ip,k)) / (p(ip,k)-p(ip,k-1)) … … 330 330 gbx%skt = skt !Skin temperature (K) 331 331 332 doip = 1, Npoints332 DO ip = 1, Npoints 333 333 if (fracTerLic(ip).ge.0.5) then 334 334 gbx%land(ip) = 1. -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/prec_scops.F90
r5095 r5158 66 66 if (cv_col .eq. 0) cv_col=1 67 67 68 doilev=1,nlev69 doibox=1,ncol70 do j=1,npoints68 DO ilev=1,nlev 69 DO ibox=1,ncol 70 DO j=1,npoints 71 71 prec_frac(j,ibox,ilev) = 0 72 72 enddo … … 74 74 enddo 75 75 76 doj=1,npoints77 doibox=1,ncol76 DO j=1,npoints 77 DO ibox=1,ncol 78 78 frac_out_ls(j,ibox)=0 79 79 frac_out_cv(j,ibox)=0 80 80 flag_ls=0 81 81 flag_cv=0 82 doilev=1,nlev82 DO ilev=1,nlev 83 83 if (frac_out(j,ibox,ilev) .eq. 1) then 84 84 flag_ls=1 … … 98 98 99 99 ! initialize the top layer 100 doj=1,npoints100 DO j=1,npoints 101 101 flag_ls=0 102 102 flag_cv=0 103 103 104 104 if (ls_p_rate(j,1) .gt. 0.) then 105 doibox=1,ncol ! possibility ONE105 DO ibox=1,ncol ! possibility ONE 106 106 if (frac_out(j,ibox,1) .eq. 1) then 107 107 prec_frac(j,ibox,1) = 1 … … 110 110 enddo ! loop over ncol 111 111 if (flag_ls .eq. 0) then ! possibility THREE 112 doibox=1,ncol112 DO ibox=1,ncol 113 113 if (frac_out(j,ibox,2) .eq. 1) then 114 114 prec_frac(j,ibox,1) = 1 … … 118 118 endif 119 119 if (flag_ls .eq. 0) then ! possibility Four 120 doibox=1,ncol120 DO ibox=1,ncol 121 121 if (frac_out_ls(j,ibox) .eq. 1) then 122 122 prec_frac(j,ibox,1) = 1 … … 126 126 endif 127 127 if (flag_ls .eq. 0) then ! possibility Five 128 doibox=1,ncol128 DO ibox=1,ncol 129 129 ! prec_frac(j,1:ncol,1) = 1 130 130 prec_frac(j,ibox,1) = 1 … … 135 135 136 136 if (cv_p_rate(j,1) .gt. 0.) then 137 doibox=1,ncol ! possibility ONE137 DO ibox=1,ncol ! possibility ONE 138 138 if (frac_out(j,ibox,1) .eq. 2) then 139 139 if (prec_frac(j,ibox,1) .eq. 0) then … … 146 146 enddo ! loop over ncol 147 147 if (flag_cv .eq. 0) then ! possibility THREE 148 doibox=1,ncol148 DO ibox=1,ncol 149 149 if (frac_out(j,ibox,2) .eq. 2) then 150 150 if (prec_frac(j,ibox,1) .eq. 0) then … … 158 158 endif 159 159 if (flag_cv .eq. 0) then ! possibility Four 160 doibox=1,ncol160 DO ibox=1,ncol 161 161 if (frac_out_cv(j,ibox) .eq. 1) then 162 162 if (prec_frac(j,ibox,1) .eq. 0) then … … 170 170 endif 171 171 if (flag_cv .eq. 0) then ! possibility Five 172 doibox=1,cv_col172 DO ibox=1,cv_col 173 173 if (prec_frac(j,ibox,1) .eq. 0) then 174 174 prec_frac(j,ibox,1) = 2 … … 187 187 188 188 ! working on the levels from top to surface 189 doilev=2,nlev190 doj=1,npoints189 DO ilev=2,nlev 190 DO j=1,npoints 191 191 flag_ls=0 192 192 flag_cv=0 193 193 194 194 if (ls_p_rate(j,ilev) .gt. 0.) then 195 doibox=1,ncol ! possibility ONE&TWO195 DO ibox=1,ncol ! possibility ONE&TWO 196 196 if ((frac_out(j,ibox,ilev) .eq. 1) .or. ((prec_frac(j,ibox,ilev-1) .eq. 1) & 197 197 .or. (prec_frac(j,ibox,ilev-1) .eq. 3))) then … … 201 201 enddo ! loop over ncol 202 202 if ((flag_ls .eq. 0) .and. (ilev .lt. nlev)) then ! possibility THREE 203 doibox=1,ncol203 DO ibox=1,ncol 204 204 if (frac_out(j,ibox,ilev+1) .eq. 1) then 205 205 prec_frac(j,ibox,ilev) = 1 … … 209 209 endif 210 210 if (flag_ls .eq. 0) then ! possibility Four 211 doibox=1,ncol211 DO ibox=1,ncol 212 212 if (frac_out_ls(j,ibox) .eq. 1) then 213 213 prec_frac(j,ibox,ilev) = 1 … … 217 217 endif 218 218 if (flag_ls .eq. 0) then ! possibility Five 219 doibox=1,ncol219 DO ibox=1,ncol 220 220 ! prec_frac(j,1:ncol,ilev) = 1 221 221 prec_frac(j,ibox,ilev) = 1 … … 225 225 226 226 if (cv_p_rate(j,ilev) .gt. 0.) then 227 doibox=1,ncol ! possibility ONE&TWO227 DO ibox=1,ncol ! possibility ONE&TWO 228 228 if ((frac_out(j,ibox,ilev) .eq. 2) .or. ((prec_frac(j,ibox,ilev-1) .eq. 2) & 229 229 .or. (prec_frac(j,ibox,ilev-1) .eq. 3))) then … … 237 237 enddo ! loop over ncol 238 238 if ((flag_cv .eq. 0) .and. (ilev .lt. nlev)) then ! possibility THREE 239 doibox=1,ncol239 DO ibox=1,ncol 240 240 if (frac_out(j,ibox,ilev+1) .eq. 2) then 241 241 if (prec_frac(j,ibox,ilev) .eq. 0) then … … 249 249 endif 250 250 if (flag_cv .eq. 0) then ! possibility Four 251 doibox=1,ncol251 DO ibox=1,ncol 252 252 if (frac_out_cv(j,ibox) .eq. 1) then 253 253 if (prec_frac(j,ibox,ilev) .eq. 0) then … … 261 261 endif 262 262 if (flag_cv .eq. 0) then ! possibility Five 263 doibox=1,cv_col263 DO ibox=1,cv_col 264 264 if (prec_frac(j,ibox,ilev) .eq. 0) then 265 265 prec_frac(j,ibox,ilev) = 2 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/quickbeam.F90
r5095 r5158 153 153 d_gate = -1 154 154 endif 155 dok=start_gate,end_gate,d_gate155 DO k=start_gate,end_gate,d_gate 156 156 ! Loop over each profile (nprof) 157 dopr=1,nprof157 DO pr=1,nprof 158 158 ! Attenuation due to hydrometeors between radar and volume 159 159 … … 265 265 266 266 ! Effective reflectivity histogram 267 doi=1,Npoints268 doj=1,llm267 DO i=1,Npoints 268 DO j=1,llm 269 269 cfad_ze(i,:,j) = hist1D(Ncolumns,Ze_totFlip(i,:,j),DBZE_BINS,cloudsat_histRef) 270 270 enddo … … 274 274 else 275 275 ! Effective reflectivity histogram 276 doi=1,Npoints277 doj=1,llm276 DO i=1,Npoints 277 DO j=1,llm 278 278 cfad_ze(i,:,j) = hist1D(Ncolumns,Ze_tot(i,:,j),DBZE_BINS,cloudsat_histRef) 279 279 enddo … … 315 315 trim(rcfg%scale_LUT_file_name) // '_radar_Z_scale_LUT.dat' 316 316 317 doi=1,maxhclass318 doj=1,mt_ntt319 dok=1,nRe_types317 DO i=1,maxhclass 318 DO j=1,mt_ntt 319 DO k=1,nRe_types 320 320 ind = i+(j-1)*maxhclass+(k-1)*(nRe_types*mt_ntt) 321 321 read(12,rec=ind) rcfg%Z_scale_flag(i,j,k), & … … 351 351 trim(rcfg%scale_LUT_file_name) // '_radar_Z_scale_LUT.dat' 352 352 353 doi=1,maxhclass354 doj=1,mt_ntt355 dok=1,nRe_types353 DO i=1,maxhclass 354 DO j=1,mt_ntt 355 DO k=1,nRe_types 356 356 ind = i+(j-1)*maxhclass+(k-1)*(nRe_types*mt_ntt) 357 357 if(.not.LUT_file_exists .or. rcfg%Z_scale_added_flag(i,j,k)) then -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/quickbeam_optics.F90
r5095 r5158 71 71 mt_ttl = (/ ((j-1)*5-60 + 273.15, j = 1, cnt_liq) /) 72 72 D(1) = dmin 73 doj=2,nd73 DO j=2,nd 74 74 D(j) = D(j-1)*exp((log(dmax)-log(dmin))/(nd-1)) 75 75 enddo … … 152 152 kr_vol = 0._wp 153 153 154 dok=1,ngate ! Loop over each profile (nprof)155 dopr=1,nprof154 DO k=1,ngate ! Loop over each profile (nprof) 155 DO pr=1,nprof 156 156 if (g_vol_in_present) then 157 157 g_vol(pr,k) = g_vol_in(pr,k) … … 167 167 ! Determine if hydrometeor(s) present in volume 168 168 hydro = .false. 169 doj=1,rcfg%nhclass169 DO j=1,rcfg%nhclass 170 170 if ((hm_matrix(pr,k,j) > 1E-12) .and. (sd%dtype(j) > 0)) then 171 171 hydro = .true. … … 180 180 181 181 ! Loop over hydrometeor type 182 dotp=1,rcfg%nhclass182 DO tp=1,rcfg%nhclass 183 183 Re_internal = re_matrix(pr,k,tp) 184 184 … … 368 368 369 369 where(kr_vol(:,:) <= EPSILON(kr_vol)) 370 ! Volume is hydrometeor-free 370 ! Volume is hydrometeor-free 371 371 !z_vol(:,:) = undef 372 372 z_ray(:,:) = undef … … 820 820 lidx = infind(D,dmin) 821 821 uidx = infind(D,dmax) 822 dok=lidx,uidx822 DO k=lidx,uidx 823 823 N(k) = (ahp*(D(k)*1E-3)**bhp) * 1E-12 824 824 enddo … … 1006 1006 sizep = (pi*D0)/wl 1007 1007 dqv(1) = 0._wp 1008 doi=1,nsizes1008 DO i=1,nsizes 1009 1009 call mieint(sizep(i), m0(i), one, dqv, qext(i), dqsc, qbsca(i), & 1010 1010 dg, xs1, xs2, dph, err) … … 1209 1209 sumo = 0._wp 1210 1210 aux1 = 1.1_wp*e_th 1211 doi=1,nbands_o21211 DO i=1,nbands_o2 1212 1212 aux2 = f/v0(i) 1213 1213 aux3 = v0(i)-f … … 1233 1233 sumo = 0._wp 1234 1234 aux1 = 4.8_wp*e_th 1235 doi=1,nbands_h2o1235 DO i=1,nbands_h2o 1236 1236 aux2 = f/v1(i) 1237 1237 aux3 = v1(i)-f … … 1298 1298 ! 4 for monodisperse distribution, 1299 1299 ! 5 for lognormal distribution. 1300 1300 ! 1301 1301 ! PHASE - Set to 0 for liquid, 1 for ice. 1302 1302 ! DMIN - The minimum drop size for this class (micron), ignored for monodisperse. -
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/scops.F90
r5095 r5158 94 94 if (ncolprint.ne.0) then 95 95 write (6,'(a)') 'frac_out_pp_rev:' 96 doj=1,npoints,100096 DO j=1,npoints,1000 97 97 write(6,'(a10)') 'j=' 98 98 write(6,'(8I10)') j … … 104 104 if (ncolprint.ne.0) then 105 105 write (6,'(a)') 'last_frac_pp:' 106 doj=1,npoints,1000106 DO j=1,npoints,1000 107 107 write(6,'(a10)') 'j=' 108 108 write(6,'(8I10)') j … … 139 139 IF (ncolprint.ne.0) then 140 140 write (6,'(a)') 'threshold_nsf2:' 141 doj=1,npoints,1000141 DO j=1,npoints,1000 142 142 write(6,'(a10)') 'j=' 143 143 write(6,'(8I10)') j … … 156 156 !maxocc(1:npoints,ibox) = merge(1,0,boxpos(1:npoints,ibox) .le. conv(1:npoints,ilev)) 157 157 !maxocc(1:npoints,ibox) = merge(1,0, conv(1:npoints,ilev) .gt. boxpos(1:npoints,ibox)) 158 doj=1,npoints158 DO j=1,npoints 159 159 if (boxpos(j,ibox).le.conv(j,ilev)) then 160 160 maxocc(j,ibox) = 1 … … 214 214 ! Set last_frac to tca at this level, so as to be tca from last level next time round 215 215 if (ncolprint.ne.0) then 216 doj=1,npoints ,1000216 DO j=1,npoints ,1000 217 217 write(6,'(a10)') 'j=' 218 218 write(6,'(8I10)') j
Note: See TracChangeset
for help on using the changeset viewer.