/[MITgcm]/MITgcm/pkg/obcs/obcs_prescribe_read.F
ViewVC logotype

Annotation of /MITgcm/pkg/obcs/obcs_prescribe_read.F

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


Revision 1.7 - (hide annotations) (download)
Mon Oct 10 05:53:48 2005 UTC (18 years, 7 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint57v_post, checkpoint57y_post, checkpoint57y_pre, checkpoint57x_post, checkpoint57w_post, checkpint57u_post
Changes since 1.6: +57 -3 lines
o OBCS and PTRACERS: add open boundary support for passive tracers
  - either use homogenous (pseudo) v.Neumann conditions or prescribe
    OB-values from file; this is not different from the way theta and salinity
    are treated
  - however, Orlanski-radiation conditions are not supported, and the model
    will stop if you use pTracers and Orlanski at the same time.
  - beefed up the rountine obcs_external_fields_load: now only those open
    boundary values are overwritten with values from files for which there
    are really files, otherwise the OB-fields remain untouched. This makes
    it possible to use different OBs at different ends of the domain (as
    with EXF)
  - TODO: add support for OB?w and OB?eta, which can currently not be read
    from a file.

1 mlosch 1.7 C $Header: /u/gcmpack/MITgcm/pkg/obcs/obcs_prescribe_read.F,v 1.6 2004/10/19 17:52:03 adcroft Exp $
2 heimbach 1.1 C $Name: $
3    
4     # include "OBCS_OPTIONS.h"
5    
6     subroutine obcs_prescribe_read (
7     I mycurrenttime
8     I , mycurrentiter
9     I , mythid
10     & )
11     c |==================================================================|
12     c | SUBROUTINE obcs_prescribe_read |
13     c |==================================================================|
14     c | read open boundary conditions from file |
15     c | N.B.: * uses exf and cal routines for file/record handling |
16     c | * uses ctrl routines for control variable handling |
17     c |==================================================================|
18    
19     implicit none
20    
21     c == global variables ==
22    
23     #include "EEPARAMS.h"
24     #include "SIZE.h"
25     #include "GRID.h"
26     #include "OBCS.h"
27     #ifdef ALLOW_EXF
28     # include "exf_param.h"
29     #endif
30 mlosch 1.7 #ifdef ALLOW_PTRACERS.h
31     # include "PTRACERS_SIZE.h"
32     # include "PTRACERS.h"
33     # include "OBCS_PTRACERS.h"
34     #endif /* ALLOW_PTRACERS */
35 heimbach 1.1
36     c == routine arguments ==
37    
38     _RL mycurrenttime
39     integer mycurrentiter
40     integer mythid
41    
42     #if (defined (ALLOW_OBCS) && defined (ALLOW_OBCS_PRESCRIBE))
43    
44     c == local variables ==
45    
46     logical first, changed
47     integer count0, count1
48 heimbach 1.5 integer year0, year1
49 heimbach 1.1 _RL fac
50 mlosch 1.7 #ifdef ALLOW_PTRACERS
51     integer iTracer, i,j,k
52     #endif /* ALLOW_PTRACERS */
53 heimbach 1.1
54     c == end of interface ==
55    
56 mlosch 1.2 #ifdef ALLOW_EXF
57 heimbach 1.1 #ifdef ALLOW_OBCS_NORTH
58     call exf_getffieldrec(
59     I obcsNstartdate, obcsNperiod
60 heimbach 1.3 I , obcsNstartdate1, obcsNstartdate2
61 heimbach 1.4 I , .false.
62 adcroft 1.6 O , fac, first, changed
63 heimbach 1.3 O , count0, count1, year0, year1
64 heimbach 1.1 I , mycurrenttime, mycurrentiter, mythid
65     & )
66    
67     call exf_set_obcs_xz( OBNu, OBNu0, OBNu1, OBNufile, 'u'
68     I , fac, first, changed, count0, count1
69     I , mycurrenttime, mycurrentiter, mythid )
70     call exf_set_obcs_xz( OBNv, OBNv0, OBNv1, OBNvfile, 'v'
71     I , fac, first, changed, count0, count1
72     I , mycurrenttime, mycurrentiter, mythid )
73     call exf_set_obcs_xz( OBNt, OBNt0, OBNt1, OBNtfile, 's'
74     I , fac, first, changed, count0, count1
75     I , mycurrenttime, mycurrentiter, mythid )
76     call exf_set_obcs_xz( OBNs, OBNs0, OBNs1, OBNsfile, 's'
77     I , fac, first, changed, count0, count1
78     I , mycurrenttime, mycurrentiter, mythid )
79 mlosch 1.7 #ifdef ALLOW_PTRACERS
80     if ( usePTRACERS ) then
81     do itracer = 1, PTRACERS_numInUse
82     call exf_set_obcs_xz( OBNptr (1-Olx,1,1,1,iTracer)
83     I , OBNptr0(1-Olx,1,1,1,iTracer)
84     I , OBNptr1(1-Olx,1,1,1,iTracer)
85     I , OBNptrFile(iTracer), 's'
86     I , fac, first, changed, count0, count1
87     I , mycurrenttime, mycurrentiter, mythid )
88     enddo
89     endif
90     #endif /* ALLOW_PTRACERS */
91 heimbach 1.1 #endif
92    
93     #ifdef ALLOW_OBCS_SOUTH
94     call exf_getffieldrec(
95     I obcsSstartdate, obcsSperiod
96 heimbach 1.3 I , obcsSstartdate1, obcsSstartdate2
97 heimbach 1.4 I , .false.
98     O , fac, first, changed
99     O , count0, count1, year0, year1
100 heimbach 1.1 I , mycurrenttime, mycurrentiter, mythid
101     & )
102    
103     call exf_set_obcs_xz( OBSu, OBSu0, OBSu1, OBSufile, 'u'
104     I , fac, first, changed, count0, count1
105     I , mycurrenttime, mycurrentiter, mythid )
106     call exf_set_obcs_xz( OBSv, OBSv0, OBSv1, OBSvfile, 'v'
107     I , fac, first, changed, count0, count1
108     I , mycurrenttime, mycurrentiter, mythid )
109     call exf_set_obcs_xz( OBSt, OBSt0, OBSt1, OBStfile, 's'
110     I , fac, first, changed, count0, count1
111     I , mycurrenttime, mycurrentiter, mythid )
112     call exf_set_obcs_xz( OBSs, OBSs0, OBSs1, OBSsfile, 's'
113     I , fac, first, changed, count0, count1
114     I , mycurrenttime, mycurrentiter, mythid )
115    
116 mlosch 1.7 #ifdef ALLOW_PTRACERS
117     if ( usePTRACERS ) then
118     do itracer = 1, PTRACERS_numInUse
119     call exf_set_obcs_xz( OBSptr (1-Olx,1,1,1,iTracer)
120     I , OBSptr0(1-Olx,1,1,1,iTracer)
121     I , OBSptr1(1-Olx,1,1,1,iTracer)
122     I , OBSptrFile(iTracer), 's'
123     I , fac, first, changed, count0, count1
124     I , mycurrenttime, mycurrentiter, mythid )
125     enddo
126     endif
127     #endif /* ALLOW_PTRACERS */
128 heimbach 1.1 #endif
129    
130     #ifdef ALLOW_OBCS_EAST
131     call exf_getffieldrec(
132     I obcsEstartdate, obcsEperiod
133 heimbach 1.3 I , obcsEstartdate1, obcsEstartdate2
134 heimbach 1.4 I , .false.
135     O , fac, first, changed
136     O , count0, count1, year0, year1
137 heimbach 1.1 I , mycurrenttime, mycurrentiter, mythid
138     & )
139    
140     call exf_set_obcs_yz( OBEu, OBEu0, OBEu1, OBEufile, 'u'
141     I , fac, first, changed, count0, count1
142     I , mycurrenttime, mycurrentiter, mythid )
143     call exf_set_obcs_yz( OBEv, OBEv0, OBEv1, OBEvfile, 'v'
144     I , fac, first, changed, count0, count1
145     I , mycurrenttime, mycurrentiter, mythid )
146     call exf_set_obcs_yz( OBEt, OBEt0, OBEt1, OBEtfile, 's'
147     I , fac, first, changed, count0, count1
148     I , mycurrenttime, mycurrentiter, mythid )
149     call exf_set_obcs_yz( OBEs, OBEs0, OBEs1, OBEsfile, 's'
150     I , fac, first, changed, count0, count1
151     I , mycurrenttime, mycurrentiter, mythid )
152 mlosch 1.7 #ifdef ALLOW_PTRACERS
153     if ( usePTRACERS ) then
154     do itracer = 1, PTRACERS_numInUse
155     call exf_set_obcs_yz( OBEptr (1-Oly,1,1,1,iTracer)
156     I , OBEptr0(1-Oly,1,1,1,iTracer)
157     I , OBEptr1(1-Oly,1,1,1,iTracer)
158     I , OBEptrFile(iTracer), 's'
159     I , fac, first, changed, count0, count1
160     I , mycurrenttime, mycurrentiter, mythid )
161     enddo
162     endif
163     #endif /* ALLOW_PTRACERS */
164 heimbach 1.1 #endif
165    
166     #ifdef ALLOW_OBCS_WEST
167     call exf_getffieldrec(
168     I obcsWstartdate, obcsWperiod
169 heimbach 1.3 I , obcsWstartdate1, obcsWstartdate2
170 heimbach 1.4 I , .false.
171     O , fac, first, changed
172     O , count0, count1, year0, year1
173 heimbach 1.1 I , mycurrenttime, mycurrentiter, mythid
174     & )
175    
176     call exf_set_obcs_yz( OBWu, OBWu0, OBWu1, OBWufile, 'u'
177     I , fac, first, changed, count0, count1
178     I , mycurrenttime, mycurrentiter, mythid )
179     call exf_set_obcs_yz( OBWv, OBWv0, OBWv1, OBWvfile, 'v'
180     I , fac, first, changed, count0, count1
181     I , mycurrenttime, mycurrentiter, mythid )
182     call exf_set_obcs_yz( OBWt, OBWt0, OBWt1, OBWtfile, 's'
183     I , fac, first, changed, count0, count1
184     I , mycurrenttime, mycurrentiter, mythid )
185     call exf_set_obcs_yz( OBWs, OBWs0, OBWs1, OBWsfile, 's'
186     I , fac, first, changed, count0, count1
187     I , mycurrenttime, mycurrentiter, mythid )
188 mlosch 1.7 #ifdef ALLOW_PTRACERS
189     if ( usePTRACERS ) then
190     do itracer = 1, PTRACERS_numInUse
191     call exf_set_obcs_yz( OBWptr (1-Oly,1,1,1,iTracer)
192     I , OBWptr0(1-Oly,1,1,1,iTracer)
193     I , OBWptr1(1-Oly,1,1,1,iTracer)
194     I , OBWptrFile(iTracer), 's'
195     I , fac, first, changed, count0, count1
196     I , mycurrenttime, mycurrentiter, mythid )
197     enddo
198     endif
199     #endif /* ALLOW_PTRACERS */
200 heimbach 1.1 #endif
201    
202     #ifdef ALLOW_OBCS_CONTROL
203     cgg WARNING: Assuming North Open Boundary exists and has same
204     cgg calendar information as other boundaries.
205     call ctrl_obcsbal ( mycurrenttime,mycurrentiter,mythid )
206     #endif
207    
208     #ifdef ALLOW_OBCSN_CONTROL
209     call ctrl_getobcsn ( mycurrenttime, mycurrentiter, mythid )
210     #endif
211    
212     #ifdef ALLOW_OBCSS_CONTROL
213     call ctrl_getobcss ( mycurrenttime, mycurrentiter, mythid )
214     #endif
215    
216     #ifdef ALLOW_OBCSW_CONTROL
217     call ctrl_getobcsw ( mycurrenttime, mycurrentiter, mythid )
218     #endif
219    
220     #ifdef ALLOW_OBCSE_CONTROL
221     call ctrl_getobcse ( mycurrenttime, mycurrentiter, mythid )
222     #endif
223    
224 mlosch 1.2 #else /* not ALLOW_EXF */
225     CALL OBCS_EXTERNAL_FIELDS_LOAD(
226     & myCurrentTime, myCurrentIter, myThid )
227     #endif /* ALLOw_EXF */
228 heimbach 1.1
229     #endif /* ALLOW_OBCS */
230    
231 adcroft 1.6 RETURN
232     END

  ViewVC Help
Powered by ViewVC 1.1.22