- 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_config.F90
r4773 r4853 34 34 ! 35 35 36 #include "ecrad_config.h" 37 36 38 module radiation_config 37 39 … … 202 204 ! more random numbers being generated? This is the default on NEC 203 205 ! SX. 204 #ifdef __SX__206 #ifdef DWD_VECTOR_OPTIMIZATIONS 205 207 logical :: use_vectorizable_generator = .true. 206 208 #else … … 276 278 277 279 ! Codes describing the gas model 278 integer :: i_gas_model = IGasModelIFSRRTMG 280 integer :: i_gas_model_sw = IGasModelIFSRRTMG 281 integer :: i_gas_model_lw = IGasModelIFSRRTMG 279 282 280 283 ! Optics if i_gas_model==IGasModelMonochromatic. … … 702 705 character(511) :: ssi_override_file_name 703 706 character(63) :: liquid_model_name, ice_model_name, gas_model_name 707 character(63) :: sw_gas_model_name, lw_gas_model_name 704 708 character(63) :: sw_solver_name, lw_solver_name, overlap_scheme_name 705 709 character(63) :: sw_entrapment_name, sw_encroachment_name, cloud_pdf_shape_name … … 709 713 & .false.,.false.,.false.,.false.,.false.,.false.] 710 714 integer :: i_aerosol_type_map(NMaxAerosolTypes) ! More than 256 is an error 711 715 712 716 logical :: do_nearest_spectral_sw_albedo 713 717 logical :: do_nearest_spectral_lw_emiss … … 716 720 integer :: i_sw_albedo_index(NMaxAlbedoIntervals) 717 721 integer :: i_lw_emiss_index (NMaxAlbedoIntervals) 722 integer :: i_gas_model 718 723 719 724 integer :: iunit ! Unit number of namelist file … … 726 731 & do_surface_sw_spectral_flux, do_lw_derivatives, do_toa_spectral_flux, & 727 732 & do_lw_aerosol_scattering, do_lw_cloud_scattering, & 728 & n_regions, directory_name, gas_model_name, &733 & n_regions, directory_name, gas_model_name, sw_gas_model_name, lw_gas_model_name, & 729 734 & ice_optics_override_file_name, liq_optics_override_file_name, & 730 735 & aerosol_optics_override_file_name, cloud_pdf_override_file_name, & … … 815 820 encroachment_scaling = -1.0_jprb 816 821 gas_model_name = '' !DefaultGasModelName 822 sw_gas_model_name = '' !DefaultGasModelName 823 lw_gas_model_name = '' !DefaultGasModelName 817 824 liquid_model_name = '' !DefaultLiquidModelName 818 825 ice_model_name = '' !DefaultIceModelName … … 1014 1021 & 'ice_model_name', this%i_ice_model) 1015 1022 1016 ! Determine gas optics model 1023 ! Determine gas optics model(s) - firstly try the generic gas_model_name 1024 i_gas_model = -1 1017 1025 call get_enum_code(gas_model_name, GasModelName, & 1018 & 'gas_model_name', this%i_gas_model) 1019 1026 & 'gas_model_name', i_gas_model) 1027 if (i_gas_model > -1) then 1028 this%i_gas_model_sw = i_gas_model 1029 this%i_gas_model_lw = i_gas_model 1030 end if 1031 ! ...then the band-specific values 1032 call get_enum_code(sw_gas_model_name, GasModelName, & 1033 & 'sw_gas_model_name', this%i_gas_model_sw) 1034 call get_enum_code(lw_gas_model_name, GasModelName, & 1035 & 'lw_gas_model_name', this%i_gas_model_lw) 1036 1020 1037 ! Determine solvers 1021 1038 call get_enum_code(sw_solver_name, SolverName, & … … 1055 1072 end if 1056 1073 1057 if (this%i_gas_model == IGasModelIFSRRTMG & 1058 & .and. (this%use_general_cloud_optics & 1059 & .or. this%use_general_aerosol_optics)) then 1060 if (this%do_sw .and. this%do_cloud_aerosol_per_sw_g_point) then 1074 if (this%use_general_cloud_optics .or. this%use_general_aerosol_optics) then 1075 if (this%do_sw .and. this%do_cloud_aerosol_per_sw_g_point & 1076 & .and. this%i_gas_model_sw == IGasModelIFSRRTMG) then 1061 1077 write(nulout,'(a)') 'Warning: RRTMG SW only supports cloud/aerosol/surface optical properties per band, not per g-point' 1062 1078 this%do_cloud_aerosol_per_sw_g_point = .false. 1063 1079 end if 1064 if (this%do_lw .and. this%do_cloud_aerosol_per_lw_g_point) then 1080 if (this%do_lw .and. this%do_cloud_aerosol_per_lw_g_point & 1081 & .and. this%i_gas_model_lw == IGasModelIFSRRTMG) then 1065 1082 write(nulout,'(a)') 'Warning: RRTMG LW only supports cloud/aerosol/surface optical properties per band, not per g-point' 1066 1083 this%do_cloud_aerosol_per_lw_g_point = .false. … … 1128 1145 1129 1146 ! If ecCKD gas optics model is being used set relevant file names 1130 if (this%i_gas_model == IGasModelECCKD) then1147 if (this%i_gas_model_sw == IGasModelECCKD .or. this%i_gas_model_lw == IGasModelECCKD) then 1131 1148 1132 1149 ! This gas optics model usually used with general cloud and … … 1138 1155 write(nulout,'(a)') 'Warning: ecCKD gas optics model usually used with general aerosol optics' 1139 1156 end if 1157 1158 end if 1159 1160 if (this%i_gas_model_sw == IGasModelECCKD) then 1140 1161 1141 1162 if (len_trim(this%gas_optics_sw_override_file_name) > 0) then … … 1153 1174 end if 1154 1175 1176 end if 1177 1178 if (this%i_gas_model_lw == IGasModelECCKD) then 1179 1155 1180 if (len_trim(this%gas_optics_lw_override_file_name) > 0) then 1156 1181 if (this%gas_optics_lw_override_file_name(1:1) == '/') then … … 1170 1195 1171 1196 if (this%use_spectral_solar_cycle) then 1172 if (this%i_gas_model /= IGasModelECCKD) then1197 if (this%i_gas_model_sw /= IGasModelECCKD) then 1173 1198 write(nulerr,'(a)') '*** Error: solar cycle only available with ecCKD gas optics model' 1174 1199 call radiation_abort('Radiation configuration error') … … 1278 1303 end if 1279 1304 1280 ! In the monochromatic case we need to override the liquid, ice 1281 ! and aerosol models to ensure compatibility 1282 if (this%i_gas_model == IGasModelMonochromatic) then 1305 if (this%i_gas_model_sw == IGasModelMonochromatic .or. this%i_gas_model_lw == IGasModelMonochromatic) then 1306 1307 if (this%i_gas_model_sw /= this%i_gas_model_lw) then 1308 write(nulerr,'(a,i0)') '*** Error: Monochromatic gas optics model must be used in shortwave and longwave' 1309 call radiation_abort('Radiation configuration error') 1310 end if 1311 1312 ! In the monochromatic case we need to override the liquid, ice 1313 ! and aerosol models to ensure compatibility 1283 1314 this%i_liq_model = ILiquidModelMonochromatic 1284 1315 this%i_ice_model = IIceModelMonochromatic 1285 1316 this%use_aerosols = .false. 1317 1286 1318 end if 1287 1319 … … 1392 1424 call print_logical(' Saving spectral flux profiles', & 1393 1425 & 'do_save_spectral_flux', this%do_save_spectral_flux) 1394 call print_enum(' Gas model is', GasModelName, 'i_gas_model', & 1395 & this%i_gas_model) 1426 call print_enum(' Shortwave gas model is', GasModelName, 'i_gas_model_sw', & 1427 & this%i_gas_model_sw) 1428 call print_enum(' Longwave gas model is', GasModelName, 'i_gas_model_lw', & 1429 & this%i_gas_model_lw) 1396 1430 call print_logical(' Aerosols are', 'use_aerosols', this%use_aerosols) 1397 1431 if (this%use_aerosols) then … … 1481 1515 & 'i_solver_sw', this%i_solver_sw) 1482 1516 1483 if (this%i_gas_model == IGasModelMonochromatic) then1517 if (this%i_gas_model_sw == IGasModelMonochromatic) then 1484 1518 call print_real(' Shortwave atmospheric optical depth', & 1485 1519 & 'mono_sw_total_od', this%mono_sw_total_od) … … 1502 1536 & this%i_solver_lw) 1503 1537 1504 if (this%i_gas_model == IGasModelMonochromatic) then1538 if (this%i_gas_model_lw == IGasModelMonochromatic) then 1505 1539 if (this%mono_lw_wavelength > 0.0_jprb) then 1506 1540 call print_real(' Longwave effective wavelength (m)', &
Note: See TracChangeset
for help on using the changeset viewer.