- Timestamp:
- Mar 19, 2024, 3:34:21 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/ecrad/radiation/radiation_interface.F90
r4773 r4853 68 68 69 69 ! Load the look-up tables from files in the specified directory 70 if (config%i_gas_model == IGasModelMonochromatic) then70 if (config%i_gas_model_sw == IGasModelMonochromatic) then 71 71 call setup_gas_optics_mono(config, trim(config%directory_name)) 72 else if (config%i_gas_model == IGasModelIFSRRTMG) then 73 call setup_gas_optics_rrtmg(config, trim(config%directory_name)) 74 else if (config%i_gas_model == IGasModelECCKD) then 75 call setup_gas_optics_ecckd(config) 72 else 73 ! Note that we can run RRTMG and ECCKD for different parts of 74 ! the spectrum: the setup routines only configure the relevant 75 ! part. 76 if (config%i_gas_model_sw == IGasModelIFSRRTMG .or. config%i_gas_model_lw == IGasModelIFSRRTMG) then 77 call setup_gas_optics_rrtmg(config, trim(config%directory_name)) 78 end if 79 if (config%i_gas_model_sw == IGasModelECCKD .or. config%i_gas_model_lw == IGasModelECCKD) then 80 call setup_gas_optics_ecckd(config) 81 end if 76 82 end if 77 83 … … 122 128 123 129 if (config%do_clouds) then 124 if (config%i_gas_model == IGasModelMonochromatic) then130 if (config%i_gas_model_sw == IGasModelMonochromatic) then 125 131 ! call setup_cloud_optics_mono(config) 126 132 elseif (config%use_general_cloud_optics) then … … 132 138 133 139 if (config%use_aerosols) then 134 if (config%i_gas_model == IGasModelMonochromatic) then140 if (config%i_gas_model_sw == IGasModelMonochromatic) then 135 141 ! call setup_aerosol_optics_mono(config) 136 142 else … … 167 173 type(gas_type), intent(inout) :: gas 168 174 169 if (config%i_gas_model == IGasModelMonochromatic) then175 if (config%i_gas_model_sw == IGasModelMonochromatic) then 170 176 call set_gas_units_mono(gas) 171 elseif (config%i_gas_model == IGasModelECCKD) then 177 elseif (config%i_gas_model_sw == IGasModelIFSRRTMG & 178 & .or. config%i_gas_model_lw == IGasModelIFSRRTMG) then 179 ! Convert to mass-mixing ratio for RRTMG; note that ecCKD can 180 ! work with this but performs an internal scaling 181 call set_gas_units_ifs(gas) 182 else 183 ! Use volume mixing ratio preferred by ecCKD 172 184 call set_gas_units_ecckd(gas) 173 else174 call set_gas_units_ifs(gas)175 185 end if 176 186 … … 196 206 use radiation_io, only : nulout 197 207 use radiation_config, only : config_type, & 198 & IGasModelMonochromatic, IGasModelIFSRRTMG, &208 & IGasModelMonochromatic, IGasModelIFSRRTMG, IGasModelECCKD, & 199 209 & ISolverMcICA, ISolverSpartacus, ISolverHomogeneous, & 200 210 & ISolverTripleclouds … … 227 237 use radiation_general_cloud_optics, only : general_cloud_optics 228 238 use radiation_aerosol_optics, only : add_aerosol_optics 229 USE mod_phys_lmdz_para230 231 239 232 240 ! Inputs … … 238 246 type(thermodynamics_type),intent(in) :: thermodynamics 239 247 type(gas_type), intent(in) :: gas 240 type(cloud_type), intent(inout):: cloud248 type(cloud_type), intent(inout):: cloud 241 249 type(aerosol_type), intent(in) :: aerosol 242 250 ! Output … … 297 305 298 306 real(jphook) :: hook_handle 299 integer :: jcol, jlev300 307 301 308 if (lhook) call dr_hook('radiation_interface:radiation',0,hook_handle) 302 303 if (config%i_solver_sw == ISolverSPARTACUS) then304 print*,'Dans radiation, mpi_rank, omp_rank, size, chape inv_cloud = ',&305 mpi_rank, omp_rank, &306 shape(cloud%inv_cloud_effective_size), &307 size(cloud%inv_cloud_effective_size)308 ! do jcol=istartcol, iendcol309 ! do jlev=1,nlev310 ! print*,'Entree radiation_interf, mpi_rank, omp_rank, jcol, jlev &311 ! & cloud%inv_cloud_effective_size =',mpi_rank, omp_rank, jcol, jlev, &312 ! & cloud%inv_cloud_effective_size(jcol,jlev)313 ! enddo314 ! enddo315 endif316 ! cloud%inv_cloud_effective_size=0.05_jprb317 309 318 310 if (thermodynamics%pressure_hl(istartcol,2) & … … 339 331 ! incoming shortwave flux at each g-point, for the specified 340 332 ! range of atmospheric columns 341 if (config%i_gas_model == IGasModelMonochromatic) then333 if (config%i_gas_model_sw == IGasModelMonochromatic) then 342 334 call gas_optics_mono(ncol,nlev,istartcol,iendcol, config, & 343 335 & single_level, thermodynamics, gas, lw_albedo, & 344 336 & od_lw, od_sw, ssa_sw, & 345 337 & planck_hl, lw_emission, incoming_sw) 346 else if (config%i_gas_model == IGasModelIFSRRTMG) then347 call gas_optics_rrtmg(ncol,nlev,istartcol,iendcol, config, &348 & single_level, thermodynamics, gas, &349 & od_lw, od_sw, ssa_sw, lw_albedo=lw_albedo, &350 & planck_hl=planck_hl, lw_emission=lw_emission, &351 & incoming_sw=incoming_sw)352 338 else 353 call gas_optics_ecckd(ncol,nlev,istartcol,iendcol, config, & 354 & single_level, thermodynamics, gas, & 355 & od_lw, od_sw, ssa_sw, lw_albedo=lw_albedo, & 356 & planck_hl=planck_hl, lw_emission=lw_emission, & 357 & incoming_sw=incoming_sw) 339 if (config%i_gas_model_sw == IGasModelIFSRRTMG & 340 & .or. config%i_gas_model_lw == IGasModelIFSRRTMG) then 341 call gas_optics_rrtmg(ncol,nlev,istartcol,iendcol, config, & 342 & single_level, thermodynamics, gas, & 343 & od_lw, od_sw, ssa_sw, lw_albedo=lw_albedo, & 344 & planck_hl=planck_hl, lw_emission=lw_emission, & 345 & incoming_sw=incoming_sw) 346 end if 347 if (config%i_gas_model_sw == IGasModelECCKD & 348 & .or. config%i_gas_model_lw == IGasModelECCKD) then 349 call gas_optics_ecckd(ncol,nlev,istartcol,iendcol, config, & 350 & single_level, thermodynamics, gas, & 351 & od_lw, od_sw, ssa_sw, lw_albedo=lw_albedo, & 352 & planck_hl=planck_hl, lw_emission=lw_emission, & 353 & incoming_sw=incoming_sw) 354 end if 358 355 end if 359 356 … … 368 365 ! Compute hydrometeor absorption/scattering properties in each 369 366 ! shortwave and longwave band 370 if (config%i_gas_model == IGasModelMonochromatic) then367 if (config%i_gas_model_sw == IGasModelMonochromatic) then 371 368 call cloud_optics_mono(nlev, istartcol, iendcol, & 372 369 & config, thermodynamics, cloud, & … … 387 384 388 385 if (config%use_aerosols) then 389 if (config%i_gas_model == IGasModelMonochromatic) then386 if (config%i_gas_model_sw == IGasModelMonochromatic) then 390 387 ! call add_aerosol_optics_mono(nlev,istartcol,iendcol, & 391 388 ! & config, thermodynamics, gas, aerosol, & … … 474 471 else if (config%i_solver_sw == ISolverSPARTACUS) then 475 472 ! Compute fluxes using the SPARTACUS shortwave solver 476 ! cloud%inv_cloud_effective_size=0.05_jprb477 ! do jcol=istartcol, iendcol478 ! do jlev=1,nlev479 ! print*,'jcol, jlev, dans radiation_interf i &480 ! & cloud%inv_cloud_effective_size =',jcol, jlev, &481 ! cloud%inv_cloud_effective_size(jcol,jlev)482 ! enddo483 ! enddo484 473 call solver_spartacus_sw(nlev,istartcol,iendcol, & 485 474 & config, single_level, thermodynamics, cloud, &
Note: See TracChangeset
for help on using the changeset viewer.