File indexing completed on 2021-11-10 06:16:20 UTC
view on githubraw file Latest commit deacece5 on 2021-11-09 17:35:09 UTC
aaab34a9a9 Jean*0001 # include "OBCS_OPTIONS.h"
0002
0003
0004
0005
0006
0007
0008
0009
0010
34e32f6831 Jean*0011
0012
0013
aaab34a9a9 Jean*0014 SUBROUTINE OBCS_EXF_LOAD (
34e32f6831 Jean*0015 I myTime, myIter, myThid )
0016
0017
c8a7569c80 Jean*0018
34e32f6831 Jean*0019
c8a7569c80 Jean*0020
34e32f6831 Jean*0021
0022
0023
c8a7569c80 Jean*0024
34e32f6831 Jean*0025
0026
0027 IMPLICIT NONE
0028
aaab34a9a9 Jean*0029 #include "SIZE.h"
0030 #include "EEPARAMS.h"
0031 #include "PARAMS.h"
9b4f2a04e2 Jean*0032 #include "OBCS_PARAMS.h"
0033
0034 #include "OBCS_FIELDS.h"
0035 #include "OBCS_SEAICE.h"
aaab34a9a9 Jean*0036 #ifdef ALLOW_EXF
0037 # include "EXF_PARAM.h"
0038 #endif
0039 #ifdef ALLOW_PTRACERS
0040 # include "PTRACERS_SIZE.h"
0041 # include "OBCS_PTRACERS.h"
0042 #endif /* ALLOW_PTRACERS */
0043
34e32f6831 Jean*0044
0045 _RL myTime
0046 INTEGER myIter
0047 INTEGER myThid
aaab34a9a9 Jean*0048
56c567caee Jean*0049 #if ( defined ALLOW_EXF ) && ( defined ALLOW_OBCS_PRESCRIBE )
34e32f6831 Jean*0050
56c567caee Jean*0051
aaab34a9a9 Jean*0052
56c567caee Jean*0053 # ifdef ALLOW_OBCS_NORTH
aaab34a9a9 Jean*0054 CALL OBCS_EXF_READ_XZ (
56c567caee Jean*0055 I 'N', useOBCSYearlyFields,
7b6a2adf81 Jean*0056 I obcsNstartTime, obcsNperiod, obcsNrepCycle,
34e32f6831 Jean*0057 U OBNu, OBNu0, OBNu1, OBNufile,
0058 U OBNv, OBNv0, OBNv1, OBNvfile,
0059 U OBNt, OBNt0, OBNt1, OBNtfile,
0060 U OBNs, OBNs0, OBNs1, OBNsfile,
56c567caee Jean*0061 # ifdef NONLIN_FRSURF
34e32f6831 Jean*0062 U OBNeta, OBNeta0, OBNeta1, OBNetafile,
56c567caee Jean*0063 # endif
0064 # ifdef ALLOW_SEAICE
7b6a2adf81 Jean*0065 I siobNstartTime, siobNperiod, siobNrepCycle,
aaab34a9a9 Jean*0066 U OBNa, OBNa0, OBNa1, OBNafile,
0067 U OBNh, OBNh0, OBNh1, OBNhfile,
0068 U OBNsl, OBNsl0, OBNsl1, OBNslfile,
0069 U OBNsn, OBNsn0, OBNsn1, OBNsnfile,
0070 U OBNuice,OBNuice0,OBNuice1,OBNuicefile,
0071 U OBNvice,OBNvice0,OBNvice1,OBNvicefile,
56c567caee Jean*0072 # endif
0073 # ifdef ALLOW_PTRACERS
aaab34a9a9 Jean*0074 U OBNptr ,OBNptr0, OBNptr1, OBNptrFile,
56c567caee Jean*0075 # endif
34e32f6831 Jean*0076 I myTime, myIter, myThid )
56c567caee Jean*0077 # endif /* ALLOW_OBCS_NORTH */
aaab34a9a9 Jean*0078
56c567caee Jean*0079 # ifdef ALLOW_OBCS_SOUTH
aaab34a9a9 Jean*0080 CALL OBCS_EXF_READ_XZ (
56c567caee Jean*0081 I 'S', useOBCSYearlyFields,
7b6a2adf81 Jean*0082 I obcsSstartTime, obcsSperiod, obcsSrepCycle,
34e32f6831 Jean*0083 U OBSu, OBSu0, OBSu1, OBSufile,
0084 U OBSv, OBSv0, OBSv1, OBSvfile,
0085 U OBSt, OBSt0, OBSt1, OBStfile,
0086 U OBSs, OBSs0, OBSs1, OBSsfile,
56c567caee Jean*0087 # ifdef NONLIN_FRSURF
34e32f6831 Jean*0088 U OBSeta, OBSeta0, OBSeta1, OBSetafile,
56c567caee Jean*0089 # endif
0090 # ifdef ALLOW_SEAICE
7b6a2adf81 Jean*0091 I siobSstartTime, siobSperiod, siobSrepCycle,
aaab34a9a9 Jean*0092 U OBSa, OBSa0, OBSa1, OBSafile,
0093 U OBSh, OBSh0, OBSh1, OBShfile,
0094 U OBSsl, OBSsl0, OBSsl1, OBSslfile,
0095 U OBSsn, OBSsn0, OBSsn1, OBSsnfile,
0096 U OBSuice,OBSuice0,OBSuice1,OBSuicefile,
0097 U OBSvice,OBSvice0,OBSvice1,OBSvicefile,
56c567caee Jean*0098 # endif
0099 # ifdef ALLOW_PTRACERS
aaab34a9a9 Jean*0100 U OBSptr ,OBSptr0, OBSptr1, OBSptrFile,
56c567caee Jean*0101 # endif
34e32f6831 Jean*0102 I myTime, myIter, myThid )
56c567caee Jean*0103 # endif /* ALLOW_OBCS_SOUTH */
aaab34a9a9 Jean*0104
56c567caee Jean*0105 # ifdef ALLOW_OBCS_EAST
aaab34a9a9 Jean*0106 CALL OBCS_EXF_READ_YZ (
56c567caee Jean*0107 I 'E', useOBCSYearlyFields,
7b6a2adf81 Jean*0108 I obcsEstartTime, obcsEperiod, obcsErepCycle,
34e32f6831 Jean*0109 U OBEu, OBEu0, OBEu1, OBEufile,
0110 U OBEv, OBEv0, OBEv1, OBEvfile,
0111 U OBEt, OBEt0, OBEt1, OBEtfile,
0112 U OBEs, OBEs0, OBEs1, OBEsfile,
56c567caee Jean*0113 # ifdef NONLIN_FRSURF
34e32f6831 Jean*0114 U OBEeta, OBEeta0, OBEeta1, OBEetafile,
56c567caee Jean*0115 # endif
0116 # ifdef ALLOW_SEAICE
7b6a2adf81 Jean*0117 I siobEstartTime, siobEperiod, siobErepCycle,
aaab34a9a9 Jean*0118 U OBEa, OBEa0, OBEa1, OBEafile,
0119 U OBEh, OBEh0, OBEh1, OBEhfile,
0120 U OBEsl, OBEsl0, OBEsl1, OBEslfile,
0121 U OBEsn, OBEsn0, OBEsn1, OBEsnfile,
0122 U OBEuice,OBEuice0,OBEuice1,OBEuicefile,
0123 U OBEvice,OBEvice0,OBEvice1,OBEvicefile,
56c567caee Jean*0124 # endif
0125 # ifdef ALLOW_PTRACERS
aaab34a9a9 Jean*0126 U OBEptr ,OBEptr0, OBEptr1, OBEptrFile,
56c567caee Jean*0127 # endif
34e32f6831 Jean*0128 I myTime, myIter, myThid )
56c567caee Jean*0129 # endif /* ALLOW_OBCS_EAST */
aaab34a9a9 Jean*0130
56c567caee Jean*0131 # ifdef ALLOW_OBCS_WEST
aaab34a9a9 Jean*0132 CALL OBCS_EXF_READ_YZ (
56c567caee Jean*0133 I 'W', useOBCSYearlyFields,
7b6a2adf81 Jean*0134 I obcsWstartTime, obcsWperiod, obcsWrepCycle,
34e32f6831 Jean*0135 U OBWu, OBWu0, OBWu1, OBWufile,
0136 U OBWv, OBWv0, OBWv1, OBWvfile,
0137 U OBWt, OBWt0, OBWt1, OBWtfile,
0138 U OBWs, OBWs0, OBWs1, OBWsfile,
56c567caee Jean*0139 # ifdef NONLIN_FRSURF
34e32f6831 Jean*0140 U OBWeta, OBWeta0, OBWeta1, OBWetafile,
56c567caee Jean*0141 # endif
0142 # ifdef ALLOW_SEAICE
7b6a2adf81 Jean*0143 I siobWstartTime, siobWperiod, siobWrepCycle,
aaab34a9a9 Jean*0144 U OBWa, OBWa0, OBWa1, OBWafile,
0145 U OBWh, OBWh0, OBWh1, OBWhfile,
0146 U OBWsl, OBWsl0, OBWsl1, OBWslfile,
0147 U OBWsn, OBWsn0, OBWsn1, OBWsnfile,
0148 U OBWuice,OBWuice0,OBWuice1,OBWuicefile,
0149 U OBWvice,OBWvice0,OBWvice1,OBWvicefile,
56c567caee Jean*0150 # endif
0151 # ifdef ALLOW_PTRACERS
aaab34a9a9 Jean*0152 U OBWptr ,OBWptr0, OBWptr1, OBWptrFile,
56c567caee Jean*0153 # endif
34e32f6831 Jean*0154 I myTime, myIter, myThid )
56c567caee Jean*0155 # endif /* ALLOW_OBCS_WEST */
aaab34a9a9 Jean*0156
0157 #endif /* ALLOW_EXF and ALLOW_OBCS_PRESCRIBE */
0158
0159 RETURN
0160 END
0161
0162
0163
34e32f6831 Jean*0164
a6d1f588a0 Jean*0165
34e32f6831 Jean*0166
aaab34a9a9 Jean*0167 SUBROUTINE OBCS_EXF_READ_XZ (
56c567caee Jean*0168 I obName, useYearlyFields,
0169 I obcsStartTime, obcsPeriod, obcsRepeatCycle,
34e32f6831 Jean*0170 U OBu, OBu0, OBu1, OBufile,
0171 U OBv, OBv0, OBv1, OBvfile,
0172 U OBt, OBt0, OBt1, OBtfile,
0173 U OBs, OBs0, OBs1, OBsfile,
aaab34a9a9 Jean*0174 #ifdef NONLIN_FRSURF
34e32f6831 Jean*0175 U OBeta, OBeta0, OBeta1, OBetafile,
aaab34a9a9 Jean*0176 #endif
0177 #ifdef ALLOW_SEAICE
56c567caee Jean*0178 I siobStartTime, siobPeriod, siobRepeatCycle,
aaab34a9a9 Jean*0179 U OBa, OBa0, OBa1, OBafile,
0180 U OBh, OBh0, OBh1, OBhfile,
0181 U OBsl, OBsl0, OBsl1, OBslfile,
0182 U OBsn, OBsn0, OBsn1, OBsnfile,
0183 U OBuice,OBuice0,OBuice1,OBuicefile,
0184 U OBvice,OBvice0,OBvice1,OBvicefile,
0185 #endif
0186 #ifdef ALLOW_PTRACERS
0187 U OBptr ,OBptr0, OBptr1, OBptrFile,
0188 #endif
34e32f6831 Jean*0189 I myTime, myIter, myThid )
0190
0191
c8a7569c80 Jean*0192
34e32f6831 Jean*0193
c8a7569c80 Jean*0194
34e32f6831 Jean*0195
0196
0197
c8a7569c80 Jean*0198
34e32f6831 Jean*0199
0200
0201 IMPLICIT NONE
0202
aaab34a9a9 Jean*0203 #include "SIZE.h"
0204 #include "EEPARAMS.h"
0205 #include "PARAMS.h"
0206 #ifdef ALLOW_EXF
0207 # include "EXF_PARAM.h"
0208 #endif
0209 #ifdef ALLOW_PTRACERS
0210 # include "PTRACERS_SIZE.h"
0211 # include "PTRACERS_PARAMS.h"
0212 #endif /* ALLOW_PTRACERS */
0213
34e32f6831 Jean*0214
56c567caee Jean*0215 CHARACTER*(*) obName
aaab34a9a9 Jean*0216 LOGICAL useYearlyFields
56c567caee Jean*0217 _RL obcsStartTime, obcsPeriod, obcsRepeatCycle
6c6a5a9345 Jean*0218 _RL OBu (1-OLx:sNx+OLx,Nr,nSx,nSy)
0219 _RL OBv (1-OLx:sNx+OLx,Nr,nSx,nSy)
0220 _RL OBt (1-OLx:sNx+OLx,Nr,nSx,nSy)
0221 _RL OBs (1-OLx:sNx+OLx,Nr,nSx,nSy)
0222 _RL OBu0 (1-OLx:sNx+OLx,Nr,nSx,nSy)
0223 _RL OBv0 (1-OLx:sNx+OLx,Nr,nSx,nSy)
0224 _RL OBt0 (1-OLx:sNx+OLx,Nr,nSx,nSy)
0225 _RL OBs0 (1-OLx:sNx+OLx,Nr,nSx,nSy)
0226 _RL OBu1 (1-OLx:sNx+OLx,Nr,nSx,nSy)
0227 _RL OBv1 (1-OLx:sNx+OLx,Nr,nSx,nSy)
0228 _RL OBt1 (1-OLx:sNx+OLx,Nr,nSx,nSy)
0229 _RL OBs1 (1-OLx:sNx+OLx,Nr,nSx,nSy)
aaab34a9a9 Jean*0230 CHARACTER*(MAX_LEN_FNAM) OBuFile,OBvFile,OBtFile,OBsFile
0231 #ifdef NONLIN_FRSURF
6c6a5a9345 Jean*0232 _RL OBeta (1-OLx:sNx+OLx,nSx,nSy)
0233 _RL OBeta0 (1-OLx:sNx+OLx,nSx,nSy)
0234 _RL OBeta1 (1-OLx:sNx+OLx,nSx,nSy)
aaab34a9a9 Jean*0235 CHARACTER*(MAX_LEN_FNAM) OBetaFile
0236 #endif
0237 #ifdef ALLOW_SEAICE
56c567caee Jean*0238 _RL siobStartTime, siobPeriod, siobRepeatCycle
6c6a5a9345 Jean*0239 _RL OBa (1-OLx:sNx+OLx,nSx,nSy)
0240 _RL OBh (1-OLx:sNx+OLx,nSx,nSy)
0241 _RL OBa0 (1-OLx:sNx+OLx,nSx,nSy)
0242 _RL OBh0 (1-OLx:sNx+OLx,nSx,nSy)
0243 _RL OBa1 (1-OLx:sNx+OLx,nSx,nSy)
0244 _RL OBh1 (1-OLx:sNx+OLx,nSx,nSy)
0245 _RL OBsl (1-OLx:sNx+OLx,nSx,nSy)
0246 _RL OBsn (1-OLx:sNx+OLx,nSx,nSy)
0247 _RL OBsl0 (1-OLx:sNx+OLx,nSx,nSy)
0248 _RL OBsn0 (1-OLx:sNx+OLx,nSx,nSy)
0249 _RL OBsl1 (1-OLx:sNx+OLx,nSx,nSy)
0250 _RL OBsn1 (1-OLx:sNx+OLx,nSx,nSy)
0251 _RL OBuice (1-OLx:sNx+OLx,nSx,nSy)
0252 _RL OBvice (1-OLx:sNx+OLx,nSx,nSy)
0253 _RL OBuice0 (1-OLx:sNx+OLx,nSx,nSy)
0254 _RL OBvice0 (1-OLx:sNx+OLx,nSx,nSy)
0255 _RL OBuice1 (1-OLx:sNx+OLx,nSx,nSy)
0256 _RL OBvice1 (1-OLx:sNx+OLx,nSx,nSy)
aaab34a9a9 Jean*0257 CHARACTER*(MAX_LEN_FNAM)
0258 & OBaFile,OBhFile,OBslFile,OBsnFile,OBuiceFile,OBviceFile
0259 #endif /* ALLOW_SEAICE */
0260 #ifdef ALLOW_PTRACERS
6c6a5a9345 Jean*0261 _RL OBptr (1-OLx:sNx+OLx,Nr,nSx,nSy,PTRACERS_num)
0262 _RL OBptr0(1-OLx:sNx+OLx,Nr,nSx,nSy,PTRACERS_num)
0263 _RL OBptr1(1-OLx:sNx+OLx,Nr,nSx,nSy,PTRACERS_num)
aaab34a9a9 Jean*0264 CHARACTER*(MAX_LEN_FNAM) OBptrFile(PTRACERS_num)
0265 #endif /* ALLOW_PTRACERS */
34e32f6831 Jean*0266 _RL myTime
0267 INTEGER myIter
0268 INTEGER myThid
aaab34a9a9 Jean*0269
56c567caee Jean*0270 #if ( defined ALLOW_EXF ) && ( defined ALLOW_OBCS_PRESCRIBE )
34e32f6831 Jean*0271
6c6a5a9345 Jean*0272
0273 CHARACTER*(MAX_LEN_MBUF) msgBuf
56c567caee Jean*0274 CHARACTER*(6) fldName
c8a7569c80 Jean*0275 LOGICAL first, changed
0276 INTEGER count0, count1
0277 INTEGER year0, year1
aaab34a9a9 Jean*0278 _RL fac
0279 # ifdef ALLOW_PTRACERS
c8a7569c80 Jean*0280 INTEGER iTracer
aaab34a9a9 Jean*0281 # endif /* ALLOW_PTRACERS */
56c567caee Jean*0282
aaab34a9a9 Jean*0283
c8a7569c80 Jean*0284 IF ( useCAL .AND. obcsPeriod .EQ. -12. _d 0 ) THEN
0285 # ifdef ALLOW_CAL
0286
6c6a5a9345 Jean*0287
0288 CALL cal_GetMonthsRec(
0289 O fac, first, changed,
deacece587 Oliv*0290 O count0, count1, year0, year1,
0291 I myTime, myIter, myThid )
0292 # endif /* ALLOW_CAL */
0293 ELSEIF ( useCal .AND. obcsPeriod .EQ. -1. _d 0 ) THEN
0294
0295
0296
0297
0298 # ifdef ALLOW_CAL
0299 CALL EXF_GetMonthsRec(
0300 I obcsStartTime, useYearlyFields,
0301 O fac, first, changed,
0302 O count0, count1, year0, year1,
6c6a5a9345 Jean*0303 I myTime, myIter, myThid )
c8a7569c80 Jean*0304 # endif /* ALLOW_CAL */
0305 ELSEIF ( obcsPeriod .LT. 0. _d 0 ) THEN
56c567caee Jean*0306 WRITE(msgBuf,'(A,1PE16.8,3A)')
c8a7569c80 Jean*0307 & 'OBCS_EXF_READ_XZ: Invalid obcsPeriod=', obcsPeriod,
56c567caee Jean*0308 & ' for ', obName, ' OBCS files'
6c6a5a9345 Jean*0309 CALL PRINT_ERROR( msgBuf, myThid )
0310 STOP 'ABNORMAL END: S/R OBCS_EXF_READ_XZ'
0311 ELSE
56c567caee Jean*0312
0313 fldName = 'obcs'//obName
0314 CALL EXF_GetFFieldRec(
0315 I obcsStartTime, obcsPeriod, obcsRepeatCycle,
0316 I fldName, useYearlyFields,
6c6a5a9345 Jean*0317 O fac, first, changed,
0318 O count0, count1, year0, year1,
0319 I myTime, myIter, myThid )
0320 ENDIF
0321 IF ( exf_debugLev.GE.debLevD ) THEN
0322 _BEGIN_MASTER( myThid )
56c567caee Jean*0323 WRITE(msgBuf,'(4A)') ' OBCS_EXF_READ_XZ: ',
0324 & 'processing ', obName, '-OBCS files'
6c6a5a9345 Jean*0325 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0326 & SQUEEZE_RIGHT, myThid )
0327 WRITE(msgBuf,'(2A,I10,2I7)') ' OBCS_EXF_READ_XZ: ',
0328 & ' myIter, count0, count1:', myIter, count0, count1
0329 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0330 & SQUEEZE_RIGHT, myThid )
0331 WRITE(msgBuf,'(2A,2(L2,2X),E16.9)') ' OBCS_EXF_READ_XZ: ',
0332 & ' first, changed, fac: ', first, changed, fac
0333 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0334 & SQUEEZE_RIGHT, myThid )
0335 _END_MASTER( myThid )
0336 ENDIF
0337
56c567caee Jean*0338 CALL EXF_SET_OBCS_XZ( OBu, OBu0, OBu1, OBufile, 'u', Nr,
0339 I fac, first, changed, useYearlyFields,
0340 I obcsPeriod, count0, count1, year0, year1,
0341 I myTime, myIter, myThid )
0342 CALL EXF_SET_OBCS_XZ( OBv, OBv0, OBv1, OBvfile, 'v', Nr,
0343 I fac, first, changed, useYearlyFields,
0344 I obcsPeriod, count0, count1, year0, year1,
0345 I myTime, myIter, myThid )
0346 CALL EXF_SET_OBCS_XZ( OBt, OBt0, OBt1, OBtfile, 's', Nr,
0347 I fac, first, changed, useYearlyFields,
0348 I obcsPeriod, count0, count1, year0, year1,
0349 I myTime, myIter, myThid )
0350 CALL EXF_SET_OBCS_XZ( OBs, OBs0, OBs1, OBsfile, 's', Nr,
0351 I fac, first, changed, useYearlyFields,
0352 I obcsPeriod, count0, count1, year0, year1,
0353 I myTime, myIter, myThid )
aaab34a9a9 Jean*0354 # ifdef NONLIN_FRSURF
56c567caee Jean*0355 CALL EXF_SET_OBCS_XZ( OBeta, OBeta0, OBeta1, OBetaFile, 's', 1,
0356 I fac, first, changed, useYearlyFields,
0357 I obcsPeriod, count0, count1, year0, year1,
0358 I myTime, myIter, myThid )
aaab34a9a9 Jean*0359 # endif /* NONLIN_FRSURF */
0360 # ifdef ALLOW_PTRACERS
32e4056e6a Jean*0361 IF ( usePTRACERS ) THEN
0362 DO iTracer = 1, PTRACERS_numInUse
56c567caee Jean*0363 CALL EXF_SET_OBCS_XZ( OBptr (1-OLx,1,1,1,iTracer),
0364 I OBptr0(1-OLx,1,1,1,iTracer),
0365 I OBptr1(1-OLx,1,1,1,iTracer),
0366 I OBptrFile(iTracer), 's', Nr,
0367 I fac, first, changed, useYearlyFields,
0368 I obcsPeriod, count0, count1, year0, year1,
0369 I myTime, myIter, myThid )
32e4056e6a Jean*0370 ENDDO
0371 ENDIF
aaab34a9a9 Jean*0372 # endif /* ALLOW_PTRACERS */
6c6a5a9345 Jean*0373
aaab34a9a9 Jean*0374 # ifdef ALLOW_SEAICE
0375 IF (useSEAICE) THEN
c8a7569c80 Jean*0376 IF ( useCAL .AND. siobPeriod .EQ. -12. _d 0 ) THEN
0377 # ifdef ALLOW_CAL
0378
6c6a5a9345 Jean*0379
0380 CALL cal_GetMonthsRec(
0381 O fac, first, changed,
deacece587 Oliv*0382 O count0, count1, year0, year1,
6c6a5a9345 Jean*0383 I myTime, myIter, myThid )
c8a7569c80 Jean*0384 # endif /* ALLOW_CAL */
deacece587 Oliv*0385 ELSEIF ( useCal .AND. siobPeriod .EQ. -1. _d 0 ) THEN
0386
0387
0388
0389
0390 # ifdef ALLOW_CAL
0391 CALL EXF_GetMonthsRec(
0392 I siobStartTime, useYearlyFields,
0393 O fac, first, changed,
0394 O count0, count1, year0, year1,
0395 I myTime, myIter, myThid )
0396 # endif /* ALLOW_CAL */
c8a7569c80 Jean*0397 ELSEIF ( siobPeriod .LT. 0. _d 0 ) THEN
56c567caee Jean*0398 WRITE(msgBuf,'(A,1PE16.8,3A)')
c8a7569c80 Jean*0399 & 'OBCS_EXF_READ_XZ: Invalid siobPeriod=', siobPeriod,
56c567caee Jean*0400 & ' for ', obName, ' OBCS files'
6c6a5a9345 Jean*0401 CALL PRINT_ERROR( msgBuf, myThid )
0402 STOP 'ABNORMAL END: S/R OBCS_EXF_READ_XZ'
0403 ELSE
56c567caee Jean*0404
0405 fldName = 'SIob'//obName
0406 CALL EXF_GetFFieldRec(
0407 I siobStartTime, siobPeriod, siobRepeatCycle,
0408 I fldName, useYearlyFields,
6c6a5a9345 Jean*0409 O fac, first, changed,
0410 O count0, count1, year0, year1,
0411 I myTime, myIter, myThid )
0412 ENDIF
0413 IF ( exf_debugLev.GE.debLevD ) THEN
0414 _BEGIN_MASTER( myThid )
56c567caee Jean*0415 WRITE(msgBuf,'(4A)') ' OBCS_EXF_READ_XZ: ',
0416 & 'processing SEAICE ', obName, '-OBCS files'
6c6a5a9345 Jean*0417 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0418 & SQUEEZE_RIGHT, myThid )
0419 WRITE(msgBuf,'(2A,I10,2I7)') ' OBCS_EXF_READ_XZ: ',
0420 & ' myIter, count0, count1:', myIter, count0, count1
0421 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0422 & SQUEEZE_RIGHT, myThid )
0423 WRITE(msgBuf,'(2A,2(L2,2X),E16.9)') ' OBCS_EXF_READ_XZ: ',
0424 & ' first, changed, fac: ', first, changed, fac
0425 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0426 & SQUEEZE_RIGHT, myThid )
0427 _END_MASTER( myThid )
0428 ENDIF
0429
56c567caee Jean*0430 CALL EXF_SET_OBCS_XZ( OBa, OBa0, OBa1, OBafile, 's', 1,
0431 I fac, first, changed, useYearlyFields,
0432 I siobPeriod, count0, count1, year0, year1,
0433 I myTime, myIter, myThid )
0434 CALL EXF_SET_OBCS_XZ( OBh, OBh0, OBh1, OBhfile, 's', 1,
0435 I fac, first, changed, useYearlyFields,
0436 I siobPeriod, count0, count1, year0, year1,
0437 I myTime, myIter, myThid )
0438 CALL EXF_SET_OBCS_XZ( OBsl, OBsl0, OBsl1, OBslfile, 's', 1,
0439 I fac, first, changed, useYearlyFields,
0440 I siobPeriod, count0, count1, year0, year1,
0441 I myTime, myIter, myThid )
0442 CALL EXF_SET_OBCS_XZ( OBsn, OBsn0, OBsn1, OBsnfile, 's', 1,
0443 I fac, first, changed, useYearlyFields,
0444 I siobPeriod, count0, count1, year0, year1,
0445 I myTime, myIter, myThid )
0446 CALL EXF_SET_OBCS_XZ( OBuice,OBuice0,OBuice1,OBuicefile,'u', 1,
0447 I fac, first, changed, useYearlyFields,
0448 I siobPeriod, count0, count1, year0, year1,
0449 I myTime, myIter, myThid )
0450 CALL EXF_SET_OBCS_XZ( OBvice,OBvice0,OBvice1,OBvicefile,'v', 1,
0451 I fac, first, changed, useYearlyFields,
0452 I siobPeriod, count0, count1, year0, year1,
0453 I myTime, myIter, myThid )
aaab34a9a9 Jean*0454 ENDIF
0455 # endif /* ALLOW_SEAICE */
0456
56c567caee Jean*0457 #endif /* ALLOW_EXF and ALLOW_OBCS_PRESCRIBE */
aaab34a9a9 Jean*0458 RETURN
0459 END
0460
0461
0462
34e32f6831 Jean*0463
a6d1f588a0 Jean*0464
34e32f6831 Jean*0465
aaab34a9a9 Jean*0466 SUBROUTINE OBCS_EXF_READ_YZ (
56c567caee Jean*0467 I obName, useYearlyFields,
0468 I obcsStartTime, obcsPeriod, obcsRepeatCycle,
34e32f6831 Jean*0469 U OBu, OBu0, OBu1, OBufile,
0470 U OBv, OBv0, OBv1, OBvfile,
0471 U OBt, OBt0, OBt1, OBtfile,
0472 U OBs, OBs0, OBs1, OBsfile,
aaab34a9a9 Jean*0473 #ifdef NONLIN_FRSURF
34e32f6831 Jean*0474 U OBeta, OBeta0, OBeta1, OBetafile,
aaab34a9a9 Jean*0475 #endif
0476 #ifdef ALLOW_SEAICE
56c567caee Jean*0477 I siobStartTime, siobPeriod, siobRepeatCycle,
aaab34a9a9 Jean*0478 U OBa, OBa0, OBa1, OBafile,
0479 U OBh, OBh0, OBh1, OBhfile,
0480 U OBsl, OBsl0, OBsl1, OBslfile,
0481 U OBsn, OBsn0, OBsn1, OBsnfile,
0482 U OBuice,OBuice0,OBuice1,OBuicefile,
0483 U OBvice,OBvice0,OBvice1,OBvicefile,
0484 #endif
0485 #ifdef ALLOW_PTRACERS
0486 U OBptr ,OBptr0, OBptr1, OBptrFile,
0487 #endif
34e32f6831 Jean*0488 I myTime, myIter, myThid )
0489
0490
c8a7569c80 Jean*0491
34e32f6831 Jean*0492
c8a7569c80 Jean*0493
34e32f6831 Jean*0494
0495
0496
c8a7569c80 Jean*0497
34e32f6831 Jean*0498
0499
0500 IMPLICIT NONE
0501
aaab34a9a9 Jean*0502 #include "SIZE.h"
0503 #include "EEPARAMS.h"
0504 #include "PARAMS.h"
0505 #ifdef ALLOW_EXF
0506 # include "EXF_PARAM.h"
0507 #endif
0508 #ifdef ALLOW_PTRACERS
0509 # include "PTRACERS_SIZE.h"
0510 # include "PTRACERS_PARAMS.h"
0511 #endif /* ALLOW_PTRACERS */
0512
34e32f6831 Jean*0513
56c567caee Jean*0514 CHARACTER*(*) obName
aaab34a9a9 Jean*0515 LOGICAL useYearlyFields
56c567caee Jean*0516 _RL obcsStartTime, obcsPeriod, obcsRepeatCycle
6c6a5a9345 Jean*0517 _RL OBu (1-OLy:sNy+OLy,Nr,nSx,nSy)
0518 _RL OBv (1-OLy:sNy+OLy,Nr,nSx,nSy)
0519 _RL OBt (1-OLy:sNy+OLy,Nr,nSx,nSy)
0520 _RL OBs (1-OLy:sNy+OLy,Nr,nSx,nSy)
0521 _RL OBu0 (1-OLy:sNy+OLy,Nr,nSx,nSy)
0522 _RL OBv0 (1-OLy:sNy+OLy,Nr,nSx,nSy)
0523 _RL OBt0 (1-OLy:sNy+OLy,Nr,nSx,nSy)
0524 _RL OBs0 (1-OLy:sNy+OLy,Nr,nSx,nSy)
0525 _RL OBu1 (1-OLy:sNy+OLy,Nr,nSx,nSy)
0526 _RL OBv1 (1-OLy:sNy+OLy,Nr,nSx,nSy)
0527 _RL OBt1 (1-OLy:sNy+OLy,Nr,nSx,nSy)
0528 _RL OBs1 (1-OLy:sNy+OLy,Nr,nSx,nSy)
aaab34a9a9 Jean*0529 CHARACTER*(MAX_LEN_FNAM) OBuFile,OBvFile,OBtFile,OBsFile
0530 #ifdef NONLIN_FRSURF
6c6a5a9345 Jean*0531 _RL OBeta (1-OLy:sNy+OLy,nSx,nSy)
0532 _RL OBeta0 (1-OLy:sNy+OLy,nSx,nSy)
0533 _RL OBeta1 (1-OLy:sNy+OLy,nSx,nSy)
aaab34a9a9 Jean*0534 CHARACTER*(MAX_LEN_FNAM) OBetaFile
0535 #endif
0536 #ifdef ALLOW_SEAICE
56c567caee Jean*0537 _RL siobStartTime, siobPeriod, siobRepeatCycle
6c6a5a9345 Jean*0538 _RL OBa (1-OLy:sNy+OLy,nSx,nSy)
0539 _RL OBh (1-OLy:sNy+OLy,nSx,nSy)
0540 _RL OBa0 (1-OLy:sNy+OLy,nSx,nSy)
0541 _RL OBh0 (1-OLy:sNy+OLy,nSx,nSy)
0542 _RL OBa1 (1-OLy:sNy+OLy,nSx,nSy)
0543 _RL OBh1 (1-OLy:sNy+OLy,nSx,nSy)
0544 _RL OBsl (1-OLy:sNy+OLy,nSx,nSy)
0545 _RL OBsn (1-OLy:sNy+OLy,nSx,nSy)
0546 _RL OBsl0 (1-OLy:sNy+OLy,nSx,nSy)
0547 _RL OBsn0 (1-OLy:sNy+OLy,nSx,nSy)
0548 _RL OBsl1 (1-OLy:sNy+OLy,nSx,nSy)
0549 _RL OBsn1 (1-OLy:sNy+OLy,nSx,nSy)
0550 _RL OBuice (1-OLy:sNy+OLy,nSx,nSy)
0551 _RL OBvice (1-OLy:sNy+OLy,nSx,nSy)
0552 _RL OBuice0 (1-OLy:sNy+OLy,nSx,nSy)
0553 _RL OBvice0 (1-OLy:sNy+OLy,nSx,nSy)
0554 _RL OBuice1 (1-OLy:sNy+OLy,nSx,nSy)
0555 _RL OBvice1 (1-OLy:sNy+OLy,nSx,nSy)
aaab34a9a9 Jean*0556 CHARACTER*(MAX_LEN_FNAM)
0557 & OBaFile,OBhFile,OBslFile,OBsnFile,OBuiceFile,OBviceFile
0558 #endif /* ALLOW_SEAICE */
0559 #ifdef ALLOW_PTRACERS
6c6a5a9345 Jean*0560 _RL OBptr (1-OLy:sNy+OLy,Nr,nSx,nSy,PTRACERS_num)
0561 _RL OBptr0(1-OLy:sNy+OLy,Nr,nSx,nSy,PTRACERS_num)
0562 _RL OBptr1(1-OLy:sNy+OLy,Nr,nSx,nSy,PTRACERS_num)
aaab34a9a9 Jean*0563 CHARACTER*(MAX_LEN_FNAM) OBptrFile(PTRACERS_num)
0564 #endif /* ALLOW_PTRACERS */
34e32f6831 Jean*0565 _RL myTime
0566 INTEGER myIter
0567 INTEGER myThid
aaab34a9a9 Jean*0568
56c567caee Jean*0569 #if ( defined ALLOW_EXF ) && ( defined ALLOW_OBCS_PRESCRIBE )
34e32f6831 Jean*0570
6c6a5a9345 Jean*0571
0572 CHARACTER*(MAX_LEN_MBUF) msgBuf
56c567caee Jean*0573 CHARACTER*(6) fldName
c8a7569c80 Jean*0574 LOGICAL first, changed
0575 INTEGER count0, count1
0576 INTEGER year0, year1
aaab34a9a9 Jean*0577 _RL fac
0578 # ifdef ALLOW_PTRACERS
c8a7569c80 Jean*0579 INTEGER iTracer
aaab34a9a9 Jean*0580 # endif /* ALLOW_PTRACERS */
56c567caee Jean*0581
aaab34a9a9 Jean*0582
c8a7569c80 Jean*0583 IF ( useCAL .AND. obcsPeriod .EQ. -12. _d 0 ) THEN
0584 # ifdef ALLOW_CAL
0585
6c6a5a9345 Jean*0586
0587 CALL cal_GetMonthsRec(
0588 O fac, first, changed,
deacece587 Oliv*0589 O count0, count1, year0, year1,
0590 I myTime, myIter, myThid )
0591 # endif /* ALLOW_CAL */
0592 ELSEIF ( useCal .AND. obcsPeriod .EQ. -1. _d 0 ) THEN
0593
0594
0595
0596
0597 # ifdef ALLOW_CAL
0598 CALL EXF_GetMonthsRec(
0599 I obcsStartTime, useYearlyFields,
0600 O fac, first, changed,
0601 O count0, count1, year0, year1,
6c6a5a9345 Jean*0602 I myTime, myIter, myThid )
c8a7569c80 Jean*0603 # endif /* ALLOW_CAL */
0604 ELSEIF ( obcsPeriod .LT. 0. _d 0 ) THEN
56c567caee Jean*0605 WRITE(msgBuf,'(A,1PE16.8,3A)')
c8a7569c80 Jean*0606 & 'OBCS_EXF_READ_YZ: Invalid obcsPeriod=', obcsPeriod,
56c567caee Jean*0607 & ' for ', obName, ' OBCS files'
6c6a5a9345 Jean*0608 CALL PRINT_ERROR( msgBuf, myThid )
0609 STOP 'ABNORMAL END: S/R OBCS_EXF_READ_YZ'
0610 ELSE
56c567caee Jean*0611
0612 fldName = 'obcs'//obName
0613 CALL EXF_GetFFieldRec(
0614 I obcsStartTime, obcsPeriod, obcsRepeatCycle,
0615 I fldName, useYearlyFields,
6c6a5a9345 Jean*0616 O fac, first, changed,
0617 O count0, count1, year0, year1,
0618 I myTime, myIter, myThid )
0619 ENDIF
0620 IF ( exf_debugLev.GE.debLevD ) THEN
0621 _BEGIN_MASTER( myThid )
56c567caee Jean*0622 WRITE(msgBuf,'(4A)') ' OBCS_EXF_READ_XZ: ',
0623 & 'processing ', obName, '-OBCS files'
6c6a5a9345 Jean*0624 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0625 & SQUEEZE_RIGHT, myThid )
0626 WRITE(msgBuf,'(2A,I10,2I7)') ' OBCS_EXF_READ_YZ: ',
0627 & ' myIter, count0, count1:', myIter, count0, count1
0628 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0629 & SQUEEZE_RIGHT, myThid )
0630 WRITE(msgBuf,'(2A,2(L2,2X),E16.9)') ' OBCS_EXF_READ_YZ: ',
0631 & ' first, changed, fac: ', first, changed, fac
0632 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0633 & SQUEEZE_RIGHT, myThid )
0634 _END_MASTER( myThid )
0635 ENDIF
0636
56c567caee Jean*0637 CALL EXF_SET_OBCS_YZ( OBu, OBu0, OBu1, OBufile, 'u', Nr,
0638 I fac, first, changed, useYearlyFields,
0639 I obcsPeriod, count0, count1, year0, year1,
0640 I myTime, myIter, myThid )
0641 CALL EXF_SET_OBCS_YZ( OBv, OBv0, OBv1, OBvfile, 'v', Nr,
0642 I fac, first, changed, useYearlyFields,
0643 I obcsPeriod, count0, count1, year0, year1,
0644 I myTime, myIter, myThid )
0645 CALL EXF_SET_OBCS_YZ( OBt, OBt0, OBt1, OBtfile, 's', Nr,
0646 I fac, first, changed, useYearlyFields,
0647 I obcsPeriod, count0, count1, year0, year1,
0648 I myTime, myIter, myThid )
0649 CALL EXF_SET_OBCS_YZ( OBs, OBs0, OBs1, OBsfile, 's', Nr,
0650 I fac, first, changed, useYearlyFields,
0651 I obcsPeriod, count0, count1, year0, year1,
0652 I myTime, myIter, myThid )
aaab34a9a9 Jean*0653 # ifdef NONLIN_FRSURF
56c567caee Jean*0654 CALL EXF_SET_OBCS_YZ( OBeta, OBeta0, OBeta1, OBetaFile, 's', 1,
0655 I fac, first, changed, useYearlyFields,
0656 I obcsPeriod, count0, count1, year0, year1,
0657 I myTime, myIter, myThid )
aaab34a9a9 Jean*0658 # endif /* NONLIN_FRSURF */
0659 # ifdef ALLOW_PTRACERS
32e4056e6a Jean*0660 IF ( usePTRACERS ) THEN
0661 DO iTracer = 1, PTRACERS_numInUse
56c567caee Jean*0662 CALL EXF_SET_OBCS_YZ( OBptr (1-OLx,1,1,1,iTracer),
0663 I OBptr0(1-OLx,1,1,1,iTracer),
0664 I OBptr1(1-OLx,1,1,1,iTracer),
0665 I OBptrFile(iTracer), 's', Nr,
0666 I fac, first, changed, useYearlyFields,
0667 I obcsPeriod, count0, count1, year0, year1,
0668 I myTime, myIter, myThid )
32e4056e6a Jean*0669 ENDDO
0670 ENDIF
aaab34a9a9 Jean*0671 # endif /* ALLOW_PTRACERS */
6c6a5a9345 Jean*0672
aaab34a9a9 Jean*0673 # ifdef ALLOW_SEAICE
0674 IF (useSEAICE) THEN
c8a7569c80 Jean*0675 IF ( useCAL .AND. siobPeriod .EQ. -12. _d 0 ) THEN
0676 # ifdef ALLOW_CAL
0677
6c6a5a9345 Jean*0678
0679 CALL cal_GetMonthsRec(
0680 O fac, first, changed,
deacece587 Oliv*0681 O count0, count1, year0, year1,
6c6a5a9345 Jean*0682 I myTime, myIter, myThid )
c8a7569c80 Jean*0683 # endif /* ALLOW_CAL */
deacece587 Oliv*0684 ELSEIF ( useCal .AND. siobPeriod .EQ. -1. _d 0 ) THEN
0685
0686
0687
0688
0689 # ifdef ALLOW_CAL
0690 CALL EXF_GetMonthsRec(
0691 I siobStartTime, useYearlyFields,
0692 O fac, first, changed,
0693 O count0, count1, year0, year1,
0694 I myTime, myIter, myThid )
0695 # endif /* ALLOW_CAL */
c8a7569c80 Jean*0696 ELSEIF ( siobPeriod .LT. 0. _d 0 ) THEN
56c567caee Jean*0697 WRITE(msgBuf,'(A,1PE16.8,3A)')
c8a7569c80 Jean*0698 & 'OBCS_EXF_READ_YZ: Invalid siobPeriod=', siobPeriod,
56c567caee Jean*0699 & ' for ', obName, ' OBCS files'
6c6a5a9345 Jean*0700 CALL PRINT_ERROR( msgBuf, myThid )
0701 STOP 'ABNORMAL END: S/R OBCS_EXF_READ_YZ'
0702 ELSE
56c567caee Jean*0703
0704 fldName = 'SIob'//obName
0705 CALL EXF_GetFFieldRec(
0706 I siobStartTime, siobPeriod, siobRepeatCycle,
0707 I fldName, useYearlyFields,
6c6a5a9345 Jean*0708 O fac, first, changed,
0709 O count0, count1, year0, year1,
0710 I myTime, myIter, myThid )
0711 ENDIF
0712 IF ( exf_debugLev.GE.debLevD ) THEN
0713 _BEGIN_MASTER( myThid )
56c567caee Jean*0714 WRITE(msgBuf,'(4A)') ' OBCS_EXF_READ_XZ: ',
0715 & 'processing SEAICE ', obName, '-OBCS files'
6c6a5a9345 Jean*0716 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0717 & SQUEEZE_RIGHT, myThid )
0718 WRITE(msgBuf,'(2A,I10,2I7)') ' OBCS_EXF_READ_YZ: ',
0719 & ' myIter, count0, count1:', myIter, count0, count1
0720 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0721 & SQUEEZE_RIGHT, myThid )
0722 WRITE(msgBuf,'(2A,2(L2,2X),E16.9)') ' OBCS_EXF_READ_YZ: ',
0723 & ' first, changed, fac: ', first, changed, fac
0724 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0725 & SQUEEZE_RIGHT, myThid )
0726 _END_MASTER( myThid )
0727 ENDIF
0728
56c567caee Jean*0729 CALL EXF_SET_OBCS_YZ( OBa, OBa0, OBa1, OBafile, 's', 1,
0730 I fac, first, changed, useYearlyFields,
0731 I siobPeriod, count0, count1, year0, year1,
0732 I myTime, myIter, myThid )
0733 CALL EXF_SET_OBCS_YZ( OBh, OBh0, OBh1, OBhfile, 's', 1,
0734 I fac, first, changed, useYearlyFields,
0735 I siobPeriod, count0, count1, year0, year1,
0736 I myTime, myIter, myThid )
0737 CALL EXF_SET_OBCS_YZ( OBsl, OBsl0, OBsl1, OBslfile, 's', 1,
0738 I fac, first, changed, useYearlyFields,
0739 I siobPeriod, count0, count1, year0, year1,
0740 I myTime, myIter, myThid )
0741 CALL EXF_SET_OBCS_YZ( OBsn, OBsn0, OBsn1, OBsnfile, 's', 1,
0742 I fac, first, changed, useYearlyFields,
0743 I siobPeriod, count0, count1, year0, year1,
0744 I myTime, myIter, myThid )
0745 CALL EXF_SET_OBCS_YZ( OBuice,OBuice0,OBuice1,OBuicefile,'u', 1,
0746 I fac, first, changed, useYearlyFields,
0747 I siobPeriod, count0, count1, year0, year1,
0748 I myTime, myIter, myThid )
0749 CALL EXF_SET_OBCS_YZ( OBvice,OBvice0,OBvice1,OBvicefile,'v', 1,
0750 I fac, first, changed, useYearlyFields,
0751 I siobPeriod, count0, count1, year0, year1,
0752 I myTime, myIter, myThid )
aaab34a9a9 Jean*0753 ENDIF
0754 # endif /* ALLOW_SEAICE */
0755
56c567caee Jean*0756 #endif /* ALLOW_EXF and ALLOW_OBCS_PRESCRIBE */
aaab34a9a9 Jean*0757 RETURN
0758 END