[1310] | 1 | SUBROUTINE nirco2abs(nlon,nlev,nplay,dist_sol,nq,pq, |
---|
[1442] | 2 | $ mu0,fract,pdtnirco2) |
---|
[1310] | 3 | |
---|
| 4 | use dimphy |
---|
[1545] | 5 | use geometry_mod, only: longitude_deg, latitude_deg |
---|
[1442] | 6 | use chemparam_mod, only: i_co2, i_o |
---|
[1310] | 7 | c use compo_hedin83_mod2 |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | IMPLICIT NONE |
---|
| 11 | c======================================================================= |
---|
| 12 | c subject: |
---|
| 13 | c -------- |
---|
| 14 | c Computing heating rate due to |
---|
| 15 | c absorption by CO2 in the near-infrared |
---|
| 16 | c This version includes NLTE effects |
---|
| 17 | c |
---|
| 18 | c (Scheme to be described in Forget et al., JGR, 2003) |
---|
| 19 | c (old Scheme described in Forget et al., JGR, 1999) |
---|
| 20 | c |
---|
| 21 | c This version updated with a new functional fit, |
---|
| 22 | c see NLTE correction-factor of Lopez-Valverde et al (1998) |
---|
| 23 | c Stephen Lewis 2000 |
---|
| 24 | c |
---|
[2198] | 25 | c apr 2019 d.quirino Improving NLTE params, SOIR/SPICAV Temp comparison |
---|
[1442] | 26 | c oct 2014 g.gilli Coupling with photochemical model |
---|
| 27 | C jan 2014 g.gilli Revision (following martian non-lte param) |
---|
[1310] | 28 | C jun 2013 l.salmi First adaptation to Venus and NIR NLTE param |
---|
| 29 | c jul 2011 malv+fgg New corrections for NLTE implemented |
---|
| 30 | c 08/2002 : correction for bug when running with diurnal=F |
---|
| 31 | c |
---|
| 32 | c author: Frederic Hourdin 1996 |
---|
| 33 | c ------ |
---|
| 34 | c Francois Forget 1999 |
---|
| 35 | c |
---|
| 36 | c input: |
---|
| 37 | c ----- |
---|
| 38 | c nlon number of gridpoint of horizontal grid |
---|
| 39 | c nlev Number of layer |
---|
| 40 | c dist_sol sun-Venus distance (AU) |
---|
| 41 | c mu0(nlon) |
---|
| 42 | c fract(nlon) day fraction of the time interval |
---|
| 43 | c declin latitude of subslar point |
---|
| 44 | c |
---|
| 45 | c output: |
---|
| 46 | c ------- |
---|
| 47 | c |
---|
| 48 | c pdtnirco2(nlon,nlev) Heating rate (K/sec) |
---|
| 49 | c |
---|
| 50 | c |
---|
| 51 | c======================================================================= |
---|
| 52 | c |
---|
| 53 | c 0. Declarations : |
---|
| 54 | c ------------------ |
---|
| 55 | c |
---|
| 56 | |
---|
| 57 | #include "YOMCST.h" |
---|
| 58 | #include "clesphys.h" |
---|
| 59 | c#include "comdiurn.h" |
---|
| 60 | #include "nirdata.h" |
---|
| 61 | c#include "tracer.h" |
---|
[1442] | 62 | #include "mmol.h" |
---|
[1310] | 63 | c----------------------------------------------------------------------- |
---|
| 64 | c Input/Output |
---|
| 65 | c ------------ |
---|
| 66 | integer,intent(in) :: nlon ! number of (horizontal) grid points |
---|
| 67 | integer,intent(in) :: nlev ! number of atmospheric layers |
---|
[1442] | 68 | |
---|
[1310] | 69 | real,intent(in) :: nplay(nlon,nlev) ! Pressure |
---|
| 70 | real,intent(in) :: dist_sol ! Sun-Venus distance (in AU) |
---|
| 71 | integer,intent(in) :: nq ! number of tracers |
---|
[1442] | 72 | real,intent(in) :: pq(nlon,nlev,nq) ! mass mixing ratio tracers |
---|
[1310] | 73 | real,intent(in) :: mu0(nlon) ! solar angle |
---|
| 74 | real,intent(in) :: fract(nlon) ! day fraction of the time interval |
---|
| 75 | c real,intent(in) :: declin ! latitude of sub-solar point |
---|
[1442] | 76 | real :: co2vmr_gcm(nlon,nlev), o3pvmr_gcm(nlon,nlev) |
---|
| 77 | |
---|
[1310] | 78 | real,intent(out) :: pdtnirco2(nlon,nlev) ! heating rate (K/sec) |
---|
| 79 | |
---|
| 80 | c |
---|
| 81 | c Local variables : |
---|
| 82 | c ----------------- |
---|
| 83 | INTEGER l,ig, n, nstep,i |
---|
| 84 | REAL co2heat0, zmu(nlon) |
---|
| 85 | |
---|
| 86 | c special diurnal=F |
---|
| 87 | real mu0_int(nlon),fract_int(nlon),zday_int |
---|
| 88 | real ztim1,ztim2,ztim3,step |
---|
| 89 | |
---|
| 90 | c |
---|
| 91 | c local saved variables |
---|
| 92 | c --------------------- |
---|
| 93 | logical,save :: firstcall=.true. |
---|
| 94 | integer,save :: ico2=0 ! index of "co2" tracer |
---|
| 95 | integer,save :: io=0 ! index of "o" tracer |
---|
| 96 | |
---|
[1442] | 97 | cccc parameters for CO2 heating fit |
---|
[1310] | 98 | c |
---|
| 99 | c n_a = heating rate for Venusian day at p0, r0, mu =0 [K day-1] |
---|
| 100 | c Here p0 = p_cloud top [Pa] |
---|
| 101 | c n_p0 = is a pressure below which non LTE effects are significant [Pa] |
---|
| 102 | c n_a Solar heating [K/Eday] at the cloud top, taken from Crisps table |
---|
| 103 | |
---|
| 104 | real n_a, n_p0, n_b, p_ctop |
---|
| 105 | |
---|
[1442] | 106 | |
---|
[2198] | 107 | cc "Nominal" values used in Gilli+2'17 |
---|
| 108 | c parameter (n_a = 18.13/86400.0) !c K/Eday ---> K/sec |
---|
| 109 | c parameter (p_ctop=13.2e2) |
---|
| 110 | c parameter (n_p0=0.008) |
---|
| 111 | |
---|
| 112 | cc "New" values used to improve SPICAV/SOIR Temperature comparision (D.Quirino) |
---|
| 113 | parameter (n_a = 15.92/86400.0) !c K/Eday ---> K/sec |
---|
| 114 | parameter (p_ctop=19.85e2) |
---|
| 115 | parameter (n_p0=0.1) |
---|
[1442] | 116 | parameter (n_b=1.362) |
---|
[1310] | 117 | |
---|
[1442] | 118 | c -- NLTE Param v2 -- |
---|
| 119 | C parameter (n_p0=0.01) |
---|
| 120 | c parameter (n_b = 1.3) |
---|
| 121 | |
---|
[1310] | 122 | |
---|
| 123 | c Variables added to implement NLTE correction factor (feb 2011) |
---|
| 124 | real pyy(nlev) |
---|
| 125 | real cor1(nlev),oldoco2(nlev),alfa2(nlev) |
---|
| 126 | real p2011,cociente1,merge |
---|
| 127 | real cor0,oco2gcm |
---|
[1442] | 128 | !!!! |
---|
| 129 | c real :: pic27(nlon,nlev), pic27b(nlon,nlev) |
---|
| 130 | c real :: pic43(nlon,nlev), picnir(nlon,nlev) |
---|
[1310] | 131 | |
---|
[1442] | 132 | c co2heat is the heating by CO2 at p_ctop=13.2e2 for a zero zenithal angle. |
---|
[1310] | 133 | |
---|
| 134 | co2heat0=n_a*(0.72/dist_sol)**2 |
---|
| 135 | |
---|
[1442] | 136 | CCCCCC TEST: reduce by X% nir Heating |
---|
| 137 | c co2heat0 = co2heat0 * 0.8 |
---|
[1310] | 138 | |
---|
| 139 | c---------------------------------------------------------------------- |
---|
| 140 | |
---|
| 141 | c Initialisation |
---|
| 142 | c -------------- |
---|
[1442] | 143 | if (firstcall) then |
---|
| 144 | if (nircorr.eq.1) then |
---|
| 145 | c ! we will need co2 and o tracers |
---|
| 146 | ico2= i_co2 |
---|
| 147 | if (ico2==0) then |
---|
| 148 | write(*,*) "nirco2abs error: I need a CO2 tracer" |
---|
| 149 | write(*,*) " when running with nircorr==1" |
---|
| 150 | stop |
---|
| 151 | endif |
---|
| 152 | io=i_o |
---|
| 153 | if (io==0) then |
---|
| 154 | write(*,*) "nirco2abs error: I need an O tracer" |
---|
| 155 | write(*,*) " when running with nircorr==1" |
---|
| 156 | stop |
---|
| 157 | endif |
---|
| 158 | endif |
---|
| 159 | firstcall=.false. |
---|
| 160 | endif |
---|
[1310] | 161 | |
---|
| 162 | |
---|
| 163 | c |
---|
| 164 | c Simple calcul for a given sun incident angle (if cycle_diurne=T) |
---|
| 165 | c -------------------------------------------- |
---|
| 166 | |
---|
| 167 | IF (cycle_diurne) THEN |
---|
| 168 | |
---|
| 169 | do ig=1,nlon |
---|
| 170 | zmu(ig)=sqrt(1224.*mu0(ig)*mu0(ig)+1.)/35. |
---|
| 171 | |
---|
[1442] | 172 | |
---|
[1310] | 173 | if(nircorr.eq.1) then |
---|
| 174 | do l=1,nlev |
---|
| 175 | pyy(l)=nplay(ig,l) |
---|
| 176 | enddo |
---|
| 177 | |
---|
| 178 | call interpnir(cor1,pyy,nlev,corgcm,pres1d,npres) |
---|
| 179 | call interpnir(oldoco2,pyy,nlev,oco21d,pres1d,npres) |
---|
| 180 | call interpnir(alfa2,pyy,nlev,alfa,pres1d,npres) |
---|
[1442] | 181 | |
---|
[1310] | 182 | endif |
---|
| 183 | |
---|
| 184 | do l=1,nlev |
---|
[1442] | 185 | |
---|
[1310] | 186 | c Calculations for the O/CO2 correction |
---|
| 187 | if(nircorr.eq.1) then |
---|
| 188 | cor0=1./(1.+n_p0/nplay(ig,l))**n_b |
---|
[1442] | 189 | if(pq(ig,l,ico2) .gt. 1.e-6) then |
---|
| 190 | oco2gcm=pq(ig,l,io)/pq(ig,l,ico2) |
---|
[2464] | 191 | ! handle the rare cases when pq(ig,l,io)<0 |
---|
| 192 | if (pq(ig,l,io).lt.0) then |
---|
| 193 | write(*,*) "nirco2abs: warning ig=",ig," l=",l, |
---|
| 194 | & " pq(ig,l,io)=",pq(ig,l,io) |
---|
| 195 | oco2gcm=1.e6 |
---|
| 196 | endif |
---|
[1310] | 197 | else |
---|
| 198 | oco2gcm=1.e6 |
---|
| 199 | endif |
---|
| 200 | cociente1=oco2gcm/oldoco2(l) |
---|
[1442] | 201 | |
---|
| 202 | c WRITE(*,*) "nirco2abs line 211", l, cociente1 |
---|
| 203 | |
---|
[1310] | 204 | merge=alog10(cociente1)*alfa2(l)+alog10(cor0)* |
---|
| 205 | $ (1.-alfa2(l)) |
---|
| 206 | merge=10**merge |
---|
| 207 | p2011=sqrt(merge)*cor0 |
---|
| 208 | |
---|
| 209 | else if (nircorr.eq.0) then |
---|
| 210 | p2011=1. |
---|
| 211 | cor1(l)=1. |
---|
| 212 | endif |
---|
| 213 | |
---|
| 214 | if(fract(ig).gt.0.) pdtnirco2(ig,l)= |
---|
| 215 | & co2heat0*sqrt((p_ctop*zmu(ig))/nplay(ig,l)) |
---|
| 216 | & /(1.+n_p0/nplay(ig,l))**n_b |
---|
| 217 | c Corrections from tabulation |
---|
| 218 | $ * cor1(l) * p2011 |
---|
[1442] | 219 | |
---|
[1310] | 220 | enddo |
---|
| 221 | enddo |
---|
| 222 | |
---|
| 223 | c Averaging over diurnal cycle (if diurnal=F) |
---|
| 224 | c ------------------------------------------- |
---|
| 225 | c NIR CO2 abs is slightly non linear. To remove the diurnal |
---|
| 226 | c cycle, it is better to average the heating rate over 1 day rather |
---|
| 227 | c than using the mean mu0 computed by mucorr in physiq.F (FF, 1998) |
---|
| 228 | |
---|
| 229 | ELSE ! if (.not.diurnal) then |
---|
| 230 | nstep = 20 ! number of integration step /sol |
---|
| 231 | do n=1,nstep |
---|
| 232 | |
---|
| 233 | zday_int = (n-1)/float(nstep) |
---|
| 234 | |
---|
[1545] | 235 | CALL zenang(0.,zday_int,RDAY/nstep, |
---|
| 236 | & latitude_deg,longitude_deg, |
---|
| 237 | & mu0_int,fract_int) |
---|
[1310] | 238 | |
---|
| 239 | do ig=1,nlon |
---|
| 240 | zmu(ig)=sqrt(1224.*mu0_int(ig)*mu0_int(ig)+1.)/35. |
---|
| 241 | |
---|
| 242 | if(nircorr.eq.1) then |
---|
| 243 | do l=1,nlev |
---|
| 244 | pyy(l)=nplay(ig,l) |
---|
| 245 | enddo |
---|
| 246 | call interpnir(cor1,pyy,nlev,corgcm,pres1d,npres) |
---|
| 247 | call interpnir(oldoco2,pyy,nlev,oco21d,pres1d,npres) |
---|
| 248 | call interpnir(alfa2,pyy,nlev,alfa,pres1d,npres) |
---|
| 249 | endif |
---|
| 250 | c |
---|
| 251 | |
---|
| 252 | do l=1,nlev |
---|
[1442] | 253 | c Calculations for the O/CO2 correction |
---|
| 254 | if(nircorr.eq.1) then |
---|
| 255 | cor0=1./(1.+n_p0/nplay(ig,l))**n_b |
---|
| 256 | oco2gcm=pq(ig,l,io)/pq(ig,l,ico2) |
---|
| 257 | cociente1=oco2gcm/oldoco2(l) |
---|
| 258 | merge=alog10(cociente1)*alfa2(l)+alog10(cor0)* |
---|
| 259 | $ (1.-alfa2(l)) |
---|
| 260 | merge=10**merge |
---|
| 261 | p2011=sqrt(merge)*cor0 |
---|
[1310] | 262 | |
---|
[1442] | 263 | else if (nircorr.eq.0) then |
---|
| 264 | p2011=1. |
---|
| 265 | cor1(l)=1. |
---|
| 266 | endif |
---|
[1310] | 267 | |
---|
[1442] | 268 | if(fract_int(ig).gt.0.) pdtnirco2(ig,l)= |
---|
| 269 | & pdtnirco2(ig,l) + (1/float(nstep))* |
---|
| 270 | & co2heat0*sqrt((p_ctop*zmu(ig))/nplay(ig,l)) |
---|
| 271 | & /(1.+n_p0/nplay(ig,l))**n_b |
---|
| 272 | ! Corrections from tabulation |
---|
| 273 | $ * cor1(l) * p2011 |
---|
[1310] | 274 | |
---|
| 275 | enddo |
---|
| 276 | enddo |
---|
| 277 | end do |
---|
| 278 | |
---|
| 279 | |
---|
[1442] | 280 | END IF |
---|
| 281 | |
---|
[1310] | 282 | return |
---|
| 283 | end |
---|
| 284 | |
---|
| 285 | |
---|
| 286 | subroutine interpnir(escout,p,nlev,escin,pin,nl) |
---|
| 287 | C |
---|
| 288 | C subroutine to perform linear interpolation in pressure from 1D profile |
---|
| 289 | C escin(nl) sampled on pressure grid pin(nl) to profile |
---|
| 290 | C escout(nlev) on pressure grid p(nlev). |
---|
| 291 | C |
---|
| 292 | real escout(nlev),p(nlev) |
---|
| 293 | real escin(nl),pin(nl),wm,wp |
---|
| 294 | integer nl,nlev,n1,n,nm,np |
---|
| 295 | do n1=1,nlev |
---|
| 296 | if(p(n1) .gt. 1500. .or. p(n1) .lt. 1.0e-13) then |
---|
[1442] | 297 | c escout(n1) = 0.0 |
---|
| 298 | escout(n1) = 1.e-15 |
---|
[1310] | 299 | else |
---|
| 300 | do n = 1,nl-1 |
---|
| 301 | if (p(n1).le.pin(n).and.p(n1).ge.pin(n+1)) then |
---|
| 302 | nm=n |
---|
| 303 | np=n+1 |
---|
| 304 | wm=abs(pin(np)-p(n1))/(pin(nm)-pin(np)) |
---|
| 305 | wp=1.0 - wm |
---|
| 306 | endif |
---|
| 307 | enddo |
---|
| 308 | escout(n1) = escin(nm)*wm + escin(np)*wp |
---|
| 309 | endif |
---|
| 310 | enddo |
---|
| 311 | return |
---|
| 312 | end |
---|