Ignore:
Timestamp:
Nov 23, 2011, 10:14:21 AM (13 years ago)
Author:
aslmd
Message:

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

Location:
trunk/LMDZ.MARS/libf/aeronomars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/aeronomars/moldiff.F

    r38 r414  
    3232c Local
    3333c
    34        real hco2(ncomptot),ho
     34
     35      integer,parameter :: ncompmoldiff = 14
     36       real hco2(ncompmoldiff),ho
    3537
    3638      integer ig,nz,l,n,nn,iq
     
    3941      real hp(nlayermx)
    4042      real tt(nlayermx)
    41       real qq(nlayermx,ncomptot)
     43      real qq(nlayermx,ncompmoldiff)
    4244      real dmmeandz(nlayermx)
    43       real qnew(nlayermx,ncomptot)
     45      real qnew(nlayermx,ncompmoldiff)
    4446      real zlocal(nlayermx)
    45       real alf(ncomptot-1,ncomptot-1)
    46       real alfinv(nlayermx,ncomptot-1,ncomptot-1)
    47       real indx(ncomptot-1)
    48       real b(nlayermx,ncomptot-1)
    49       real y(ncomptot-1,ncomptot-1)
    50       real aa(nlayermx,ncomptot-1,ncomptot-1)
    51       real bb(nlayermx,ncomptot-1,ncomptot-1)
    52       real cc(nlayermx,ncomptot-1,ncomptot-1)
     47      real alf(ncompmoldiff-1,ncompmoldiff-1)
     48      real alfinv(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
     49      real indx(ncompmoldiff-1)
     50      real b(nlayermx,ncompmoldiff-1)
     51      real y(ncompmoldiff-1,ncompmoldiff-1)
     52      real aa(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
     53      real bb(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
     54      real cc(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
    5355      real atri(nlayermx-2)
    5456      real btri(nlayermx-2)
     
    5658      real rtri(nlayermx-2)
    5759      real qtri(nlayermx-2)
    58       real alfdiag(ncomptot-1)
    59       real wi(ncomptot), flux(ncomptot), pote
     60      real alfdiag(ncompmoldiff-1)
     61      real wi(ncompmoldiff), flux(ncompmoldiff), pote
    6062
    6163cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
     
    9597      integer,save :: g_h2o=0
    9698
    97       integer,save :: gcmind(ncomptot) ! array of GCM indexes
     99      integer,save :: gcmind(ncompmoldiff) ! array of GCM indexes
    98100      integer ierr
    99101
    100102      logical,save :: firstcall=.true.
    101       real abfac(ncomptot)
    102       real,save :: dij(ncomptot,ncomptot)
     103      real abfac(ncompmoldiff)
     104      real,save :: dij(ncompmoldiff,ncompmoldiff)
    103105
    104106! Initializations at first call
     
    215217     &                  +pdtconduc(ig,l)*ptimestep
    216218
    217           do nn=1,ncomptot
     219          do nn=1,ncompmoldiff
    218220            qq(l,nn)=pq(ig,l,gcmind(nn))+pdq(ig,l,gcmind(nn))*ptimestep
    219221            qq(l,nn)=max(qq(l,nn),1.e-30)
     
    230232     &                  +pdtconduc(ig,nz)*ptimestep
    231233
    232         do nn=1,ncomptot
     234        do nn=1,ncompmoldiff
    233235          qq(1,nn)=pq(ig,1,gcmind(nn))+pdq(ig,1,gcmind(nn))*ptimestep
    234236          qq(nz,nn)=pq(ig,nz,gcmind(nn))+pdq(ig,nz,gcmind(nn))*ptimestep
     
    251253        ntot=pplay(ig,l)/(1.381e-23*tt(l))                      ! in #/m3
    252254
    253         do nn=1,ncomptot-1            ! rows
     255        do nn=1,ncompmoldiff-1            ! rows
    254256          alfdiag(nn)=0.
    255257          dcoef1=dij(nn,i_o)*ptfac
    256           do n=1,ncomptot-1           ! columns
     258          do n=1,ncompmoldiff-1           ! columns
    257259            y(nn,n)=0.
    258260            dcoef=dij(nn,n)*ptfac
     
    277279c Inverting the alfa matrix
    278280c
    279         call ludcmp(alf,ncomptot-1,ncomptot-1,indx,d,ierr)
     281        call ludcmp(alf,ncompmoldiff-1,ncompmoldiff-1,indx,d,ierr)
    280282
    281283c       TEMPORAIRE *****************************
     
    291293        end if
    292294c       *******************************************
    293         do n=1,ncomptot-1
    294           call lubksb(alf,ncomptot-1,ncomptot-1,indx,y(1,n))
    295           do nn=1,ncomptot-1
     295        do n=1,ncompmoldiff-1
     296          call lubksb(alf,ncompmoldiff-1,ncompmoldiff-1,indx,y(1,n))
     297          do nn=1,ncompmoldiff-1
    296298            alfinv(l,nn,n)=y(nn,n)/hh
    297299          enddo
     
    309311        del1=hp(l)*pplay(ig,l)/(g*ptimestep)
    310312        del2=(hp(l)/2)**2*pplay(ig,l)/(g*ptimestep)
    311         do nn=1,ncomptot-1
    312           do n=1,ncomptot-1
     313        do nn=1,ncompmoldiff-1
     314          do n=1,ncompmoldiff-1
    313315            dalfinvdz=(alfinv(l+1,nn,n)-alfinv(l-1,nn,n))/hp(l)
    314316            aa(l,nn,n)=-dalfinvdz/del1+alfinv(l,nn,n)/del2
     
    336338c (Hunten 1973, eq. 5)
    337339     
    338       do n=1,ncomptot
     340      do n=1,ncompmoldiff
    339341        wi(n)=1.
    340342        flux(n)=0.
     
    379381c
    380382
    381       do nn=1,ncomptot-1
     383      do nn=1,ncompmoldiff-1
    382384        do l=2,nz-1
    383385          atri(l-1)=aa(l,nn,nn)
     
    385387          ctri(l-1)=cc(l,nn,nn)
    386388          rtri(l-1)=qq(l,nn)
    387           do n=1,ncomptot-1
     389          do n=1,ncompmoldiff-1
    388390            rtri(l-1)=rtri(l-1)-(aa(l,nn,n)*qq(l-1,n)
    389391     &                           +bb(l,nn,n)*qq(l,n)
     
    434436        if(zlocal(l).gt.65000.)then
    435437        pdqdiff(ig,l,g_o)=0.
    436         do n=1,ncomptot-1
     438        do n=1,ncompmoldiff-1
    437439          pdqdiff(ig,l,gcmind(n))=(qnew(l,n)-qq(l,n))
    438440          pdqdiff(ig,l,g_o)=pdqdiff(ig,l,g_o)-(qnew(l,n)-qq(l,n))
  • trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff.F

    r38 r414  
    2222c    Input/Output
    2323c    ------------
    24       real dij(ncomptot,ncomptot)
     24       integer,parameter :: ncompmoldiff = 14
     25      real dij(ncompmoldiff,ncompmoldiff)
    2526
    2627c    Local variables:
     
    6364      integer,save :: g_h2o=0
    6465
    65       integer,save :: gcmind(ncomptot)
     66      integer,save :: gcmind(ncompmoldiff)
    6667
    6768      real dnh
     
    187188       print*,'moldiffcoef: COEFF CALC'
    188189       open(56,file='coeffs.dat',status='unknown')
    189       do n=1,ncomptot
     190      do n=1,ncompmoldiff
    190191        if (dij(i_h2,n).gt.0.0) then
    191           do nn=n,ncomptot
     192          do nn=n,ncompmoldiff
    192193            dij(nn,n)=dij(i_h2,n)
    193194     &                  *sqrt(mmol(g_h2)/mmol(gcmind(nn)))
     
    198199        if (dij(i_h2,n).eq.0.0) then
    199200          dnh=dij(i_h,i_o)*sqrt(mmol(g_o)/mmol(gcmind(n)))
    200           do nn=n,ncomptot
     201          do nn=n,ncompmoldiff
    201202            dij(nn,n)=dnh*sqrt(mmol(g_h)/mmol(gcmind(nn)))
    202203            if(n.eq.nn) dij(nn,n)=1.0
     
    206207      enddo
    207208
    208       do n=1,ncomptot
    209         do nn=n,ncomptot
     209      do n=1,ncompmoldiff
     210        do nn=n,ncompmoldiff
    210211          write(56,*) n,nn,dij(n,nn)    !*1.e5/1.381e-23/(273**1.75)
    211212        enddo
Note: See TracChangeset for help on using the changeset viewer.