Changeset 4677 for LMDZ6/trunk/libf/phylmd/ecrad/radiation_scheme.F90
- Timestamp:
- Sep 7, 2023, 1:07:27 PM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/ecrad/radiation_scheme.F90
r4570 r4677 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, & … … 80 82 USE PARKIND1 , ONLY : JPIM, JPRB 81 83 USE YOMHOOK , ONLY : LHOOK, DR_HOOK 82 ! AI ATTENTION module propre a ifs commentes 83 !USE YOERAD , ONLY : YRERAD 84 USE RADIATION_SETUP, ONLY : SETUP_RADIATION_SCHEME, rad_config, & 85 !USE RADIATION_SETUP, ONLY : & 86 & NWEIGHT_UV, IBAND_UV, WEIGHT_UV, & 87 & NWEIGHT_PAR, IBAND_PAR, WEIGHT_PAR, & 88 & ITYPE_TROP_BG_AER, TROP_BG_AER_MASS_EXT, & 89 & ITYPE_STRAT_BG_AER, STRAT_BG_AER_MASS_EXT, ISolverSpartacus 90 ! Commentes : jour, date de la simulation 91 !USE YOMRIP0 , ONLY : NINDAT 92 !USE YOMCT3 , ONLY : NSTEP 93 !USE YOMRIP , ONLY : YRRIP 84 USE RADIATION_SETUP 94 85 USE YOMCST , ONLY : RSIGMA ! Stefan-Boltzmann constant 86 USE RADIATION_SETUP, ONLY : SETUP_RADIATION_SCHEME, & 87 & config_type, driver_config_type, & 88 & NWEIGHT_UV, IBAND_UV, WEIGHT_UV, & 89 & NWEIGHT_PAR, IBAND_PAR, WEIGHT_PAR, & 90 & ITYPE_TROP_BG_AER, TROP_BG_AER_MASS_EXT, & 91 & ITYPE_STRAT_BG_AER, STRAT_BG_AER_MASS_EXT, & 92 & ISolverSpartacus 95 93 96 94 ! Modules from radiation library … … 105 103 106 104 USE mod_phys_lmdz_para 107 USE setup_config_from_lmdz, ONLY : driver_config_type108 105 109 106 IMPLICIT NONE … … 142 139 !REAL(KIND=JPRB), INTENT(IN) :: PLAND_SEA_MASK(KLON) 143 140 144 ! *** Variables on full levels145 !REAL(KIND=JPRB), INTENT(IN) :: PPRESSURE(KLON,KLEV) ! (Pa)146 !REAL(KIND=JPRB), INTENT(IN) :: PTEMPERATURE(KLON,KLEV) ! (K)147 141 ! *** Variables on half levels 148 142 REAL(KIND=JPRB), INTENT(IN) :: PPRESSURE_H(KLON,KLEV+1) ! (Pa) … … 201 195 REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_LW_UP_CLEAR(KLON,KLEV+1) 202 196 203 ! *** Surface flux components (W m-2)204 ! AI ATTENTION205 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_SW_DN_SURF(KLON)206 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_LW_DN_SURF(KLON)207 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_SW_DN_CLEAR_SURF(KLON)208 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_LW_DN_CLEAR_SURF(KLON)209 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_SW_UP_SURF(KLON)210 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_LW_UP_SURF(KLON)211 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_SW_UP_CLEAR_SURF(KLON)212 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_LW_UP_CLEAR_SURF(KLON)213 214 197 ! Direct component of surface flux into horizontal plane 215 198 REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_DIR(KLON) … … 222 205 REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_PAR(KLON) 223 206 REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_PAR_CLEAR(KLON) 224 225 ! *** Other single-level diagnostics226 ! Top-of-atmosphere incident solar flux (W m-2)227 ! AI ATTENTION228 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_SW_DN_TOA(KLON)229 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_SW_UP_TOA(KLON)230 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_LW_DN_TOA(KLON)231 !REAL(KIND=JPRB), INTENT(OUT) :: PFLUX_LW_UP_TOA(KLON)232 207 233 208 ! Diagnosed longwave surface emissivity across the whole spectrum … … 250 225 ! LOCAL VARIABLES 251 226 ! AI ATTENTION 252 !type(config_type) :: rad_config 227 type(config_type),save :: rad_config 228 !!$OMP THREADPRIVATE(rad_config) 229 type(driver_config_type),save :: driver_config 230 !!$OMP THREADPRIVATE(driver_config) 231 !type(config_type) :: rad_config 232 !type(driver_config_type) :: driver_config 253 233 TYPE(single_level_type) :: single_level 254 234 TYPE(thermodynamics_type) :: thermodynamics … … 272 252 !REAL(KIND=JPRB) :: ZDECORR_LEN_RATIO = 0.5_jprb 273 253 274 !AI mai 2023275 ! A mettre dans namelist276 !real(jprb) :: high_inv_effective_size277 !real(jprb) :: middle_inv_effective_size278 !real(jprb) :: low_inv_effective_size279 280 !real(jprb) :: cloud_inhom_separation_factor281 !real(jprb) :: cloud_separation_scale_surface282 !real(jprb) :: cloud_separation_scale_toa283 !real(jprb) :: cloud_separation_scale_power284 285 254 ! The surface net longwave flux if the surface was a black body, used 286 255 ! to compute the effective broadband surface emissivity … … 301 270 INTEGER, PARAMETER :: NAERMACC = 1 302 271 303 ! AI ATTENTION304 ! A mettre dans namelist305 !real(jprb), parameter :: frac_std = 0.75306 307 272 ! Name of file names specified on command line 308 character(len=512) :: file_name273 character(len=512) :: namelist_file 309 274 310 275 logical :: loutput=.true. 311 276 logical :: lprint_input=.false. 312 logical :: lprint_config=. false.277 logical :: lprint_config=.true. 313 278 logical, save :: debut_ecrad=.true. 314 279 !$OMP THREADPRIVATE(debut_ecrad) 315 316 type(driver_config_type) :: driver_config 317 ! Import time functions for iseed calculation 318 ! AI ATTENTION propre a ifs 319 !#include "fcttim.func.h" 320 !#include "liquid_effective_radius.intfb.h" 321 !#include "ice_effective_radius.intfb.h" 322 !#include "cloud_overlap_decorr_len.intfb.h" 323 !#include "satur.intfb.h" 324 325 ! Verifier les inputs 326 print*,'=============== dans radiation_scheme : ===================' 327 if (lprint_input) then 328 print*,'********** Verification des entrees *************' 329 print*,'KIDIA, KFDIA, KLON, KLEV, KAEROSOL, NSW =', & 330 KIDIA, KFDIA, KLON, KLEV, KAEROSOL, NSW 331 print*,'IDAY, TIME =', IDAY, TIME 332 print*,'PSOLAR_IRRADIANCE =', PSOLAR_IRRADIANCE 333 print*,'PMU0 =', PMU0 334 print*,'PTEMPERATURE_SKIN =',PTEMPERATURE_SKIN 335 print*,'PEMIS, PEMIS_WINDOW =', PEMIS, PEMIS_WINDOW 336 print*,'PGELAM, PGEMU =', PGELAM, PGEMU 337 print*,'PPRESSURE_H =', PPRESSURE_H 338 print*,'PTEMPERATURE_H =', PTEMPERATURE_H 339 print*,'PQ =', PQ 340 print*,'PQSAT=',PQSAT 341 print*,'PCO2, PCH4, PN2O, PNO2, PCFC11, PCFC12, PHCFC22, PCCL4 =', & 342 PCO2, PCH4, PN2O, PNO2, PCFC11, PCFC12, PHCFC22, PCCL4 343 print*,'PO3 =',PO3 344 print*,'PCLOUD_FRAC, PQ_LIQUID, PQ_ICE, PQ_SNOW =', & 345 PCLOUD_FRAC, PQ_LIQUID, PQ_ICE, PQ_SNOW 346 print*,'ZRE_LIQUID_UM, ZRE_ICE_UM =', & 347 ZRE_LIQUID_UM, ZRE_ICE_UM 348 print*,'PAEROSOL_OLD, PAEROSOL =', PAEROSOL_OLD, PAEROSOL 280 integer, save :: itap_ecrad=1 281 logical :: ok_3Deffect 282 283 IF (LHOOK) CALL DR_HOOK('RADIATION_SCHEME',0,ZHOOK_HANDLE) 284 285 ! A.I juillet 2023 : 286 ! Initialisation dans radiation_setup au 1er passage dans Ecrad 287 !$OMP MASTER 288 if (.not.ok_3Deffect) then 289 if (debut_ecrad) then 290 call SETUP_RADIATION_SCHEME(loutput,namelist_file,rad_config,driver_config) 291 debut_ecrad=.false. 292 endif 293 else 294 call SETUP_RADIATION_SCHEME(loutput,namelist_file,rad_config,driver_config) 349 295 endif 350 351 IF (LHOOK) CALL DR_HOOK('RADIATION_SCHEME',0,ZHOOK_HANDLE)352 print*,'Entree dans radiation_scheme'353 354 !$OMP MASTER355 if (debut_ecrad) then356 ! AI appel radiation_setup357 call SETUP_RADIATION_SCHEME(loutput)358 ! Read "radiation_driver" namelist into radiation driver config type359 file_name="namelist_ecrad"360 call driver_config%read(file_name)361 362 if (rad_config%i_solver_sw == ISolverSPARTACUS &363 & .or. rad_config%i_solver_lw == ISolverSPARTACUS) then364 print*,'Solveur SW: ', rad_config%i_solver_sw365 print*,'Solveur LW: ', rad_config%i_solver_lw366 if (driver_config%ok_effective_size) then367 print*,'low_inv_effective_size = ',driver_config%low_inv_effective_size368 print*,'middle_inv_effective_size = ',driver_config%middle_inv_effective_size369 print*,'high_inv_effective_size = ',driver_config%high_inv_effective_size370 else if (driver_config%ok_separation) then371 print*,'cloud_separation_scale_surface =',driver_config%cloud_separation_scale_surface372 print*,'cloud_separation_scale_toa =',driver_config%cloud_separation_scale_toa373 print*,'cloud_separation_scale_power =',driver_config%cloud_separation_scale_power374 print*,'cloud_inhom_separation_factor =',driver_config%cloud_inhom_separation_factor375 endif376 endif377 378 if (lprint_config) then379 print*,'************* Parametres de configuration ********************'380 print*,'rad_config%iverbosesetup = ',rad_config%iverbosesetup381 print*,'rad_config%iverbose = ',rad_config%iverbose382 print*,'rad_config%directory_name =', rad_config%directory_name383 print*,'rad_config%do_lw_derivatives =',rad_config%do_lw_derivatives384 print*,'rad_config%do_surface_sw_spectral_flux =', &385 rad_config%do_surface_sw_spectral_flux386 print*,'rad_config%do_setup_ifsrrtm =', rad_config%do_setup_ifsrrtm387 print*,'rad_config%i_liq_model =',rad_config%i_liq_model388 print*,'rad_config%i_ice_model =',rad_config%i_ice_model389 print*,'rad_config%i_overlap_scheme =', rad_config%i_overlap_scheme390 print*,'rad_config%use_aerosols = ', rad_config%use_aerosols391 print*,'rad_config%n_aerosol_types = ', rad_config%n_aerosol_types392 print*,'rad_config%i_solver_lw =',rad_config%i_solver_lw393 print*,'rad_config%i_solver_sw =',rad_config%i_solver_sw394 print*,'rad_config%do_3d_effects =', rad_config%do_3d_effects395 print*,'rad_config%do_sw_delta_scaling_with_gases =', &396 rad_config%do_sw_delta_scaling_with_gases397 print*,'rad_config%do_lw_aerosol_scattering =', &398 rad_config%do_lw_aerosol_scattering399 print*,'rad_config%i_albedo_from_band_sw = ', &400 rad_config%i_albedo_from_band_sw401 print*,'n_bands_lw =', rad_config%n_bands_lw402 print*,'rad_config%i_emiss_from_band_lw =', rad_config%i_emiss_from_band_lw403 endif404 debut_ecrad=.false.405 endif406 296 !$OMP END MASTER 407 297 !$OMP BARRIER 408 298 ! Fin partie initialisation et configuration 409 299 410 ! AI : allocation des tableaux pour chaque partie (thermo, ...) 411 ! passage des champs LMDZ aux structures Ecrad 412 ! calculs Ecrad 300 !AI juillet 2023 : verif des param de config : 301 if (lprint_config) then 302 ! IF (is_master) THEN 303 print*,'Parametres de configuration de ecrad, etape ',itap_ecrad 304 print*,'Entree dans radiation_scheme' 305 print*,'ok_3Deffect = ',ok_3Deffect 306 print*,'Fichier namelist = ',namelist_file 307 308 print*,'do_sw, do_lw, do_sw_direct, do_3d_effects = ', & 309 rad_config%do_sw, rad_config%do_lw, rad_config%do_sw_direct, rad_config%do_3d_effects 310 print*,'do_lw_side_emissivity, do_clear, do_save_radiative_properties = ', & 311 rad_config%do_lw_side_emissivity, rad_config%do_clear, rad_config%do_save_radiative_properties 312 ! print*,'sw_entrapment_name, sw_encroachment_name = ', & 313 ! rad_config%sw_entrapment_name, rad_config%sw_encroachment_name 314 print*,'do_3d_lw_multilayer_effects, do_fu_lw_ice_optics_bug = ', & 315 rad_config%do_3d_lw_multilayer_effects, rad_config%do_fu_lw_ice_optics_bug 316 print*,'do_save_spectral_flux, do_save_gpoint_flux = ', & 317 rad_config%do_save_spectral_flux, rad_config%do_save_gpoint_flux 318 print*,'do_surface_sw_spectral_flux, do_lw_derivatives = ', & 319 rad_config%do_surface_sw_spectral_flux, rad_config%do_lw_derivatives 320 print*,'do_lw_aerosol_scattering, do_lw_cloud_scattering = ', & 321 rad_config%do_lw_aerosol_scattering, rad_config%do_lw_cloud_scattering 322 print*, 'nregions, i_gas_model = ', & 323 rad_config%nregions, rad_config%i_gas_model 324 ! print*, 'ice_optics_override_file_name, liq_optics_override_file_name = ', & 325 ! rad_config%ice_optics_override_file_name, rad_config%liq_optics_override_file_name 326 ! print*, 'aerosol_optics_override_file_name, cloud_pdf_override_file_name = ', & 327 ! rad_config%aerosol_optics_override_file_name, rad_config%cloud_pdf_override_file_name 328 ! print*, 'gas_optics_sw_override_file_name, gas_optics_lw_override_file_name = ', & 329 ! rad_config%gas_optics_sw_override_file_name, rad_config%gas_optics_lw_override_file_name 330 print*, 'i_liq_model, i_ice_model, max_3d_transfer_rate = ', & 331 rad_config%i_liq_model, rad_config%i_ice_model, rad_config%max_3d_transfer_rate 332 print*, 'min_cloud_effective_size, overhang_factor = ', & 333 rad_config%min_cloud_effective_size, rad_config%overhang_factor 334 print*, 'use_canopy_full_spectrum_sw, use_canopy_full_spectrum_lw = ', & 335 rad_config%use_canopy_full_spectrum_sw, rad_config%use_canopy_full_spectrum_lw 336 print*, 'do_canopy_fluxes_sw, do_canopy_fluxes_lw = ', & 337 rad_config%do_canopy_fluxes_sw, rad_config%do_canopy_fluxes_lw 338 print*, 'do_canopy_gases_sw, do_canopy_gases_lw = ', & 339 rad_config%do_canopy_gases_sw, rad_config%do_canopy_gases_lw 340 print*, 'use_general_cloud_optics, use_general_aerosol_optics = ', & 341 rad_config%use_general_cloud_optics, rad_config%use_general_aerosol_optics 342 print*, 'do_sw_delta_scaling_with_gases, i_overlap_scheme = ', & 343 rad_config%do_sw_delta_scaling_with_gases, rad_config%i_overlap_scheme 344 print*, 'i_solver_sw, i_solver_sw, use_beta_overlap, use_vectorizable_generator = ', & 345 rad_config%i_solver_sw, rad_config%i_solver_lw, & 346 rad_config%use_beta_overlap, rad_config%use_vectorizable_generator 347 print*, 'use_expm_everywhere, iverbose, iverbosesetup = ', & 348 rad_config%use_expm_everywhere, rad_config%iverbose, rad_config%iverbosesetup 349 print*, 'cloud_inhom_decorr_scaling, cloud_fraction_threshold = ', & 350 rad_config%cloud_inhom_decorr_scaling, rad_config%cloud_fraction_threshold 351 print*, 'clear_to_thick_fraction, max_gas_od_3d, max_cloud_od = ', & 352 rad_config%clear_to_thick_fraction, rad_config%max_gas_od_3d, rad_config%max_cloud_od 353 print*, 'cloud_mixing_ratio_threshold, overhead_sun_factor =', & 354 rad_config%cloud_mixing_ratio_threshold, rad_config%overhead_sun_factor 355 print*, 'n_aerosol_types, i_aerosol_type_map, use_aerosols = ', & 356 rad_config%n_aerosol_types, rad_config%i_aerosol_type_map, rad_config%use_aerosols 357 print*, 'mono_lw_wavelength, mono_lw_total_od, mono_sw_total_od = ', & 358 rad_config%mono_lw_wavelength, rad_config%mono_lw_total_od,rad_config% mono_sw_total_od 359 print*, 'mono_lw_single_scattering_albedo, mono_sw_single_scattering_albedo = ', & 360 rad_config%mono_lw_single_scattering_albedo, rad_config%mono_sw_single_scattering_albedo 361 print*, 'mono_lw_asymmetry_factor, mono_sw_asymmetry_factor = ', & 362 rad_config%mono_lw_asymmetry_factor, rad_config%mono_sw_asymmetry_factor 363 print*, 'i_cloud_pdf_shape = ', & 364 rad_config%i_cloud_pdf_shape 365 ! cloud_type_name, use_thick_cloud_spectral_averaging = ', & 366 ! rad_config%i_cloud_pdf_shape, rad_config%cloud_type_name, & 367 ! rad_config%use_thick_cloud_spectral_averaging 368 print*, 'do_nearest_spectral_sw_albedo, do_nearest_spectral_lw_emiss = ', & 369 rad_config%do_nearest_spectral_sw_albedo, rad_config%do_nearest_spectral_lw_emiss 370 print*, 'sw_albedo_wavelength_bound, lw_emiss_wavelength_bound = ', & 371 rad_config%sw_albedo_wavelength_bound, rad_config%lw_emiss_wavelength_bound 372 print*, 'i_sw_albedo_index, i_lw_emiss_index = ', & 373 rad_config%i_sw_albedo_index, rad_config%i_lw_emiss_index 374 print*, 'do_cloud_aerosol_per_lw_g_point = ', & 375 rad_config%do_cloud_aerosol_per_lw_g_point 376 print*, 'do_cloud_aerosol_per_sw_g_point, do_weighted_surface_mapping = ', & 377 rad_config%do_cloud_aerosol_per_sw_g_point, rad_config%do_weighted_surface_mapping 378 print*, 'n_bands_sw, n_bands_lw, n_g_sw, n_g_lw = ', & 379 rad_config%n_bands_sw, rad_config%n_bands_lw, rad_config%n_g_sw, rad_config%n_g_lw 380 381 itap_ecrad=itap_ecrad+1 382 ! ENDIF 383 endif 384 413 385 ! AI ATTENTION 414 386 ! Allocate memory in radiation objects
Note: See TracChangeset
for help on using the changeset viewer.