/[MITgcm]/MITgcm/verification/fizhi-gridalt-hs/code/fizhi_init_fixed.F
ViewVC logotype

Diff of /MITgcm/verification/fizhi-gridalt-hs/code/fizhi_init_fixed.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by molod, Tue May 24 14:57:00 2005 UTC revision 1.4 by jmc, Tue Mar 20 19:46:17 2012 UTC
# Line 2  C $Header$ Line 2  C $Header$
2  C $Name$  C $Name$
3    
4  #include "FIZHI_OPTIONS.h"  #include "FIZHI_OPTIONS.h"
5         subroutine fizhi_init_fixed (myThid)         SUBROUTINE FIZHI_INIT_FIXED (myThid)
6  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
7  c  Routine to initialise the fizhi package.  c  Routine to initialise the fizhi package.
8  c    c
9  c  Input: myThid       - Process number calling this routine  c  Input: myThid       - Process number calling this routine
10  c  c
11  c  Notes:  c  Notes:
12  c   1) This routine is the interface to read input datasets and set  c   1) This routine is the interface to read input datasets and set
13  c      other fixed variables for fizhi  c      other fixed variables for fizhi
14  c      the datasets are:  c      the datasets are:
# Line 21  c         CO2, CFC11, CFC12, CFC22 (set Line 21  c         CO2, CFC11, CFC12, CFC22 (set
21  c   3) For now, the fizhi package contains the alarms and clocks  c   3) For now, the fizhi package contains the alarms and clocks
22  c      routines, so this routine will also initialize the alarms.  c      routines, so this routine will also initialize the alarms.
23  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
24         implicit none         IMPLICIT NONE
25  #include "SIZE.h"  #include "SIZE.h"
26  #include "fizhi_SIZE.h"  #include "fizhi_SIZE.h"
27  #include "fizhi_land_SIZE.h"  #include "fizhi_land_SIZE.h"
# Line 35  c--------------------------------------- Line 35  c---------------------------------------
35  #include "GRID.h"  #include "GRID.h"
36  #include "PARAMS.h"  #include "PARAMS.h"
37    
38         integer myThid         INTEGER myThid
39    
40         integer i,j,L,bi,bj         INTEGER i,j,L,bi,bj
41         integer im1, im2, jm1, jm2, idim2, jdim2         INTEGER im1, im2, jm1, jm2, idim2, jdim2
42         integer nymdb,nhmsb         INTEGER nymdb,nhmsb
43         character*40 vegdata         CHARACTER*40 vegdata
44         _RL pressure0(Nrphys+1)         _RL pressure0(Nrphys+1)
45         _RL pressure(Nrphys)         _RL pressure(Nrphys)
46         _RL lats(sNx,sNy,Nsx,Nsy), lons(sNx,sNy,Nsx,Nsy)         _RL lats(sNx,sNy,nSx,nSy), lons(sNx,sNy,nSx,nSy)
47         _RL fracland(sNx,sNy,Nsx,Nsy)         _RL fracland(sNx,sNy,nSx,nSy)
48    
49         idim2 = sNx+OLx         idim2 = sNx+OLx
50         jdim2 = sNy+OLy         jdim2 = sNy+OLy
# Line 61  c--------------------------------------- Line 61  c---------------------------------------
61         endif         endif
62  #endif  #endif
63    
64    #ifdef ALLOW_DIAGNOSTICS
65           if ( useDiagnostics ) then
66            call fizhi_diagnostics_init( myThid )
67           endif
68    #endif
69    
70         call fizhi_alarms(nymdb,nhmsb,deltaTClock)         call fizhi_alarms(nymdb,nhmsb,deltaTClock)
71    
72         do bj = myByLo(myThid), myByHi(myThid)         do bj = myByLo(myThid), myByHi(myThid)
# Line 74  c--------------------------------------- Line 80  c---------------------------------------
80         enddo         enddo
81         enddo         enddo
82         vegdata = 'veg19232.data'         vegdata = 'veg19232.data'
83         call fizhi_init_veg ( mythid, vegdata,im2,jm2,Nsx,Nsy,         call fizhi_init_veg ( myThid, vegdata,im2,jm2,nSx,nSy,
84       .         nSx*nPx,nSy*nPy,maxtyp,nchp,nchptot,nchpland,lons,lats,       &         nSx*nPx,nSy*nPy,maxtyp,nchp,nchptot,nchpland,lons,lats,
85       .         surftype,tilefrac,igrd,ityp,chfr,chlt,chlon)       &         surftype,tilefrac,igrd,ityp,chfr,chlt,chlon)
86    
87  C And now fill the earth export landtype  C And now fill the earth export landtype
88         do bj = myByLo(myThid), myByHi(myThid)         do bj = myByLo(myThid), myByHi(myThid)
89         do bi = myBxLo(myThid), myBxHi(myThid)         do bi = myBxLo(myThid), myBxHi(myThid)
90          call get_landfrac(im2,jm2,Nsx,Nsy,bi,bj,maxtyp,          call get_landfrac(im2,jm2,nSx,nSy,bi,bj,maxtyp,
91       .        surftype,tilefrac,fracland)       &        surftype,tilefrac,fracland(1,1,bi,bj))
92          do j=jm1,jm2          do j=jm1,jm2
93          do i=im1,im2          do i=im1,im2
94           landtype(i,j,bi,bj) = surftype(i,j,1,bi,bj)           landtype(i,j,bi,bj) = surftype(i,j,1,bi,bj)
95           if(fracland(i,j,bi,bj).ge.0.3.and.surftype(i,j,1,bi,bj).ge.100)           if(fracland(i,j,bi,bj).ge.0.3.and.surftype(i,j,1,bi,bj).ge.100)
96       .            landtype(i,j,bi,bj) = surftype(i,j,2,bi,bj)       &            landtype(i,j,bi,bj) = surftype(i,j,2,bi,bj)
97           if(sice(i,j,bi,bj).ne.0.0)landtype(i,j,bi,bj) = 101           if(sice(i,j,bi,bj).ne.0.0)landtype(i,j,bi,bj) = 101
98          enddo          enddo
99          enddo          enddo
100         enddo         enddo
101         enddo         enddo
102    
103  C Compute pressure profile to get methane and n2o values  C Compute pressure profile to get methane and n2o values
104  C     - First bottom-up (in mb)  C     - First bottom-up (in mb)
105    
106         pressure0(1)=1000.         pressure0(1)=1000.
# Line 107  C     to send to fizhi init chem Line 113  C     to send to fizhi init chem
113          pressure(L)=(pressure0(Nrphys+2-L)+pressure0(Nrphys+1-L))/2.          pressure(L)=(pressure0(Nrphys+2-L)+pressure0(Nrphys+1-L))/2.
114         enddo         enddo
115    
116         call fizhi_init_chem(mythid,         call fizhi_init_chem(myThid,
117       .      nlatsoz,nlevsoz,ntimesoz,latsoz,levsoz,ozone,       &      nlatsoz,nlevsoz,ntimesoz,latsoz,levsoz,ozone,
118       .      nlatsq,nlevsq,ntimesq,latsq,levsq,stratq,       &      nlatsq,nlevsq,ntimesq,latsq,levsq,stratq,
119       .      Nrphys,pressure,n2o,methane,co2,cfc11,cfc12,cfc22)       &      Nrphys,pressure,n2o,methane,co2,cfc11,cfc12,cfc22)
120    
121         do bj = myByLo(myThid), myByHi(myThid)         do bj = myByLo(myThid), myByHi(myThid)
122         do bi = myBxLo(myThid), myBxHi(myThid)         do bi = myBxLo(myThid), myBxHi(myThid)
# Line 122  C     to send to fizhi init chem Line 128  C     to send to fizhi init chem
128         enddo         enddo
129         enddo         enddo
130    
131    C Finally, grab unit numbers for reading sst and sea ice
132    C   (held in common block fizhi ocean coms)
133    
134    c      call mdsfindunit( kice, myThid )
135    c      open(kice)
136    c      call mdsfindunit( ksst, myThid )
137    c      open(ksst)
138    
139         return         return
140         end         end

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22