source: trunk/LMDZ.MARS/libf/aeronomars/read_phototable.F @ 416

Last change on this file since 416 was 334, checked in by aslmd, 14 years ago

LMDZ.MARS:

28/10/11 == FL + AS

ADDED THE NEW FRAMEWORK FOR PHOTOCHEMISTRY
This is not the last version. A new rewritten version of calchim.F [using LAPACK] is yet to be committed.
--> A new version for photochemistry routines : *_B.F no longer exists, new routines in aeronomars
D 333 libf/aeronomars/photochemist_B.F
D 333 libf/aeronomars/init_chimie_B.F
A 0 libf/aeronomars/read_phototable.F
M 333 libf/aeronomars/calchim.F
A 0 libf/aeronomars/photochemistry.F
M 333 libf/aeronomars/chimiedata.h
--> Changed calls to calchim and watercloud [surfdust and surfice needed] in physiq.F
--> Left commented code for outputs in physiq.F [search for FL]
--> Added settings which works for 35 levels in inidissip.F according to FL. Commented for the moment.
--> Checked compilation and run, looks fine. Note that 'jmars.20101220' is needed.

File size: 2.1 KB
Line 
1      subroutine read_phototable
2c
3cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
4c
5c   subject:
6c   --------
7c
8c   read photolysis lookup table
9c
10c   VERSION: 17/03/2011
11c
12c   Author:   Franck Lefevre
13c
14c   Arguments:
15c   ----------
16c
17c   The output variable is jphot and is put in common chimiedata.
18c
19cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
20c
21      implicit none
22c
23#include "dimensions.h"
24#include "chimiedata.h"
25#include "datafile.h"
26c
27cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
28c     local:
29cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
30c
31      integer fic, ij, iozo, isza, itemp, iz, itau, ierr
32c
33      real xsza
34c
35cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
36c
37      fic = 81
38
39      open(fic, form = 'formatted', status = 'old',
40     &file =trim(datafile)//'/jmars.20101220',iostat=ierr)
41
42      IF (ierr.NE.0) THEN
43        write(*,*)'Error : cannot open photolysis lookup table'
44        write(*,*)'(in aeronomars/init_chemistry.F)'
45        write(*,*)'It should be in :',trim(datafile),'/'
46        write(*,*)'1) You can change this directory address in '
47        write(*,*)'   file phymars/datafile.h'
48        STOP
49      ENDIF
50
51c
52      print*, 'read photolysis lookup table...'
53c
54      do itau = 1,ntau
55         do itemp = 1,ntemp
56            do iozo = 1,nozo
57               do isza = 1,nsza
58                  do iz = 200,0,-1
59                     read(fic,*) colairtab(iz), xsza, table_ozo(iozo)
60c                    print*, colairtab(iz), xsza, table_ozo(iozo)
61                     read(fic,'(7e11.4)')
62     $               (jphot(itemp,isza,iz,iozo,itau,ij), ij= 1,nd)
63                     do ij = 1,nd
64                        if (jphot(itemp,isza,iz,iozo,itau,ij)
65     $                     .eq. 1.e-30) then
66                           jphot(itemp,isza,iz,iozo,itau,ij) = 0.
67                        end if
68                     end do
69                  end do
70               end do
71            end do
72         end do
73      end do
74c
75      print*, 'lookup table...ok'
76      close(fic)
77c
78      return
79      end
Note: See TracBrowser for help on using the repository browser.