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

Annotation of /MITgcm/pkg/fizhi/update_chemistry_exports.F

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


Revision 1.1 - (hide annotations) (download)
Fri Jun 4 16:23:37 2004 UTC (20 years ago) by molod
Branch: MAIN
Cleanup for real fizhi code

1 molod 1.1 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/update_chemistry_exports-fake.F,v 1.2 2004/05/05 00:39:21 edhill Exp $
2     C $Name: $
3    
4     subroutine update_chemistry_exports (myTime, myIter, myThid)
5     c----------------------------------------------------------------------
6     c Subroutine update_chemistry_exports - 'Wrapper' routine to update
7     c the fields related to the earth's chemistry that are needed
8     c by fizhi.
9     c Also: Set up "bi, bj loop" and some timers and clocks here.
10     c
11     c Call: interp_chemistry
12     c-----------------------------------------------------------------------
13     implicit none
14     #include "CPP_OPTIONS.h"
15     #include "SIZE.h"
16     #include "fizhi_SIZE.h"
17     #include "GRID.h"
18     #include "DYNVARS.h"
19     #include "chemistry_coms.h"
20     #include "gridalt_mapping.h"
21     #include "EEPARAMS.h"
22    
23     integer myTime, myIter, myThid
24    
25     c pe on physics grid refers to bottom edge
26     _RL pephy(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nrphys+1,nSx,nSy)
27    
28     integer i, j, L, bi, bj
29     integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2
30    
31     im1 = 1-OLx
32     im2 = sNx+OLx
33     jm1 = 1-OLy
34     jm2 = sNy+OLy
35     idim1 = 1
36     idim2 = sNx
37     jdim1 = 1
38     jdim2 = sNy
39    
40     do bj = myByLo(myThid), myByHi(myThid)
41     do bi = myBxLo(myThid), myBxHi(myThid)
42    
43     C Compute pressures on physics grid
44     do j = 1,sNy
45     do i = 1,sNx
46     pephy(i,j,1,bi,bj)=Ro_surf(i,j,bi,bj) + etaH(i,j,bi,bj)
47     c do L = 1,Nr
48     c pephy(i,j,1,bi,bj)=pephy(i,j,1,bi,bj) -
49     c . (1.-hfacC(i,j,L,bi,bj))*drF(L)
50     c enddo
51     do L = 2,Nrphys+1
52     pephy(i,j,L,bi,bj)=pephy(i,j,L-1,bi,bj)-dpphys(i,j,L-1,bi,bj)
53     enddo
54     c Do not use a zero field as the top edge pressure for interpolation
55     if(pephy(i,j,Nrphys+1,bi,bj).lt.1.e-5)
56     . pephy(i,j,Nrphys+1,bi,bj) = 1.e-5
57     enddo
58     enddo
59    
60     call interp chemistry
61     c reminder - lats are in yC and lons in xC in GRID.h
62    
63     enddo
64     enddo
65    
66     return
67     end

  ViewVC Help
Powered by ViewVC 1.1.22