Changeset 5158 for LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_cosp.F90
- Timestamp:
- Aug 2, 2024, 2:12:03 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_cosp.F90
r5099 r5158 68 68 integer,dimension(2) :: ix,iy 69 69 logical :: reff_zero 70 real:: maxp,minp70 REAL :: maxp,minp 71 71 integer,dimension(:),allocatable :: & ! Dimensions nPoints 72 72 seed ! It is recommended that the seed is set to a different value for each model … … 95 95 96 96 !++++++++++ Depth of model layers ++++++++++++ 97 doi=1,Nlevels-197 DO i=1,Nlevels-1 98 98 gbx%dlev(:,i) = gbx%zlev_half(:,i+1) - gbx%zlev_half(:,i) 99 99 enddo … … 195 195 Niter = gbx%Npoints/gbx%Npoints_it ! Integer division 196 196 if (Niter*gbx%Npoints_it < gbx%Npoints) Niter = Niter + 1 197 doi=1,Niter197 DO i=1,Niter 198 198 i_first = (i-1)*gbx%Npoints_it + 1 199 199 i_last = i_first + gbx%Npoints_it - 1 … … 409 409 410 410 ! Precipitation fraction 411 doj=1,Npoints,1412 dok=1,Nlevels,1413 doi=1,Ncolumns,1411 DO j=1,Npoints,1 412 DO k=1,Nlevels,1 413 DO i=1,Ncolumns,1 414 414 if (sgx%frac_out (j,i,Nlevels+1-k) == I_LSC) frac_ls(j,k)=frac_ls(j,k)+1. 415 415 if (sgx%frac_out (j,i,Nlevels+1-k) == I_CVC) frac_cv(j,k)=frac_cv(j,k)+1. … … 434 434 else 435 435 ! This is done within a loop (unvectorized) over nPoints to save memory 436 doj=1,Npoints436 DO j=1,Npoints 437 437 sgx%frac_out(j,:,1:Nlevels) = sgx%frac_out(j,:,Nlevels:1:-1) 438 438 sgx%prec_frac(j,:,1:Nlevels) = sgx%prec_frac(j,:,Nlevels:1:-1) … … 445 445 ! Populate the subgrid arrays 446 446 call construct_cosp_sghydro(Npoints,Ncolumns,Nlevels,Nhydro,sghydro) 447 dok=1,Ncolumns447 DO k=1,Ncolumns 448 448 !--------- Mixing ratios for clouds and Reff for Clouds and precip ------- 449 449 column_frac_out => sgx%frac_out(:,k,:) … … 498 498 enddo 499 499 ! convert the mixing ratio and precipitation flux from gridbox mean to the fraction-based values 500 dok=1,Nlevels501 doj=1,Npoints500 DO k=1,Nlevels 501 DO j=1,Npoints 502 502 !--------- Clouds ------- 503 503 if (frac_ls(j,k) .ne. 0.) then
Note: See TracChangeset
for help on using the changeset viewer.