source: trunk/LMDZ.MARS/libf/aeronomars/param_read.F @ 658

Last change on this file since 658 was 658, checked in by emillour, 13 years ago

Mars GCM:

  • updated high atmosphere photochemistry (jthermcalc.F, param_v4.h, iono.h, paramfoto_compact.F, param_read.F , thermosphere.F).
  • minor change in calchim.F90 (to not use maxloc(zycol, dim = 2) function which seems to be a problem for g95) .
  • minor bug fix in perosat.F; set tendency on pdqscloud for h2o2 to zero if none is computed.
  • in "moldiff.F", changed "tridag" to "tridag_sp", "LUBKSB" to "LUBKSB_SP" and "LUDCMP" to "LUDCMP_SP" to avoid possible conflicts with same routines defined in "moldiff_red.F". Added use of automatic-sized array in "tridag" and "tridag_sp" local array "gam" (to avoid using an a priori oversized local array).

FGG+JYC+EM

File size: 13.1 KB
RevLine 
[38]1      subroutine param_read
2
3      implicit none
4
5
6c     common variables and constants
[635]7      include "dimensions.h"
8      include "dimphys.h"
9      include 'param.h'
10      include 'param_v4.h'
11      include 'datafile.h'
12 
13 
[38]14c     local variables
15
16      integer    i,j,k,inter                          !indexes
[635]17      integer ierr,lnblnk
[38]18      real       nada
[635]19 
20     
[38]21c*************************+PROGRAM STARTS**************************
22
23
[635]24c     data for the UV heating tabulation
[38]25
[635]26      data (crscabsi2(1,j),j=1,16) /5.61031E-19,1.59677E-18,4.7072E-18,
27     $     1.48254e-17,2.07445e-17,2.573e-17,2.901e-17,3.083e-17,
28     $     3.217e-17,3.539e-17,3.658e-17,3.63e-17,3.41239e-17,
29     $     2.71019e-17,4.93677e-17,1.64e-17/
[38]30
[635]31      data (crscabsi2(2,j),j=1,16) /0.27250E-18,0.11650E-17,0.39250E-17,
32     $     0.10630E-16,0.15590E-16,0.17180E-16,0.19270E-16,0.22860E-16,
33     $     0.24270E-16,0.24440E-16,0.25020E-16,0.26600E-16,0.25400E-16,
34     $     0.35800E-16,0.25590E-16,0.16740E-16/
[38]35
[635]36      data (crscabsi2(3,j),j=1,16) /0.2776E-18,0.9792E-18,0.3313E-17,
37     $     0.6621E-17,0.8481E-17,0.9146E-17,0.9414E-17,0.1039E-16,
38     $     0.1012E-16,0.1033E-16,0.1033E-16,0.1033E-16,0.8268E-17,
39     $     0.6563E-17,0.3506E-17,0.3470E-17/
[38]40
[635]41      data (crscabsi2(5,j),j=1,16) /.5E-20,.1077607E-19,.5670491E-19,
42     $     .3322716E-18,.1054509E-17,.1700005E-17,.3171188E-17,
43     $     .4734241E-17,.5108741E-17,.6022236E-17,.6741537E-17,
44     $     .7277079E-17,.9070787E-17,.9708916E-17,.4026281E-17,0.0/
45
46      data (crscabsi2(8,j),j=1,16) /0.0, 7.44175e-19, 2.23167e-18,
47     $    8.46200e-18,1.18275e-17,1.54900e-17,2.32475e-17,2.41373e-17,
48     $     2.55482e-17,2.38431e-17,2.28600e-17,2.35067e-17,2.56000e-17,
49     $     2.64636e-17,2.86260e-17,3.26561e-17/
50
51      data(crscabsi2(9,j),j=1,16) /3.48182e-20,3.37038e-19,1.03077e-18,
52     $     4.01364e-18,6.45e-18,7.8e-18,1.0e-17,1.13500e-17,1.15500e-17,
53     $     1.18000e-17,1.17500e-17,1.16000e-17,1.28667e-17,1.18500e-17,
54     $     1.11000e-17,9.50000e-18/
55
56      data(crscabsi2(10,j),j=1,16) /0.0,9.39833e-19,2.87714e-18,
57     $     9.66900e-18,1.37063e-17,1.61820e-17,2.30450e-17,2.63373e-17,
58     $     2.63773e-17,2.67677e-17,2.64100e-17,2.53000e-17,2.18100e-17,
59     $     2.04941e-17,2.28160e-17,2.93550e-17/
60
61      data(crscabsi2(11,j),j=1,16) /0.0,9.58555e-19,2.52767e-18,
62     $     8.29700e-18,1.21850e-17,1.40500e-17,1.97025e-17,2.12018e-17,
63     $     2.14673e-17,2.20331e-17,2.21500e-17,2.21600e-17,2.33200e-17,
64     $     2.67800e-17,2.56400e-17,3.58561e-17/
65
66      data(crscabsi2(12,j),j=1,16) /0.0,1.0e-20,2.5e-20,1.30400e-19,
67     $     2.93800e-19,4.36000e-19,8.49400e-19,1.29400e-18,1.40500e-18,
68     $     1.67600e-18,1.93400e-18,2.12200e-18,2.75800e-18,3.48400e-18,
69     $     4.17200e-18,5.26000e-18/
70
71      data(crscabsi2(13,j),j=1,16) /0.0,1.60e-18,4.99111e-18,1.48496e-17
72     $     ,2.17395e-17,2.55857e-17,2.87754e-17,3.65571e-17,3.85691e-17,
73     $     4.16286e-17,4.15117e-17,4.05901e-17,3.64000e-17,2.99670e-17,
74     $     2.46796e-17,2.51789e-17/
75
76      data freccen /3.4,7.5,14.5,23.0,30.3,34.1,49.6,50.5,52.5,56.0,
[38]77     $59.0,61.5,68.7,73.1,78.4,83.1,92.4,97.5,99.3,100.1,100.7,102.1,
78     $104.5,116.8,121.3,127.0,130.6,153.7,162.8,171.4
[635]79     $,195.6,206.3,222.0,236.0,289.0,600./
[38]80
[635]81      data co2crsc195/2.05864e-17,5.90557e-20,3.1027e-19,6.70653e-19,
82     $4.55132e-19,8.87122e-20,1.32138e-20,7.22244e-23,2.88002e-26/
[38]83
[635]84      data co2crsc295/2.05897e-17,6.71104e-20,3.45509e-19,7.45711e-19,
85     $4.82752e-19,1.11594e-19,1.98308e-20,1.3853e-22,2.1414e-25/
[38]86
87c     Reads tabulated functions
88
[635]89      !Tabulated column amount
90      open(210, status = 'old',
91c    $file=datafile(1:lnblnk(datafile))//'/EUVDAT/coln.dat',iostat=ierr)
92     $file=datafile
93     $   (1:lnblnk(datafile))//'/EUVDAT/param_v5/coln.dat',iostat=ierr)
[38]94
[635]95      IF (ierr.NE.0) THEN
[38]96       write(*,*)'cant find directory EUVDAT and content coln.dat'
[658]97       write(*,*)'(in aeronomars/param_read.F)'
[635]98       write(*,*)'It should be in :', datafile,'/'
[38]99       write(*,*)'1) You can change this directory address in '
100       write(*,*)'   file phymars/datafile.h'
101       write(*,*)'2) If necessary, EUVDAT (and other datafiles)'
102       write(*,*)'   can be obtained online on:'
103       write(*,*)'   http://www.lmd.jussieu.fr/~forget/datagcm/datafile'
104       STOP
105      ENDIF
[635]106 
107      !Tabulated photoabsorption coefficients
108      open(220,file=datafile
109     $     (1:lnblnk(datafile))//'/EUVDAT/param_v5/j2_an.dat')
110      open(230,file=datafile
111     $     (1:lnblnk(datafile))//'/EUVDAT/param_v5/j3_an.dat')
112      open(240,file=datafile
113     $     (1:lnblnk(datafile))//'/EUVDAT/param_v5/j1_an.dat')
114      open(250,file=datafile
115     $     (1:lnblnk(datafile))//'/EUVDAT/param_v5/j2_bn.dat')
116      open(260,file=datafile
117     $     (1:lnblnk(datafile))//'/EUVDAT/param_v5/j2_cn.dat')
118      open(300,file=datafile
119     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j2_dn.dat')
120      open(270,file=datafile
121     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j1_bn.dat')
122      open(280,file=datafile
123     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j1_cn.dat')
124      open(290,file=datafile
125     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j1_dn.dat')
126      open(150,file=datafile
127     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j4n.dat')
128      open(160,file=datafile
129     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j5n.dat')
130      open(170,file=datafile
131     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j6n.dat')
132      open(180,file=datafile
133     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j7n.dat')
134      open(390,file=datafile
135     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j8_an.dat')
136      open(400,file=datafile
137     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j8_bn.dat')
138      open(410,file=datafile
139     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j9n.dat')
140      open(420,file=datafile
141     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j10_an.dat')
142      open(430,file=datafile
143     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j10_bn.dat')
144      open(440,file=datafile
145     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j10_cn.dat')
146      open(450,file=datafile
147     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j11_an.dat')
148      open(460,file=datafile
149     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j11_bn.dat')
150      open(470,file=datafile
151     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j11_cn.dat')
152      open(480,file=datafile
153     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j12n.dat')
154      open(490,file=datafile
155     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j13_an.dat')
156      open(500,file=datafile
157     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j13_bn.dat')
158      open(510,file=datafile
159     $     (1:lnblnk(datafile))//'/EUVDAT//param_v5/j13_cn.dat')
[38]160
[635]161     
162      do i=210,300,10
[38]163         read(i,*)
164         read(i,*)
165      end do
166
[635]167      do i=150,180,10
[38]168         read(i,*)
169         read(i,*)
170      end do
171
[635]172      do i=390,510,10
173         read(i,*)
174         read(i,*)
175      enddo
176
[38]177      do i=nz2,1,-1
[635]178         read(210,*) (c1_16(i,j),j=1,16),c17_24(i),c25_29(i),c30_31(i),
179     $        c32(i),c33(i),c34(i),c35(i),c36(i)
[38]180      end do
181
182      do i=nz2,1,-1
[658]183         read(220,*) (jabsifotsintpar(i,2,j),j=1,16)
[38]184      end do
185     
186      do i=nz2,1,-1
[658]187         read(230,*) (jabsifotsintpar(i,3,j),j=1,16)
[38]188      end do
189
190      do i=nz2,1,-1
[658]191         read(240,*) (jabsifotsintpar(i,1,j),j=1,16)
[38]192      end do
193
194      do i=nz2,1,-1
[658]195         read(250,*) (jabsifotsintpar(i,2,j),j=17,24)
[38]196      end do
197
[635]198
[38]199      do i=nz2,1,-1
[658]200         read(260,*) (jabsifotsintpar(i,2,j),j=25,31)
[38]201      end do
202
203      do i=nz2,1,-1
[658]204         read(270,*) (jabsifotsintpar(i,1,j),j=17,24)
[38]205      end do
206
207      do i=nz2,1,-1
[658]208         read(280,*) (jabsifotsintpar(i,1,j),j=25,31)
[38]209      end do
210
211      do i=nz2,1,-1
[658]212         read(290,*) jabsifotsintpar(i,1,32)
[38]213      end do
214
215      do i=nz2,1,-1
[658]216         read(300,*) (jabsifotsintpar(i,2,j),j=32,34)
[38]217      end do
218
219      do i=nz2,1,-1
[658]220         read(160,*) (jabsifotsintpar(i,5,j),j=1,15)
[38]221      end do
222
223      do i=nz2,1,-1
[658]224         read(150,*) (jabsifotsintpar(i,4,j),j=25,31)
[38]225      end do
226
[635]227      do i=nz2,1,-1
[658]228         read(170,*) (jabsifotsintpar(i,6,j),j=25,35)
[635]229      end do
230
231      do i=nz2,1,-1
[658]232         read(180,*) (jabsifotsintpar(i,7,j),j=34,36)
[635]233      end do
234
235      do i=nz2,1,-1
[658]236         read(390,*) (jabsifotsintpar(i,8,j),j=2,16)
[635]237      enddo
238
239      do i=nz2,1,-1
[658]240         read(400,*) (jabsifotsintpar(i,8,j),j=17,24)
[635]241      enddo
242
243      do i=nz2,1,-1
[658]244         read(410,*) (jabsifotsintpar(i,9,j),j=1,16)
[635]245      enddo
246
247      do i=nz2,1,-1
[658]248         read(420,*) (jabsifotsintpar(i,10,j),j=2,16)
[635]249      enddo
250
251      do i=nz2,1,-1
[658]252         read(430,*) (jabsifotsintpar(i,10,j),j=17,24)
[635]253      enddo
254
255      do i=nz2,1,-1
[658]256         read(440,*) (jabsifotsintpar(i,10,j),j=25,32)
[635]257      enddo
258
259      do i=nz2,1,-1
[658]260         read(450,*) (jabsifotsintpar(i,11,j),j=2,16)
[635]261      enddo
262
263      do i=nz2,1,-1
[658]264         read(460,*) (jabsifotsintpar(i,11,j),j=17,24)
[635]265      enddo
266
267      do i=nz2,1,-1
[658]268         read(470,*) (jabsifotsintpar(i,11,j),j=25,29)
[635]269      enddo
270     
271      do i=nz2,1,-1
[658]272         read(480,*) (jabsifotsintpar(i,12,j),j=2,16)
[635]273      enddo
274
275      do i=nz2,1,-1
[658]276         read(490,*) (jabsifotsintpar(i,13,j),j=2,16)
[635]277      enddo
278     
279      do i=nz2,1,-1
[658]280         read(500,*) (jabsifotsintpar(i,13,j),j=17,24)
[635]281      enddo
282     
283      do i=nz2,1,-1
[658]284         read(510,*) (jabsifotsintpar(i,13,j),j=25,36)
[635]285      enddo
286
287      do i=210,300,10
[38]288         close(i)
289      end do
290
[635]291      do i=150,180,10
[38]292         close(i)
293      end do
294
[635]295      do i=390,510,10
296         close(i)
297      enddo
[38]298
299
[635]300c     set t0
301
302      do i=1,nz2
303         t0(i)=195.
[38]304      end do
305
[635]306
[38]307      do i=1,ninter
[635]308         fluxtop(i)=1.
[38]309      end do
310
[635]311      !Parameters for the variation of the solar flux with 11 years cycle
312      open(100,file=datafile
313     $     (1:lnblnk(datafile))//'/EUVDAT/param_v5/varflujo.dat')
314      read(100,*)
[38]315      do i=1,24
[635]316         read(100,*) inter,ct1(i),p1(i),ct2(i),p2(i),nada
[38]317      end do
[635]318      close(100)
[38]319
[635]320c     dissociation and ionization efficiencies
[38]321
[635]322      do inter=1,ninter
323         efdisco2(inter)=0.
324         efdiso2(inter)=0.
325         efdish2(inter)=0.
326         efdish2o(inter)=0.
327         efdish2o2(inter)=0.
328         efdiso3(inter)=0.
329         efdisco(inter)=0.
330         efdisn2(inter)=0.
331         efdisno(inter)=0.
332         efdisno2(inter)=0.
333         efionco2(inter,1)=0.
334         efionco2(inter,2)=0.
335         efionco2(inter,3)=0.
336         efionco2(inter,4)=0.
337         efiono3p(inter)=0.
338         efionn2(inter,1)=0.
339         efionn2(inter,2)=0.
340         efionco(inter,1)=0.
341         efionco(inter,2)=0.
342         efionco(inter,3)=0.
343         efionn(inter)=0.
344         efionh(inter)=0.
345         efionno(inter)=0.
346      enddo
[38]347
348
[635]349c     CO2, O2, NO
[38]350
[635]351      open(120,file=datafile
352     $     (1:lnblnk(datafile))//'/EUVDAT/param_v5/efdis_inter.dat')
353      read(120,*)
354!      do i=1,21
355!         read(120,*)inter,efdisco2(inter),efdiso2(inter),efdisno(inter)
356      do inter=8,28
357         read(120,*)i,efdisco2(inter),efdiso2(inter),efdisno(inter)
358      enddo
359      do inter=29,ninter
360         efdisco2(inter)=1.
361         efdiso2(inter)=1.
362         efdisno(inter)=1.
363      enddo
[38]364
365
[635]366c     N2
[38]367
[635]368      efdisn2(15)=0.1
369      do inter=16,ninter
370         efdisn2(inter)=1.
371      enddo
[38]372
373
[635]374c     CO
[38]375
[635]376      efdisco(16)=0.5
377      do inter=17,ninter
378         efdisco(inter)=1.
379      enddo
[38]380
[635]381     
382c     O, N, H
[38]383
[635]384      do inter=1,ninter
385         efdiso(inter)=0.
386         efdisn(inter)=0.
387         efdish(inter)=0.
388      enddo
[38]389
[635]390
391c     H2O, H2O2, O3, NO2
392
[38]393      do inter=25,31
[635]394         efdish2o(inter)=1.
395      enddo
396      do inter=25,35
397         efdish2o2(inter)=1.
398      enddo
399      do inter=34,36
400         efdiso3(inter)=1.
401      enddo
402      do inter=27,36
403         efdisno2(inter)=1.
404      enddo
405      do inter=1,15
406         efdish2(inter)=1.
407      enddo
408         
409      !4 possible channels for CO2 ionization
410      do inter=14,16
411         efionco2(inter,1)=1.-efdisco2(inter)
412      enddo
413      efionco2(13,1)=0.805*(1.-efdisco2(13))
414      efionco2(13,2)=0.195*(1.-efdisco2(13))
415      do inter=11,12
416         efionco2(inter,3)=1.-efdisco2(inter)
417      enddo
418      efionco2(10,3)=0.9*(1.-efdisco2(10))
419      efionco2(10,4)=0.1*(1.-efdisco2(10))
420      do inter=2,9
421         efionco2(inter,4)=1.-efdisco2(inter)
422      enddo
[38]423
[635]424      !For O(3p) total ionization under 91.1 nm
425      do inter=1,16
426         efiono3p(inter)=1.d0
427      enddo
[38]428
[635]429      !2 channels for N2 ionization
430      do inter=9,15
431         efionn2(inter,1)=1.-efdisn2(inter)
432      enddo
433      do inter=2,8
434         efionn2(inter,2)=1.-efdisn2(inter)
435      enddo
436     
437      !3 channels for CO ionization
438      do inter=11,16
439         efionco(inter,1)=1.-efdisco(inter)
440      enddo
441      efionco(10,1)=0.87*(1.-efdisco(10))
442      efionco(10,2)=0.13*(1.-efdisco(10))
443      do inter=8,9
444         efionco(inter,2)=1.-efdisco(inter)
445      enddo
446      efionco(7,2)=0.1*(1.-efdisco(7))
447      efionco(7,3)=0.9*(1.-efdisco(7))
448      do inter=2,6
449         efionco(inter,3)=1.-efdisco(inter)
450      enddo
[38]451
[635]452      !Total ionization under 85 nm for N
453      do inter=1,16
454         efionn(inter)=1.
455      enddo
456
457      !NO
458      do inter=2,28
459         efionno(inter)=1.-efdisno(inter)
460      enddo
461
462      !Total ionization under 90 nm for H
463      do inter=3,16
464         efionh(inter)=1.
465      enddo
466
467
[38]468      return
469
470
471      end
[635]472
Note: See TracBrowser for help on using the repository browser.