1 |
C $Header: /u/gcmpack/MITgcm/pkg/fizhi/fizhi_init_fixed.F,v 1.5 2004/06/08 15:09:01 molod Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
subroutine fizhi_init_fixed (myThid) |
5 |
c----------------------------------------------------------------------- |
6 |
c Routine to initialise the fizhi package. |
7 |
c |
8 |
c Input: myThid - Process number calling this routine |
9 |
c |
10 |
c Notes: |
11 |
c 1) This routine is the interface to read input datasets and set |
12 |
c other fixed variables for fizhi |
13 |
c the datasets are: |
14 |
c vegetation (data for each tile at every grid point) |
15 |
c ozone (varies with lat, height and time - read it all in |
16 |
c now and interpolate between values later) |
17 |
c the other fixed parameters are: |
18 |
c N2O, Methane (vary with space) |
19 |
c CO2, CFC11, CFC12, CFC22 (set to a global value) |
20 |
c 3) For now, the fizhi package contains the alarms and clocks |
21 |
c routines, so this routine will also initialize the alarms. |
22 |
c----------------------------------------------------------------------- |
23 |
implicit none |
24 |
#include "CPP_OPTIONS.h" |
25 |
#include "SIZE.h" |
26 |
#include "fizhi_SIZE.h" |
27 |
#include "fizhi_land_SIZE.h" |
28 |
#include "EEPARAMS.h" |
29 |
#include "fizhi_chemistry_coms.h" |
30 |
#include "fizhi_earth_coms.h" |
31 |
#include "fizhi_land_coms.h" |
32 |
#include "chronos.h" |
33 |
#include "gridalt_mapping.h" |
34 |
#include "GRID.h" |
35 |
|
36 |
integer myThid |
37 |
|
38 |
integer i,j,bi,bj |
39 |
integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2 |
40 |
integer nymdb,nhmsb |
41 |
character*40 vegdata |
42 |
_RL pressure(Nrphys) |
43 |
_RL lats(sNx,sNy,nSx,nSy), lons(sNx,sNy,nSx,nSy) |
44 |
|
45 |
im1 = 1-OLx |
46 |
im2 = sNx+OLx |
47 |
jm1 = 1-OLy |
48 |
jm2 = sNy+OLy |
49 |
idim1 = 1 |
50 |
idim2 = sNx |
51 |
jdim1 = 1 |
52 |
jdim2 = sNy |
53 |
nymdb = nymd0 |
54 |
nhmsb = nhms0 |
55 |
|
56 |
call fizhi_alarms(nymdb,nhmsb,deltaTClock) |
57 |
|
58 |
do bj = myByLo(myThid), myByHi(myThid) |
59 |
do bi = myBxLo(myThid), myBxHi(myThid) |
60 |
do j = jm1,jm2 |
61 |
do i = im1,im2 |
62 |
lons(i,j,bi,bj) = xC(i,j,bi,bj) |
63 |
lats(i,j,bi,bj) = yC(i,j,bi,bj) |
64 |
enddo |
65 |
enddo |
66 |
enddo |
67 |
enddo |
68 |
call fizhi_init_veg ( mythid, vegdata,idim2,jdim2,Nsx,Nsy, |
69 |
. nSx*nPx,nSy*nPy,maxtyp,nchp,lons,lats, |
70 |
. surftype,tilefrac,igrd,ityp,chfr,chlt,chlon) |
71 |
|
72 |
C Compute pressure profile to get methane and n2o values (bottom-up) |
73 |
|
74 |
pressure(1)=1000. |
75 |
do L = 2,Nrphys+1 |
76 |
pressure(L)=pressure(L-1)-dpphys0(1,1,L-1,1,1) |
77 |
enddo |
78 |
|
79 |
call fizhi_init_chem(mythid, |
80 |
. nlatsoz,nlevsoz,ntimesoz,latsoz,levsoz,ozone, |
81 |
. nlatsq,nlevsq,ntimesq,latsq,levsq,stratq, |
82 |
. Nrphys,pressure,n20,methane,co2,cfc11,cfc12,cfc22) |
83 |
|
84 |
return |
85 |
end |