47 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
48 |
#include "PARAMS.h" |
#include "PARAMS.h" |
49 |
#include "GRID.h" |
#include "GRID.h" |
|
|
|
|
C !INPUT/OUTPUT PARAMETERS: |
|
|
C === Routine arguments === |
|
|
C myThid - Thread no. that called this routine. |
|
|
C myTime - Simulation time |
|
|
C myIter - Simulation timestep number |
|
|
INTEGER myThid |
|
|
_RL myTime |
|
|
INTEGER myIter |
|
|
|
|
|
C if external forcing (exf) package is enabled, all loading of external |
|
|
C fields is done by exf |
|
|
#if (defined ALLOW_OBCS && defined ALLOW_OBCS_PRESCRIBE && !defined ALLOW_EXF) |
|
|
C |
|
50 |
#include "OBCS.h" |
#include "OBCS.h" |
51 |
#ifdef ALLOW_PTRACERS |
#ifdef ALLOW_PTRACERS |
52 |
#include "PTRACERS_SIZE.h" |
#include "PTRACERS_SIZE.h" |
55 |
c#include "PTRACERS_FIELDS.h" |
c#include "PTRACERS_FIELDS.h" |
56 |
#endif /* ALLOW_PTRACERS */ |
#endif /* ALLOW_PTRACERS */ |
57 |
|
|
58 |
|
C !INPUT/OUTPUT PARAMETERS: |
59 |
|
C === Routine arguments === |
60 |
|
C myTime :: Simulation time |
61 |
|
C myIter :: Simulation timestep number |
62 |
|
C myThid :: Thread no. that called this routine. |
63 |
|
_RL myTime |
64 |
|
INTEGER myIter |
65 |
|
INTEGER myThid |
66 |
|
|
67 |
|
C if external forcing (exf) package is enabled (useEXF=T), all loading of |
68 |
|
C external fields is done by exf |
69 |
|
#if (defined ALLOW_OBCS && defined ALLOW_OBCS_PRESCRIBE ) |
70 |
|
|
71 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
72 |
C === Local arrays === |
C === Local arrays === |
73 |
C aWght, bWght :: Interpolation weights |
C aWght, bWght :: Interpolation weights |
74 |
C msgBuf :: Informational/error meesage buffer |
C msgBuf :: Informational/error meesage buffer |
75 |
INTEGER intime0,intime1,iTracer |
#ifdef NONLIN_FRSURF |
76 |
|
INTEGER i,j,bi,bj |
77 |
|
#endif /* NONLIN_FRSURF */ |
78 |
|
INTEGER fp |
79 |
|
INTEGER iRec0, iRec1, iTr |
80 |
_RL aWght,bWght,rdt |
_RL aWght,bWght,rdt |
81 |
INTEGER nForcingPeriods,Imytm,Ifprd,Ifcyc,Iftm |
INTEGER nForcingPeriods,Imytm,Ifprd,Ifcyc,Iftm |
82 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
83 |
CEOP |
CEOP |
84 |
|
|
85 |
|
fp = readBinaryPrec |
86 |
|
|
87 |
IF ( periodicExternalForcing ) THEN |
IF ( periodicExternalForcing ) THEN |
88 |
|
|
89 |
C Now calculate whether it is time to update the forcing arrays |
C Now calculate whether it is time to update the forcing arrays |
94 |
Ifcyc = NINT(externForcingCycle*rdt) |
Ifcyc = NINT(externForcingCycle*rdt) |
95 |
Iftm = MOD( Imytm+Ifcyc-Ifprd/2, Ifcyc) |
Iftm = MOD( Imytm+Ifcyc-Ifprd/2, Ifcyc) |
96 |
|
|
97 |
intime0 = 1 + INT(Iftm/Ifprd) |
iRec0 = 1 + INT(Iftm/Ifprd) |
98 |
intime1 = 1 + MOD(intime0,nForcingPeriods) |
iRec1 = 1 + MOD(iRec0,nForcingPeriods) |
99 |
c aWght = DFLOAT( Iftm-Ifprd*(intime0 - 1) ) / DFLOAT( Ifprd ) |
c aWght = DFLOAT( Iftm-Ifprd*(iRec0 - 1) ) / DFLOAT( Ifprd ) |
100 |
aWght = FLOAT( Iftm-Ifprd*(intime0 - 1) ) |
aWght = FLOAT( Iftm-Ifprd*(iRec0 - 1) ) |
101 |
bWght = FLOAT( Ifprd ) |
bWght = FLOAT( Ifprd ) |
102 |
aWght = aWght / bWght |
aWght = aWght / bWght |
103 |
bWght = 1. _d 0 - aWght |
bWght = 1. _d 0 - aWght |
104 |
|
|
105 |
IF ( |
IF ( |
106 |
& Iftm-Ifprd*(intime0-1) .EQ. 0 |
& Iftm-Ifprd*(iRec0-1) .EQ. 0 |
107 |
& .OR. myIter .EQ. nIter0 |
& .OR. myIter .EQ. nIter0 |
108 |
& ) THEN |
& ) THEN |
109 |
|
|
110 |
|
#ifndef ALLOW_MDSIO |
111 |
|
STOP 'ABNORMAL END: OBCS_EXTERNAL_FIELDS_LOAD: NEEDS MSDIO PKG' |
112 |
|
#endif /* ALLOW_MDSIO */ |
113 |
|
|
114 |
_BARRIER |
_BARRIER |
|
_BEGIN_MASTER(myThid) |
|
115 |
|
|
116 |
C If the above condition is met then we need to read in |
C If the above condition is met then we need to read in |
117 |
C data for the period ahead and the period behind myTime. |
C data for the period ahead and the period behind myTime. |
118 |
WRITE(msgBuf,'(1X,A,2I5,I10,1P1E20.12)') |
WRITE(msgBuf,'(1X,A,2I5,I10,1P1E20.12)') |
119 |
& 'OBCS_EXTERNAL_FIELDS_LOAD: Reading new data:', |
& 'OBCS_EXTERNAL_FIELDS_LOAD: Reading new data:', |
120 |
& intime0, intime1, myIter, myTime |
& iRec0, iRec1, myIter, myTime |
121 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
122 |
& SQUEEZE_RIGHT,myThid) |
& SQUEEZE_RIGHT,myThid) |
123 |
|
|
|
#ifdef ALLOW_MDSIO |
|
124 |
#ifdef ALLOW_OBCS_EAST |
#ifdef ALLOW_OBCS_EAST |
125 |
C Eastern boundary |
C Eastern boundary |
126 |
IF ( OBEuFile .NE. ' ' ) THEN |
IF ( OBEuFile .NE. ' ' ) THEN |
127 |
CALL MDSREADFIELDYZ ( OBEuFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBEuFile, fp,Nr,OBEu0,iRec0,myIter,myThid ) |
128 |
& 'RL', Nr, OBEu0, intime0, myThid ) |
CALL READ_REC_YZ_RL( OBEuFile, fp,Nr,OBEu1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDYZ ( OBEuFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBEu1, intime1, myThid ) |
|
129 |
ENDIF |
ENDIF |
130 |
IF ( OBEvFile .NE. ' ' ) THEN |
IF ( OBEvFile .NE. ' ' ) THEN |
131 |
CALL MDSREADFIELDYZ ( OBEvFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBEvFile, fp,Nr,OBEv0,iRec0,myIter,myThid ) |
132 |
& 'RL', Nr, OBEv0, intime0, myThid ) |
CALL READ_REC_YZ_RL( OBEvFile, fp,Nr,OBEv1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDYZ ( OBEvFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBEv1, intime1, myThid ) |
|
133 |
ENDIF |
ENDIF |
134 |
IF ( OBEtFile .NE. ' ' ) THEN |
IF ( OBEtFile .NE. ' ' ) THEN |
135 |
CALL MDSREADFIELDYZ ( OBEtFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBEtFile, fp,Nr,OBEt0,iRec0,myIter,myThid ) |
136 |
& 'RL', Nr, OBEt0, intime0, myThid ) |
CALL READ_REC_YZ_RL( OBEtFile, fp,Nr,OBEt1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDYZ ( OBEtFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBEt1, intime1, myThid ) |
|
137 |
ENDIF |
ENDIF |
138 |
IF ( OBEsFile .NE. ' ' ) THEN |
IF ( OBEsFile .NE. ' ' ) THEN |
139 |
CALL MDSREADFIELDYZ ( OBEsFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBEsFile, fp,Nr,OBEs0,iRec0,myIter,myThid ) |
140 |
& 'RL', Nr, OBEs0, intime0, myThid ) |
CALL READ_REC_YZ_RL( OBEsFile, fp,Nr,OBEs1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDYZ ( OBEsFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBEs1, intime1, myThid ) |
|
141 |
ENDIF |
ENDIF |
142 |
#endif /* ALLOW_OBCS_WEST */ |
# ifdef NONLIN_FRSURF |
143 |
|
IF ( OBEetaFile .NE. ' ' ) THEN |
144 |
|
CALL READ_REC_YZ_RL(OBEetaFile,fp,1,OBEeta0,iRec0,myIter,myThid) |
145 |
|
CALL READ_REC_YZ_RL(OBEetaFile,fp,1,OBEeta1,iRec1,myIter,myThid) |
146 |
|
ENDIF |
147 |
|
# endif /* NONLIN_FRSURF */ |
148 |
|
#endif /* ALLOW_OBCS_EAST */ |
149 |
#ifdef ALLOW_OBCS_WEST |
#ifdef ALLOW_OBCS_WEST |
150 |
C Western boundary |
C Western boundary |
151 |
IF ( OBWuFile .NE. ' ' ) THEN |
IF ( OBWuFile .NE. ' ' ) THEN |
152 |
CALL MDSREADFIELDYZ ( OBWuFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBWuFile, fp,Nr,OBWu0,iRec0,myIter,myThid ) |
153 |
& 'RL', Nr, OBWu0, intime0, myThid ) |
CALL READ_REC_YZ_RL( OBWuFile, fp,Nr,OBWu1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDYZ ( OBWuFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBWu1, intime1, myThid ) |
|
154 |
ENDIF |
ENDIF |
155 |
IF ( OBWvFile .NE. ' ' ) THEN |
IF ( OBWvFile .NE. ' ' ) THEN |
156 |
CALL MDSREADFIELDYZ ( OBWvFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBWvFile, fp,Nr,OBWv0,iRec0,myIter,myThid ) |
157 |
& 'RL', Nr, OBWv0, intime0, myThid ) |
CALL READ_REC_YZ_RL( OBWvFile, fp,Nr,OBWv1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDYZ ( OBWvFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBWv1, intime1, myThid ) |
|
158 |
ENDIF |
ENDIF |
159 |
IF ( OBWtFile .NE. ' ' ) THEN |
IF ( OBWtFile .NE. ' ' ) THEN |
160 |
CALL MDSREADFIELDYZ ( OBWtFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBWtFile, fp,Nr,OBWt0,iRec0,myIter,myThid ) |
161 |
& 'RL', Nr, OBWt0, intime0, myThid ) |
CALL READ_REC_YZ_RL( OBWtFile, fp,Nr,OBWt1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDYZ ( OBWtFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBWt1, intime1, myThid ) |
|
162 |
ENDIF |
ENDIF |
163 |
IF ( OBWsFile .NE. ' ' ) THEN |
IF ( OBWsFile .NE. ' ' ) THEN |
164 |
CALL MDSREADFIELDYZ ( OBWsFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBWsFile, fp,Nr,OBWs0,iRec0,myIter,myThid ) |
165 |
& 'RL', Nr, OBWs0, intime0, myThid ) |
CALL READ_REC_YZ_RL( OBWsFile, fp,Nr,OBWs1,iRec1,myIter,myThid ) |
166 |
CALL MDSREADFIELDYZ ( OBWsFile, readBinaryPrec, |
ENDIF |
167 |
& 'RL', Nr, OBWs1, intime1, myThid ) |
# ifdef NONLIN_FRSURF |
168 |
|
IF ( OBWetaFile .NE. ' ' ) THEN |
169 |
|
CALL READ_REC_YZ_RL(OBWetaFile,fp,1,OBWeta0,iRec0,myIter,myThid) |
170 |
|
CALL READ_REC_YZ_RL(OBWetaFile,fp,1,OBWeta1,iRec1,myIter,myThid) |
171 |
ENDIF |
ENDIF |
172 |
|
# endif /* NONLIN_FRSURF */ |
173 |
#endif /* ALLOW_OBCS_WEST */ |
#endif /* ALLOW_OBCS_WEST */ |
174 |
#ifdef ALLOW_OBCS_NORTH |
#ifdef ALLOW_OBCS_NORTH |
175 |
C Northern boundary |
C Northern boundary |
176 |
IF ( OBNuFile .NE. ' ' ) THEN |
IF ( OBNuFile .NE. ' ' ) THEN |
177 |
CALL MDSREADFIELDXZ ( OBNuFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBNuFile, fp,Nr,OBNu0,iRec0,myIter,myThid ) |
178 |
& 'RL', Nr, OBNu0, intime0, myThid ) |
CALL READ_REC_XZ_RL( OBNuFile, fp,Nr,OBNu1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDXZ ( OBNuFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBNu1, intime1, myThid ) |
|
179 |
ENDIF |
ENDIF |
180 |
IF ( OBNvFile .NE. ' ' ) THEN |
IF ( OBNvFile .NE. ' ' ) THEN |
181 |
CALL MDSREADFIELDXZ ( OBNvFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBNvFile, fp,Nr,OBNv0,iRec0,myIter,myThid ) |
182 |
& 'RL', Nr, OBNv0, intime0, myThid ) |
CALL READ_REC_XZ_RL( OBNvFile, fp,Nr,OBNv1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDXZ ( OBNvFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBNv1, intime1, myThid ) |
|
183 |
ENDIF |
ENDIF |
184 |
IF ( OBNtFile .NE. ' ' ) THEN |
IF ( OBNtFile .NE. ' ' ) THEN |
185 |
CALL MDSREADFIELDXZ ( OBNtFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBNtFile, fp,Nr,OBNt0,iRec0,myIter,myThid ) |
186 |
& 'RL', Nr, OBNt0, intime0, myThid ) |
CALL READ_REC_XZ_RL( OBNtFile, fp,Nr,OBNt1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDXZ ( OBNtFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBNt1, intime1, myThid ) |
|
187 |
ENDIF |
ENDIF |
188 |
IF ( OBNsFile .NE. ' ' ) THEN |
IF ( OBNsFile .NE. ' ' ) THEN |
189 |
CALL MDSREADFIELDXZ ( OBNsFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBNsFile, fp,Nr,OBNs0,iRec0,myIter,myThid ) |
190 |
& 'RL', Nr, OBNs0, intime0, myThid ) |
CALL READ_REC_XZ_RL( OBNsFile, fp,Nr,OBNs1,iRec1,myIter,myThid ) |
191 |
CALL MDSREADFIELDXZ ( OBNsFile, readBinaryPrec, |
ENDIF |
192 |
& 'RL', Nr, OBNs1, intime1, myThid ) |
# ifdef NONLIN_FRSURF |
193 |
|
IF ( OBNetaFile .NE. ' ' ) THEN |
194 |
|
CALL READ_REC_XZ_RL(OBNetaFile,fp,1,OBNeta0,iRec0,myIter,myThid) |
195 |
|
CALL READ_REC_XZ_RL(OBNetaFile,fp,1,OBNeta1,iRec1,myIter,myThid) |
196 |
ENDIF |
ENDIF |
197 |
|
# endif /* NONLIN_FRSURF */ |
198 |
#endif /* ALLOW_OBCS_NORTH */ |
#endif /* ALLOW_OBCS_NORTH */ |
199 |
#ifdef ALLOW_OBCS_SOUTH |
#ifdef ALLOW_OBCS_SOUTH |
200 |
C Southern boundary |
C Southern boundary |
201 |
IF ( OBSuFile .NE. ' ' ) THEN |
IF ( OBSuFile .NE. ' ' ) THEN |
202 |
CALL MDSREADFIELDXZ ( OBSuFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBSuFile, fp,Nr,OBSu0,iRec0,myIter,myThid ) |
203 |
& 'RL', Nr, OBSu0, intime0, myThid ) |
CALL READ_REC_XZ_RL( OBSuFile, fp,Nr,OBSu1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDXZ ( OBSuFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBSu1, intime1, myThid ) |
|
204 |
ENDIF |
ENDIF |
205 |
IF ( OBSvFile .NE. ' ' ) THEN |
IF ( OBSvFile .NE. ' ' ) THEN |
206 |
CALL MDSREADFIELDXZ ( OBSvFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBSvFile, fp,Nr,OBSv0,iRec0,myIter,myThid ) |
207 |
& 'RL', Nr, OBSv0, intime0, myThid ) |
CALL READ_REC_XZ_RL( OBSvFile, fp,Nr,OBSv1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDXZ ( OBSvFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBSv1, intime1, myThid ) |
|
208 |
ENDIF |
ENDIF |
209 |
IF ( OBStFile .NE. ' ' ) THEN |
IF ( OBStFile .NE. ' ' ) THEN |
210 |
CALL MDSREADFIELDXZ ( OBStFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBStFile, fp,Nr,OBSt0,iRec0,myIter,myThid ) |
211 |
& 'RL', Nr, OBSt0, intime0, myThid ) |
CALL READ_REC_XZ_RL( OBStFile, fp,Nr,OBSt1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDXZ ( OBStFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBSt1, intime1, myThid ) |
|
212 |
ENDIF |
ENDIF |
213 |
IF ( OBSsFile .NE. ' ' ) THEN |
IF ( OBSsFile .NE. ' ' ) THEN |
214 |
CALL MDSREADFIELDXZ ( OBSsFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBSsFile, fp,Nr,OBSs0,iRec0,myIter,myThid ) |
215 |
& 'RL', Nr, OBSs0, intime0, myThid ) |
CALL READ_REC_XZ_RL( OBSsFile, fp,Nr,OBSs1,iRec1,myIter,myThid ) |
|
CALL MDSREADFIELDXZ ( OBSsFile, readBinaryPrec, |
|
|
& 'RL', Nr, OBSs1, intime1, myThid ) |
|
216 |
ENDIF |
ENDIF |
217 |
|
# ifdef NONLIN_FRSURF |
218 |
|
IF ( OBSetaFile .NE. ' ' ) THEN |
219 |
|
CALL READ_REC_XZ_RL(OBSetaFile,fp,1,OBSeta0,iRec0,myIter,myThid) |
220 |
|
CALL READ_REC_XZ_RL(OBSetaFile,fp,1,OBSeta1,iRec1,myIter,myThid) |
221 |
|
ENDIF |
222 |
|
# endif /* NONLIN_FRSURF */ |
223 |
#endif /* ALLOW_OBCS_SOUTH */ |
#endif /* ALLOW_OBCS_SOUTH */ |
224 |
#ifdef ALLOW_PTRACERS |
#ifdef ALLOW_PTRACERS |
225 |
IF (usePTRACERS) THEN |
IF (usePTRACERS) THEN |
226 |
C read boundary values for passive tracers |
C read boundary values for passive tracers |
227 |
DO iTracer = 1, PTRACERS_numInUse |
DO iTr = 1, PTRACERS_numInUse |
228 |
# ifdef ALLOW_OBCS_EAST |
# ifdef ALLOW_OBCS_EAST |
229 |
C Eastern boundary |
C Eastern boundary |
230 |
IF ( OBEptrFile(iTracer) .NE. ' ' ) THEN |
IF ( OBEptrFile(iTr) .NE. ' ' ) THEN |
231 |
CALL MDSREADFIELDYZ ( OBEptrFile(itracer), readBinaryPrec, |
CALL READ_REC_YZ_RL( OBEptrFile(iTr), fp, Nr, |
232 |
& 'RL', Nr, OBEptr0(1-Oly,1,1,1,iTracer), |
& OBEptr0(1-Oly,1,1,1,iTr), iRec0, myIter, myThid ) |
233 |
& intime0, myThid ) |
CALL READ_REC_YZ_RL( OBEptrFile(iTr), fp, Nr, |
234 |
CALL MDSREADFIELDYZ ( OBEptrFile(itracer), readBinaryPrec, |
& OBEptr1(1-Oly,1,1,1,iTr), iRec1, myIter, myThid ) |
|
& 'RL', Nr, OBEptr1(1-Oly,1,1,1,iTracer), |
|
|
& intime1, myThid ) |
|
235 |
ENDIF |
ENDIF |
236 |
# endif /* ALLOW_OBCS_WEST */ |
# endif /* ALLOW_OBCS_WEST */ |
237 |
# ifdef ALLOW_OBCS_WEST |
# ifdef ALLOW_OBCS_WEST |
238 |
C Western boundary |
C Western boundary |
239 |
IF ( OBWptrFile(iTracer) .NE. ' ' ) THEN |
IF ( OBWptrFile(iTr) .NE. ' ' ) THEN |
240 |
CALL MDSREADFIELDYZ ( OBWptrFile(itracer), readBinaryPrec, |
CALL READ_REC_YZ_RL( OBWptrFile(iTr), fp, Nr, |
241 |
& 'RL', Nr, OBWptr0(1-Oly,1,1,1,iTracer), |
& OBWptr0(1-Oly,1,1,1,iTr), iRec0, myIter, myThid ) |
242 |
& intime0, myThid ) |
CALL READ_REC_YZ_RL( OBWptrFile(iTr), fp, Nr, |
243 |
CALL MDSREADFIELDYZ ( OBWptrFile(itracer), readBinaryPrec, |
& OBWptr1(1-Oly,1,1,1,iTr), iRec1, myIter, myThid ) |
|
& 'RL', Nr, OBWptr1(1-Oly,1,1,1,iTracer), |
|
|
& intime1, myThid ) |
|
244 |
ENDIF |
ENDIF |
245 |
# endif /* ALLOW_OBCS_WEST */ |
# endif /* ALLOW_OBCS_WEST */ |
246 |
# ifdef ALLOW_OBCS_NORTH |
# ifdef ALLOW_OBCS_NORTH |
247 |
C Northern boundary |
C Northern boundary |
248 |
IF ( OBNptrFile(iTracer) .NE. ' ' ) THEN |
IF ( OBNptrFile(iTr) .NE. ' ' ) THEN |
249 |
CALL MDSREADFIELDXZ ( OBNptrFile(itracer), readBinaryPrec, |
CALL READ_REC_XZ_RL( OBNptrFile(iTr), fp, Nr, |
250 |
& 'RL', Nr, OBNptr0(1-Olx,1,1,1,iTracer), |
& OBNptr0(1-Oly,1,1,1,iTr), iRec0, myIter, myThid ) |
251 |
& intime0, myThid ) |
CALL READ_REC_XZ_RL( OBNptrFile(iTr), fp, Nr, |
252 |
CALL MDSREADFIELDXZ ( OBNptrFile(itracer), readBinaryPrec, |
& OBNptr1(1-Oly,1,1,1,iTr), iRec1, myIter, myThid ) |
|
& 'RL', Nr, OBNptr1(1-Olx,1,1,1,iTracer), |
|
|
& intime1, myThid ) |
|
253 |
ENDIF |
ENDIF |
254 |
# endif /* ALLOW_OBCS_NORTH */ |
# endif /* ALLOW_OBCS_NORTH */ |
255 |
# ifdef ALLOW_OBCS_SOUTH |
# ifdef ALLOW_OBCS_SOUTH |
256 |
C Southern boundary |
C Southern boundary |
257 |
IF ( OBSptrFile(iTracer) .NE. ' ' ) THEN |
IF ( OBSptrFile(iTr) .NE. ' ' ) THEN |
258 |
CALL MDSREADFIELDXZ ( OBSptrFile(itracer), readBinaryPrec, |
CALL READ_REC_XZ_RL( OBSptrFile(iTr), fp, Nr, |
259 |
& 'RL', Nr, OBSptr0(1-Olx,1,1,1,iTracer), |
& OBSptr0(1-Oly,1,1,1,iTr), iRec0, myIter, myThid ) |
260 |
& intime0, myThid ) |
CALL READ_REC_XZ_RL( OBSptrFile(iTr), fp, Nr, |
261 |
CALL MDSREADFIELDXZ ( OBSptrFile(itracer), readBinaryPrec, |
& OBSptr1(1-Oly,1,1,1,iTr), iRec1, myIter, myThid ) |
|
& 'RL', Nr, OBSptr1(1-Olx,1,1,1,iTracer), |
|
|
& intime1, myThid ) |
|
262 |
ENDIF |
ENDIF |
263 |
# endif /* ALLOW_OBCS_SOUTH */ |
# endif /* ALLOW_OBCS_SOUTH */ |
264 |
C end do iTracer |
C end do iTr |
265 |
ENDDO |
ENDDO |
266 |
C end if (usePTRACERS) |
C end if (usePTRACERS) |
267 |
ENDIF |
ENDIF |
268 |
#endif /* ALLOW_PTRACERS */ |
#endif /* ALLOW_PTRACERS */ |
|
#else /* ALLOW_MDSIO */ |
|
|
STOP 'ABNORMAL END: OBCS_EXTERNAL_FIELDS_LOAD: NEEDS MSDIO PKG' |
|
|
#endif /* ALLOW_MDSIO */ |
|
269 |
|
|
|
_END_MASTER(myThid) |
|
270 |
C |
C |
271 |
C At this point in external_fields_load the input fields are exchanged. |
C At this point in external_fields_load the input fields are exchanged. |
272 |
C However, we do not have exchange routines for vertical |
C However, we do not have exchange routines for vertical |
284 |
bWght = 1. _d 0 |
bWght = 1. _d 0 |
285 |
C read boundary values once and for all |
C read boundary values once and for all |
286 |
IF ( myIter .EQ. nIter0 ) THEN |
IF ( myIter .EQ. nIter0 ) THEN |
287 |
|
#ifndef ALLOW_MDSIO |
288 |
|
STOP 'ABNORMAL END: OBCS_EXTERNAL_FIELDS_LOAD: NEEDS MSDIO PKG' |
289 |
|
#endif /* ALLOW_MDSIO */ |
290 |
_BARRIER |
_BARRIER |
|
_BEGIN_MASTER(myThid) |
|
291 |
C Read constant boundary conditions only for myIter = nIter0 |
C Read constant boundary conditions only for myIter = nIter0 |
292 |
WRITE(msgBuf,'(1X,A,I10,1P1E20.12)') |
WRITE(msgBuf,'(1X,A,I10,1P1E20.12)') |
293 |
& 'OBCS_EXTERNAL_FIELDS_LOAD: Reading initial data:', |
& 'OBCS_EXTERNAL_FIELDS_LOAD: Reading initial data:', |
294 |
& myIter, myTime |
& myIter, myTime |
295 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
296 |
& SQUEEZE_RIGHT,myThid) |
& SQUEEZE_RIGHT,myThid) |
297 |
inTime0 = 1 |
iRec0 = 1 |
298 |
#ifdef ALLOW_MDSIO |
|
299 |
#ifdef ALLOW_OBCS_EAST |
#ifdef ALLOW_OBCS_EAST |
300 |
C Eastern boundary |
C Eastern boundary |
301 |
IF ( OBEuFile .NE. ' ' ) THEN |
IF ( OBEuFile .NE. ' ' ) THEN |
302 |
CALL MDSREADFIELDYZ ( OBEuFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBEuFile,fp,Nr,OBEu0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBEu0, inTime0, myThid ) |
|
303 |
ENDIF |
ENDIF |
304 |
IF ( OBEvFile .NE. ' ' ) THEN |
IF ( OBEvFile .NE. ' ' ) THEN |
305 |
CALL MDSREADFIELDYZ ( OBEvFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBEvFile,fp,Nr,OBEv0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBEv0, inTime0, myThid ) |
|
306 |
ENDIF |
ENDIF |
307 |
IF ( OBEtFile .NE. ' ' ) THEN |
IF ( OBEtFile .NE. ' ' ) THEN |
308 |
CALL MDSREADFIELDYZ ( OBEtFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBEtFile,fp,Nr,OBEt0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBEt0, inTime0, myThid ) |
|
309 |
ENDIF |
ENDIF |
310 |
IF ( OBEsFile .NE. ' ' ) THEN |
IF ( OBEsFile .NE. ' ' ) THEN |
311 |
CALL MDSREADFIELDYZ ( OBEsFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBEsFile,fp,Nr,OBEs0,iRec0,myIter,myThid ) |
312 |
& 'RL', Nr, OBEs0, inTime0, myThid ) |
ENDIF |
313 |
|
# ifdef NONLIN_FRSURF |
314 |
|
IF ( OBEetaFile .NE. ' ' ) THEN |
315 |
|
CALL READ_REC_YZ_RL( OBEetaFile, fp, 1, OBEeta0, iRec0, |
316 |
|
& myIter, myThid ) |
317 |
ENDIF |
ENDIF |
318 |
|
# endif /* NONLIN_FRSURF */ |
319 |
#endif /* ALLOW_OBCS_WEST */ |
#endif /* ALLOW_OBCS_WEST */ |
320 |
#ifdef ALLOW_OBCS_WEST |
#ifdef ALLOW_OBCS_WEST |
321 |
C Western boundary |
C Western boundary |
322 |
IF ( OBWuFile .NE. ' ' ) THEN |
IF ( OBWuFile .NE. ' ' ) THEN |
323 |
CALL MDSREADFIELDYZ ( OBWuFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBWuFile,fp,Nr,OBWu0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBWu0, inTime0, myThid ) |
|
324 |
ENDIF |
ENDIF |
325 |
IF ( OBWvFile .NE. ' ' ) THEN |
IF ( OBWvFile .NE. ' ' ) THEN |
326 |
CALL MDSREADFIELDYZ ( OBWvFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBWvFile,fp,Nr,OBWv0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBWv0, inTime0, myThid ) |
|
327 |
ENDIF |
ENDIF |
328 |
IF ( OBWtFile .NE. ' ' ) THEN |
IF ( OBWtFile .NE. ' ' ) THEN |
329 |
CALL MDSREADFIELDYZ ( OBWtFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBWtFile,fp,Nr,OBWt0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBWt0, inTime0, myThid ) |
|
330 |
ENDIF |
ENDIF |
331 |
IF ( OBWsFile .NE. ' ' ) THEN |
IF ( OBWsFile .NE. ' ' ) THEN |
332 |
CALL MDSREADFIELDYZ ( OBWsFile, readBinaryPrec, |
CALL READ_REC_YZ_RL( OBWsFile,fp,Nr,OBWs0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBWs0, inTime0, myThid ) |
|
333 |
ENDIF |
ENDIF |
334 |
|
# ifdef NONLIN_FRSURF |
335 |
|
IF ( OBWetaFile .NE. ' ' ) THEN |
336 |
|
CALL READ_REC_YZ_RL( OBWetaFile, fp, 1, OBWeta0, iRec0, |
337 |
|
& myIter, myThid ) |
338 |
|
ENDIF |
339 |
|
# endif /* NONLIN_FRSURF */ |
340 |
#endif /* ALLOW_OBCS_WEST */ |
#endif /* ALLOW_OBCS_WEST */ |
341 |
#ifdef ALLOW_OBCS_NORTH |
#ifdef ALLOW_OBCS_NORTH |
342 |
C Northern boundary |
C Northern boundary |
343 |
IF ( OBNuFile .NE. ' ' ) THEN |
IF ( OBNuFile .NE. ' ' ) THEN |
344 |
CALL MDSREADFIELDXz ( OBNuFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBNuFile,fp,Nr,OBNu0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBNu0, inTime0, myThid ) |
|
345 |
ENDIF |
ENDIF |
346 |
IF ( OBNvFile .NE. ' ' ) THEN |
IF ( OBNvFile .NE. ' ' ) THEN |
347 |
CALL MDSREADFIELDXZ ( OBNvFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBNvFile,fp,Nr,OBNv0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBNv0, inTime0, myThid ) |
|
348 |
ENDIF |
ENDIF |
349 |
IF ( OBNtFile .NE. ' ' ) THEN |
IF ( OBNtFile .NE. ' ' ) THEN |
350 |
CALL MDSREADFIELDXZ ( OBNtFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBNtFile,fp,Nr,OBNt0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBNt0, inTime0, myThid ) |
|
351 |
ENDIF |
ENDIF |
352 |
IF ( OBNsFile .NE. ' ' ) THEN |
IF ( OBNsFile .NE. ' ' ) THEN |
353 |
CALL MDSREADFIELDXZ ( OBNsFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBNsFile,fp,Nr,OBNs0,iRec0,myIter,myThid ) |
354 |
& 'RL', Nr, OBNs0, inTime0, myThid ) |
ENDIF |
355 |
|
# ifdef NONLIN_FRSURF |
356 |
|
IF ( OBNetaFile .NE. ' ' ) THEN |
357 |
|
CALL READ_REC_XZ_RL( OBNetaFile, fp, 1, OBNeta0, iRec0, |
358 |
|
& myIter, myThid ) |
359 |
ENDIF |
ENDIF |
360 |
|
# endif /* NONLIN_FRSURF */ |
361 |
#endif /* ALLOW_OBCS_NORTH */ |
#endif /* ALLOW_OBCS_NORTH */ |
362 |
#ifdef ALLOW_OBCS_SOUTH |
#ifdef ALLOW_OBCS_SOUTH |
363 |
C Southern boundary |
C Southern boundary |
364 |
IF ( OBSuFile .NE. ' ' ) THEN |
IF ( OBSuFile .NE. ' ' ) THEN |
365 |
CALL MDSREADFIELDXz ( OBSuFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBSuFile,fp,Nr,OBSu0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBSu0, inTime0, myThid ) |
|
366 |
ENDIF |
ENDIF |
367 |
IF ( OBSvFile .NE. ' ' ) THEN |
IF ( OBSvFile .NE. ' ' ) THEN |
368 |
CALL MDSREADFIELDXZ ( OBSvFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBSvFile,fp,Nr,OBSv0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBSv0, inTime0, myThid ) |
|
369 |
ENDIF |
ENDIF |
370 |
IF ( OBStFile .NE. ' ' ) THEN |
IF ( OBStFile .NE. ' ' ) THEN |
371 |
CALL MDSREADFIELDXZ ( OBStFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBStFile,fp,Nr,OBSt0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBSt0, inTime0, myThid ) |
|
372 |
ENDIF |
ENDIF |
373 |
IF ( OBSsFile .NE. ' ' ) THEN |
IF ( OBSsFile .NE. ' ' ) THEN |
374 |
CALL MDSREADFIELDXZ ( OBSsFile, readBinaryPrec, |
CALL READ_REC_XZ_RL( OBSsFile,fp,Nr,OBSs0,iRec0,myIter,myThid ) |
|
& 'RL', Nr, OBSs0, inTime0, myThid ) |
|
375 |
ENDIF |
ENDIF |
376 |
|
# ifdef NONLIN_FRSURF |
377 |
|
IF ( OBSetaFile .NE. ' ' ) THEN |
378 |
|
CALL READ_REC_XZ_RL( OBSetaFile, fp, 1, OBSeta0, iRec0, |
379 |
|
& myIter, myThid ) |
380 |
|
ENDIF |
381 |
|
# endif /* NONLIN_FRSURF */ |
382 |
#endif /* ALLOW_OBCS_SOUTH */ |
#endif /* ALLOW_OBCS_SOUTH */ |
383 |
#ifdef ALLOW_PTRACERS |
#ifdef ALLOW_PTRACERS |
384 |
IF (usePTRACERS) THEN |
IF (usePTRACERS) THEN |
385 |
C read passive tracer boundary values |
C read passive tracer boundary values |
386 |
DO iTracer = 1, PTRACERS_numInUse |
DO iTr = 1, PTRACERS_numInUse |
387 |
# ifdef ALLOW_OBCS_EAST |
# ifdef ALLOW_OBCS_EAST |
388 |
C Eastern boundary |
C Eastern boundary |
389 |
IF ( OBEptrFile(iTracer) .NE. ' ' ) THEN |
IF ( OBEptrFile(iTr) .NE. ' ' ) THEN |
390 |
CALL MDSREADFIELDYZ ( OBEptrFile(iTracer), readBinaryPrec, |
CALL READ_REC_YZ_RL( OBEptrFile(iTr), fp, Nr, |
391 |
& 'RL', Nr, OBEptr0(1-Oly,1,1,1,iTracer), |
& OBEptr0(1-Oly,1,1,1,iTr), iRec0,myIter, myThid ) |
|
& inTime0, myThid ) |
|
392 |
ENDIF |
ENDIF |
393 |
# endif /* ALLOW_OBCS_WEST */ |
# endif /* ALLOW_OBCS_WEST */ |
394 |
# ifdef ALLOW_OBCS_WEST |
# ifdef ALLOW_OBCS_WEST |
395 |
C Western boundary |
C Western boundary |
396 |
IF ( OBWptrFile(iTracer) .NE. ' ' ) THEN |
IF ( OBWptrFile(iTr) .NE. ' ' ) THEN |
397 |
CALL MDSREADFIELDYZ ( OBWptrFile(iTracer), readBinaryPrec, |
CALL READ_REC_YZ_RL( OBWptrFile(iTr), fp, Nr, |
398 |
& 'RL', Nr, OBWptr0(1-Oly,1,1,1,iTracer), |
& OBWptr0(1-Oly,1,1,1,iTr), iRec0, myIter, myThid ) |
|
& inTime0, myThid ) |
|
399 |
ENDIF |
ENDIF |
400 |
# endif /* ALLOW_OBCS_WEST */ |
# endif /* ALLOW_OBCS_WEST */ |
401 |
# ifdef ALLOW_OBCS_NORTH |
# ifdef ALLOW_OBCS_NORTH |
402 |
C Northern boundary |
C Northern boundary |
403 |
IF ( OBNptrFile(iTracer) .NE. ' ' ) THEN |
IF ( OBNptrFile(iTr) .NE. ' ' ) THEN |
404 |
CALL MDSREADFIELDXZ ( OBNptrFile(iTracer), readBinaryPrec, |
CALL READ_REC_XZ_RL( OBNptrFile(iTr), fp, Nr, |
405 |
& 'RL', Nr, OBNptr0(1-Olx,1,1,1,iTracer), |
& OBNptr0(1-Oly,1,1,1,iTr), iRec0, myIter, myThid ) |
|
& inTime0, myThid ) |
|
406 |
ENDIF |
ENDIF |
407 |
# endif /* ALLOW_OBCS_NORTH */ |
# endif /* ALLOW_OBCS_NORTH */ |
408 |
# ifdef ALLOW_OBCS_SOUTH |
# ifdef ALLOW_OBCS_SOUTH |
409 |
C Southern boundary |
C Southern boundary |
410 |
IF ( OBSptrFile(iTracer) .NE. ' ' ) THEN |
IF ( OBSptrFile(iTr) .NE. ' ' ) THEN |
411 |
CALL MDSREADFIELDXZ ( OBSptrFile(iTracer), readBinaryPrec, |
CALL READ_REC_XZ_RL( OBSptrFile(iTr), fp, Nr, |
412 |
& 'RL', Nr, OBSptr0(1-Olx,1,1,1,iTracer), |
& OBSptr0(1-Oly,1,1,1,iTr), iRec0, myIter, myThid ) |
|
& inTime0, myThid ) |
|
413 |
ENDIF |
ENDIF |
414 |
# endif /* ALLOW_OBCS_SOUTH */ |
# endif /* ALLOW_OBCS_SOUTH */ |
415 |
C end do iTracer |
C end do iTr |
416 |
ENDDO |
ENDDO |
417 |
C end if (usePTRACERS) |
C end if (usePTRACERS) |
418 |
ENDIF |
ENDIF |
419 |
#endif /* ALLOW_PTRACERS */ |
#endif /* ALLOW_PTRACERS */ |
|
#else /* ALLOW_MDSIO */ |
|
|
STOP 'ABNORMAL END: OBCS_EXTERNAL_FIELDS_LOAD: NEEDS MSDIO PKG' |
|
|
#endif /* ALLOW_MDSIO */ |
|
|
_END_MASTER(myThid) |
|
420 |
_BARRIER |
_BARRIER |
421 |
C endif myIter .EQ. nIter0 |
C endif myIter .EQ. nIter0 |
422 |
ENDIF |
ENDIF |
436 |
& OBEt, OBEt0, OBEt1, aWght, bWght, myThid ) |
& OBEt, OBEt0, OBEt1, aWght, bWght, myThid ) |
437 |
IF ( OBEsFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_YZ( |
IF ( OBEsFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_YZ( |
438 |
& OBEs, OBEs0, OBEs1, aWght, bWght, myThid ) |
& OBEs, OBEs0, OBEs1, aWght, bWght, myThid ) |
439 |
|
# ifdef NONLIN_FRSURF |
440 |
|
IF ( OBEetaFile .NE. ' ' ) THEN |
441 |
|
DO bj = myByLo(myThid), myByHi(myThid) |
442 |
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
443 |
|
DO j=1-Oly,sNy+Oly |
444 |
|
OBEeta(j,bi,bj) = bWght*OBEeta0(j,bi,bj) |
445 |
|
& +aWght*OBEeta1(j,bi,bj) |
446 |
|
ENDDO |
447 |
|
ENDDO |
448 |
|
ENDDO |
449 |
|
ENDIF |
450 |
|
# endif /* NONLIN_FRSURF */ |
451 |
#endif /* ALLOW_OBCS_EAST */ |
#endif /* ALLOW_OBCS_EAST */ |
452 |
#ifdef ALLOW_OBCS_WEST |
#ifdef ALLOW_OBCS_WEST |
453 |
IF ( OBWuFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_YZ( |
IF ( OBWuFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_YZ( |
458 |
& OBWt, OBWt0, OBWt1, aWght, bWght, myThid ) |
& OBWt, OBWt0, OBWt1, aWght, bWght, myThid ) |
459 |
IF ( OBWsFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_YZ( |
IF ( OBWsFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_YZ( |
460 |
& OBWs, OBWs0, OBWs1, aWght, bWght, myThid ) |
& OBWs, OBWs0, OBWs1, aWght, bWght, myThid ) |
461 |
|
# ifdef NONLIN_FRSURF |
462 |
|
IF ( OBWetaFile .NE. ' ' ) THEN |
463 |
|
DO bj = myByLo(myThid), myByHi(myThid) |
464 |
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
465 |
|
DO j=1-Oly,sNy+Oly |
466 |
|
OBWeta(j,bi,bj) = bWght*OBWeta0(j,bi,bj) |
467 |
|
& +aWght*OBWeta1(j,bi,bj) |
468 |
|
ENDDO |
469 |
|
ENDDO |
470 |
|
ENDDO |
471 |
|
ENDIF |
472 |
|
# endif /* NONLIN_FRSURF */ |
473 |
#endif /* ALLOW_OBCS_WEST */ |
#endif /* ALLOW_OBCS_WEST */ |
474 |
#ifdef ALLOW_OBCS_NORTH |
#ifdef ALLOW_OBCS_NORTH |
475 |
IF ( OBNuFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
IF ( OBNuFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
480 |
& OBNt, OBNt0, OBNt1, aWght, bWght, myThid ) |
& OBNt, OBNt0, OBNt1, aWght, bWght, myThid ) |
481 |
IF ( OBNsFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
IF ( OBNsFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
482 |
& OBNs, OBNs0, OBNs1, aWght, bWght, myThid ) |
& OBNs, OBNs0, OBNs1, aWght, bWght, myThid ) |
483 |
|
# ifdef NONLIN_FRSURF |
484 |
|
IF ( OBNetaFile .NE. ' ' ) THEN |
485 |
|
DO bj = myByLo(myThid), myByHi(myThid) |
486 |
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
487 |
|
DO i=1-Olx,sNx+Olx |
488 |
|
OBNeta(i,bi,bj) = bWght*OBNeta0(i,bi,bj) |
489 |
|
& +aWght*OBNeta1(i,bi,bj) |
490 |
|
ENDDO |
491 |
|
ENDDO |
492 |
|
ENDDO |
493 |
|
ENDIF |
494 |
|
# endif /* NONLIN_FRSURF */ |
495 |
#endif /* ALLOW_OBCS_NORTH */ |
#endif /* ALLOW_OBCS_NORTH */ |
496 |
#ifdef ALLOW_OBCS_SOUTH |
#ifdef ALLOW_OBCS_SOUTH |
497 |
IF ( OBSuFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
IF ( OBSuFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
502 |
& OBSt, OBSt0, OBSt1, aWght, bWght, myThid ) |
& OBSt, OBSt0, OBSt1, aWght, bWght, myThid ) |
503 |
IF ( OBSsFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
IF ( OBSsFile .NE. ' ' ) CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
504 |
& OBSs, OBSs0, OBSs1, aWght, bWght, myThid ) |
& OBSs, OBSs0, OBSs1, aWght, bWght, myThid ) |
505 |
|
# ifdef NONLIN_FRSURF |
506 |
|
IF ( OBSetaFile .NE. ' ' ) THEN |
507 |
|
DO bj = myByLo(myThid), myByHi(myThid) |
508 |
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
509 |
|
DO i=1-Olx,sNx+Olx |
510 |
|
OBSeta(i,bi,bj) = bWght*OBSeta0(i,bi,bj) |
511 |
|
& +aWght*OBSeta1(i,bi,bj) |
512 |
|
ENDDO |
513 |
|
ENDDO |
514 |
|
ENDDO |
515 |
|
ENDIF |
516 |
|
# endif /* NONLIN_FRSURF */ |
517 |
#endif /* ALLOW_OBCS_SOUTH */ |
#endif /* ALLOW_OBCS_SOUTH */ |
518 |
#ifdef ALLOW_PTRACERS |
#ifdef ALLOW_PTRACERS |
519 |
IF (usePTRACERS) THEN |
IF (usePTRACERS) THEN |
520 |
C "interpolate" passive tracer boundary values |
C "interpolate" passive tracer boundary values |
521 |
DO iTracer = 1, PTRACERS_numInUse |
DO iTr = 1, PTRACERS_numInUse |
522 |
# ifdef ALLOW_OBCS_EAST |
# ifdef ALLOW_OBCS_EAST |
523 |
IF ( OBEptrFile(iTracer) .NE. ' ' ) |
IF ( OBEptrFile(iTr) .NE. ' ' ) |
524 |
& CALL OBCS_EXTERNAL_FIELDS_INTERP_YZ( |
& CALL OBCS_EXTERNAL_FIELDS_INTERP_YZ( |
525 |
O OBEptr (1-Oly,1,1,1,iTracer), |
O OBEptr (1-Oly,1,1,1,iTr), |
526 |
I OBEptr0(1-Oly,1,1,1,iTracer), |
I OBEptr0(1-Oly,1,1,1,iTr), |
527 |
I OBEptr1(1-Oly,1,1,1,iTracer), aWght, bWght, myThid ) |
I OBEptr1(1-Oly,1,1,1,iTr), aWght, bWght, myThid ) |
528 |
# endif /* ALLOW_OBCS_EAST */ |
# endif /* ALLOW_OBCS_EAST */ |
529 |
# ifdef ALLOW_OBCS_WEST |
# ifdef ALLOW_OBCS_WEST |
530 |
IF ( OBWptrFile(iTracer) .NE. ' ' ) |
IF ( OBWptrFile(iTr) .NE. ' ' ) |
531 |
& CALL OBCS_EXTERNAL_FIELDS_INTERP_YZ( |
& CALL OBCS_EXTERNAL_FIELDS_INTERP_YZ( |
532 |
O OBWptr (1-Oly,1,1,1,iTracer), |
O OBWptr (1-Oly,1,1,1,iTr), |
533 |
I OBWptr0(1-Oly,1,1,1,iTracer), |
I OBWptr0(1-Oly,1,1,1,iTr), |
534 |
I OBWptr1(1-Oly,1,1,1,iTracer), aWght, bWght, myThid ) |
I OBWptr1(1-Oly,1,1,1,iTr), aWght, bWght, myThid ) |
535 |
# endif /* ALLOW_OBCS_WEST */ |
# endif /* ALLOW_OBCS_WEST */ |
536 |
# ifdef ALLOW_OBCS_NORTH |
# ifdef ALLOW_OBCS_NORTH |
537 |
IF ( OBNptrFile(iTracer) .NE. ' ' ) |
IF ( OBNptrFile(iTr) .NE. ' ' ) |
538 |
& CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
& CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
539 |
O OBNptr (1-Olx,1,1,1,iTracer), |
O OBNptr (1-Olx,1,1,1,iTr), |
540 |
I OBNptr0(1-Olx,1,1,1,iTracer), |
I OBNptr0(1-Olx,1,1,1,iTr), |
541 |
I OBNptr1(1-Olx,1,1,1,iTracer), aWght, bWght, myThid ) |
I OBNptr1(1-Olx,1,1,1,iTr), aWght, bWght, myThid ) |
542 |
# endif /* ALLOW_OBCS_NORTH */ |
# endif /* ALLOW_OBCS_NORTH */ |
543 |
# ifdef ALLOW_OBCS_SOUTH |
# ifdef ALLOW_OBCS_SOUTH |
544 |
IF ( OBSptrFile(iTracer) .NE. ' ' ) |
IF ( OBSptrFile(iTr) .NE. ' ' ) |
545 |
& CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
& CALL OBCS_EXTERNAL_FIELDS_INTERP_XZ( |
546 |
O OBSptr (1-Olx,1,1,1,iTracer), |
O OBSptr (1-Olx,1,1,1,iTr), |
547 |
I OBSptr0(1-Olx,1,1,1,iTracer), |
I OBSptr0(1-Olx,1,1,1,iTr), |
548 |
I OBSptr1(1-Olx,1,1,1,iTracer), aWght, bWght, myThid ) |
I OBSptr1(1-Olx,1,1,1,iTr), aWght, bWght, myThid ) |
549 |
# endif /* ALLOW_OBCS_SOUTH */ |
# endif /* ALLOW_OBCS_SOUTH */ |
550 |
C end do iTracer |
C end do iTr |
551 |
ENDDO |
ENDDO |
552 |
C end if (usePTRACERS) |
C end if (usePTRACERS) |
553 |
ENDIF |
ENDIF |
554 |
#endif /* ALLOW_PTRACERS */ |
#endif /* ALLOW_PTRACERS */ |
|
CMLC endif for periodicForcing |
|
|
CML ENDIF |
|
555 |
|
|
556 |
RETURN |
RETURN |
557 |
END |
END |
648 |
ENDDO |
ENDDO |
649 |
ENDDO |
ENDDO |
650 |
ENDDO |
ENDDO |
651 |
ENDDO |
ENDDO |
652 |
|
|
653 |
#endif /* ALLOW_OBCS AND ALLOW_OBCS_PRESCRIBE AND .NOT. ALLOW_EXF */ |
#endif /* ALLOW_OBCS AND ALLOW_OBCS_PRESCRIBE */ |
654 |
|
|
655 |
RETURN |
RETURN |
656 |
END |
END |