Changeset 2780 for trunk/LMDZ.VENUS
- Timestamp:
- Jul 22, 2022, 1:41:25 PM (2 years ago)
- Location:
- trunk/LMDZ.VENUS/libf/phyvenus
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/libf/phyvenus/photochemistry_venus.F90
r2622 r2780 1 subroutine photochemistry_venus(nz, n_lon, ptimestep, p, t, tr, mumean, sza_input, lon, lat, nesp, iter, prod_tr, loss_tr)1 subroutine photochemistry_venus(nz, n_lon, zlocal, ptimestep, p, t, tr, mumean, sza_input, lon, lat, nesp, iter, prod_tr, loss_tr) 2 2 3 3 use chemparam_mod 4 use photolysis_mod 4 5 5 6 implicit none … … 14 15 real, dimension(nz) :: p ! pressure (hpa) 15 16 real, dimension(nz) :: t ! temperature (k) 17 real, dimension(nz) :: zlocal ! altitude (km) 16 18 real, dimension(nz) :: mumean ! mean molecular mass (g/mol) 17 19 real :: ptimestep ! physics timestep (s) … … 25 27 !=================================================================== 26 28 27 real, dimension(nz,nesp) :: tr ! tracer mixing ratio29 real, dimension(nz,nesp) :: tr ! tracer mixing ratio 28 30 real, dimension(nz,nesp) :: prod_tr ! production (cm-3.s-1) 29 31 real, dimension(nz,nesp) :: loss_tr ! loss (cm-3.s-1) … … 39 41 !=================================================================== 40 42 43 ! jonline 44 ! true : on-line calculation of photodissociation rates ! false : lookup table 45 46 logical, save :: jonline = .false. 47 41 48 logical, save :: firstcall = .true. 42 49 … … 44 51 real, dimension(nz) :: surfice1d, surfdust1d 45 52 46 ! photolysis lookup table 47 48 integer, parameter :: nj = 19, nztable = 201, nsza = 27, nso2 = 13 53 ! photolysis lookup table (case jonline = .false.) 54 ! if prior to jvenus.20211025, set nztable = 201 below 55 56 integer, parameter :: nj = 19, nztable = 281, nsza = 27, nso2 = 13 49 57 real, dimension(nso2,nsza,nztable,nj), save :: jphot 50 58 real, dimension(nztable), save :: table_colair … … 96 104 if (firstcall) then 97 105 !=================================================================== 98 ! read photolysis lookup table106 ! initialisation of photolysis 99 107 !=================================================================== 100 108 101 call init_chimie(nj, nztable, nsza, nso2, jphot, table_colair, table_colso2, table_sza) 109 if (jonline) then 110 print*, 'Photochemistry: Read UV absorption cross-sections:' 111 call init_photolysis 112 else 113 print*, 'Photochemistry: Read photolysis lookup table:' 114 call init_chimie(nj, nztable, nsza, nso2, jphot, table_colair, table_colso2, table_sza) 115 end if 102 116 103 117 !=================================================================== … … 132 146 dist_sol = 0.72333 133 147 134 call phot(nj, nztable, nsza, nso2, sza_input, dist_sol, mumean, tr(:,i_co2), tr(:,i_so2), & 135 jphot, table_colair, table_colso2, table_sza, nz, nb_phot_max, t, p, v_phot) 148 if (jonline) then 149 if (sza_input <= 95.) then !day at 30 km 150 call photolysis_online(nz, nb_phot_max, zlocal, p, & 151 t, mumean, i_co2,i_co, i_o, i_o1d, & 152 i_o2, i_o3, i_oh, i_ho2, i_h2o2, i_h2o, & 153 i_h, i_hcl, i_cl2, i_hocl, i_so2, i_so, & 154 i_so3, i_clo, i_ocs, i_cocl2, i_h2so4, i_cl,& 155 nesp, tr, sza_input, dist_sol, v_phot) 156 else ! night 157 v_phot(:,:) = 0. 158 end if 159 else 160 call phot(nj, nztable, nsza, nso2, sza_input, dist_sol, mumean, tr(:,i_co2), tr(:,i_so2), & 161 jphot, table_colair, table_colso2, table_sza, nz, nb_phot_max, t, p, v_phot) 162 end if 136 163 137 164 !=================================================================== … … 146 173 ! the fraction phychemrat of the physical timestep 147 174 !=================================================================== 148 175 149 176 phychemrat = 1 150 177 … … 237 264 !================== 238 265 239 IF(n_lon .EQ. 1) THEN240 PRINT*,'On est en 1D'266 !IF(n_lon .EQ. 1) THEN 267 !PRINT*,'On est en 1D' 241 268 !PRINT*,"DEBUT rate_save" 242 CALL rate_save(nz,p(:),t(:),tr(:,:),nesp,v_phot(:,:),v_3(:,:),v_4(:,:))269 !CALL rate_save(nz,p(:),t(:),tr(:,:),nesp,v_phot(:,:),v_3(:,:),v_4(:,:)) 243 270 !PRINT*,"FIN rate_save" 244 END IF271 !END IF 245 272 246 273 end subroutine photochemistry_venus … … 3193 3220 LOGICAL, SAVE :: f_call = .true. 3194 3221 3195 integer, parameter :: nb_phot_max = 3 13196 integer, parameter :: nb_reaction_3_max = 1 13197 integer, parameter :: nb_reaction_4_max = 8 43222 integer, parameter :: nb_phot_max = 30 3223 integer, parameter :: nb_reaction_3_max = 12 3224 integer, parameter :: nb_reaction_4_max = 87 3198 3225 3199 3226 real, dimension(n_lev,nb_phot_max) :: vphot -
trunk/LMDZ.VENUS/libf/phyvenus/physiq_mod.F
r2686 r2780 1061 1061 $ latitude_deg, 1062 1062 $ longitude_deg, 1063 $ zzlay, 1063 1064 $ nlev, 1064 1065 $ zctime, -
trunk/LMDZ.VENUS/libf/phyvenus/phytrac_chimie.F
r2622 r2780 6 6 $ lat, 7 7 $ lon, 8 $ zzlay, 8 9 $ nlev, 9 10 $ pdtphys, … … 38 39 real, dimension(nlon,nlev) :: temp ! temperature (k) 39 40 real, dimension(nlon,nlev) :: pplay ! pressure (pa) 41 real, dimension(nlon,nlev) :: zzlay ! altitude (m) 40 42 real, dimension(nlon,nlev,nqmax) :: trac ! tracer mass mixing ratio 41 43 … … 54 56 !=================================================================== 55 57 56 real :: sza_local ! solar zenith angle (deg)58 real :: sza_local ! solar zenith angle (deg) 57 59 real :: lon_sun 60 real :: zlocal(nlev) ! altitude for photochem (km) 58 61 59 62 integer :: i, iq … … 83 86 ! case of tracers re-initialisation with chemistry 84 87 !------------------------------------------------------------------- 88 85 89 if (reinit_trac .and. ok_chem) then 86 90 … … 130 134 end if 131 135 132 133 ! update mmean 136 ! update mmean 137 134 138 mmean(:,:) = 0. 135 139 do iq = 1,nqmax - nmicro … … 139 143 140 144 ! convert volume to mass mixing ratio 145 141 146 do iq = 1,nqmax - nmicro 142 147 trac(:,:,iq) = trac(:,:,iq)*m_tr(iq)/mmean(:,:) … … 148 153 ! case of detailed microphysics without chemistry 149 154 !------------------------------------------------------------------- 155 150 156 if (.not. ok_chem .and. ok_cloud .and. cl_scheme == 2) then 151 157 … … 276 282 277 283 do ilon = 1,nlon 284 zlocal(:)=zzlay(ilon,:)/1000. 278 285 279 286 ! solar zenith angle … … 282 289 $ *cos(lon_sun) + cos(lat_local(ilon)) 283 290 $ *sin(lon_local(ilon))*sin(lon_sun))*180./rpi 284 285 call photochemistry_venus(nlev, nlon, pdtphys,291 292 call photochemistry_venus(nlev, nlon, zlocal, pdtphys, 286 293 $ pplay(ilon,:)/100., 287 294 $ temp(ilon,:), … … 301 308 !=================================================================== 302 309 303 ! update mmean 304 mmean(:,:) = 0. 305 do iq = 1,nqmax - nmicro 306 mmean(:,:) = mmean(:,:)+ztrac(:,:,iq)*m_tr(iq) 307 enddo 308 rnew(:,:) = 8.314/mmean(:,:)*1.e3 ! J/kg K 310 ! update mmean 311 312 mmean(:,:) = 0. 313 do iq = 1,nqmax - nmicro 314 mmean(:,:) = mmean(:,:)+ztrac(:,:,iq)*m_tr(iq) 315 end do 316 rnew(:,:) = 8.314/mmean(:,:)*1.e3 ! J/kg K 309 317 310 318 !=================================================================== 311 319 ! convert volume to mass mixing ratio / then tendencies in mmr 312 320 !=================================================================== 321 313 322 ! gas phase 314 323
Note: See TracChangeset
for help on using the changeset viewer.