- Timestamp:
- Sep 20, 2024, 12:32:04 PM (5 days ago)
- Location:
- LMDZ6/branches/cirrus
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/cirrus
- Property svn:mergeinfo changed
-
LMDZ6/branches/cirrus/libf/phylmd/ecrad/radiation/radiation_tripleclouds_lw.F90
r4853 r5202 170 170 logical :: is_clear_sky_layer(0:nlev+1) 171 171 172 ! Temporaries to speed up summations173 real(jprb) :: sum_dn, sum_up174 175 172 ! Index of the highest cloudy layer 176 173 integer :: i_cloud_top … … 264 261 if (config%do_clear) then 265 262 ! Sum over g-points to compute broadband fluxes 266 do jlev = 1,nlev+1 267 sum_up = 0.0_jprb 268 sum_dn = 0.0_jprb 269 !$omp simd reduction(+:sum_up, sum_dn) 270 do jg = 1,ng 271 sum_up = sum_up + flux_up_clear(jg,jlev) 272 sum_dn = sum_dn + flux_dn_clear(jg,jlev) 273 end do 274 flux%lw_up_clear(jcol,jlev) = sum_up 275 flux%lw_dn_clear(jcol,jlev) = sum_dn 276 end do 277 263 flux%lw_up_clear(jcol,:) = sum(flux_up_clear,1) 264 flux%lw_dn_clear(jcol,:) = sum(flux_dn_clear,1) 278 265 ! Store surface spectral downwelling fluxes / TOA upwelling 279 do jg = 1,ng 280 flux%lw_dn_surf_clear_g(jg,jcol) = flux_dn_clear(jg,nlev+1) 281 flux%lw_up_toa_clear_g (jg,jcol) = flux_up_clear(jg,1) 282 end do 266 flux%lw_dn_surf_clear_g(:,jcol) = flux_dn_clear(:,nlev+1) 267 flux%lw_up_toa_clear_g (:,jcol) = flux_up_clear(:,1) 283 268 ! Save the spectral fluxes if required 284 269 if (config%do_save_spectral_flux) then … … 468 453 end if 469 454 else 470 sum_dn = 0.0_jprb 471 !$omp simd reduction(+:sum_dn) 472 do jg = 1,ng 473 sum_dn = sum_dn + flux_dn_clear(jg,jlev) 474 end do 475 flux%lw_dn(jcol,jlev) = sum_dn 455 flux%lw_dn(jcol,:) = sum(flux_dn_clear(:,jlev)) 476 456 if (config%do_save_spectral_flux) then 477 457 call indexed_sum(flux_dn_clear(:,jlev), & … … 490 470 & + total_albedo(:,1,i_cloud_top)*flux_dn_clear(:,i_cloud_top) 491 471 flux_up(:,2:) = 0.0_jprb 492 493 sum_up = 0.0_jprb 494 !$omp simd reduction(+:sum_up) 495 do jg = 1,ng 496 sum_up = sum_up + flux_up(jg,1) 497 end do 498 flux%lw_up(jcol,i_cloud_top) = sum_up 499 472 flux%lw_up(jcol,i_cloud_top) = sum(flux_up(:,1)) 500 473 if (config%do_save_spectral_flux) then 501 474 call indexed_sum(flux_up(:,1), & … … 505 478 do jlev = i_cloud_top-1,1,-1 506 479 flux_up(:,1) = trans_clear(:,jlev)*flux_up(:,1) + source_up_clear(:,jlev) 507 sum_up = 0.0_jprb 508 !$omp simd reduction(+:sum_up) 509 do jg = 1,ng 510 sum_up = sum_up + flux_up(jg,1) 511 end do 512 flux%lw_up(jcol,jlev) = sum_up 480 flux%lw_up(jcol,jlev) = sum(flux_up(:,1)) 513 481 if (config%do_save_spectral_flux) then 514 482 call indexed_sum(flux_up(:,1), & … … 560 528 561 529 ! Store the broadband fluxes 562 sum_up = 0.0_jprb 563 sum_dn = 0.0_jprb 564 do jreg = 1,nregions 565 !$omp simd reduction(+:sum_up, sum_dn) 566 do jg = 1,ng 567 sum_up = sum_up + flux_up(jg,jreg) 568 sum_dn = sum_dn + flux_dn(jg,jreg) 569 end do 570 end do 571 flux%lw_up(jcol,jlev+1) = sum_up 572 flux%lw_dn(jcol,jlev+1) = sum_dn 530 flux%lw_up(jcol,jlev+1) = sum(sum(flux_up,1)) 531 flux%lw_dn(jcol,jlev+1) = sum(sum(flux_dn,1)) 573 532 574 533 ! Save the spectral fluxes if required
Note: See TracChangeset
for help on using the changeset viewer.