/[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.2 - (hide annotations) (download)
Fri Aug 20 13:40:03 2004 UTC (19 years, 8 months ago) by molod
Branch: MAIN
CVS Tags: checkpoint55c_post, checkpoint54e_post, checkpoint55d_pre, checkpoint55h_post, checkpoint55b_post, checkpoint55, checkpoint54f_post, checkpoint55g_post, checkpoint55f_post, checkpoint55e_post, checkpoint55a_post, checkpoint55d_post
Changes since 1.1: +168 -22 lines
Check-in of fizhi interface running a Held-Suarez Experiment

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

  ViewVC Help
Powered by ViewVC 1.1.22