Changeset 4647 for LMDZ6/branches/LMDZ_ECRad
- Timestamp:
- Aug 7, 2023, 1:42:51 PM (17 months ago)
- Location:
- LMDZ6/branches/LMDZ_ECRad/libf/phylmd
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/clesphys.h
r4482 r4647 103 103 INTEGER :: iflag_phytrac 104 104 105 !AI flags pour ECRAD 106 LOGICAL :: ok_3Deffect 107 CHARACTER(len=512) :: namelist_ecrad_file 108 105 109 COMMON/clesphys/ & 106 110 ! REAL FIRST … … 151 155 & , ok_daily_climoz, ok_all_xml, ok_lwoff & 152 156 & , iflag_phytrac, ok_new_lscp & 153 & , iflag_thermals,nsplit_thermals, tau_thermals 157 & , iflag_thermals,nsplit_thermals, tau_thermals & 158 & , ok_3Deffect, namelist_ecrad_file 154 159 save /clesphys/ 155 160 !$OMP THREADPRIVATE(/clesphys/) -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_aerosol_optics.F90
r4444 r4647 53 53 ! properties and average to the spectral intervals of the 54 54 ! current gas-optics scheme 55 ! call setup_general_aerosol_optics(config) 56 call setup_general_aerosol_optics_lmdz(config,trim(config%aerosol_optics_file_name)) 55 call setup_general_aerosol_optics(config) 57 56 else 58 57 ! Read file containing optical properties already in the bands … … 334 333 335 334 end subroutine setup_general_aerosol_optics 336 337 !---------------------------------------------------------------------338 ! Read LMDZ file containing high spectral resolution optical properties339 ! and average to the spectral intervals of the current gas-optics340 ! scheme341 subroutine setup_general_aerosol_optics_lmdz(config,file_name)342 343 use parkind1, only : jprb344 use yomhook, only : lhook, dr_hook345 ! use easy_netcdf, only : netcdf_file346 use radiation_config, only : config_type347 use radiation_aerosol_optics_data, only : aerosol_optics_type348 use radiation_spectral_definition, only : SolarReferenceTemperature, &349 & TerrestrialReferenceTemperature350 use radiation_io, only : nulout351 use netcdf95, only: nf95_open, nf95_inq_grp_full_ncid, nf95_close, &352 nf95_inq_dimid, nf95_inq_varid, nf95_inquire_dimension, &353 nf95_get_var, nf95_gw_var354 use netcdf, only: nf90_nowrite355 356 357 type(config_type), intent(inout), target :: config358 359 ! ! The NetCDF file containing the aerosol optics data360 ! type(netcdf_file) :: file361 362 character(len=*), intent(in):: file_name363 ! NetCDF file containing the aerosol optics data364 365 ! Wavenumber points in NetCDF file366 real(jprb), allocatable :: wavenumber(:) ! cm-1367 368 ! Hydrophilic aerosol properties369 real(jprb), allocatable :: mass_ext_philic(:,:,:) ! Mass-ext coefficient (m2 kg-1)370 real(jprb), allocatable :: ssa_philic(:,:,:) ! Single-scattering albedo371 real(jprb), allocatable :: g_philic(:,:,:) ! Asymmetry factor372 real(jprb), allocatable :: lidar_ratio_philic(:,:,:) ! Lidar ratio (sr)373 374 ! Hydrophobic aerosol properties375 real(jprb), allocatable :: mass_ext_phobic(:,:) ! Mass-ext coefficient (m2 kg-1)376 real(jprb), allocatable :: ssa_phobic(:,:) ! Single-scattering albedo377 real(jprb), allocatable :: g_phobic(:,:) ! Asymmetry factor378 real(jprb), allocatable :: lidar_ratio_phobic(:,:) ! Lidar ratio (sr)379 380 ! Mapping matrix between optical properties at the wavenumbers in381 ! the file, and spectral intervals used by the gas-optics scheme382 real(jprb), allocatable :: mapping(:,:)383 384 ! Pointer to the aerosol optics coefficients for brevity of access385 type(aerosol_optics_type), pointer :: ao386 387 ! Target monochromatic wavenumber for interpolation (cm-1)388 real(jprb) :: wavenumber_target389 390 ! Number of spectral points describing aerosol properties in the391 ! shortwave and longwave392 integer :: nspecsw, nspeclw393 394 ! Number of monochromatic wavelengths required395 integer :: nmono396 397 integer :: n_type_philic, n_type_phobic, nrh, nwn398 integer :: jtype, jwl, iwn399 400 ! Weight of first point in interpolation401 real(jprb) :: weight1402 403 real(jprb) :: hook_handle404 405 ! Local:406 integer ncid, grpid, dimid, varid407 408 if (lhook) call dr_hook('radiation_aerosol_optics:setup_general_aerosol_optics',0,hook_handle)409 410 ao => config%aerosol_optics411 412 ao%use_hydrophilic = .true.413 ao%use_monochromatic = .true.414 print*,'file_name= ',file_name415 call nf95_open(file_name, nf90_nowrite, ncid)416 call nf95_inq_grp_full_ncid(ncid, "Hydrophilic", grpid)417 call nf95_inq_dimid(grpid, "hur", dimid)418 call nf95_inquire_dimension(grpid, dimid, nclen = ao%nrh)419 ! allocate(ao%rh_lower(ao%nrh))420 call nf95_inq_varid(grpid, "hur_bounds", varid)421 call nf95_get_var(grpid, varid, ao%rh_lower, count_nc = [1, ao%nrh])422 423 ! Hydrophilic/LW_bands:424 call nf95_inq_grp_full_ncid(ncid, "Hydrophilic/LW_bands", grpid)425 call nf95_inq_varid(grpid, "asymmetry", varid)426 call nf95_gw_var(grpid, varid, ao%g_lw_philic)427 call nf95_inq_varid(grpid, "single_scat_alb", varid)428 call nf95_gw_var(grpid, varid, ao%ssa_lw_philic)429 call nf95_inq_varid(grpid, "mass_ext", varid)430 call nf95_gw_var(grpid, varid, ao%mass_ext_lw_philic)431 432 ! Hydrophilic/SW_bands:433 call nf95_inq_grp_full_ncid(ncid, "Hydrophilic/SW_bands", grpid)434 call nf95_inq_varid(grpid, "asymmetry", varid)435 call nf95_gw_var(grpid, varid, ao%g_sw_philic)436 ao%g_sw_philic = cshift(ao%g_sw_philic, 1)437 call nf95_inq_varid(grpid, "single_scat_alb", varid)438 call nf95_gw_var(grpid, varid, ao%ssa_sw_philic)439 ao%g_sw_philic = cshift(ao%ssa_sw_philic, 1)440 call nf95_inq_varid(grpid, "mass_ext", varid)441 call nf95_gw_var(grpid, varid, ao%mass_ext_sw_philic)442 ao%g_sw_philic = cshift(ao%mass_ext_sw_philic, 1)443 444 ! Hydrophilic/Monochromatic:445 call nf95_inq_grp_full_ncid(ncid, "Hydrophilic/Monochromatic", grpid)446 call nf95_inq_varid(grpid, "mass_ext", varid)447 call nf95_gw_var(grpid, varid, ao%mass_ext_mono_philic)448 449 ! Hydrophobic/LW_bands:450 call nf95_inq_grp_full_ncid(ncid, "Hydrophobic/LW_bands", grpid)451 call nf95_inq_varid(grpid, "asymmetry", varid)452 call nf95_gw_var(grpid, varid, ao%g_lw_phobic)453 call nf95_inq_varid(grpid, "single_scat_alb", varid)454 call nf95_gw_var(grpid, varid, ao%ssa_lw_phobic)455 call nf95_inq_varid(grpid, "mass_ext", varid)456 call nf95_gw_var(grpid, varid, ao%mass_ext_lw_phobic)457 458 ! Hydrophobic/SW_bands:459 call nf95_inq_grp_full_ncid(ncid, "Hydrophobic/SW_bands", grpid)460 call nf95_inq_varid(grpid, "asymmetry", varid)461 call nf95_gw_var(grpid, varid, ao%g_sw_phobic)462 ao%g_sw_phobic = cshift(ao%g_sw_phobic, 1)463 call nf95_inq_varid(grpid, "single_scat_alb", varid)464 call nf95_gw_var(grpid, varid, ao%ssa_sw_phobic)465 ao%g_sw_phobic = cshift(ao%ssa_sw_phobic, 1)466 call nf95_inq_varid(grpid, "mass_ext", varid)467 call nf95_gw_var(grpid, varid, ao%mass_ext_sw_phobic)468 ao%g_sw_phobic = cshift(ao%mass_ext_sw_phobic, 1)469 ! AI ATTENTION470 call nf95_inq_varid(grpid, "wavenumber", varid)471 call nf95_gw_var(grpid, varid, wavenumber)472 473 ! Hydrophobic/Monochromatic:474 call nf95_inq_grp_full_ncid(ncid, "Hydrophobic/Monochromatic", grpid)475 call nf95_inq_varid(grpid, "mass_ext", varid)476 call nf95_gw_var(grpid, varid, ao%mass_ext_mono_phobic)477 478 ! call file%get('wavenumber', wavenumber)479 ! nwn = size(wavenumber)480 481 ! call file%get_global_attribute('description_hydrophobic', &482 ! & ao%description_phobic_str)483 484 485 ! call file%get('relative_humidity1', ao%rh_lower)486 487 ! call file%get_global_attribute('description_hydrophilic', &488 ! & ao%description_philic_str)489 490 ! Close aerosol scattering file491 ! call file%close()492 493 call nf95_close(ncid)494 495 ! Get array sizes496 ! ao%n_bands_lw = size(ao%mass_ext_lw_phobic, 1)497 ! ao%n_bands_sw = size(ao%mass_ext_sw_phobic, 1)498 ! ao%n_mono_wl = size(ao%mass_ext_mono_phobic, 1)499 ! ao%n_type_phobic = size(ao%mass_ext_lw_phobic, 2)500 ! ao%n_type_philic = size(ao%mass_ext_lw_philic, 3)501 502 ! Allocate memory for mapping arrays503 ! ao%ntype = ao%n_type_phobic + ao%n_type_philic504 ! allocate(ao%iclass(ao%ntype))505 ! allocate(ao%itype(ao%ntype))506 507 ! ao%iclass = IAerosolClassUndefined508 ! ao%itype = 0509 510 n_type_phobic = size(mass_ext_phobic, 2)511 if (ao%use_hydrophilic) then512 n_type_philic = size(mass_ext_philic, 3)513 nrh = size(ao%rh_lower)514 else515 n_type_philic = 0516 nrh = 0517 end if518 519 if (config%do_cloud_aerosol_per_sw_g_point) then520 nspecsw = config%gas_optics_sw%spectral_def%ng521 else522 nspecsw = config%gas_optics_sw%spectral_def%nband523 end if524 525 if (config%do_cloud_aerosol_per_lw_g_point) then526 nspeclw = config%gas_optics_lw%spectral_def%ng527 else528 nspeclw = config%gas_optics_lw%spectral_def%nband529 end if530 531 if (allocated(ao%wavelength_mono)) then532 ! Monochromatic wavelengths also required533 nmono = size(ao%wavelength_mono)534 else535 nmono = 0536 end if537 538 call ao%allocate(n_type_phobic, n_type_philic, nrh, nspeclw, nspecsw, nmono)539 540 if (config%do_sw) then541 call config%gas_optics_sw%spectral_def%calc_mapping(SolarReferenceTemperature, &542 & wavenumber, mapping, use_bands=(.not. config%do_cloud_aerosol_per_sw_g_point))543 544 ao%mass_ext_sw_phobic = matmul(mapping, mass_ext_phobic)545 ao%ssa_sw_phobic = matmul(mapping, mass_ext_phobic*ssa_phobic) &546 & / ao%mass_ext_sw_phobic547 ao%g_sw_phobic = matmul(mapping, mass_ext_phobic*ssa_phobic*g_phobic) &548 & / (ao%mass_ext_sw_phobic*ao%ssa_sw_phobic)549 550 if (ao%use_hydrophilic) then551 do jtype = 1,n_type_philic552 ao%mass_ext_sw_philic(:,:,jtype) = matmul(mapping, mass_ext_philic(:,:,jtype))553 ao%ssa_sw_philic(:,:,jtype) = matmul(mapping, mass_ext_philic(:,:,jtype) &554 & *ssa_philic(:,:,jtype)) &555 & / ao%mass_ext_sw_philic(:,:,jtype)556 ao%g_sw_philic(:,:,jtype) = matmul(mapping, mass_ext_philic(:,:,jtype) &557 & *ssa_philic(:,:,jtype)*g_philic(:,:,jtype)) &558 & / (ao%mass_ext_sw_philic(:,:,jtype)*ao%ssa_sw_philic(:,:,jtype))559 end do560 end if561 end if562 if (config%do_lw) then563 call config%gas_optics_lw%spectral_def%calc_mapping(TerrestrialReferenceTemperature, &564 & wavenumber, mapping, use_bands=(.not. config%do_cloud_aerosol_per_lw_g_point))565 566 ao%mass_ext_lw_phobic = matmul(mapping, mass_ext_phobic)567 ao%ssa_lw_phobic = matmul(mapping, mass_ext_phobic*ssa_phobic) &568 & / ao%mass_ext_lw_phobic569 ao%g_lw_phobic = matmul(mapping, mass_ext_phobic*ssa_phobic*g_phobic) &570 & / (ao%mass_ext_lw_phobic*ao%ssa_lw_phobic)571 572 if (ao%use_hydrophilic) then573 do jtype = 1,n_type_philic574 ao%mass_ext_lw_philic(:,:,jtype) = matmul(mapping, mass_ext_philic(:,:,jtype))575 ao%ssa_lw_philic(:,:,jtype) = matmul(mapping, mass_ext_philic(:,:,jtype) &576 & *ssa_philic(:,:,jtype)) &577 & / ao%mass_ext_lw_philic(:,:,jtype)578 ao%g_lw_philic(:,:,jtype) = matmul(mapping, mass_ext_philic(:,:,jtype) &579 & *ssa_philic(:,:,jtype)*g_philic(:,:,jtype)) &580 & / (ao%mass_ext_lw_philic(:,:,jtype)*ao%ssa_lw_philic(:,:,jtype))581 end do582 end if583 end if584 585 if (allocated(ao%wavelength_mono)) then586 ! Monochromatic wavelengths also required587 do jwl = 1,nmono588 ! Wavelength (m) to wavenumber (cm-1)589 wavenumber_target = 0.01_jprb / ao%wavelength_mono(jwl)590 ! Find index to first interpolation point, and its weight591 if (wavenumber_target <= wavenumber(1)) then592 weight1 = 1.0_jprb593 iwn = 1594 else if (wavenumber_target >= wavenumber(nwn)) then595 iwn = nwn-1596 weight1 = 0.0_jprb597 else598 iwn = 1599 do while (wavenumber(iwn+1) < wavenumber_target .and. iwn < nwn-1)600 iwn = iwn + 1601 end do602 weight1 = (wavenumber(iwn+1)-wavenumber_target) &603 & / (wavenumber(iwn+1)-wavenumber(iwn))604 end if605 ! Linear interpolation606 ao%mass_ext_mono_phobic(jwl,:) = weight1 * mass_ext_phobic(iwn,:) &607 & + (1.0_jprb - weight1)* mass_ext_phobic(iwn+1,:)608 ao%ssa_mono_phobic(jwl,:) = weight1 * ssa_phobic(iwn,:) &609 & + (1.0_jprb - weight1)* ssa_phobic(iwn+1,:)610 ao%g_mono_phobic(jwl,:) = weight1 * g_phobic(iwn,:) &611 & + (1.0_jprb - weight1)* g_phobic(iwn+1,:)612 ao%lidar_ratio_mono_phobic(jwl,:) = weight1 * lidar_ratio_phobic(iwn,:) &613 & + (1.0_jprb - weight1)* lidar_ratio_phobic(iwn+1,:)614 if (ao%use_hydrophilic) then615 ao%mass_ext_mono_philic(jwl,:,:) = weight1 * mass_ext_philic(iwn,:,:) &616 & + (1.0_jprb - weight1)* mass_ext_philic(iwn+1,:,:)617 ao%ssa_mono_philic(jwl,:,:) = weight1 * ssa_philic(iwn,:,:) &618 & + (1.0_jprb - weight1)* ssa_philic(iwn+1,:,:)619 ao%g_mono_philic(jwl,:,:) = weight1 * g_philic(iwn,:,:) &620 & + (1.0_jprb - weight1)* g_philic(iwn+1,:,:)621 ao%lidar_ratio_mono_philic(jwl,:,:) = weight1 * lidar_ratio_philic(iwn,:,:) &622 & + (1.0_jprb - weight1)* lidar_ratio_philic(iwn+1,:,:)623 end if624 end do625 end if626 627 ! Deallocate memory local to this routine628 deallocate(mass_ext_phobic)629 deallocate(ssa_phobic)630 deallocate(g_phobic)631 deallocate(lidar_ratio_phobic)632 if (ao%use_hydrophilic) then633 deallocate(mass_ext_philic)634 deallocate(ssa_philic)635 deallocate(g_philic)636 deallocate(lidar_ratio_philic)637 end if638 639 if (lhook) call dr_hook('radiation_aerosol_optics:setup_general_aerosol_optics',1,hook_handle)640 641 end subroutine setup_general_aerosol_optics_lmdz642 643 335 644 336 !--------------------------------------------------------------------- -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_cloud_generator.F90
r4444 r4647 541 541 use radiation_pdf_sampler, only : pdf_sampler_type 542 542 implicit none 543 #if defined(__GFORTRAN__) || defined(__PGI) || defined(__NEC__)544 #else545 !$omp declare simd(sample_from_pdf_simd) uniform(this) &546 !$omp linear(ref(fsd)) linear(ref(cdf))547 #endif548 543 type(pdf_sampler_type), intent(in) :: this 549 544 -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_ecckd.F90
r4444 r4647 147 147 this%d_log_pressure = log(pressure_lut(2)) - this%log_pressure1 148 148 call file%get('temperature', temperature_full) 149 if (allocated(this%temperature1)) deallocate(this%temperature1) 149 150 allocate(this%temperature1(this%npress)); 150 151 this%temperature1 = temperature_full(:,1) … … 179 180 ! Read gases 180 181 call file%get('n_gases', this%ngas) 182 if (allocated(this%single_gas)) deallocate(this%single_gas) 181 183 allocate(this%single_gas(this%ngas)) 182 184 call file%get_global_attribute('constituent_id', constituent_id) -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_ecckd_interface.F90
r4444 r4647 52 52 end if 53 53 54 allocate(config%i_band_from_g_sw (config%n_g_sw)) 54 if (allocated(config%i_band_from_g_sw)) deallocate(config%i_band_from_g_sw) 55 allocate(config%i_band_from_g_sw(config%n_g_sw)) 56 if (allocated(config%i_band_from_reordered_g_sw)) deallocate(config%i_band_from_reordered_g_sw) 55 57 allocate(config%i_band_from_reordered_g_sw(config%n_g_sw)) 56 allocate(config%i_g_from_reordered_g_sw (config%n_g_sw)) 58 if (allocated(config%i_g_from_reordered_g_sw)) deallocate(config%i_g_from_reordered_g_sw) 59 allocate(config%i_g_from_reordered_g_sw(config%n_g_sw)) 57 60 58 61 if (config%do_cloud_aerosol_per_sw_g_point) then … … 91 94 end if 92 95 96 if (allocated(config%i_band_from_g_lw)) deallocate(config%i_band_from_g_lw) 93 97 allocate(config%i_band_from_g_lw (config%n_g_lw)) 98 if (allocated(config%i_band_from_reordered_g_lw)) deallocate(config%i_band_from_reordered_g_lw) 94 99 allocate(config%i_band_from_reordered_g_lw(config%n_g_lw)) 100 if (allocated(config%i_g_from_reordered_g_lw)) deallocate(config%i_g_from_reordered_g_lw) 95 101 allocate(config%i_g_from_reordered_g_lw (config%n_g_lw)) 96 102 -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_general_cloud_optics.F90
r4444 r4647 75 75 ! Allocate structures 76 76 if (config%do_sw) then 77 if (allocated(config%cloud_optics_sw)) deallocate(config%cloud_optics_sw) 77 78 allocate(config%cloud_optics_sw(config%n_cloud_types)) 78 79 end if 79 80 80 81 if (config%do_lw) then 82 if (allocated(config%cloud_optics_lw)) deallocate(config%cloud_optics_lw) 81 83 allocate(config%cloud_optics_lw(config%n_cloud_types)) 82 84 end if -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_general_cloud_optics_data.F90
r4444 r4647 185 185 call delta_eddington(mass_ext, ssa, asymmetry) 186 186 187 187 188 ! Thin averaging 189 ! AI juillet 2023 190 allocate(this%mass_ext(nre,nwav)) 188 191 this%mass_ext = matmul(mapping, mass_ext) 189 192 this%ssa = matmul(mapping, mass_ext*ssa) / this%mass_ext -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_scheme.F90
r4646 r4647 9 9 ! 3. Configuration a partir de namelist 10 10 ! 4. frac_std = 0.75 11 ! Juillet 2023 : 12 ! 11 13 ! ============================================================================ 12 14 … … 14 16 ! Inputs 15 17 & (KIDIA, KFDIA, KLON, KLEV, KAEROSOL, NSW, & 16 & IDAY, TIME, &18 & namelist_file, ok_3Deffect, IDAY, TIME, & 17 19 & PSOLAR_IRRADIANCE, & 18 20 & PMU0, PTEMPERATURE_SKIN, & … … 97 99 USE mod_phys_lmdz_para 98 100 USE setup_config_from_lmdz, ONLY : driver_config_type 101 !USE RADIATION_SETUP, ONLY : config_type, driver_config_type 99 102 100 103 IMPLICIT NONE … … 220 223 ! AI ATTENTION 221 224 type(config_type),save :: rad_config 225 !!$OMP THREADPRIVATE(rad_config) 222 226 type(driver_config_type),save :: driver_config 227 !!$OMP THREADPRIVATE(driver_config) 228 !type(config_type) :: rad_config 229 !type(driver_config_type) :: driver_config 223 230 TYPE(single_level_type) :: single_level 224 231 TYPE(thermodynamics_type) :: thermodynamics … … 261 268 262 269 ! Name of file names specified on command line 263 character(len=512) :: file_name270 character(len=512) :: namelist_file 264 271 265 272 logical :: loutput=.true. … … 269 276 !$OMP THREADPRIVATE(debut_ecrad) 270 277 integer, save :: itap_ecrad=1 278 logical :: ok_3Deffect 271 279 272 280 IF (LHOOK) CALL DR_HOOK('RADIATION_SCHEME',0,ZHOOK_HANDLE) 273 print*,'Entree dans radiation_scheme'274 281 275 282 ! A.I juillet 2023 : 276 283 ! Initialisation dans radiation_setup au 1er passage dans Ecrad 277 284 !$OMP MASTER 278 if (debut_ecrad) then 279 ! AI appel radiation_setup 280 call SETUP_RADIATION_SCHEME(loutput,rad_config,driver_config) 281 debut_ecrad=.false. 282 endif 285 if (.not.ok_3Deffect) then 286 if (debut_ecrad) then 287 call SETUP_RADIATION_SCHEME(loutput,namelist_file,rad_config,driver_config) 288 debut_ecrad=.false. 289 endif 290 else 291 call SETUP_RADIATION_SCHEME(loutput,namelist_file,rad_config,driver_config) 292 endif 283 293 !$OMP END MASTER 284 294 !$OMP BARRIER … … 287 297 !AI juillet 2023 : verif des param de config : 288 298 if (lprint_config) then 299 IF (is_master) THEN 289 300 print*,'Parametres de configuration de ecrad, etape ',itap_ecrad 301 print*,'Entree dans radiation_scheme' 302 print*,'ok_3Deffect = ',ok_3Deffect 303 print*,'Fichier namelist = ',namelist_file 304 290 305 print*,'do_sw, do_lw, do_sw_direct, do_3d_effects = ', & 291 306 rad_config%do_sw, rad_config%do_lw, rad_config%do_sw_direct, rad_config%do_3d_effects … … 362 377 363 378 itap_ecrad=itap_ecrad+1 379 ENDIF 364 380 endif 365 381 -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_setup.F90
r4646 r4647 46 46 ! AI At the end of the routine, the parameters are read in namelist 47 47 ! 48 SUBROUTINE SETUP_RADIATION_SCHEME(LOUTPUT, rad_config,driver_config)48 SUBROUTINE SETUP_RADIATION_SCHEME(LOUTPUT,file_name,rad_config,driver_config) 49 49 50 50 USE radiation_config, ONLY : config_type, & … … 86 86 87 87 ! AI ATTENTION (parameters read in namelist file) 88 file_name="namelist_ecrad"88 ! file_name="namelist_ecrad" 89 89 call rad_config%read(file_name=file_name) 90 90 call driver_config%read(file_name) -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/setup_aerosol_optics_lmdz_m.F90
r4188 r4647 29 29 use netcdf95, only: nf95_open, nf95_inq_grp_full_ncid, nf95_close, & 30 30 nf95_inq_dimid, nf95_inq_varid, nf95_inquire_dimension, & 31 nf95_get_var, nf95_gw_var 32 use netcdf, only: nf90_nowrite 31 nf95_get_var, nf95_gw_var, nf95_nowrite 33 32 34 33 type(aerosol_optics_type), intent(out):: ao … … 44 43 ao%use_hydrophilic = .true. 45 44 ao%use_monochromatic = .true. 46 print*,'file_name= ',file_name 47 call nf95_open(file_name, nf90_nowrite, ncid) 45 call nf95_open(file_name, nf95_nowrite, ncid) 48 46 call nf95_inq_grp_full_ncid(ncid, "Hydrophilic", grpid) 49 47 call nf95_inq_dimid(grpid, "hur", dimid) … … 69 67 call nf95_inq_varid(grpid, "single_scat_alb", varid) 70 68 call nf95_gw_var(grpid, varid, ao%ssa_sw_philic) 71 ao% g_sw_philic = cshift(ao%ssa_sw_philic, 1)69 ao%ssa_sw_philic = cshift(ao%ssa_sw_philic, 1) 72 70 call nf95_inq_varid(grpid, "mass_ext", varid) 73 71 call nf95_gw_var(grpid, varid, ao%mass_ext_sw_philic) 74 ao% g_sw_philic = cshift(ao%mass_ext_sw_philic, 1)72 ao%mass_ext_sw_philic = cshift(ao%mass_ext_sw_philic, 1) 75 73 76 74 ! Hydrophilic/Monochromatic: … … 95 93 call nf95_inq_varid(grpid, "single_scat_alb", varid) 96 94 call nf95_gw_var(grpid, varid, ao%ssa_sw_phobic) 97 ao% g_sw_phobic = cshift(ao%ssa_sw_phobic, 1)95 ao%ssa_sw_phobic = cshift(ao%ssa_sw_phobic, 1) 98 96 call nf95_inq_varid(grpid, "mass_ext", varid) 99 97 call nf95_gw_var(grpid, varid, ao%mass_ext_sw_phobic) 100 ao% g_sw_phobic = cshift(ao%mass_ext_sw_phobic, 1)98 ao%mass_ext_sw_phobic = cshift(ao%mass_ext_sw_phobic, 1) 101 99 102 100 ! Hydrophobic/Monochromatic: -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/phys_local_var_mod.F90
r4188 r4647 141 141 REAL, SAVE, ALLOCATABLE :: toplwad0_aero(:), sollwad0_aero(:) ! diag 142 142 !$OMP THREADPRIVATE(toplwad0_aero,sollwad0_aero) 143 144 !AI 08 2023 ajout pour Ecrad 145 REAL,ALLOCATABLE,SAVE :: topswad_aero_s2(:), solswad_aero_s2(:) 146 !$OMP THREADPRIVATE(topswad_aero_s2, solswad_aero_s2) 147 REAL,ALLOCATABLE,SAVE :: topswai_aero_s2(:), solswai_aero_s2(:) 148 !$OMP THREADPRIVATE(topswai_aero_s2, solswai_aero_s2) 149 REAL,ALLOCATABLE,SAVE :: topswad0_aero_s2(:), solswad0_aero_s2(:) 150 !$OMP THREADPRIVATE(topswad0_aero_s2, solswad0_aero_s2) 151 REAL,ALLOCATABLE,SAVE :: topsw_aero_s2(:,:), topsw0_aero_s2(:,:) 152 !$OMP THREADPRIVATE(topsw_aero_s2, topsw0_aero_s2) 153 REAL,ALLOCATABLE,SAVE :: solsw_aero_s2(:,:), solsw0_aero_s2(:,:) 154 !$OMP THREADPRIVATE(solsw_aero_s2, solsw0_aero_s2) 155 REAL,ALLOCATABLE,SAVE :: topswcf_aero_s2(:,:), solswcf_aero_s2(:,:) 156 !$OMP THREADPRIVATE(topswcf_aero_s2, solswcf_aero_s2) 157 ! additional LW variables CK 158 REAL,ALLOCATABLE,SAVE :: toplwad_aero_s2(:), sollwad_aero_s2(:) 159 !$OMP THREADPRIVATE(toplwad_aero_s2, sollwad_aero_s2) 160 REAL,ALLOCATABLE,SAVE :: toplwai_aero_s2(:), sollwai_aero_s2(:) 161 !$OMP THREADPRIVATE(toplwai_aero_s2, sollwai_aero_s2) 162 REAL,ALLOCATABLE,SAVE :: toplwad0_aero_s2(:), sollwad0_aero_s2(:) 163 !$OMP THREADPRIVATE(toplwad0_aero_s2, sollwad0_aero_s2) 164 143 165 ! Special RRTM 144 166 REAL, SAVE, ALLOCATABLE :: ZLWFT0_i(:,:), ZSWFT0_i(:,:) ! diag … … 740 762 ALLOCATE(solsw_aerop(klon,naero_grp), solsw0_aerop(klon,naero_grp)) 741 763 ALLOCATE(topswcf_aerop(klon,naero_grp), solswcf_aerop(klon,naero_grp)) 764 765 !AI Ajout Ecrad (3Deffect) 766 ALLOCATE(topswad_aero_s2(klon), solswad_aero_s2(klon)) 767 ALLOCATE(topswai_aero_s2(klon), solswai_aero_s2(klon)) 768 ALLOCATE(topswad0_aero_s2(klon), solswad0_aero_s2(klon)) 769 ALLOCATE(topsw_aero_s2(klon,naero_grp), topsw0_aero_s2(klon,naero_grp)) 770 ALLOCATE(solsw_aero_s2(klon,naero_grp), solsw0_aero_s2(klon,naero_grp)) 771 ALLOCATE(topswcf_aero_s2(klon,naero_grp), solswcf_aero_s2(klon,naero_grp)) 772 ! additional LW variables CK 773 ALLOCATE(toplwad_aero_s2(klon), sollwad_aero_s2(klon)) 774 ALLOCATE(toplwai_aero_s2(klon), sollwai_aero_s2(klon)) 775 ALLOCATE(toplwad0_aero_s2(klon), sollwad0_aero_s2(klon)) 742 776 743 777 ! additional LW variables CK … … 1056 1090 DEALLOCATE(solsw_aerop, solsw0_aerop) 1057 1091 DEALLOCATE(topswcf_aerop, solswcf_aerop) 1092 1093 !AI Ajout pour Ecrad (3Deffect) 1094 DEALLOCATE(topswad_aero_s2, solswad_aero_s2) 1095 DEALLOCATE(topswai_aero_s2, solswai_aero_s2) 1096 DEALLOCATE(topswad0_aero_s2, solswad0_aero_s2) 1097 DEALLOCATE(topsw_aero_s2, topsw0_aero_s2) 1098 DEALLOCATE(solsw_aero_s2, solsw0_aero_s2) 1099 DEALLOCATE(topswcf_aero_s2, solswcf_aero_s2) 1100 !CK LW diagnostics 1101 DEALLOCATE(toplwad_aero_s2, sollwad_aero_s2) 1102 DEALLOCATE(toplwai_aero_s2, sollwai_aero_s2) 1103 DEALLOCATE(toplwad0_aero_s2, sollwad0_aero_s2) 1104 1058 1105 !AI Aerosols 1059 1106 DEALLOCATE(m_allaer) -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/phys_output_ctrlout_mod.F90
r4482 r4647 529 529 TYPE(ctrl_out), SAVE :: o_tauy = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 530 530 'tauy', 'Meridional wind stress', 'Pa', (/ ('', i=1, 10) /)) 531 532 !AI Ecrad 3Deffect 533 #ifdef CPP_ECRAD 534 TYPE(ctrl_out), SAVE :: o_sols_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 535 'sols_s2', 'Solar rad. at surf.', 'W/m2', (/ ('', i=1, 10) /)) 536 TYPE(ctrl_out), SAVE :: o_sols0_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 537 'sols0_s2', 'Solar rad. at surf.', 'W/m2', (/ ('', i=1, 10) /)) 538 TYPE(ctrl_out), SAVE :: o_soll_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 539 'soll_s2', 'IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /)) 540 TYPE(ctrl_out), SAVE :: o_soll0_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 541 'soll0_s2', 'IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /)) 542 TYPE(ctrl_out), SAVE :: o_tops_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 543 'tops_s2', 'Solar rad. at TOA', 'W/m2', (/ ('', i=1, 10) /)) 544 TYPE(ctrl_out), SAVE :: o_tops0_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 545 'tops0_s2', 'CS Solar rad. at TOA', 'W/m2', (/ ('', i=1, 10) /)) 546 TYPE(ctrl_out), SAVE :: o_topl_s2 = ctrl_out((/ 11, 11, 10, 11, 10, 10, 11, 11, 11, 11/), & 547 'topl_s2', 'IR rad. at TOA', 'W/m2', (/ ('', i=1, 10) /)) 548 TYPE(ctrl_out), SAVE :: o_topl0_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 549 'topl0_s2', 'IR rad. at TOA', 'W/m2', (/ ('', i=1, 10) /)) 550 TYPE(ctrl_out), SAVE :: o_SWupTOA_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 551 'SWupTOA_s2', 'SWup at TOA', 'W/m2', (/ ('', i=1, 10) /)) 552 TYPE(ctrl_out), SAVE :: o_SWupTOAclr_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 553 'SWupTOAclr_s2', 'SWup clear sky at TOA', 'W/m2', (/ ('', i=1, 10) /)) 554 TYPE(ctrl_out), SAVE :: o_SWupTOAcleanclr_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 555 'SWupTOAcleanclr_s2', 'SWup clear sky clean (no aerosol) at TOA', 'W/m2', (/ ('', i=1, 10) /)) 556 TYPE(ctrl_out), SAVE :: o_SWdnTOA_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 557 'SWdnTOA_s2', 'SWdn at TOA', 'W/m2', (/ ('', i=1, 10) /)) 558 TYPE(ctrl_out), SAVE :: o_SWdnTOAclr_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 559 'SWdnTOAclr_s2', 'SWdn clear sky at TOA', 'W/m2', (/ ('', i=1, 10) /)) 560 TYPE(ctrl_out), SAVE :: o_nettop_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 561 'nettop_s2', 'Net dn radiatif flux at TOA', 'W/m2', (/ ('', i=1, 10) /)) 562 TYPE(ctrl_out), SAVE :: o_LWdnSFC_s2 = ctrl_out((/ 11, 11, 10, 10, 11, 10, 11, 11, 11, 11/), & 563 'LWdnSFC_s2', 'Down. IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /)) 564 TYPE(ctrl_out), SAVE :: o_LWdnSFCclr_s2 = ctrl_out((/ 11, 11, 10, 10, 11, 10, 11, 11, 11, 11/), & 565 'LWdnSFCclr_s2', 'Down. CS IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /)) 566 TYPE(ctrl_out), SAVE :: o_SWupSFC_s2 = ctrl_out((/ 11, 11, 10, 10, 11, 10, 11, 11, 11, 11/), & 567 'SWupSFC_s2', 'SWup at surface', 'W/m2', (/ ('', i=1, 10) /)) 568 TYPE(ctrl_out), SAVE :: o_SWupSFCclr_s2 = ctrl_out((/ 11, 11, 10, 10, 11, 10, 11, 11, 11, 11/), & 569 'SWupSFCclr_s2', 'SWup clear sky at surface', 'W/m2', (/ ('', i=1, 10) /)) 570 TYPE(ctrl_out), SAVE :: o_SWupSFCcleanclr_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 571 'SWupSFCcleanclr_s2', 'SWup clear sky clean (no aerosol) at surface', 'W/m2', (/ ('', i=1, 10) /)) 572 TYPE(ctrl_out), SAVE :: o_fdiffSWdnSFC_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 573 'fdiffSWdnSFC_s2', 'Fraction of diffuse SWdn at surface', 'W/m2', (/ ('', i=1, 10) /)) 574 TYPE(ctrl_out), SAVE :: o_SWdnSFC_s2 = ctrl_out((/ 11, 11, 11, 10, 11, 10, 11, 11, 11, 11/), & 575 'SWdnSFC_s2', 'SWdn at surface', 'W/m2', (/ ('', i=1, 10) /)) 576 TYPE(ctrl_out), SAVE :: o_SWdnSFCclr_s2 = ctrl_out((/ 11, 11, 10, 10, 11, 10, 11, 11, 11, 11/), & 577 'SWdnSFCclr_s2', 'SWdn clear sky at surface', 'W/m2', (/ ('', i=1, 10) /)) 578 TYPE(ctrl_out), SAVE :: o_SWdnSFCcleanclr_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 579 'SWdnSFCcleanclr_s2', 'SWdn clear sky clean (no aerosol) at surface', 'W/m2', (/ ('', i=1, 10) /)) 580 TYPE(ctrl_out), SAVE :: o_LWupSFC_s2 = ctrl_out((/ 11, 11, 10, 10, 11, 10, 11, 11, 11, 11/), & 581 'LWupSFC_s2', 'Upwd. IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /)) 582 TYPE(ctrl_out), SAVE :: o_LWupSFCclr_s2 = ctrl_out((/ 11, 11, 10, 10, 10, 10, 11, 11, 11, 11/), & 583 'LWupSFCclr_s2', 'CS Upwd. IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /)) 584 TYPE(ctrl_out), SAVE :: o_LWupTOAcleanclr_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 585 'LWupTOAcleanclr_s2', 'Upward CS clean (no aerosol) IR rad. at TOA', 'W/m2', (/ ('', i=1, 10) /)) 586 TYPE(ctrl_out), SAVE :: o_LWdnSFCcleanclr_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 587 'LWdnSFCcleanclr_s2', 'Downward CS clean (no aerosol) IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /)) 588 TYPE(ctrl_out), SAVE :: o_rsu_s2 = ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 589 'rsu_s2', 'SW upward radiation', 'W m-2', (/ ('', i=1, 10) /)) 590 TYPE(ctrl_out), SAVE :: o_rsd_s2 = ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 591 'rsd_s2', 'SW downward radiation', 'W m-2', (/ ('', i=1, 10) /)) 592 TYPE(ctrl_out), SAVE :: o_rlu_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 593 'rlu_s2', 'LW upward radiation', 'W m-2', (/ ('', i=1, 10) /)) 594 TYPE(ctrl_out), SAVE :: o_rld_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 595 'rld_s2', 'LW downward radiation', 'W m-2', (/ ('', i=1, 10) /)) 596 TYPE(ctrl_out), SAVE :: o_rsucs_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 597 'rsucs_s2', 'SW CS upward radiation', 'W m-2', (/ ('', i=1, 10) /)) 598 TYPE(ctrl_out), SAVE :: o_rsdcs_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 599 'rsdcs_s2', 'SW CS downward radiation', 'W m-2', (/ ('', i=1, 10) /)) 600 TYPE(ctrl_out), SAVE :: o_rlucs_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 601 'rlucs_s2', 'LW CS upward radiation', 'W m-2', (/ ('', i=1, 10) /)) 602 TYPE(ctrl_out), SAVE :: o_rldcs_s2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 603 'rldcs_s2', 'LW CS downward radiation', 'W m-2', (/ ('', i=1, 10) /)) 604 #endif 531 605 532 606 TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_taux_srf = (/ & -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/phys_output_write_mod.F90
r4482 r4647 236 236 #endif 237 237 238 #ifdef CPP_ECRAD 239 USE phys_output_ctrlout_mod, ONLY: & 240 o_soll0_s2,o_soll_s2,o_sols0_s2,o_sols_s2, & 241 o_topl0_s2,o_topl_s2,o_tops0_s2,o_tops_s2 242 #endif 243 238 244 USE ice_sursat_mod, ONLY: flight_m, flight_h2o 239 245 … … 272 278 #endif 273 279 dt_ns, delta_sst, dter, dser 280 281 ! AI 08 2023 pour ECRAD 3Deffect 282 #ifdef CPP_ECRAD 283 USE phys_state_var_mod, ONLY: & 284 sollw0_s2,sollw_s2,solsw0_s2,solsw_s2, & 285 toplw0_s2,toplw_s2,topsw0_s2,topsw_s2 286 #endif 274 287 275 288 USE phys_local_var_mod, ONLY: zxfluxlat, slp, ptstar, pt0, zxtsol, zt2m, & … … 1068 1081 ENDIF 1069 1082 1083 !AI 08 2023 Ecrad 3Deffect 1084 #ifdef CPP_ECRAD 1085 if (ok_3Deffect) then 1086 IF (vars_defined) THEN 1087 zx_tmp_fi2d = solsw_s2*swradcorr 1088 ENDIF 1089 CALL histwrite_phy(o_sols_s2, zx_tmp_fi2d) 1090 IF (vars_defined) THEN 1091 zx_tmp_fi2d = solsw0_s2*swradcorr 1092 ENDIF 1093 CALL histwrite_phy(o_sols0_s2, zx_tmp_fi2d) 1094 CALL histwrite_phy(o_soll_s2, sollw_s2) 1095 CALL histwrite_phy(o_soll0_s2, sollw0_s2) 1096 IF (vars_defined) THEN 1097 zx_tmp_fi2d = topsw_s2*swradcorr 1098 ENDIF 1099 CALL histwrite_phy(o_tops_s2, zx_tmp_fi2d) 1100 1101 IF (vars_defined) THEN 1102 zx_tmp_fi2d = topsw0_s2*swradcorr 1103 ENDIF 1104 CALL histwrite_phy(o_tops0_s2, zx_tmp_fi2d) 1105 1106 CALL histwrite_phy(o_topl_s2, toplw_s2) 1107 CALL histwrite_phy(o_topl0_s2, toplw0_s2) 1108 endif 1109 #endif 1110 1070 1111 CALL histwrite_phy(o_bils, bils) 1071 1112 CALL histwrite_phy(o_bils_diss, bils_diss) -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/phys_state_var_mod.F90
r4482 r4647 397 397 !$OMP THREADPRIVATE(swdnc0p, swdn0p, swdnp, swupc0p, swup0p, swupp) 398 398 399 !AI ajout variables double appel Ecrad (3Deffect) 400 REAL,ALLOCATABLE,SAVE :: heat_s2(:,:), cool_s2(:,:) 401 !$OMP THREADPRIVATE(heat_s2, cool_s2) 402 REAL,ALLOCATABLE,SAVE :: heat0_s2(:,:), cool0_s2(:,:) 403 !$OMP THREADPRIVATE(heat0_s2, cool0_s2) 404 REAL,ALLOCATABLE,SAVE :: radsol_s2(:), topsw_s2(:), toplw_s2(:) 405 !$OMP THREADPRIVATE(radsol_s2, topsw_s2, toplw_s2) 406 REAL,ALLOCATABLE,SAVE :: albpla_s2(:) 407 !$OMP THREADPRIVATE(albpla_s2) 408 REAL,ALLOCATABLE,SAVE :: solsw_s2(:), solswfdiff_s2(:), sollw_s2(:) 409 !$OMP THREADPRIVATE(solsw_s2, solswfdiff_s2, sollw_s2) 410 REAL,ALLOCATABLE,SAVE :: sollwdown_s2(:) 411 !$OMP THREADPRIVATE(sollwdown_s2) 412 REAL,ALLOCATABLE,SAVE :: topsw0_s2(:),toplw0_s2(:) 413 REAL,ALLOCATABLE,SAVE :: solsw0_s2(:),sollw0_s2(:) 414 !$OMP THREADPRIVATE(topsw0_s2,toplw0_s2,solsw0_s2,sollw0_s2) 415 REAL,ALLOCATABLE,SAVE :: lwdnc0_s2(:,:), lwdn0_s2(:,:), lwdn_s2(:,:) 416 REAL,ALLOCATABLE,SAVE :: lwupc0_s2(:,:), lwup0_s2(:,:), lwup_s2(:,:) 417 !$OMP THREADPRIVATE(lwdnc0_s2,lwdn0_s2,lwdn_s2,lwupc0_s2,lwup0_s2,lwup_s2) 418 REAL,ALLOCATABLE,SAVE :: swdnc0_s2(:,:), swdn0_s2(:,:), swdn_s2(:,:) 419 REAL,ALLOCATABLE,SAVE :: swupc0_s2(:,:), swup0_s2(:,:), swup_s2(:,:) 420 !$OMP THREADPRIVATE(swdnc0_s2, swdn0_s2, swdn_s2, swupc0_s2, swup0_s2, swup_s2) 421 399 422 ! pbase : cloud base pressure 400 423 ! bbase : cloud base buoyancy … … 693 716 ALLOCATE(swdnc0p(klon,klevp1), swdn0p(klon,klevp1), swdnp(klon,klevp1)) 694 717 ALLOCATE(swupc0p(klon,klevp1), swup0p(klon,klevp1), swupp(klon,klevp1)) 718 719 !AI Ajout pour Ecrad (3Deffect) 720 ALLOCATE(heat_s2(klon,klev), cool_s2(klon,klev)) 721 ALLOCATE(heat0_s2(klon,klev), cool0_s2(klon,klev)) 722 ALLOCATE(radsol_s2(klon), topsw_s2(klon), toplw_s2(klon)) 723 ALLOCATE(albpla_s2(klon)) 724 ALLOCATE(solsw_s2(klon), solswfdiff_s2(klon), sollw_s2(klon)) 725 ALLOCATE(sollwdown_s2(klon)) 726 ALLOCATE(topsw0_s2(klon),toplw0_s2(klon)) 727 ALLOCATE(solsw0_s2(klon),sollw0_s2(klon)) 728 ALLOCATE(lwdnc0_s2(klon,klevp1), lwdn0_s2(klon,klevp1), lwdn_s2(klon,klevp1)) 729 ALLOCATE(lwupc0_s2(klon,klevp1), lwup0_s2(klon,klevp1), lwup_s2(klon,klevp1)) 730 ALLOCATE(swdnc0_s2(klon,klevp1), swdn0_s2(klon,klevp1), swdn_s2(klon,klevp1)) 731 ALLOCATE(swupc0_s2(klon,klevp1), swup0_s2(klon,klevp1), swup_s2(klon,klevp1)) 695 732 696 733 ALLOCATE(cape(klon)) … … 851 888 DEALLOCATE(topsw0,toplw0,solsw0,sollw0) 852 889 DEALLOCATE(albpla) 890 891 !AI Ajout pour Ecrad (3Deffect) 892 DEALLOCATE(heat_s2, cool_s2) 893 DEALLOCATE(heat0_s2, cool0_s2) 894 DEALLOCATE(radsol_s2, topsw_s2, toplw_s2) 895 DEALLOCATE(albpla_s2) 896 DEALLOCATE(solsw_s2, solswfdiff_s2, sollw_s2) 897 DEALLOCATE(sollwdown_s2) 898 DEALLOCATE(topsw0_s2,toplw0_s2) 899 DEALLOCATE(solsw0_s2,sollw0_s2) 900 DEALLOCATE(lwdnc0_s2, lwdn0_s2, lwdn_s2) 901 DEALLOCATE(lwupc0_s2, lwup0_s2, lwup_s2) 902 DEALLOCATE(swdnc0_s2, swdn0_s2, swdn_s2) 903 DEALLOCATE(swupc0_s2, swup0_s2, swup_s2) 904 853 905 !IM ajout variables CFMIP2/CMIP5 854 906 DEALLOCATE(heatp, coolp) -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/physiq_mod.F90
r4482 r4647 209 209 toplwai_aerop, sollwai_aerop, & 210 210 toplwad0_aerop, sollwad0_aerop, & 211 ! 211 ! 212 !pour Ecrad 213 topswad_aero_s2, solswad_aero_s2, & 214 topswai_aero_s2, solswai_aero_s2, & 215 topswad0_aero_s2, solswad0_aero_s2, & 216 topsw_aero_s2, topsw0_aero_s2, & 217 solsw_aero_s2, solsw0_aero_s2, & 218 topswcf_aero_s2, solswcf_aero_s2, & 219 !LW diagnostics 220 toplwad_aero_s2, sollwad_aero_s2, & 221 toplwai_aero_s2, sollwai_aero_s2, & 222 toplwad0_aero_s2, sollwad0_aero_s2, & 223 ! 212 224 ptstar, pt0, slp, & 213 225 ! … … 1435 1447 WRITE(lunout,*) 'Call to infocfields from physiq' 1436 1448 CALL infocfields_init 1449 1450 !AI 08 2023 1451 #ifdef CPP_ECRAD 1452 ok_3Deffect=.false. 1453 CALL getin_p('ok_3Deffect',ok_3Deffect) 1454 namelist_ecrad_file='namelist_ecrad' 1455 #endif 1437 1456 1438 1457 ENDIF … … 4450 4469 ZSWFT0_i, ZFSDN0, ZFSUP0) 4451 4470 ENDIF !ok_4xCO2atm 4471 4472 ! A.I aout 2023 4473 ! Effet 3D des nuages Ecrad 4474 #ifdef CPP_ECRAD 4475 IF (ok_3Deffect) then 4476 namelist_ecrad_file='namelist_ecrad_s2' 4477 CALL radlwsw & 4478 (dist, rmu0, fract, & 4479 paprs, pplay,zxtsol,SFRWL,albsol_dir, albsol_dif, & 4480 t_seri,q_seri,wo, & 4481 cldfrarad, cldemirad, cldtaurad, & 4482 ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, flag_volc_surfstrat, & 4483 flag_aerosol, flag_aerosol_strat, flag_aer_feedback, & 4484 tau_aero, piz_aero, cg_aero, & 4485 tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & 4486 tau_aero_lw_rrtm, & 4487 cldtaupi, & 4488 zqsat, flwc, fiwc, & 4489 ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, & 4490 heat_s2,heat0_s2,cool_s2,cool0_s2,albpla_s2, & 4491 heat_volc,cool_volc, & 4492 topsw_s2,toplw_s2,solsw_s2,solswfdiff_s2,sollw_s2, & 4493 sollwdown_s2, & 4494 topsw0_s2,toplw0_s2,solsw0_s2,sollw0_s2, & 4495 lwdnc0_s2, lwdn0_s2, lwdn_s2, lwupc0_s2, lwup0_s2, lwup_s2, & 4496 swdnc0_s2, swdn0_s2, swdn_s2, swupc0_s2, swup0_s2, swup_s2, & 4497 topswad_aero_s2, solswad_aero_s2, & 4498 topswai_aero_s2, solswai_aero_s2, & 4499 topswad0_aero_s2, solswad0_aero_s2, & 4500 topsw_aero_s2, topsw0_aero_s2, & 4501 solsw_aero_s2, solsw0_aero_s2, & 4502 topswcf_aero_s2, solswcf_aero_s2, & 4503 !-C. Kleinschmitt for LW diagnostics 4504 toplwad_aero_s2, sollwad_aero_s2,& 4505 toplwai_aero_s2, sollwai_aero_s2, & 4506 toplwad0_aero_s2, sollwad0_aero_s2,& 4507 !-end 4508 ZLWFT0_i, ZFLDN0, ZFLUP0, & 4509 ZSWFT0_i, ZFSDN0, ZFSUP0) 4510 namelist_ecrad_file='namelist_ecrad' 4511 ENDIF ! ok_3Deffect 4512 #endif 4513 4452 4514 ENDIF ! aerosol_couple 4453 4515 itaprad = 0 -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/radlwsw_m.F90
r4482 r4647 1348 1348 CALL RADIATION_SCHEME & 1349 1349 & (ist, iend, klon, klev, naero_grp, NSW, & 1350 & namelist_ecrad_file, ok_3Deffect, & 1350 1351 & day_cur, current_time, & 1351 1352 ! Cste solaire/(d_Terre-Soleil)**2
Note: See TracChangeset
for help on using the changeset viewer.