Changeset 4188 for LMDZ6/branches/LMDZ_ECRad/libf/phylmd
- Timestamp:
- Jun 29, 2022, 9:23:14 AM (2 years ago)
- Location:
- LMDZ6/branches/LMDZ_ECRad/libf/phylmd
- Files:
-
- 2 added
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_aerosol_optics.F90
r4182 r4188 89 89 & IAerosolClassUndefined, IAerosolClassIgnored, & 90 90 & IAerosolClassHydrophobic, IAerosolClassHydrophilic 91 USE phys_local_var_mod, ONLY: rhcl 91 92 92 93 integer, intent(in) :: nlev ! number of model levels … … 187 188 end if 188 189 189 call gas%get(IH2O, IMassMixingRatio, h2o_mmr, istartcol=istartcol) 190 !AI juin 2022 191 !call gas%get(IH2O, IMassMixingRatio, h2o_mmr, istartcol=istartcol) 190 192 191 193 ! Loop over position … … 195 197 ! saturation and the index to the relative-humidity index of 196 198 ! hydrophilic-aerosol data 197 rh = h2o_mmr(jcol,jlev) / thermodynamics%h2o_sat_liq(jcol,jlev) 198 irh = ao%calc_rh_index(rh) 199 ! AI juin 2022 200 ! rh = h2o_mmr(jcol,jlev) / thermodynamics%h2o_sat_liq(jcol,jlev) 201 ! irh = ao%calc_rh_index(rh) 202 irh = ao%calc_rh_index(rhcl(jcol,jlev)) 203 ! print*,'irh=',irh 199 204 200 205 factor = ( thermodynamics%pressure_hl(jcol,jlev+1) & -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_scheme.F90
r4115 r4188 13 13 SUBROUTINE RADIATION_SCHEME & 14 14 ! Inputs 15 & (KIDIA, KFDIA, KLON, KLEV, KAERO LMDZ, NSW, &15 & (KIDIA, KFDIA, KLON, KLEV, KAEROSOL, NSW, & 16 16 & IDAY, TIME, & 17 17 & PSOLAR_IRRADIANCE, & … … 117 117 INTEGER(KIND=JPIM),INTENT(IN) :: KLEV ! Number of levels 118 118 !INTEGER, INTENT(IN) :: KLON, KLEV 119 INTEGER(KIND=JPIM),INTENT(IN) :: KAEROLMDZ ! Number of aerosol types 119 !INTEGER(KIND=JPIM),INTENT(IN) :: KAEROLMDZ ! Number of aerosol types 120 INTEGER(KIND=JPIM),INTENT(IN) :: KAEROSOL 120 121 INTEGER(KIND=JPIM),INTENT(IN) :: NSW ! Numbe of bands 121 122 122 123 ! AI ATTENTION 123 INTEGER, PARAMETER :: KAEROSOL = 12124 !INTEGER, PARAMETER :: KAEROSOL = 12 124 125 125 126 ! *** Single-level fields … … 313 314 if (lprint_input) then 314 315 print*,'********** Verification des entrees *************' 315 print*,'KIDIA, KFDIA, KLON, KLEV, KAERO LMDZ, NSW =', &316 KIDIA, KFDIA, KLON, KLEV, KAERO LMDZ, NSW316 print*,'KIDIA, KFDIA, KLON, KLEV, KAEROSOL, NSW =', & 317 KIDIA, KFDIA, KLON, KLEV, KAEROSOL, NSW 317 318 print*,'IDAY, TIME =', IDAY, TIME 318 319 print*,'PSOLAR_IRRADIANCE =', PSOLAR_IRRADIANCE … … 510 511 511 512 print*,'******** AEROSOLS (allocate + input) **************************************' 512 IF (NAERMACC > 0) THEN513 !IF (NAERMACC > 0) THEN 513 514 CALL aerosol%allocate(KLON, 1, KLEV, KAEROSOL) ! MACC climatology 514 ELSE515 CALL aerosol%allocate(KLON, 1, KLEV, 6) ! Tegen climatology516 ENDIF515 !ELSE 516 ! CALL aerosol%allocate(KLON, 1, KLEV, 6) ! Tegen climatology 517 !ENDIF 517 518 ! Compute the dry mass of each layer neglecting humidity effects, in 518 519 ! kg m-2, needed to scale some of the aerosol inputs -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/radiation_setup.F90
r4115 r4188 238 238 ! hydrophobic black carbon, 11 ammonium sulphate, 12 inactive 239 239 ! SO2 240 rad_config%n_aerosol_types = 12241 if (lprint_setp) then242 print*,'rad_config%n_aerosol_types =', rad_config%n_aerosol_types243 endif240 ! rad_config%n_aerosol_types = 12 241 ! if (lprint_setp) then 242 ! print*,'rad_config%n_aerosol_types =', rad_config%n_aerosol_types 243 ! endif 244 244 245 245 ! Indices to the aerosol optical properties in … … 247 247 ! index hydrophilic aerosol types and positive numbers index 248 248 ! hydrophobic aerosol types 249 rad_config%i_aerosol_type_map = 0 ! There can be up to 256 types249 ! rad_config%i_aerosol_type_map = 0 ! There can be up to 256 types 250 250 ! if (lprint_setp) then 251 251 ! print*,'rad_config%i_aerosol_type_map =', rad_config%i_aerosol_type_map 252 252 ! endif 253 253 254 rad_config%i_aerosol_type_map(1:12) = (/ &255 & -1, & ! Sea salt, size bin 1 (OPAC)256 & -2, & ! Sea salt, size bin 2 (OPAC)257 & -3, & ! Sea salt, size bin 3 (OPAC)258 & 7, & ! Desert dust, size bin 1 (Woodward 2001)259 & 8, & ! Desert dust, size bin 2 (Woodward 2001)260 & 9, & ! Desert dust, size bin 3 (Woodward 2001)261 & -4, & ! Hydrophilic organic matter (OPAC)262 & 10, & ! Hydrophobic organic matter (OPAC)263 & 11, & ! Black carbon (Boucher)264 & 11, & ! Black carbon (Boucher)265 & -5, & ! Ammonium sulphate (OPAC)266 & 14 /) ! Stratospheric sulphate (hand edited from OPAC)254 ! rad_config%i_aerosol_type_map(1:12) = (/ & 255 ! & -1, & ! Sea salt, size bin 1 (OPAC) 256 ! & -2, & ! Sea salt, size bin 2 (OPAC) 257 ! & -3, & ! Sea salt, size bin 3 (OPAC) 258 ! & 7, & ! Desert dust, size bin 1 (Woodward 2001) 259 ! & 8, & ! Desert dust, size bin 2 (Woodward 2001) 260 ! & 9, & ! Desert dust, size bin 3 (Woodward 2001) 261 ! & -4, & ! Hydrophilic organic matter (OPAC) 262 ! & 10, & ! Hydrophobic organic matter (OPAC) 263 ! & 11, & ! Black carbon (Boucher) 264 ! & 11, & ! Black carbon (Boucher) 265 ! & -5, & ! Ammonium sulphate (OPAC) 266 ! & 14 /) ! Stratospheric sulphate (hand edited from OPAC) 267 267 ! if (lprint_setp) then 268 268 ! print*,'rad_config%i_aerosol_type_map =', rad_config%i_aerosol_type_map … … 433 433 & 'photosynthetically active radiation, PAR') 434 434 435 rad_config%i_aerosol_type_map(1:13) = (/ & 436 & -1, & ! Sea salt, size bin 1 (OPAC) 437 & -2, & ! Sea salt, size bin 2 (OPAC) 438 & -3, & ! Sea salt, size bin 3 (OPAC) 439 & -4, & ! Hydrophilic organic matter (OPAC) 440 & -5, & ! Ammonium sulphate (OPAC) 441 & -6, & 442 & -7, & 443 & 1, & 444 & 2, & 445 & 3, & 446 & -8, & 447 & -9, & 448 & 4 /) ! Stratospheric sulphate (hand edited from OPAC) 449 rad_config%aerosol_optics_override_file_name = 'aerosol_optics_lmdz.nc' 450 435 451 ! IF (YRERAD%NAERMACC > 0) THEN 436 452 ! With the MACC aerosol climatology we need to add in the -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/phys_local_var_mod.F90
r4118 r4188 24 24 REAL, SAVE, ALLOCATABLE :: tr_seri(:,:,:) 25 25 !$OMP THREADPRIVATE(tr_seri) 26 REAL, SAVE, ALLOCATABLE :: rhcl(:,:) 27 !$OMP THREADPRIVATE(rhcl) 26 28 REAL, SAVE, ALLOCATABLE :: d_t_dyn(:,:), d_q_dyn(:,:) 27 29 !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn) … … 116 118 !$OMP THREADPRIVATE(d_ts, d_tr) 117 119 120 ! aerosols 121 REAL, SAVE, ALLOCATABLE :: m_allaer (:,:,:) 122 !$OMP THREADPRIVATE(m_allaer) 118 123 ! diagnostique pour le rayonnement 119 124 REAL, SAVE, ALLOCATABLE :: topswad_aero(:), solswad_aero(:) ! diag … … 608 613 l_mix(:,:,:)=0.;l_mixmin(:,:,:)=0.;tke_dissip(:,:,:)=0.;wprime(:,:,:)=0. ! doit etre initialse car pas toujours remplis 609 614 615 ALLOCATE(rhcl(klon,klev)) 610 616 ALLOCATE(tr_seri(klon,klev,nbtr)) 611 617 ALLOCATE(d_t_dyn(klon,klev),d_q_dyn(klon,klev)) … … 647 653 ALLOCATE(d_u_lif(klon,klev),d_v_lif(klon,klev)) 648 654 ALLOCATE(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr)) 655 656 ! aerosols 657 ALLOCATE(m_allaer(klon,klev,naero_tot)) 649 658 ! Special RRTM 650 659 ALLOCATE(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1)) … … 937 946 DEALLOCATE(l_mixmin,l_mix, tke_dissip,wprime) 938 947 948 DEALLOCATE(rhcl) 939 949 DEALLOCATE(tr_seri) 940 950 DEALLOCATE(d_t_dyn,d_q_dyn) … … 1046 1056 DEALLOCATE(solsw_aerop, solsw0_aerop) 1047 1057 DEALLOCATE(topswcf_aerop, solswcf_aerop) 1048 1058 !AI Aerosols 1059 DEALLOCATE(m_allaer) 1049 1060 !CK LW diagnostics 1050 1061 DEALLOCATE(toplwad_aerop, sollwad_aerop) -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/phys_output_write_mod.F90
r4170 r4188 1568 1568 !--OLIVIER 1569 1569 !This is warranted by treating INCA aerosols as offline aerosols 1570 #ifndef CPP_ECRAD 1570 1571 IF (flag_aerosol.GT.0) THEN 1571 1572 IF (ALL(types_trac/='inca') .OR. config_inca=='aeNP') THEN … … 1773 1774 ENDIF 1774 1775 ENDIF 1776 1775 1777 CALL histwrite_phy(o_lwcon, flwc) 1776 1778 CALL histwrite_phy(o_iwcon, fiwc) … … 1807 1809 #endif 1808 1810 !solbnd end 1811 #endif 1809 1812 #endif 1810 1813 -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/physiq_mod.F90
r4179 r4188 132 132 ! Variables locales pour effectuer les appels en serie 133 133 t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,tr_seri,rneb_seri, & 134 rhcl, & 134 135 ! Dynamic tendencies (diagnostics) 135 136 d_t_dyn,d_q_dyn,d_ql_dyn,d_qs_dyn,d_u_dyn,d_v_dyn,d_tr_dyn,d_rneb_dyn, & … … 813 814 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 814 815 ! 815 REAL rhcl(klon,klev) ! humiditi relative ciel clair816 ! REAL rhcl(klon,klev) ! humiditi relative ciel clair 816 817 REAL dialiq(klon,klev) ! eau liquide nuageuse 817 818 REAL diafra(klon,klev) ! fraction nuageuse … … 3969 3970 tausum_aero, tau3d_aero) 3970 3971 ENDIF 3971 ELSE 3972 ELSE IF (iflag_rrtm .EQ.1) THEN ! RRTM radiation 3972 3973 IF (aerosol_couple .AND. config_inca == 'aero' ) THEN 3973 3974 abort_message='config_inca=aero et rrtm=1 impossible' … … 4035 4036 ! 4036 4037 ENDIF 4038 ELSE IF (iflag_rrtm .EQ.2) THEN ! ecrad RADIATION 4039 #ifdef CPP_ECRAD 4040 !--climatologies or INCA aerosols 4041 CALL readaerosol_optic_ecrad( debut, aerosol_couple, ok_alw, ok_volcan, & 4042 flag_aerosol, flag_bc_internal_mixture, itap, jD_cur-jD_ref, & 4043 pdtphys, pplay, paprs, t_seri, rhcl, presnivs, & 4044 tr_seri, mass_solu_aero, mass_solu_aero_pi, & 4045 tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & 4046 tausum_aero, drytausum_aero, tau3d_aero) 4047 #else 4048 abort_message='You should compile with -rad ecrad if running with iflag_rrtm=2' 4049 CALL abort_physic(modname,abort_message,1) 4050 #endif 4037 4051 ENDIF 4052 4038 4053 ELSE !--flag_aerosol = 0 4039 4054 tausum_aero(:,:,:) = 0. -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/radlwsw_m.F90
r4170 r4188 78 78 ! Besoin pour ECRAD de pctsrf, zmasq, longitude, altitude 79 79 #ifdef CPP_ECRAD 80 USE phys_local_var_mod, ONLY: rhcl, m_allaer 80 81 USE geometry_mod, ONLY: latitude, longitude 81 82 USE phys_state_var_mod, ONLY: pctsrf … … 323 324 ZQ_SNOW(klon,klev) ! Snow cloud mass mixing ratio (kg/kg) ? 324 325 REAL(KIND=8) ZAEROSOL_OLD(KLON,6,KLEV), & ! 325 ZAEROSOL(KLON,KLEV,naero_ tot) !326 ZAEROSOL(KLON,KLEV,naero_grp) ! 326 327 ! OUTPUTS 327 328 REAL(KIND=8) ZFLUX_DIR(klon), & ! Direct compt of surf flux into horizontal plane … … 1181 1182 ! 1182 1183 ! AI ATTENTION Aerosols A REVOIR 1183 !DO i = 1, kdlon1184 !DO k = 1, kflev1185 ! DO kk= 1, naero_tot 1184 DO i = 1, kdlon 1185 DO k = 1, kflev 1186 DO kk= 1, naero_grp 1186 1187 ! DO kk=1, NSW 1187 1188 ! … … 1194 1195 ! PCGA_NAT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,1,kk) 1195 1196 ! ZAEROSOL(i,kflev+1-k,kk)=m_allaer(i,k,kk) 1196 ! 1197 ! ENDDO 1198 ! ENDDO 1199 ! ENDDO 1197 ZAEROSOL(i,kflev+1-k,kk)=m_allaer(i,k,kk) 1198 ! 1199 ENDDO 1200 ENDDO 1201 ENDDO 1200 1202 !-end OB 1201 1203 ! … … 1345 1347 1346 1348 CALL RADIATION_SCHEME & 1347 & (ist, iend, klon, klev, naero_ tot, NSW, &1349 & (ist, iend, klon, klev, naero_grp, NSW, & 1348 1350 ! ??? naero_tot 1349 1351 & day_cur, current_time, &
Note: See TracChangeset
for help on using the changeset viewer.