/[MITgcm]/MITgcm/pkg/fizhi/fizhi_init_vars.F
ViewVC logotype

Diff of /MITgcm/pkg/fizhi/fizhi_init_vars.F

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

revision 1.2 by molod, Mon Jun 7 18:11:37 2004 UTC revision 1.7 by edhill, Fri Aug 6 21:12:14 2004 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    #include "FIZHI_OPTIONS.h"
5         subroutine fizhi_init_vars (myThid)         subroutine fizhi_init_vars (myThid)
6  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
7  c  Routine to initialise the fizhi state.  c  Routine to initialise the fizhi state.
# Line 20  c Line 21  c
21  c Calls: dyn2phys (x4)  c Calls: dyn2phys (x4)
22  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
23         implicit none         implicit none
 #include "CPP_OPTIONS.h"  
24  #include "SIZE.h"  #include "SIZE.h"
25  #include "fizhi_SIZE.h"  #include "fizhi_SIZE.h"
26  #include "fizhi_land_SIZE.h"  #include "fizhi_land_SIZE.h"
# Line 29  c--------------------------------------- Line 29  c---------------------------------------
29  #include "gridalt_mapping.h"  #include "gridalt_mapping.h"
30  #include "fizhi_coms.h"  #include "fizhi_coms.h"
31  #include "fizhi_land_coms.h"  #include "fizhi_land_coms.h"
32    #include "fizhi_earth_coms.h"
33  #include "EEPARAMS.h"  #include "EEPARAMS.h"
34  #include "SURFACE.h"  #include "SURFACE.h"
35  #include "PARAMS.h"  #include "PARAMS.h"
# Line 41  c pe on dynamics and physics grid refers Line 42  c pe on dynamics and physics grid refers
42         _RL windphy(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nrphys,nSx,nSy)         _RL windphy(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nrphys,nSx,nSy)
43         _RL udyntemp(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)         _RL udyntemp(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
44         _RL vdyntemp(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)         _RL vdyntemp(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
45           _RL tempphy(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nrphys,nSx,nSy)
46    
47         integer i, j, L, bi, bj, Lbotij         integer i, j, L, bi, bj, Lbotij
48         integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2         integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2
# Line 124  c Create initial fields on phys. grid - Line 126  c Create initial fields on phys. grid -
126    
127  c Create initial fields on phys. grid - interpolate from dyn. grid  c Create initial fields on phys. grid - interpolate from dyn. grid
128          call dyn2phys(udyntemp,pedyn,im1,im2,jm1,jm2,Nr,Nsx,Nsy,          call dyn2phys(udyntemp,pedyn,im1,im2,jm1,jm2,Nr,Nsx,Nsy,
129       .    1,sNx,1,sNy,bi,bj,windphy,pephy,ksurfC,Nrphys,nlperdyn,1,uphy)       . 1,sNx,1,sNy,bi,bj,windphy,pephy,ksurfC,Nrphys,nlperdyn,1,tempphy)
130    c   Note: Interpolation gives bottom-up arrays (level 1 is bottom),
131    c         Physics works top-down. so -> need to flip arrays
132            do L = 1,Nrphys
133            do j = 1,sNy
134            do i = 1,sNx
135             uphy(i,j,Nrphys+1-L,bi,bj) = tempphy(i,j,L,bi,bj)
136            enddo
137            enddo
138            enddo
139          call dyn2phys(vdyntemp,pedyn,im1,im2,jm1,jm2,Nr,Nsx,Nsy,          call dyn2phys(vdyntemp,pedyn,im1,im2,jm1,jm2,Nr,Nsx,Nsy,
140       .    1,sNx,1,sNy,bi,bj,windphy,pephy,ksurfC,Nrphys,nlperdyn,1,vphy)       . 1,sNx,1,sNy,bi,bj,windphy,pephy,ksurfC,Nrphys,nlperdyn,1,tempphy)
141            do L = 1,Nrphys
142            do j = 1,sNy
143            do i = 1,sNx
144             vphy(i,j,Nrphys+1-L,bi,bj) = tempphy(i,j,L,bi,bj)
145            enddo
146            enddo
147            enddo
148          call dyn2phys(theta,pedyn,im1,im2,jm1,jm2,Nr,Nsx,Nsy,          call dyn2phys(theta,pedyn,im1,im2,jm1,jm2,Nr,Nsx,Nsy,
149       .   1,sNx,1,sNy,bi,bj,windphy,pephy,ksurfC,Nrphys,nlperdyn,0,thphy)       . 1,sNx,1,sNy,bi,bj,windphy,pephy,ksurfC,Nrphys,nlperdyn,0,tempphy)
150            do L = 1,Nrphys
151            do j = 1,sNy
152            do i = 1,sNx
153             thphy(i,j,Nrphys+1-L,bi,bj) = tempphy(i,j,L,bi,bj)
154            enddo
155            enddo
156            enddo
157    
158          call dyn2phys(salt,pedyn,im1,im2,jm1,jm2,Nr,Nsx,Nsy,          call dyn2phys(salt,pedyn,im1,im2,jm1,jm2,Nr,Nsx,Nsy,
159       .    1,sNx,1,sNy,bi,bj,windphy,pephy,ksurfC,Nrphys,nlperdyn,0,sphy)       . 1,sNx,1,sNy,bi,bj,windphy,pephy,ksurfC,Nrphys,nlperdyn,0,tempphy)
160            do L = 1,Nrphys
161            do j = 1,sNy
162            do i = 1,sNx
163             sphy(i,j,Nrphys+1-L,bi,bj) = tempphy(i,j,L,bi,bj)
164            enddo
165            enddo
166            enddo
167    
168  c Now initialize tke, xlmt, khmt, xxmt, yymt, ctmt, zetamt,  c Now initialize tke, xlmt, khmt, xxmt, yymt, ctmt, zetamt,
169  c Now initialize land state too - tcanopy, etc...  c Now initialize land state too - tcanopy, etc...
170         do L = 1,Nrphys          do L = 1,Nrphys
171          do i = 1,nchp          do i = 1,nchptot
172           tke(i,L,bi,bj) = 0.           tke(i,L,bi,bj) = 0.
173           xlmt(i,L,bi,bj) = 0.           xlmt(i,L,bi,bj) = 0.
174           khmt(i,L,bi,bj) = 0.           khmt(i,L,bi,bj) = 0.
175          enddo          enddo
176         enddo          enddo
177  c Now initialize land state too - tcanopy, etc... ZERO FOR NOW,  c Now initialize land state too - tcanopy, etc... SET FOR NOW,
178  c                                              READ CLIM FOR REAL  c                                              READ CLIM FOR REAL
179         do i = 1,nchp          do i = 1,nchptot
180          tcanopy(i) = 0.          tcanopy(i,bi,bj) = 283.
181          tdeep(i) = 0.          tdeep(i,bi,bj) = 282.5
182          ecanopy(i) = 0.          ecanopy(i,bi,bj) = 2.e-2
183          swetshal(i) = 0.          swetshal(i,bi,bj) = 0.6
184          swetroot(i) = 0.          swetroot(i,bi,bj) = 0.5
185          swetdeep(i) = 0.          swetdeep(i,bi,bj) = 0.5
186          capac(i) = 0.          capac(i,bi,bj) = 0.
187          snodep(i) = 0.          snodep(i,bi,bj) = 0.
188         enddo          enddo
189    
190         enddo         enddo
191         enddo         enddo
# Line 161  c Line 194  c
194        print *,' In fizhi_init_vars: Read from restart '        print *,' In fizhi_init_vars: Read from restart '
195                                                                                                                                                                        
196  C--   Read fizhi package state variables from pickup file  C--   Read fizhi package state variables from pickup file
197          call fizhi_read_pickup( nIter0, myThid )         call fizhi_read_pickup( nIter0, myThid )
198                                                                                             CALL FIZHI_READ_VEGTILES( nIter0, 'D', myThid )
199    
200        ENDIF        ENDIF
201    
202         return         return

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22