Changeset 4489 for LMDZ6/trunk/libf/phylmd/ecrad/radiation_ifs_rrtm.F90
- Timestamp:
- Mar 31, 2023, 8:42:57 PM (18 months ago)
- Location:
- LMDZ6/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk
- Property svn:mergeinfo changed
/LMDZ6/branches/LMDZ_ECRad (added) merged: 4175,4177-4183,4188,4192,4200-4203,4355,4366,4387-4388,4390,4444,4482,4486,4488
- Property svn:mergeinfo changed
-
LMDZ6/trunk/libf/phylmd/ecrad/radiation_ifs_rrtm.F90
r4115 r4489 68 68 real(jprb) :: hook_handle 69 69 70 #include "surdi.intfb.h"70 !#include "surdi.intfb.h" 71 71 #include "surrtab.intfb.h" 72 72 #include "surrtpk.intfb.h" … … 81 81 ! up now. 82 82 if (config%do_setup_ifsrrtm) then 83 call SURDI83 !call SURDI 84 84 call SURRTAB 85 85 call SURRTPK … … 89 89 end if 90 90 91 ! Cloud and aerosol properties can only be defined per band 92 config%do_cloud_aerosol_per_sw_g_point = .false. 93 config%do_cloud_aerosol_per_lw_g_point = .false. 94 91 95 config%n_g_sw = jpgsw 92 96 config%n_g_lw = jpglw … … 97 101 ! can compute UV and photosynthetically active radiation for a 98 102 ! particular wavelength range 99 allocate(config%wavenumber1_sw(config%n_bands_sw)) 100 allocate(config%wavenumber2_sw(config%n_bands_sw)) 101 allocate(config%wavenumber1_lw(config%n_bands_lw)) 102 allocate(config%wavenumber2_lw(config%n_bands_lw)) 103 config%wavenumber1_lw = (/ 10, 350, 500, 630, 700, 820, 980, 1080, 1180, 1390, 1480, & 104 & 1800, 2080, 2250, 2380, 2600 /) 105 config%wavenumber2_lw = (/ 350, 500, 630, 700, 820, 980, 1080, 1180, 1390, 1480, 1800, & 106 & 2080, 2250, 2380, 2600, 3250 /) 107 config%wavenumber1_sw = (/ 2600, 3250, 4000, 4650, 5150, 6150, 7700, 8050, 12850, & 108 & 16000 , 22650, 29000, 38000, 820 /) 109 config%wavenumber2_sw = (/ 3250, 4000, 4650, 5150, 6150, 7700, 8050, 12850, 16000, & 110 & 22650, 29000, 38000, 50000, 2600 /) 111 print*,'allocate dans ifs_rrtm' 103 call config%gas_optics_sw%spectral_def%allocate_bands_only( & 104 & [2600.0_jprb, 3250.0_jprb, 4000.0_jprb, 4650.0_jprb, 5150.0_jprb, 6150.0_jprb, 7700.0_jprb, & 105 & 8050.0_jprb, 12850.0_jprb, 16000.0_jprb, 22650.0_jprb, 29000.0_jprb, 38000.0_jprb, 820.0_jprb], & 106 & [3250.0_jprb, 4000.0_jprb, 4650.0_jprb, 5150.0_jprb, 6150.0_jprb, 7700.0_jprb, 8050.0_jprb, & 107 & 12850.0_jprb, 16000.0_jprb, 22650.0_jprb, 29000.0_jprb, 38000.0_jprb, 50000.0_jprb, 2600.0_jprb]) 108 call config%gas_optics_lw%spectral_def%allocate_bands_only( & 109 & [10.0_jprb, 350.0_jprb, 500.0_jprb, 630.0_jprb, 700.0_jprb, 820.0_jprb, 980.0_jprb, 1080.0_jprb, & 110 & 1180.0_jprb, 1390.0_jprb, 1480.0_jprb, 1800.0_jprb, 2080.0_jprb, 2250.0_jprb, 2380.0_jprb, 2600.0_jprb], & 111 & [350.0_jprb, 500.0_jprb, 630.0_jprb, 700.0_jprb, 820.0_jprb, 980.0_jprb, 1080.0_jprb, 1180.0_jprb, & 112 & 1390.0_jprb, 1480.0_jprb, 1800.0_jprb, 2080.0_jprb, 2250.0_jprb, 2380.0_jprb, 2600.0_jprb, 3250.0_jprb]) 113 112 114 allocate(config%i_band_from_g_sw (config%n_g_sw)) 113 115 allocate(config%i_band_from_g_lw (config%n_g_lw)) … … 360 362 ! end if 361 363 362 pressure_fl(istartcol:iendcol,:) & 363 & = 0.5_jprb * (thermodynamics%pressure_hl(istartcol:iendcol,istartlev:iendlev) & 364 & +thermodynamics%pressure_hl(istartcol:iendcol,istartlev+1:iendlev+1)) 365 temperature_fl(istartcol:iendcol,:) & 366 & = 0.5_jprb * (thermodynamics%temperature_hl(istartcol:iendcol,istartlev:iendlev) & 367 & +thermodynamics%temperature_hl(istartcol:iendcol,istartlev+1:iendlev+1)) 364 do jlev=1,nlev 365 do jcol= istartcol,iendcol 366 pressure_fl(jcol,jlev) & 367 & = 0.5_jprb * (thermodynamics%pressure_hl(jcol,jlev+istartlev-1) & 368 & +thermodynamics%pressure_hl(jcol,jlev+istartlev)) 369 temperature_fl(jcol,jlev) & 370 & = 0.5_jprb * (thermodynamics%temperature_hl(jcol,jlev+istartlev-1) & 371 & +thermodynamics%temperature_hl(jcol,jlev+istartlev)) 372 end do 373 end do 368 374 369 375 ! Check we have gas mixing ratios in the right units … … 402 408 & ZRAT_N2OCO2, ZRAT_N2OCO2_1, ZRAT_O3CO2, ZRAT_O3CO2_1) 403 409 404 ZTAUAERL = 0.0_jprb410 ZTAUAERL(istartcol:iendcol,:,:) = 0.0_jprb 405 411 406 412 CALL RRTM_GAS_OPTICAL_DEPTH & … … 434 440 lw_emission = lw_emission * (1.0_jprb - lw_albedo) 435 441 else 436 ! Longwave emission has already been computed442 ! Longwave emission has already been computed 437 443 if (config%use_canopy_full_spectrum_lw) then 438 444 lw_emission = transpose(single_level%lw_emission(istartcol:iendcol,:)) … … 509 515 ! Scale the incoming solar per band, if requested 510 516 if (config%use_spectral_solar_scaling) then 511 ZINCSOL(istartcol:iendcol,:) = ZINCSOL(istartcol:iendcol,:) & 512 & * spread(single_level%spectral_solar_scaling(config%i_band_from_reordered_g_sw), & 513 & 1,iendcol-istartcol+1) 517 do jg = 1,JPGPT_SW 518 do jcol = istartcol,iendcol 519 ZINCSOL(jcol,jg) = ZINCSOL(jcol,jg) * & 520 & single_level%spectral_solar_scaling(config%i_band_from_reordered_g_sw(jg)) 521 end do 522 end do 514 523 end if 515 524 … … 518 527 ! ZINCSOL will be zero. 519 528 if (present(incoming_sw)) then 520 incoming_sw_scale = 1.0_jprb521 529 do jcol = istartcol,iendcol 522 530 if (single_level%cos_sza(jcol) > 0.0_jprb) then 531 ! Added for DWD (2020) 532 !NEC$ nounroll 523 533 incoming_sw_scale(jcol) = single_level%solar_irradiance / sum(ZINCSOL(jcol,:)) 534 else 535 incoming_sw_scale(jcol) = 1.0_jprb 524 536 end if 525 537 end do … … 546 558 else 547 559 ! G points have not been reordered 548 do j g = 1,config%n_g_sw560 do jcol = istartcol,iendcol 549 561 do jlev = 1,nlev 550 do j col = istartcol,iendcol562 do jg = 1,config%n_g_sw 551 563 ! Check for negative optical depth 552 564 od_sw (jg,nlev+1-jlev,jcol) = max(config%min_gas_od_sw, ZOD_SW(jcol,jlev,jg)) … … 555 567 end do 556 568 if (present(incoming_sw)) then 557 incoming_sw(jg,:) & 558 & = incoming_sw_scale(:) * ZINCSOL(:,jg) 569 do jg = 1,config%n_g_sw 570 incoming_sw(jg,jcol) = incoming_sw_scale(jcol) * ZINCSOL(jcol,jg) 571 end do 559 572 end if 560 573 end do … … 604 617 real(jprb) :: temperature 605 618 606 real(jprb) :: factor 619 real(jprb) :: factor, planck_tmp(istartcol:iendcol,config%n_g_lw) 607 620 real(jprb) :: ZFLUXFAC 608 621 … … 689 702 do jg = 1,config%n_g_lw 690 703 iband = config%i_band_from_g_lw(jg) 691 planck_hl(jg,jlev,:) = planck_store(:,iband) * PFRAC(:,jg,nlev+2-jlev) 704 planck_tmp(:,jg) = planck_store(:,iband) * PFRAC(:,jg,nlev+2-jlev) 705 end do 706 do jcol = istartcol,iendcol 707 planck_hl(:,jlev,jcol) = planck_tmp(jcol,:) 692 708 end do 693 709 end if
Note: See TracChangeset
for help on using the changeset viewer.