Changeset 1442 for trunk/LMDZ.VENUS/libf/phyvenus/nirco2abs.F
- Timestamp:
- Jun 4, 2015, 4:23:32 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/libf/phyvenus/nirco2abs.F
r1310 r1442 1 1 SUBROUTINE nirco2abs(nlon,nlev,nplay,dist_sol,nq,pq, 2 $ mu0,fract,pdtnirco2, 3 $ co2vmr_gcm, ovmr_gcm) 2 $ mu0,fract,pdtnirco2) 4 3 5 4 use dimphy 6 5 use comgeomphy, only: rlatd, rlond 6 use chemparam_mod, only: i_co2, i_o 7 7 c use compo_hedin83_mod2 8 8 … … 23 23 c Stephen Lewis 2000 24 24 c 25 C jan 2014 g.gilli 25 c oct 2014 g.gilli Coupling with photochemical model 26 C jan 2014 g.gilli Revision (following martian non-lte param) 26 27 C jun 2013 l.salmi First adaptation to Venus and NIR NLTE param 27 28 c jul 2011 malv+fgg New corrections for NLTE implemented … … 59 60 #include "nirdata.h" 60 61 c#include "tracer.h" 61 62 #include "mmol.h" 62 63 c----------------------------------------------------------------------- 63 64 c Input/Output 64 65 c ------------ 65 66 integer,intent(in) :: nlon ! number of (horizontal) grid points 66 67 67 integer,intent(in) :: nlev ! number of atmospheric layers 68 68 69 real,intent(in) :: nplay(nlon,nlev) ! Pressure 69 70 real,intent(in) :: dist_sol ! Sun-Venus distance (in AU) 70 71 integer,intent(in) :: nq ! number of tracers 71 real,intent(in) :: pq(nlon,nlev,nq) ! tracers72 real,intent(in) :: pq(nlon,nlev,nq) ! mass mixing ratio tracers 72 73 real,intent(in) :: mu0(nlon) ! solar angle 73 74 real,intent(in) :: fract(nlon) ! day fraction of the time interval 74 75 c real,intent(in) :: declin ! latitude of sub-solar point 75 76 real co2vmr_gcm(nlon,nlev),ovmr_gcm(nlon,nlev) 77 76 real :: co2vmr_gcm(nlon,nlev), o3pvmr_gcm(nlon,nlev) 77 78 78 real,intent(out) :: pdtnirco2(nlon,nlev) ! heating rate (K/sec) 79 79 … … 95 95 integer,save :: io=0 ! index of "o" tracer 96 96 97 ccc 97 cccc parameters for CO2 heating fit 98 98 c 99 99 c n_a = heating rate for Venusian day at p0, r0, mu =0 [K day-1] … … 104 104 real n_a, n_p0, n_b, p_ctop 105 105 106 cc Current values 107 parameter (n_a = 18.13/86400.0) !! K/Eday ---> K/sec 106 107 cc "Nominal" values 108 parameter (n_a = 18.13/86400.0) !c K/Eday ---> K/sec 108 109 parameter (p_ctop=13.2e2) 110 c -- NLTE Param v3 -- 111 parameter (n_p0=0.008) 112 parameter (n_b=1.362) 113 114 cc -- Varoxy5 115 C parameter (n_a = 20/86400.0) 116 C parameter (p_ctop=870) ! [Pa] 117 C parameter (n_b=1.98) 118 C parameter (n_p0=0.045) 119 120 c parameter (n_p0=0.1) !!!!cccc test varoxy5mod 121 c parameter (n_b=0.9) 122 109 123 110 124 c -- NLTE Param v2 -- 111 cparameter (n_p0=0.01)125 C parameter (n_p0=0.01) 112 126 c parameter (n_b = 1.3) 113 114 ccc TESTS 115 c parameter (n_a = 18.4/86400.0 *0.6) 116 c parameter (p_ctop=63.9e2) 117 c parameter (n_p0=0.012) 118 c parameter (n_b=1.9628251) 119 120 121 c -- NLTE Param v1 -- 122 c parameter (n_p0=0.012) 123 c parameter (n_b = 1.4) 124 125 c -- NLTE Param v3 -- 126 127 parameter (n_p0=0.008) 128 parameter (n_b = 1.362) 127 129 128 130 129 … … 134 133 real p2011,cociente1,merge 135 134 real cor0,oco2gcm 136 137 c co2heat is the heating by CO2 at p_ctop=9.3E03 Pa (cloud top 65 km) for a zero zenithal angle. 135 !!!! 136 c real :: pic27(nlon,nlev), pic27b(nlon,nlev) 137 c real :: pic43(nlon,nlev), picnir(nlon,nlev) 138 139 c co2heat is the heating by CO2 at p_ctop=13.2e2 for a zero zenithal angle. 138 140 139 141 co2heat0=n_a*(0.72/dist_sol)**2 140 142 141 142 CCCCCC TEST: reduce/incrise by 50% nir Heating 143 144 c co2heat0 = co2heat0 * 2 143 CCCCCC TEST: reduce by X% nir Heating 144 145 c co2heat0 = co2heat0 * 0.8 145 146 146 147 … … 149 150 c Initialisation 150 151 c -------------- 151 cif (firstcall) then152 cif (nircorr.eq.1) then153 c c! we will need co2 and o tracers154 c ico2= igcm_co2155 cif (ico2==0) then156 cwrite(*,*) "nirco2abs error: I need a CO2 tracer"157 cwrite(*,*) " when running with nircorr==1"158 cstop159 cendif160 c io=igcm_o161 cif (io==0) then162 cwrite(*,*) "nirco2abs error: I need an O tracer"163 cwrite(*,*) " when running with nircorr==1"164 cstop165 cendif166 cendif167 cfirstcall=.false.168 cendif152 if (firstcall) then 153 if (nircorr.eq.1) then 154 c ! we will need co2 and o tracers 155 ico2= i_co2 156 if (ico2==0) then 157 write(*,*) "nirco2abs error: I need a CO2 tracer" 158 write(*,*) " when running with nircorr==1" 159 stop 160 endif 161 io=i_o 162 if (io==0) then 163 write(*,*) "nirco2abs error: I need an O tracer" 164 write(*,*) " when running with nircorr==1" 165 stop 166 endif 167 endif 168 firstcall=.false. 169 endif 169 170 170 171 … … 178 179 zmu(ig)=sqrt(1224.*mu0(ig)*mu0(ig)+1.)/35. 179 180 180 181 181 182 if(nircorr.eq.1) then 182 183 do l=1,nlev … … 187 188 call interpnir(oldoco2,pyy,nlev,oco21d,pres1d,npres) 188 189 call interpnir(alfa2,pyy,nlev,alfa,pres1d,npres) 189 190 190 191 endif 191 192 192 193 do l=1,nlev 194 193 195 c Calculations for the O/CO2 correction 194 196 if(nircorr.eq.1) then 195 197 cor0=1./(1.+n_p0/nplay(ig,l))**n_b 196 if(co2vmr_gcm(ig,l).gt.1.e-6) then 197 oco2gcm=ovmr_gcm(ig,l)/co2vmr_gcm(ig,l) 198 if(pq(ig,l,ico2) .gt. 1.e-6) then 199 oco2gcm=pq(ig,l,io)/pq(ig,l,ico2) 200 198 201 else 199 202 oco2gcm=1.e6 200 203 endif 201 204 cociente1=oco2gcm/oldoco2(l) 205 206 c WRITE(*,*) "nirco2abs line 211", l, cociente1 207 202 208 merge=alog10(cociente1)*alfa2(l)+alog10(cor0)* 203 209 $ (1.-alfa2(l)) … … 209 215 cor1(l)=1. 210 216 endif 211 212 217 213 218 if(fract(ig).gt.0.) pdtnirco2(ig,l)= … … 216 221 c Corrections from tabulation 217 222 $ * cor1(l) * p2011 218 219 223 220 224 enddo 221 225 enddo … … 250 254 251 255 do l=1,nlev 252 if(nircorr.eq.1) then253 cor0=1./(1.+n_p0/nplay(ig,l))**n_b254 c oco2gcm=ovmr_gcm(ig,l)/co2vmr_gcm(ig,l) 255 cociente1 = 1256 merge=alog10(cociente1)*alfa2(l)+alog10(cor0)*257 $ (1.-alfa2(l))258 merge=10**merge259 p2011=sqrt(merge)*cor0260 else if (nircorr.eq.0) then261 p2011=1. 262 cor1(l)=1.263 endif264 265 c 266 267 268 & 269 & 270 & 271 ! 272 $ 256 c Calculations for the O/CO2 correction 257 if(nircorr.eq.1) then 258 cor0=1./(1.+n_p0/nplay(ig,l))**n_b 259 oco2gcm=pq(ig,l,io)/pq(ig,l,ico2) 260 cociente1=oco2gcm/oldoco2(l) 261 merge=alog10(cociente1)*alfa2(l)+alog10(cor0)* 262 $ (1.-alfa2(l)) 263 merge=10**merge 264 p2011=sqrt(merge)*cor0 265 266 else if (nircorr.eq.0) then 267 p2011=1. 268 cor1(l)=1. 269 endif 270 271 if(fract_int(ig).gt.0.) pdtnirco2(ig,l)= 272 & pdtnirco2(ig,l) + (1/float(nstep))* 273 & co2heat0*sqrt((p_ctop*zmu(ig))/nplay(ig,l)) 274 & /(1.+n_p0/nplay(ig,l))**n_b 275 ! Corrections from tabulation 276 $ * cor1(l) * p2011 273 277 274 278 enddo … … 276 280 end do 277 281 278 END IF 282 283 END IF 279 284 280 285 return 281 286 end 282 283 287 284 288 … … 294 298 do n1=1,nlev 295 299 if(p(n1) .gt. 1500. .or. p(n1) .lt. 1.0e-13) then 296 escout(n1) = 0.0 300 c escout(n1) = 0.0 301 escout(n1) = 1.e-15 297 302 else 298 303 do n = 1,nl-1
Note: See TracChangeset
for help on using the changeset viewer.