25 |
#include "SIZE.h" |
#include "SIZE.h" |
26 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
27 |
#include "PARAMS.h" |
#include "PARAMS.h" |
|
#include "FFIELDS.h" |
|
|
#include "GRID.h" |
|
|
#include "DYNVARS.h" |
|
28 |
#ifdef ALLOW_PTRACERS |
#ifdef ALLOW_PTRACERS |
29 |
#include "PTRACERS_SIZE.h" |
#include "PTRACERS_SIZE.h" |
30 |
#include "PTRACERS_PARAMS.h" |
#include "PTRACERS_PARAMS.h" |
31 |
#endif |
#endif |
32 |
#include "RBCS.h" |
#include "RBCS_SIZE.h" |
33 |
|
#include "RBCS_PARAMS.h" |
34 |
|
#include "RBCS_FIELDS.h" |
35 |
|
|
36 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
37 |
C === Routine arguments === |
C === Routine arguments === |
123 |
initer0 = rbcsIter0 + intime0*Ifprd |
initer0 = rbcsIter0 + intime0*Ifprd |
124 |
initer1 = rbcsIter0 + intime1*Ifprd |
initer1 = rbcsIter0 + intime1*Ifprd |
125 |
|
|
126 |
|
#ifndef DISABLE_RBCS_MOM |
127 |
|
IF ( useRBCuVel .AND. relaxUFile.NE.' ' ) THEN |
128 |
|
IF ( rbcsSingleTimeFiles ) THEN |
129 |
|
IL=ILNBLNK( relaxUFile ) |
130 |
|
WRITE(fullName,'(2A,I10.10)') relaxUFile(1:IL),'.',initer0 |
131 |
|
CALL READ_REC_XYZ_RS(fullName, rbcu0, 1, myIter, myThid) |
132 |
|
WRITE(fullName,'(2A,I10.10)') relaxUFile(1:IL),'.',initer1 |
133 |
|
CALL READ_REC_XYZ_RS(fullName, rbcu1, 1, myIter, myThid) |
134 |
|
ELSE |
135 |
|
CALL READ_REC_XYZ_RS(relaxUFile,rbcu0,intime0,myIter,myThid) |
136 |
|
CALL READ_REC_XYZ_RS(relaxUFile,rbcu1,intime1,myIter,myThid) |
137 |
|
ENDIF |
138 |
|
ENDIF |
139 |
|
IF ( useRBCvVel .AND. relaxVFile.NE.' ' ) THEN |
140 |
|
IF ( rbcsSingleTimeFiles ) THEN |
141 |
|
IL=ILNBLNK( relaxVFile ) |
142 |
|
WRITE(fullName,'(2A,I10.10)') relaxVFile(1:IL),'.',initer0 |
143 |
|
CALL READ_REC_XYZ_RS(fullName, rbcv0, 1, myIter, myThid) |
144 |
|
WRITE(fullName,'(2A,I10.10)') relaxVFile(1:IL),'.',initer1 |
145 |
|
CALL READ_REC_XYZ_RS(fullName, rbcv1, 1, myIter, myThid) |
146 |
|
ELSE |
147 |
|
CALL READ_REC_XYZ_RS(relaxVFile,rbcv0,intime0,myIter,myThid) |
148 |
|
CALL READ_REC_XYZ_RS(relaxVFile,rbcv1,intime1,myIter,myThid) |
149 |
|
ENDIF |
150 |
|
ENDIF |
151 |
|
IF ( (useRBCuVel .AND. relaxUFile.NE.' ') .OR. |
152 |
|
& (useRBCvVel .AND. relaxVFile.NE.' ') ) THEN |
153 |
|
CALL EXCH_UV_XYZ_RS( rbcu0, rbcv0, .TRUE., myThid ) |
154 |
|
CALL EXCH_UV_XYZ_RS( rbcu1, rbcv1, .TRUE., myThid ) |
155 |
|
ENDIF |
156 |
|
#endif /* DISABLE_RBCS_MOM */ |
157 |
IF ( useRBCtemp .AND. relaxTFile .NE. ' ' ) THEN |
IF ( useRBCtemp .AND. relaxTFile .NE. ' ' ) THEN |
158 |
IF ( rbcsSingleTimeFiles ) THEN |
IF ( rbcsSingleTimeFiles ) THEN |
159 |
IL=ILNBLNK( relaxTFile ) |
IL=ILNBLNK( relaxTFile ) |
165 |
CALL READ_REC_XYZ_RS(relaxTFile,rbct0,intime0,myIter,myThid) |
CALL READ_REC_XYZ_RS(relaxTFile,rbct0,intime0,myIter,myThid) |
166 |
CALL READ_REC_XYZ_RS(relaxTFile,rbct1,intime1,myIter,myThid) |
CALL READ_REC_XYZ_RS(relaxTFile,rbct1,intime1,myIter,myThid) |
167 |
ENDIF |
ENDIF |
168 |
|
CALL EXCH_XYZ_RS( rbct0 , myThid ) |
169 |
|
CALL EXCH_XYZ_RS( rbct1 , myThid ) |
170 |
ENDIF |
ENDIF |
171 |
IF ( useRBCsalt .AND. relaxSFile .NE. ' ' ) THEN |
IF ( useRBCsalt .AND. relaxSFile .NE. ' ' ) THEN |
172 |
IF ( rbcsSingleTimeFiles ) THEN |
IF ( rbcsSingleTimeFiles ) THEN |
179 |
CALL READ_REC_XYZ_RS(relaxSFile,rbcs0,intime0,myIter,myThid) |
CALL READ_REC_XYZ_RS(relaxSFile,rbcs0,intime0,myIter,myThid) |
180 |
CALL READ_REC_XYZ_RS(relaxSFile,rbcs1,intime1,myIter,myThid) |
CALL READ_REC_XYZ_RS(relaxSFile,rbcs1,intime1,myIter,myThid) |
181 |
ENDIF |
ENDIF |
182 |
|
CALL EXCH_XYZ_RS( rbcs0 , myThid ) |
183 |
|
CALL EXCH_XYZ_RS( rbcs1 , myThid ) |
184 |
ENDIF |
ENDIF |
185 |
|
|
186 |
#ifdef ALLOW_PTRACERS |
#ifdef ALLOW_PTRACERS |
208 |
& rbcptr1(1-Olx,1-Oly,1,1,1,iTracer), |
& rbcptr1(1-Olx,1-Oly,1,1,1,iTracer), |
209 |
& intime1, myIter, myThid ) |
& intime1, myIter, myThid ) |
210 |
ENDIF |
ENDIF |
|
ENDIF |
|
|
ENDDO |
|
|
ENDIF |
|
|
#endif |
|
|
|
|
|
IF ( useRBCtemp .AND. relaxTFile .NE. ' ' ) THEN |
|
|
CALL EXCH_XYZ_RS( rbct0 , myThid ) |
|
|
CALL EXCH_XYZ_RS( rbct1 , myThid ) |
|
|
ENDIF |
|
|
IF ( useRBCsalt .AND. relaxSFile .NE. ' ' ) THEN |
|
|
CALL EXCH_XYZ_RS( rbcs0 , myThid ) |
|
|
CALL EXCH_XYZ_RS( rbcs1 , myThid ) |
|
|
ENDIF |
|
|
#ifdef ALLOW_PTRACERS |
|
|
IF (usePTRACERS) THEN |
|
|
DO iTracer = 1, PTRACERS_numInUse |
|
|
IF ( useRBCptrnum(iTracer) ) THEN |
|
211 |
CALL EXCH_XYZ_RS( rbcptr0(1-Olx,1-Oly,1,1,1,iTracer),myThid ) |
CALL EXCH_XYZ_RS( rbcptr0(1-Olx,1-Oly,1,1,1,iTracer),myThid ) |
212 |
CALL EXCH_XYZ_RS( rbcptr1(1-Olx,1-Oly,1,1,1,iTracer),myThid ) |
CALL EXCH_XYZ_RS( rbcptr1(1-Olx,1-Oly,1,1,1,iTracer),myThid ) |
213 |
ENDIF |
ENDIF |
228 |
C-- Interpolate |
C-- Interpolate |
229 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
230 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
231 |
DO k=1,Nr |
#ifndef DISABLE_RBCS_MOM |
232 |
DO j=1-Oly,sNy+Oly |
IF ( useRBCuVel .OR. useRBCvVel ) THEN |
233 |
DO i=1-Olx,sNx+Olx |
DO k=1,Nr |
234 |
RBCtemp(i,j,k,bi,bj) = bWght*rbct0(i,j,k,bi,bj) |
DO j=1-Oly,sNy+Oly |
235 |
& +aWght*rbct1(i,j,k,bi,bj) |
DO i=1-Olx,sNx+Olx |
236 |
RBCsalt(i,j,k,bi,bj) = bWght*rbcs0(i,j,k,bi,bj) |
RBCuVel(i,j,k,bi,bj) = bWght*rbcu0(i,j,k,bi,bj) |
237 |
& +aWght*rbcs1(i,j,k,bi,bj) |
& +aWght*rbcu1(i,j,k,bi,bj) |
238 |
|
RBCvVel(i,j,k,bi,bj) = bWght*rbcv0(i,j,k,bi,bj) |
239 |
|
& +aWght*rbcv1(i,j,k,bi,bj) |
240 |
|
ENDDO |
241 |
|
ENDDO |
242 |
|
ENDDO |
243 |
|
ENDIF |
244 |
|
#endif /* DISABLE_RBCS_MOM */ |
245 |
|
DO k=1,Nr |
246 |
|
DO j=1-Oly,sNy+Oly |
247 |
|
DO i=1-Olx,sNx+Olx |
248 |
|
RBCtemp(i,j,k,bi,bj) = bWght*rbct0(i,j,k,bi,bj) |
249 |
|
& +aWght*rbct1(i,j,k,bi,bj) |
250 |
|
RBCsalt(i,j,k,bi,bj) = bWght*rbcs0(i,j,k,bi,bj) |
251 |
|
& +aWght*rbcs1(i,j,k,bi,bj) |
252 |
|
ENDDO |
253 |
ENDDO |
ENDDO |
254 |
ENDDO |
ENDDO |
|
ENDDO |
|
255 |
ENDDO |
ENDDO |
256 |
ENDDO |
ENDDO |
257 |
|
|