Changeset 5202 for LMDZ6/branches/cirrus/libf/phylmd/ecrad/radiation/radiation_tripleclouds_lw.F90.or
- 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.or
r4773 r5202 170 170 logical :: is_clear_sky_layer(0:nlev+1) 171 171 172 ! Temporaries to speed up summations 173 real(jprb) :: sum_dn, sum_up 174 172 175 ! Index of the highest cloudy layer 173 176 integer :: i_cloud_top … … 249 252 call calc_ref_trans_lw(ng*nlev, & 250 253 & od(:,:,jcol), ssa(:,:,jcol), g(:,:,jcol), & 251 & planck_hl(:,1: jlev,jcol), planck_hl(:,2:jlev+1,jcol), &254 & planck_hl(:,1:nlev,jcol), planck_hl(:,2:nlev+1,jcol), & 252 255 & ref_clear, trans_clear, & 253 256 & source_up_clear, source_dn_clear) … … 261 264 if (config%do_clear) then 262 265 ! Sum over g-points to compute broadband fluxes 263 flux%lw_up_clear(jcol,:) = sum(flux_up_clear,1) 264 flux%lw_dn_clear(jcol,:) = sum(flux_dn_clear,1) 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 265 278 ! Store surface spectral downwelling fluxes / TOA upwelling 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) 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 268 283 ! Save the spectral fluxes if required 269 284 if (config%do_save_spectral_flux) then … … 453 468 end if 454 469 else 455 flux%lw_dn(jcol,:) = sum(flux_dn_clear(:,jlev)) 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 456 476 if (config%do_save_spectral_flux) then 457 477 call indexed_sum(flux_dn_clear(:,jlev), & … … 470 490 & + total_albedo(:,1,i_cloud_top)*flux_dn_clear(:,i_cloud_top) 471 491 flux_up(:,2:) = 0.0_jprb 472 flux%lw_up(jcol,i_cloud_top) = sum(flux_up(:,1)) 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 473 500 if (config%do_save_spectral_flux) then 474 501 call indexed_sum(flux_up(:,1), & … … 478 505 do jlev = i_cloud_top-1,1,-1 479 506 flux_up(:,1) = trans_clear(:,jlev)*flux_up(:,1) + source_up_clear(:,jlev) 480 flux%lw_up(jcol,jlev) = sum(flux_up(:,1)) 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 481 513 if (config%do_save_spectral_flux) then 482 514 call indexed_sum(flux_up(:,1), & … … 528 560 529 561 ! Store the broadband fluxes 530 flux%lw_up(jcol,jlev+1) = sum(sum(flux_up,1)) 531 flux%lw_dn(jcol,jlev+1) = sum(sum(flux_dn,1)) 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 532 573 533 574 ! Save the spectral fluxes if required
Note: See TracChangeset
for help on using the changeset viewer.