source: trunk/LMDZ.MARS/libf/phymars/nirdata.F90 @ 3026

Last change on this file since 3026 was 3006, checked in by emillour, 18 months ago

Mars PCM:
More code cleanup. Turn "nirdata.h" common into module "nirdata.F90" and
include "nir_leedat.F" (reading/loading of the data) in the module.
Also turn nirco2abs.F in a module.
EM

File size: 1.3 KB
RevLine 
[3006]1module nirdata_mod
[414]2
[3006]3implicit none
[414]4
[3006]5! Number of pressures in NIR correction table
6integer,parameter :: npres=42   
7
8real,save,protected :: pres1d(npres)
9real,save,protected :: corgcm(npres)
10real,save,protected :: oco21d(npres)
11real,save,protected :: alfa(npres)
12real,save,protected :: p1999(npres)
13!$OMP THREADPRIVATE(pres1d,corgcm,oco21d,alfa,p1999)
14
15contains
16
17  subroutine NIR_leedat
18
19!       reads parameters for NIR NLTE calculation   
20
21!       nov 2011    fgg+malv    first version               
22!***********************************************************************
23
24    use datafile_mod, only: datadir
25    USE mod_phys_lmdz_para, ONLY: is_master
26    USE mod_phys_lmdz_transfert_para, ONLY: bcast
27
28    implicit none
29
30! local variables                               
31
32    integer :: ind
33
34    if (is_master) then
35      open(43,file=trim(datadir)//'/NIRcorrection_feb2011.dat', &
36             status='old')
37      do ind=1,9
38        read(43,*)
39      enddo
40     
41      do ind=1,npres
42         read(43,*)pres1d(ind),corgcm(ind),oco21d(ind),p1999(ind), &
43              alfa(ind)
44         !Tabulated pression to Pa
45         pres1d(ind)=pres1d(ind)*100.
46      enddo
47      close(43)
48
49    endif !  if(is_master) then
50
51    call bcast(pres1d)
52    call bcast(corgcm)
53    call bcast(oco21d)
54    call bcast(p1999)
55    call bcast(alfa)
56
57  end subroutine NIR_leedat
58
59end module nirdata_mod
Note: See TracBrowser for help on using the repository browser.