/[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.3 - (show annotations) (download)
Fri Oct 22 14:54:03 2004 UTC (19 years, 6 months ago) by molod
Branch: MAIN
CVS Tags: checkpoint57d_post, checkpoint57g_post, checkpoint57b_post, checkpoint57c_pre, checkpoint55j_post, checkpoint56b_post, checkpoint57e_post, checkpoint57g_pre, checkpoint56c_post, checkpoint57f_pre, checkpoint57a_post, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint57f_post, checkpoint57c_post, checkpoint57h_pre, checkpoint57h_post, checkpoint56a_post
Changes since 1.2: +3 -2 lines
Change (correct!) myTime to _RL

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

  ViewVC Help
Powered by ViewVC 1.1.22