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

Contents of /MITgcm/verification/fizhi-gridalt-hs/code/update_ocean_exports.F

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


Revision 1.5 - (show annotations) (download)
Tue Mar 16 00:27:00 2010 UTC (10 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, HEAD
Changes since 1.4: +2 -2 lines
avoid unbalanced quote (single or double) in commented line

1 C $Header: /u/gcmpack/MITgcm/verification/fizhi-gridalt-hs/code/update_ocean_exports.F,v 1.4 2005/06/16 15:09:42 molod Exp $
2 C $Name: $
3
4 #include "FIZHI_OPTIONS.h"
5 subroutine update_ocean_exports (myTime, myIter, myThid)
6 c----------------------------------------------------------------------
7 c Subroutine update_ocean_exports - 'Wrapper' routine to update
8 c the fields related to the ocean surface that are needed
9 c by fizhi (sst and sea ice extent).
10 c
11 c Call: getsst (Return the current sst field-read dataset if needed)
12 c getsice (Return the current sea ice field-read data if needed)
13 c-----------------------------------------------------------------------
14 implicit none
15 #include "SIZE.h"
16 #include "GRID.h"
17 #include "fizhi_ocean_coms.h"
18 #include "EEPARAMS.h"
19 #include "chronos.h"
20
21 integer myIter, myThid
22 _RL myTime
23
24 integer i, j, bi, bj, biglobal, bjglobal
25 integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2
26 integer nSxglobal, nSyglobal
27 _RL sstmin
28 parameter ( sstmin = 273.16 )
29
30 idim1 = 1-OLx
31 idim2 = sNx+OLx
32 jdim1 = 1-OLy
33 jdim2 = sNy+OLy
34 im1 = 1
35 im2 = sNx
36 jm1 = 1
37 jm2 = sNy
38 nSxglobal = nSx*nPx
39 nSyglobal = nSy*nPy
40
41 C***********************************************************************
42
43 DO BJ = myByLo(myThid),myByHi(myThid)
44 DO BI = myBxLo(myThid),myBxHi(myThid)
45
46 biglobal=bi+(myXGlobalLo-1)/im2
47 bjglobal=bj+(myYGlobalLo-1)/jm2
48
49 call getsst(ksst,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSx,
50 . nSy,nSxglobal,nSyglobal,bi,bj,biglobal,bjglobal,nymd,nhms,sst)
51 call getsice(kice,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSx,
52 . nSy,nSxglobal,nSyglobal,bi,bj,biglobal,bjglobal,nymd,nhms,sice)
53
54 c Check for Minimum Open-Water SST
55 c --------------------------------
56 do j=jm1,jm2
57 do i=im1,im2
58 if(sice(i,j,bi,bj).eq.0.0 .and. sst(i,j,bi,bj).lt.sstmin)
59 . sst(i,j,bi,bj) = sstmin
60 enddo
61 enddo
62
63 ENDDO
64 ENDDO
65
66 return
67 end
68
69 subroutine getsice(iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,
70 . nSumx,nSumy,nPgx,nPgy,bi,bj,biglobal,bjglobal,nymd,nhms,sice)
71 C************************************************************************
72 C
73 C!ROUTINE: GETSICE
74 C!DESCRIPTION: GETSICE returns the sea ice depth.
75 C! This routine is adaptable for any frequency
76 C! data upto a daily frequency.
77 C! note: for diurnal data ndmax should be increased.
78 C
79 C!INPUT PARAMETERS:
80 C! iunit Unit number assigned to the sice data file
81 C! idim1 Start dimension in x-direction
82 C! idim2 End dimension in x-direction
83 C! jdim1 Start dimension in y-direction
84 C! jdim2 End dimension in y-direction
85 C! im1 Begin of x-direction span for filling sice
86 C! im2 End of x-direction span for filling sice
87 C! jm1 Begin of y-direction span for filling sice
88 C! jm2 End of y-direction span for filling sice
89 C! nSumx Number of processors in x-direction (local processor)
90 C! nSumy Number of processors in y-direction (local processor)
91 C! nPgx Number of processors in x-direction (global)
92 C! nPgx Number of processors in y-direction (global)
93 C! bi Processor number in x-direction (local to processor)
94 C! bj Processor number in y-direction (local to processor)
95 C! biglobal Processor number in x-direction (global)
96 C! bjglobal Processor number in y-direction (global)
97 C! nymd YYMMDD of the current model timestep
98 C! nhms HHMMSS of the model time
99 C
100 C!OUTPUT PARAMETERS:
101 C! sice(idim1:idim2,jdim1:jdim2,nSumx,nSumy) Sea ice depth in meters
102 C
103 C!ROUTINES CALLED:
104 C
105 C! bcdata Reads the data for a given unit number
106 C! bcheader Reads the header info for a given unit number
107 C! interp_time Returns weights for linear interpolation
108 C
109 C--------------------------------------------------------------------------
110
111 implicit none
112 #include "SIZE.h"
113
114 integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSumx,nSumy
115 integer nPgx,nPgy,bi,bj,biglobal,bjglobal,nymd,nhms
116
117 _RL sice(idim1:idim2,jdim1:jdim2,nSumx,nSumy)
118
119 integer i,j
120
121 do j = jm1,jm2
122 do i = im1,im2
123 sice(i,j,bi,bj) = 0.
124 enddo
125 enddo
126
127 return
128 end
129 subroutine getsst(iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,
130 . nSumx,nSumy,nPgx,nPgy,bi,bj,biglobal,bjglobal,nymd,nhms,sst)
131 C************************************************************************
132 C
133 C!ROUTINE: GETSST
134 C!DESCRIPTION: GETSST gets the SST data.
135 C! This routine is adaptable for any frequency
136 C! data upto a daily frequency.
137 C! note: for diurnal data ndmax should be increased.
138 C
139 C!INPUT PARAMETERS:
140 C! iunit Unit number assigned to the sice data file
141 C! idim1 Start dimension in x-direction
142 C! idim2 End dimension in x-direction
143 C! jdim1 Start dimension in y-direction
144 C! jdim2 End dimension in y-direction
145 C! im1 Begin of x-direction span for filling sice
146 C! im2 End of x-direction span for filling sice
147 C! jm1 Begin of y-direction span for filling sice
148 C! jm2 End of y-direction span for filling sice
149 C! nSumx Number of processors in x-direction (local processor)
150 C! nSumy Number of processors in y-direction (local processor)
151 C! nPgx Number of processors in x-direction (global)
152 C! nPgy Number of processors in y-direction (global)
153 C! bi Processor number in x-direction (local to processor)
154 C! bj Processor number in y-direction (local to processor)
155 C! biglobal Processor number in x-direction (global)
156 C! bjglobal Processor number in y-direction (global)
157 C! nymd YYMMDD of the current model timestep
158 C! nhms HHMMSS of the model time
159 C
160 C!OUTPUT PARAMETERS:
161 C! sst(idim1:idim2,jdim1:jdim2,nSumx,nSumy) Sea surface temperature (K)
162 C
163 C!ROUTINES CALLED:
164 C
165 C! bcdata Reads the data for a given unit number
166 C! bcheader Reads the header info for a given unit number
167 C! interp_time Returns weights for linear interpolation
168 C
169 C--------------------------------------------------------------------------
170
171 implicit none
172 #include "SIZE.h"
173
174 integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSumx,nSumy
175 integer nPgx,nPgy,bi,bj,biglobal,bjglobal,nymd,nhms
176
177 _RL sst(idim1:idim2,jdim1:jdim2,nSumx,nSumy)
178
179 integer i,j
180
181 do j = jm1,jm2
182 do i = im1,im2
183 sst(i,j,bi,bj) = 280.
184 enddo
185 enddo
186
187 return
188 end

  ViewVC Help
Powered by ViewVC 1.1.22