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

Annotation 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.4 - (hide annotations) (download)
Thu Jun 16 15:09:42 2005 UTC (18 years, 10 months ago) by molod
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint60, checkpoint61, checkpoint62, checkpoint58r_post, checkpoint57i_post, checkpoint57y_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint57y_pre, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint57x_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint57j_post, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint58b_post, checkpoint58m_post, checkpoint57l_post
Changes since 1.3: +1 -5 lines
Remove declaration for ksst and ksice - they are in common now

1 molod 1.4 C $Header: /u/gcmpack/MITgcm/verification/fizhi-gridalt-hs/code/update_ocean_exports.F,v 1.3 2004/10/22 14:54:03 molod Exp $
2 molod 1.1 C $Name: $
3    
4 molod 1.2 #include "FIZHI_OPTIONS.h"
5 molod 1.1 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 molod 1.2 c by fizhi (sst and sea ice extent).
10 molod 1.1 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 molod 1.2 #include "fizhi_ocean_coms.h"
18 molod 1.1 #include "EEPARAMS.h"
19 molod 1.2 #include "chronos.h"
20 molod 1.1
21 molod 1.3 integer myIter, myThid
22     _RL myTime
23 molod 1.1
24 molod 1.2 integer i, j, bi, bj, biglobal, bjglobal
25 molod 1.1 integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2
26 molod 1.2 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 molod 1.1
114 molod 1.2 integer iunit,idim1,idim2,jdim1,jdim2,im1,im2,jm1,jm2,nSumx,nSumy
115     integer nPgx,nPgy,bi,bj,biglobal,bjglobal,nymd,nhms
116 molod 1.1
117 molod 1.2 _RL sice(idim1:idim2,jdim1:jdim2,nSumx,nSumy)
118 molod 1.1
119 molod 1.2 integer i,j
120 molod 1.1
121 molod 1.2 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 molod 1.1
181 molod 1.2 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