source: trunk/LMDZ.MARS/libf/phymars/cm15um_hb_simple.F @ 426

Last change on this file since 426 was 414, checked in by aslmd, 14 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: 10.6 KB
Line 
1c***********************************************************************
2                                                           
3        subroutine cm15um_hb_simple (ig,icurt)           
4                                                           
5c   computing the curtix matrixes for the 15 um hot bands   
6c   (las de las bandas fudnamentales las calcula cm15um_fb)
7                                                           
8c       jan 98          malv            version de mod3/cm_15um.f para mz1d
9c       jul 2011 malv+fgg               adapted to LMD-MGCM
10c***********************************************************************
11                                                           
12        implicit none                                 
13                                                           
14!!!!!!!!!!!!!!!!!!!!!!!                         
15! common variables & constants                 
16                                                           
17        include 'nltedefs.h'         
18        include 'nlte_atm.h'       
19        include 'nlte_data.h'       
20!       include '../CMN/tcr_15um.cmn'     
21        include 'tcr_15um.h'
22        include 'nlte_results.h' 
23        include 'nlte_matrix.h'     
24        include 'nlte_curtis.h'     
25                                                           
26!!!!!!!!!!!!!!!!!!!!!!!                         
27! arguments                                     
28                   
29        integer ig                      ! ADDED FOR TRACEBACK
30        integer icurt                   ! icurt=0,1,2                 
31                                        ! new calculations? (see caa.f heads)
32                                                           
33!!!!!!!!!!!!!!!!!!!!!!!                         
34! local variables                               
35                                                           
36        real*4 cdummy(nl,nl), csngl(nl,nl)             
37                                                           
38        real*8 cax1(nl,nl), cax2(nl,nl), cax3(nl,nl)   
39        real*8 v1(nl), v2(nl), v3(nl), cm_factor, vc_factor       
40                                                           
41        integer itauout,icfout,itableout, interpol,ismooth, isngldble         
42        integer i,j,ik,ist,isot,ib,itt                 
43                                                           
44        !character      bandcode*2
45        character       isotcode*2
46        character       codmatrx_hot*5                     
47                                                           
48!!!!!!!!!!!!!!!!!!!!!!!                         
49! external functions                           
50                                                           
51        external bandid                               
52        character*2 bandid                             
53                                                           
54!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!               
55! subroutines called:                           
56!       mz4sub, dmzout, readc_mz4, readcupdw, mztf   
57                                                           
58!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!               
59! formatos                                     
60 132    format(i2)                                 
61                                                           
62************************************************************************
63************************************************************************
64                                                           
65        call zerom (c121,nl)                           
66                                                           
67        call zerov (vc121,nl)                         
68                                                           
69        call zerom (cup121,nl)                         
70        call zerom (cdw121,nl)                         
71                                                           
72        call zerov (taugr121,nl)                       
73                                                           
74                                                           
75        itauout = 0             ! =1 --> with output of tau       
76        icfout = 0              ! =1 --> with output of cf         
77        itableout = 0           ! =1 --> with output of table of taus       
78        isngldble = 1           ! =1 --> dble precission       
79                                                           
80        codmatrx_hot='     '
81        if (icurt.eq.2) then                           
82                icfout=1                                     
83        elseif (icurt.eq.0) then                       
84                write (*,'(a,a$)')                           
85     @          ' hot bands. code for old matrixes (5 chars): '     
86                read (*,'(a)')  codmatrx_hot                 
87        endif                                         
88                                                           
89        fileroot = 'cfl'                               
90                                                           
91! ====================== curtis matrixes for fh bands ==================
92                                                           
93                                                           
94! una piedra en el camino ...                   
95!       write (*,*)  ' cm15um_hb/1 '                                   
96                                                           
97ccc                                             
98        if ( input_cza.ge.1 ) then                     
99ccc                                             
100                                                           
101        if (icurt.eq.2) then                           
102          write (*,'(a,a$)')                           
103     @        '  new calculation of curt. mat. for fh bands.',         
104     @        '    code for new matrixes : '               
105          read (*,'(a)') codmatrx_hot                 
106        elseif (icurt.eq.0) then                       
107          write (*,'(a,a$)')                           
108     @        '  reading in curt. mat. for fh bands.',     
109     @        '    code for old matrixes : '               
110          read (*,'(a)') codmatrx_hot                 
111        else                                           
112!         write (*,'(a)')                             
113!     @        '  new calculation of curt. mat. for fh bands.'         
114        end if                                         
115                                                           
116!       fh bands for the 626 isotope ================================- 
117                                                           
118        ist = 1                                       
119        isot = 26                                     
120!       encode (2,132,isotcode) isot                 
121        write (isotcode,132) isot 
122                             
123        do 11, ik=1,3                                 
124                                                           
125          ib=ik+1                                     
126                                                           
127          if (icurt.gt.0) then                         
128            call zero3m (cax1,cax2,cax3,nl)           
129! una piedra en el camino ...                   
130            !write (*,*)  ' cm15um_hb/11 '                                 
131            !write (*,*)  ' ib, ist, irw, imu =', ib, ist, irw_mztf, imu     
132            call mztf ( ig,cax1,cax2,cax3,v1,v2, ib,ist,irw_mztf,imu,     
133     @        itauout,icfout,itableout)                   
134!         else                                         
135!           bandcode = bandid(ib)                     
136!           filend=isotcode//dn//bandcode//codmatrx_hot           
137!!          write (*,*)  char(9), fileroot//filend                     
138!           call zero3m (cax1,cax2,cax3,nl)           
139!           call readcud_mz1d ( cax1,cax2,cax3, v1, v2,           
140!     @         fileroot,filend, csngl, nl,nan,0,isngldble)
141          end if                                       
142                                                           
143c         calculating the total c121(n,r) matrix for the first hot band     
144          do i=1,nl                                   
145                                                           
146           if ( ib .eq. 4 ) then                       
147!           write (*,*)  ' '                                           
148!           write (*,*)  i, ' ib,ist, altura :', ib,ist, zl(i)         
149           endif                                       
150                                                           
151!           if ( v1(i) .le. 1.d-99 ) v1(i) = 0.0d0   
152!           if ( v2(i) .le. 1.d-99 ) v2(i) = 0.0d0   
153                                                           
154                                                           
155            if(ik.eq.1)then                           
156                cm_factor = (dble(618.03/667.75))**2.d0*     
157     @                    exp( dble(ee*(667.75-618.03)/t(i)) )     
158                vc_factor = dble(667.75/618.03)               
159            elseif(ik.eq.2)then                       
160                cm_factor = 1.d0                             
161                vc_factor = 1.d0                             
162            elseif(ik.eq.3)then                       
163                cm_factor = ( dble(720.806/667.75) )**2.d0*   
164     @                    exp( dble(ee*(667.75-720.806)/t(i)) )   
165                vc_factor = dble(667.75/720.806)             
166            end if                                     
167            do j=1,nl                                 
168!              if (cax1(i,j) .le. 1.d-99 ) cax1(i,j) = 0.0d0     
169!              if (cax2(i,j) .le. 1.d-99 ) cax2(i,j) = 0.0d0     
170!              if (cax3(i,j) .le. 1.d-99 ) cax3(i,j) = 0.0d0     
171              c121(i,j) = c121(i,j) + cax1(i,j) * cm_factor       
172              cup121(i,j) = cup121(i,j) + cax2(i,j) * cm_factor   
173              cdw121(i,j) = cdw121(i,j) + cax3(i,j) * cm_factor   
174            end do                                     
175                                                           
176!           write (*,*)  ' i =', i                                     
177!           write (*,*)  ' vc_factor =', vc_factor                     
178!           write (*,*)  ' v1 =', v1(i)                               
179!           write (*,*)  ' v2 =', v2(i)                               
180!           write (*,*)  vc121(i), taugr121(i)                         
181!           write (*,*)  v1(i) * vc_factor                             
182!           write (*,*)  vc121(i) + v1(i) * vc_factor                 
183                                                           
184            vc121(i) = vc121(i) + v1(i) * vc_factor   
185           
186                                     
187!           write (*,*)  v2(i) * vc_factor                             
188!           write (*,*)  taugr121(i) + v2(i) * vc_factor               
189                                                           
190            taugr121(i) = taugr121(i) + v2(i) * vc_factor         
191                                                           
192          end do                                       
19311      continue                                     
194                                                           
195ccc                                             
196        end if                                         
197ccc                                             
198                                                           
199                                                           
200        return                                         
201        end                                           
Note: See TracBrowser for help on using the repository browser.