source: trunk/LMDZ.MARS/libf/phymars/NLTEdlvr09_ZGRID.F @ 414

Last change on this file since 414 was 414, checked in by aslmd, 13 years ago

LMDZ.MARS : NEW NLTE MODEL FROM GRANADA AMIGOS

23/11/11 == FGG + MALV

New parameterization of the NLTE 15 micron cooling. The old parameterization is kept as an option, including or not variable atomic oxygen concentration. A new flag is introduced in callphys.def, nltemodel, to select which parameterization wants to be used (new one, old one with variable [O], or old one with fixed [O], see below). Includes many new subroutines and commons in phymars. Some existing routines are also modified:

-physiq.F. Call to the new subroutine NLTE_leedat in first call. Call to nltecool modified to allow for variable atomic oxygen. Depending on the value of nltemodel, the new subroutine NLTEdlvr09_TCOOL is called instead of nltecool.

-inifis.F. Reading of nltemodel is added.

-callkeys.h Declaration of nltemodel is added.

The following lines should be added to callphys.def (ideally after setting callnlte):

# NLTE 15um scheme to use.
# 0-> Old scheme, static oxygen
# 1-> Old scheme, dynamic oxygen
# 2-> New scheme
nltemodel = 2

A new directory, NLTEDAT, has to be included in datagcm.

Improvements into NLTE NIR heating parameterization to take into account variability with O/CO2 ratio and SZA. A new subroutine, NIR_leedat.F, and a new common, NIRdata.h, are included. A new flag, nircorr, is added in callphys.def, to include or not these corrections. The following files are modified:

-nirco2abs.F: nq and pq are added in the arguments. The corrections factors are interpolated to the GCM grid and included in the clculation. A new subroutine, interpnir, is added at the end of the file.

-physiq.F: Call to NIR_leedat added at first call. Modified call to nirco2abs

-inifis: Reading new flag nircorr.

-callkeys.h: Declaration of nircorr.

The following lines have to be added to callphys.def (ideally after callnirco2):

# NIR NLTE correction for variable SZA and O/CO2?
# matters only if callnirco2=T
# 0-> no correction
# 1-> include correction
nircorr=1

A new data file, NIRcorrection_feb2011.dat, has to be included in datagcm.

Small changes to the molecular diffusion scheme to fix the number of species considered, to avoid problems when compiling with more than 15 tracers (for example, when CH4 is included). Modified subroutines: aeronomars/moldiff.F and aeronomars/moldiffcoeff.F

File size: 5.2 KB
Line 
1c***********************************************************************
2
3        subroutine NLTEdlvr09_ZGRID (n_gcm, 
4     @          p_gcm, t_gcm, z_gcm,
5     @          co2vmr_gcm, n2vmr_gcm, covmr_gcm, o3pvmr_gcm ,mmean_gcm,
6     @          cpnew_gcm)
7
8c       jul 2011 malv+fgg    First version
9c***********************************************************************
10                                               
11        implicit none                                 
12       
13        include "dimensions.h"
14        include "dimphys.h"
15        include 'nltedefs.h'         
16        include 'nlte_atm.h'       
17        include 'tcr_15um.h'
18        include 'nlte_data.h'       
19        include 'chimiedata.h'
20        include 'conc.h'
21                                               
22c Arguments
23        integer n_gcm
24        real p_gcm(n_gcm), t_gcm(n_gcm)
25        real co2vmr_gcm(n_gcm), n2vmr_gcm(n_gcm)
26        real covmr_gcm(n_gcm), o3pvmr_gcm(n_gcm)
27        real z_gcm(n_gcm)
28        real mmean_gcm(n_gcm)
29        real cpnew_gcm(n_gcm)
30
31c local variables                               
32        integer i, j  , iz                               
33!       real  distancia, meanm, gz, Hkm
34        real  zmin, zmax, deltazz, deltazzy
35        real  nt_gcm(n_gcm)
36        real  mmean_nlte(n_gcm),cpnew_nlte(n_gcm)
37             
38c functions                                     
39        external        hrkday_convert                       
40        real            hrkday_convert                         
41                                               
42c***********************************************************************
43
44
45! Define working grid for MZ1D model (NL, ZL, ZMIN)
46! y otro mas fino para M.Curtis (NZ, ZX, ZXMIN = ZMIN
47
48! Para ello hace falta una z de ref del GCM, que voy a suponer la inferior
49
50! Primero, construimos escala z_gcm
51
52!       z_gcm (1) = zmin_gcm             ! [km]
53
54        !write (*,*) ' iz, p, g, H, z =', 1, p_gcm(1), z_gcm(1)
55!       do iz = 2, n_gcm
56!       do iz=1,n_gcm
57!          z_gcm(iz)=zlay(iz)/1.e3
58
59!         meanm = ( co2vmr_gcm(iz)*44. + o3pvmr_gcm(iz)*16.
60!     @               + n2vmr_gcm(iz)*28. + covmr_gcm(iz)*28. )
61!         meanm = meanm / n_avog
62!         distancia = ( radio + z_gcm(iz-1) )*1.e5
63!         gz = gg * masa / ( distancia * distancia )
64!          Hkm = 0.5*( t_gcm(iz)+t_gcm(iz-1) ) / ( meanm * gz )
65!          Hkm = kboltzman * Hkm *1e-5                           ! [km]
66!          z_gcm(iz) = z_gcm(iz-1) - Hkm * log( p_gcm(iz)/p_gcm(iz-1) )
67
68          !write (*,*) iz, p_gcm(iz), gz, Hkm, z_gcm(iz)
69
70!        enddo
71! Segundo, definimos los límites del modelo, entre las 2 presiones clave
72
73        ! Bottom boundary for NLTE model : Pbottom=2e-2mb=1.974e-5 atm
74        jlowerboundary = 1
75        do while ( p_gcm(jlowerboundary) .gt. Pbottom_atm )
76           jlowerboundary = jlowerboundary + 1
77        enddo
78        zmin = z_gcm(jlowerboundary)
79!       write (*,*) ' jlowerboundary, Pmin, zmin =',
80!     @            jlowerboundary, p_gcm(jlowerboundary), zmin
81
82        ! Top boundary for NLTE model : Ptop=2e-7mb = 1.974e-5 atm
83        jtopboundary = jlowerboundary 
84        do while ( p_gcm(jtopboundary) .gt. Ptop_atm )
85           jtopboundary = jtopboundary + 1
86        enddo
87        zmax = z_gcm(jtopboundary)
88!       write (*,*) ' jtopboundary, Pmax, zmax =',
89!     @      jtopboundary, p_gcm(jtopboundary),zmax
90
91        deltaz = (zmax-zmin) / (nl-1)
92        do i=1,nl                                     
93            zl(i) = zmin + (i-1) * deltaz
94        enddo                                         
95!       write (*,*) ' ZL grid:  dz,zmin,zmax ', deltaz, zl(1),zl(nl)
96! Creamos el perfil interpolando
97        call intersp (    pl,zl,nl,      p_gcm,z_gcm,n_gcm, 2)   ! [atm]
98        call intersp (     t,zl,nl,      t_gcm,z_gcm,n_gcm, 1)       
99        do i = 1, n_gcm
100           nt_gcm(i) = 7.339e+21 * p_gcm(i) / t_gcm(i)    ! [cm-3]         
101        enddo
102        call intersp (    nt,zl,nl,     nt_gcm,z_gcm,n_gcm, 2)       
103        call intersp (co2vmr,zl,nl, co2vmr_gcm,z_gcm,n_gcm, 1)       
104        call intersp ( n2vmr,zl,nl,  n2vmr_gcm,z_gcm,n_gcm, 1)       
105        call intersp ( covmr,zl,nl,  covmr_gcm,z_gcm,n_gcm, 1)       
106        call intersp (o3pvmr,zl,nl, o3pvmr_gcm,z_gcm,n_gcm, 1) 
107        call intersp (mmean_nlte,zl,nl,mmean_gcm,z_gcm,n_gcm,1)
108        call intersp (cpnew_nlte,zl,nl,cpnew_gcm,z_gcm,n_gcm,1)
109       
110
111        do i = 1, nl
112
113           co2(i) = nt(i) * co2vmr(i)
114           n2(i) = nt(i) * n2vmr(i)
115           co(i) = nt(i) * covmr(i)
116           o3p(i) = nt(i) * o3pvmr(i)
117
118!               hrkday_factor(i) =  hrkday_convert( t(i),       
119!     @           co2vmr(i), o3pvmr(i), n2vmr(i), covmr(i) )
120           hrkday_factor(i) = hrkday_convert (mmean_nlte(i),cpnew_nlte(i))
121
122        enddo
123                                               
124                                             
125
126c  Fine grid for transmittance calculations
127
128        deltazy = (zmax-zmin) / (nzy-1)
129        do i=1,nzy                                     
130            zy(i) = zmin + (i-1) * deltazy                   
131        enddo                                         
132!       write (*,*) ' ZY grid:  nzy,dzy,zmin,zmax ',
133!     @         nzy, deltazy, zy(1),zy(nzy)
134
135        call intersp (    py,zy,nzy,      p_gcm,z_gcm,n_gcm, 2)   ! [atm]
136        call intersp (    ty,zy,nzy,      t_gcm,z_gcm,n_gcm, 1)       
137        call intersp (   nty,zy,nzy,     nt_gcm,z_gcm,n_gcm, 2)       
138
139        call intersp (  co2y,zy,nzy,   co2vmr_gcm,z_gcm,n_gcm, 1)
140        do i=1,nzy
141           co2y(i) = co2y(i) * nty(i)
142        enddo
143
144
145 
146
147c end                                           
148        return                                         
149        end                                           
Note: See TracBrowser for help on using the repository browser.