Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:38:23 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
cf5b5345a0 Jean*0001 #include "CHEAPAML_OPTIONS.h"
93e0447b06 Jean*0002 
cf5b5345a0 Jean*0003 C     !ROUTINE: CHEAPAML_FIELDS_LOAD
                0004 C     !INTERFACE:
                0005       SUBROUTINE CHEAPAML_FIELDS_LOAD( myTime, myIter, myThid )
                0006 C     *==========================================================*
93e0447b06 Jean*0007 C     | SUBROUTINE CHEAPAML_FIELDS_LOAD
                0008 C     | o Control reading of fields from external source.
cf5b5345a0 Jean*0009 C     *==========================================================*
                0010 
                0011 C     !USES:
                0012       IMPLICIT NONE
                0013 C     === Global variables ===
                0014 #include "SIZE.h"
                0015 #include "EEPARAMS.h"
                0016 #include "PARAMS.h"
                0017 #include "FFIELDS.h"
                0018 #include "CHEAPAML.h"
93e0447b06 Jean*0019 
cf5b5345a0 Jean*0020 C     !INPUT/OUTPUT PARAMETERS:
                0021 C     === Routine arguments ===
d0842ebedb Jean*0022 C     myIter :: Simulation timestep number
                0023 C     myTime :: Simulation time
                0024 C     myThid :: Thread no. that called this routine.
cf5b5345a0 Jean*0025       _RL     myTime
                0026       INTEGER myIter
d0842ebedb Jean*0027       INTEGER myThid
93e0447b06 Jean*0028 
cf5b5345a0 Jean*0029 C     !LOCAL VARIABLES:
d0842ebedb Jean*0030 C     === in common block ===
                0031 C     trair[01]   :: Relaxation temp. profile for air temperature
                0032 C     qrair[01]   :: Relaxation specific humidity profile for air
                0033 C     solar[01]   :: short wave flux
7c3371c654 Jean*0034 C     uWind[01]   :: wind speed [m/s], u-component (on C-grid)
                0035 C     vWind[01]   :: wind speed [m/s], v-component (on C-grid)
                0036 C     ustress[01] :: wind stress [N/m2], u-component (on A-grid)
                0037 C     vstress[01] :: wind stress [N/m2], v-component (on A-grid)
d0842ebedb Jean*0038 C     wavesh[01]  ::
                0039 C     wavesp[01]  ::
                0040 C     rair[01]    ::
ffe44ab22b Jean*0041 C     CheaptracerR[01] :: Relaxation profile for passive tracer
ced0783fba Jean*0042 
2616d73cb2 Nico*0043       COMMON /BULKFFIELDS/
ced0783fba Jean*0044      &         trair0,   trair1,
                0045      &         qrair0,   qrair1,
                0046      &         Solar0,   Solar1,
7c3371c654 Jean*0047      &         uWind0,   uWind1,
                0048      &         vWind0,   vWind1,
ced0783fba Jean*0049      &         ustress0, ustress1,
                0050      &         vstress0, vstress1,
                0051      &         wavesh0,  wavesh1,
                0052      &         wavesp0,  wavesp1,
7c3371c654 Jean*0053 c    &         rair0,    rair1,
cf6b9ab292 Brun*0054      &         CheaptracerR0, CheaptracerR1,
                0055      &         cheaph0, cheaph1,
0312857000 Jean*0056      &         cheapcl0, cheapcl1,
                0057      &         cheaplw0, cheaplw1,
                0058      &         cheappr0, cheappr1
ffe44ab22b Jean*0059 
ced0783fba Jean*0060       _RL  trair0    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0061       _RL  trair1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0062       _RL  qrair0    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0063       _RL  qrair1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0064       _RL  Solar0    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0065       _RL  Solar1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
7c3371c654 Jean*0066       _RL  uWind0    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0067       _RL  uWind1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0068       _RL  vWind0    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0069       _RL  vWind1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
ced0783fba Jean*0070       _RL  ustress0  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0071       _RL  ustress1  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0072       _RL  vstress0  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0073       _RL  vstress1  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0074       _RL  wavesh0  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0075       _RL  wavesh1  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0076       _RL  wavesp0  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0077       _RL  wavesp1  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
7c3371c654 Jean*0078 c     _RL  rair0  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0079 c     _RL  rair1  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
51132e5783 Nico*0080       _RL  CheaptracerR0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0081       _RL  CheaptracerR1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
cf6b9ab292 Brun*0082       _RL  cheaph0   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0083       _RL  cheaph1   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0084       _RL  cheapcl0   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0085       _RL  cheapcl1   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0086       _RL  cheaplw0   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0087       _RL  cheaplw1   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0088       _RL  cheappr0   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0089       _RL  cheappr1   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
cf5b5345a0 Jean*0090 
d0842ebedb Jean*0091 C     === Local arrays ===
                0092 C     cheaph[01]  ::
                0093 C     cheapcl[01] ::
                0094 C     cheaplw[01] ::
                0095 C     aWght,bWght :: Interpolation weights
                0096 
0bcb68cc3c Jean*0097       _RL aWght, bWght
d0842ebedb Jean*0098 
                0099       INTEGER bi, bj
                0100       INTEGER i, j, iG, jG
                0101       INTEGER intimeP, intime0, intime1
0bcb68cc3c Jean*0102       _RL recipNym1, local, u, ssqa
cf5b5345a0 Jean*0103 
d0842ebedb Jean*0104       recipNym1 = Ny - 1
                0105       IF ( Ny.GT.1 ) recipNym1 = 1. _d 0 / recipNym1
4fa4901be6 Nico*0106 
d0842ebedb Jean*0107       IF ( periodicExternalForcing_cheap ) THEN
cf5b5345a0 Jean*0108 
d0842ebedb Jean*0109 C the objective here is to give cheapaml a default periodic forcing
                0110 C consisting only of annually varying solar forcing, and thus Trelaxation
                0111 C variation.  everything else, relative humidity, wind, are fixed.  This
                0112 C keys off of solardata.  if a solar data file exists, the model will
                0113 C assume there are files to be read and interpolated between, as is standard
                0114 C for the MITgcm.
cf5b5345a0 Jean*0115 
d0842ebedb Jean*0116         IF ( useStressOption ) THEN
                0117           WRITE(*,*)' stress option is turned on.  this is not ',
cf6b9ab292 Brun*0118      &       'consistent with the default time dependent forcing option'
d0842ebedb Jean*0119           STOP
ced0783fba Jean*0120         ENDIF
                0121 
d0842ebedb Jean*0122 C here for usual interpolative forcings
ced0783fba Jean*0123 C First call requires that we initialize everything to zero for safety
d0842ebedb Jean*0124         IF ( myIter .EQ. nIter0 ) THEN
                0125          DO bj = myByLo(myThid), myByHi(myThid)
                0126           DO bi = myBxLo(myThid), myBxHi(myThid)
                0127            DO j=1-OLy,sNy+OLy
                0128             DO i=1-OLx,sNx+OLx
                0129              trair0  (i,j,bi,bj) = 0.
                0130              trair1  (i,j,bi,bj) = 0.
                0131              qrair0  (i,j,bi,bj) = 0.
                0132              qrair1  (i,j,bi,bj) = 0.
                0133              solar0  (i,j,bi,bj) = 0.
                0134              solar1  (i,j,bi,bj) = 0.
7c3371c654 Jean*0135              uWind0  (i,j,bi,bj) = 0.
                0136              uWind1  (i,j,bi,bj) = 0.
                0137              vWind0  (i,j,bi,bj) = 0.
                0138              vWind1  (i,j,bi,bj) = 0.
d0842ebedb Jean*0139              cheaph0 (i,j,bi,bj) = 0.
                0140              cheaph1 (i,j,bi,bj) = 0.
                0141              cheapcl0(i,j,bi,bj) = 0.5
                0142              cheapcl1(i,j,bi,bj) = 0.5
                0143              cheaplw0(i,j,bi,bj) = 0.
                0144              cheaplw1(i,j,bi,bj) = 0.
cf6b9ab292 Brun*0145              cheappr0(i,j,bi,bj) = 0.
                0146              cheappr1(i,j,bi,bj) = 0.
d0842ebedb Jean*0147              ustress0(i,j,bi,bj) = 0.
                0148              ustress1(i,j,bi,bj) = 0.
                0149              vstress0(i,j,bi,bj) = 0.
                0150              vstress1(i,j,bi,bj) = 0.
                0151              wavesh0 (i,j,bi,bj) = 0.
                0152              wavesh1 (i,j,bi,bj) = 0.
                0153              wavesp0 (i,j,bi,bj) = 0.
                0154              wavesp1 (i,j,bi,bj) = 0.
7c3371c654 Jean*0155 c            rair0   (i,j,bi,bj) = 0.
                0156 c            rair1   (i,j,bi,bj) = 0.
d0842ebedb Jean*0157              CheaptracerR0 (i,j,bi,bj) = 0.
                0158              CheaptracerR1 (i,j,bi,bj) = 0.
                0159             ENDDO
47339ef480 Jean*0160            ENDDO
                0161           ENDDO
cf5b5345a0 Jean*0162          ENDDO
d0842ebedb Jean*0163         ENDIF
                0164 
                0165 C--   Now calculate whether it is time to update the forcing arrays
                0166         CALL GET_PERIODIC_INTERVAL(
                0167      O           intimeP, intime0, intime1, bWght, aWght,
                0168      I           externForcingCycle_cheap, externForcingPeriod_cheap,
                0169      I           deltaTclock, myTime, myThid )
cf5b5345a0 Jean*0170 
d0842ebedb Jean*0171         IF ( intime0.NE.intimeP .OR. myIter.EQ.nIter0 ) THEN
2616d73cb2 Nico*0172 
                0173 C      If the above condition is met then we need to read in
                0174 C      data for the period ahead and the period behind myTime.
d0842ebedb Jean*0175          WRITE(*,*) 'S/R CHEAPAML_FIELDS_LOAD'
                0176          IF ( SolarFile .NE. ' ' ) THEN
                0177           CALL READ_REC_XY_RL( SolarFile,solar0,intime0,
                0178      &                         myIter, myThid )
                0179           CALL READ_REC_XY_RL( SolarFile,solar1,intime1,
                0180      &                         myIter, myThid )
cf6b9ab292 Brun*0181         ELSE
                0182           DO bj = myByLo(myThid), myByHi(myThid)
                0183             DO bi = myBxLo(myThid), myBxHi(myThid)
                0184               DO j=1,sNy
                0185                 DO i=1,sNx
                0186                   Solar(i,j,bi,bj) = 0.0 _d 0
                0187                 ENDDO
                0188               ENDDO
                0189             ENDDO
                0190          ENDDO
                0191          _EXCH_XY_RL( solar, myThid )
                0192 
                0193         ENDIF
d0842ebedb Jean*0194          IF ( TrFile .NE. ' ' ) THEN
                0195           CALL READ_REC_XY_RL( TRFile,trair0,intime0,
                0196      &                         myIter, myThid )
                0197           CALL READ_REC_XY_RL( TRFile,trair1,intime1,
                0198      &                         myIter, myThid )
cf6b9ab292 Brun*0199         ELSE
                0200          DO bj = myByLo(myThid), myByHi(myThid)
                0201           DO bi = myBxLo(myThid), myBxHi(myThid)
                0202            DO j=1,sNy
                0203             DO i=1,sNx
                0204               TR(i,j,bi,bj) = 0.0 _d 0
                0205             ENDDO
                0206            ENDDO
                0207           ENDDO
                0208          ENDDO
                0209          _EXCH_XY_RL( TR, myThid )
                0210 
                0211         ENDIF
d0842ebedb Jean*0212          IF ( QrFile .NE. ' ' ) THEN
                0213           CALL READ_REC_XY_RL( QrFile,qrair0,intime0,
                0214      &                         myIter, myThid )
                0215           CALL READ_REC_XY_RL( QrFile,qrair1,intime1,
                0216      &                         myIter, myThid )
cf6b9ab292 Brun*0217         ELSE
                0218           DO bj = myByLo(myThid), myByHi(myThid)
                0219             DO bi = myBxLo(myThid), myBxHi(myThid)
                0220               DO j=1,sNy
                0221                 DO i=1,sNx
                0222                   qr(i,j,bi,bj) = 0.0 _d 0
                0223                 ENDDO
                0224               ENDDO
                0225             ENDDO
                0226           ENDDO
                0227          _EXCH_XY_RL( qr, myThid )
                0228 
                0229         ENDIF
                0230         IF ( UWindFile .NE. ' ' ) THEN
7c3371c654 Jean*0231           CALL READ_REC_XY_RL( UWindFile,uWind0,intime0,
cf6b9ab292 Brun*0232      &       myIter, myThid )
7c3371c654 Jean*0233           CALL READ_REC_XY_RL( UWindFile,uWind1,intime1,
cf6b9ab292 Brun*0234      &       myIter, myThid )
                0235         ELSE
                0236           DO bj = myByLo(myThid), myByHi(myThid)
                0237           DO bi = myBxLo(myThid), myBxHi(myThid)
                0238            DO j=1,sNy
                0239             DO i=1,sNx
                0240               uWind(i,j,bi,bj) = 0.0 _d 0
                0241             ENDDO
                0242            ENDDO
                0243           ENDDO
                0244          ENDDO
                0245 
                0246          _EXCH_XY_RL( uWind, myThid )
                0247 !         CALL EXCH_UV_XY_RL( uWind, vWind, .TRUE., myThid )
                0248 
                0249        ENDIF
0312857000 Jean*0250 
d0842ebedb Jean*0251          IF ( VWindFile .NE. ' ' ) THEN
7c3371c654 Jean*0252           CALL READ_REC_XY_RL( VWindFile,vWind0,intime0,
d0842ebedb Jean*0253      &                         myIter, myThid )
7c3371c654 Jean*0254           CALL READ_REC_XY_RL( VWindFile,vWind1,intime1,
d0842ebedb Jean*0255      &                         myIter, myThid )
cf6b9ab292 Brun*0256         ELSE
                0257           DO bj = myByLo(myThid), myByHi(myThid)
                0258           DO bi = myBxLo(myThid), myBxHi(myThid)
                0259            DO j=1,sNy
                0260             DO i=1,sNx
                0261               vWind(i,j,bi,bj) = 0. _d 0
                0262             ENDDO
                0263            ENDDO
                0264           ENDDO
                0265          ENDDO
                0266 
                0267          _EXCH_XY_RL( vWind, myThid )
                0268 !         CALL EXCH_UV_XY_RL( uWind, vWind, .TRUE., myThid )
0312857000 Jean*0269 
cf6b9ab292 Brun*0270         ENDIF
0bcb68cc3c Jean*0271          IF ( useTimeVarBLH .AND. cheap_hFile .NE. ' ' ) THEN
                0272           CALL READ_REC_XY_RL( cheap_hFile,cheaph0,intime0,
d0842ebedb Jean*0273      &                         myIter, myThid )
0bcb68cc3c Jean*0274           CALL READ_REC_XY_RL( cheap_hFile,cheaph1,intime1,
d0842ebedb Jean*0275      &                         myIter, myThid )
                0276          ENDIF
0bcb68cc3c Jean*0277          IF ( useClouds .AND. cheap_clFile .NE. ' ' ) THEN
                0278           CALL READ_REC_XY_RL( cheap_clFile,cheapcl0,intime0,
d0842ebedb Jean*0279      &                         myIter, myThid )
0bcb68cc3c Jean*0280           CALL READ_REC_XY_RL( cheap_clFile,cheapcl1,intime1,
d0842ebedb Jean*0281      &                         myIter, myThid )
                0282          ENDIF
0bcb68cc3c Jean*0283          IF ( useDLongWave .AND. cheap_dlwFile .NE. ' ' ) THEN
                0284           CALL READ_REC_XY_RL( cheap_dlwFile,cheaplw0,intime0,
d0842ebedb Jean*0285      &                         myIter, myThid )
0bcb68cc3c Jean*0286           CALL READ_REC_XY_RL( cheap_dlwFile,cheaplw1,intime1,
d0842ebedb Jean*0287      &                         myIter, myThid )
                0288          ENDIF
cf6b9ab292 Brun*0289          IF ( (usePrecip) .AND. cheap_prFile .NE. ' ' ) THEN
                0290           CALL READ_REC_XY_RL( cheap_prFile,cheappr0,intime0,
                0291      &                         myIter, myThid )
                0292           CALL READ_REC_XY_RL( cheap_prFile,cheappr1,intime1,
                0293      &                         myIter, myThid )
                0294          ENDIF
d0842ebedb Jean*0295          IF ( useStressOption .AND. UStressFile .NE. ' ' ) THEN
                0296           CALL READ_REC_XY_RL( UStressFile,ustress0,intime0,
                0297      &                         myIter, myThid )
                0298           CALL READ_REC_XY_RL( UStressFile,ustress1,intime1,
                0299      &                         myIter, myThid )
                0300          ENDIF
                0301          IF ( useStressOption .AND. VStressFile .NE. ' ' ) THEN
                0302           CALL READ_REC_XY_RL( VStressFile,vstress0,intime0,
                0303      &                         myIter, myThid )
                0304           CALL READ_REC_XY_RL( VStressFile,vstress1,intime1,
                0305      &                         myIter, myThid )
                0306          ENDIF
                0307          IF ( FluxFormula.EQ.'COARE3' .AND. WaveHFile.NE.' ' ) THEN
                0308           CALL READ_REC_XY_RL( WaveHFile,wavesh0,intime0,
                0309      &                         myIter, myThid )
                0310           CALL READ_REC_XY_RL( WaveHFile,wavesh1,intime1,
                0311      &                         myIter, myThid )
                0312          ENDIF
                0313          IF ( FluxFormula.EQ.'COARE3' .AND. WavePFile.NE.' ' ) THEN
                0314           CALL READ_REC_XY_RL( WavePFile,wavesp0,intime0,
                0315      &                         myIter, myThid )
                0316           CALL READ_REC_XY_RL( WavePFile,wavesp1,intime1,
                0317      &                         myIter, myThid )
                0318          ENDIF
                0319          IF ( useCheapTracer .AND. TracerRFile .NE. ' ' ) THEN
                0320            CALL READ_REC_XY_RL( TracerRFile,CheaptracerR0,intime0,
                0321      &                         myIter, myThid )
                0322            CALL READ_REC_XY_RL( TracerRFile,CheaptracerR1,intime1,
                0323      &                         myIter, myThid )
cf6b9ab292 Brun*0324          ELSEIF( useCheapTracer ) THEN
                0325            DO bj = myByLo(myThid), myByHi(myThid)
                0326              DO bi = myBxLo(myThid), myBxHi(myThid)
                0327                DO j=1,sNy
                0328                  DO i=1,sNx
                0329                    CheaptracerR(i,j,bi,bj) = 0. _d 0
                0330                  ENDDO
                0331                ENDDO
                0332              ENDDO
                0333            ENDDO
                0334           _EXCH_XY_RL( CheaptracerR, myThid )
                0335 
d0842ebedb Jean*0336          ENDIF
                0337          _EXCH_XY_RL( trair0 , myThid )
                0338          _EXCH_XY_RL( trair1 , myThid )
320727b2eb Jean*0339          _EXCH_XY_RL( qrair0 , myThid )
d0842ebedb Jean*0340          _EXCH_XY_RL( qrair1 , myThid )
320727b2eb Jean*0341          _EXCH_XY_RL( solar0 , myThid )
d0842ebedb Jean*0342          _EXCH_XY_RL( solar1 , myThid )
7c3371c654 Jean*0343          CALL EXCH_UV_XY_RL( uWind0, vWind0, .TRUE., myThid )
                0344          CALL EXCH_UV_XY_RL( uWind1, vWind1, .TRUE., myThid )
0bcb68cc3c Jean*0345          IF ( useTimeVarBLH ) THEN
d0842ebedb Jean*0346          _EXCH_XY_RL( cheaph0, myThid )
                0347          _EXCH_XY_RL( cheaph1 , myThid )
                0348          ENDIF
0bcb68cc3c Jean*0349          IF ( useClouds ) THEN
d0842ebedb Jean*0350          _EXCH_XY_RL( cheapcl0, myThid )
                0351          _EXCH_XY_RL( cheapcl1 , myThid )
                0352          ENDIF
0bcb68cc3c Jean*0353          IF ( useDLongWave ) THEN
d0842ebedb Jean*0354          _EXCH_XY_RL( cheaplw0, myThid )
                0355          _EXCH_XY_RL( cheaplw1 , myThid )
                0356          ENDIF
cf6b9ab292 Brun*0357          IF ( usePrecip ) THEN
                0358          _EXCH_XY_RL( cheappr0, myThid )
                0359          _EXCH_XY_RL( cheappr1 , myThid )
                0360          ENDIF
d0842ebedb Jean*0361          IF ( useStressOption ) THEN
320727b2eb Jean*0362          CALL EXCH_UV_AGRID_3D_RL(ustress0,vstress0, .TRUE.,1,myThid )
                0363          CALL EXCH_UV_AGRID_3D_RL(ustress1,vstress1, .TRUE.,1,myThid )
                0364          ENDIF
                0365          IF ( FluxFormula.EQ.'COARE3' ) THEN
d0842ebedb Jean*0366          _EXCH_XY_RL( wavesp0 , myThid )
                0367          _EXCH_XY_RL( wavesp1 , myThid )
                0368          _EXCH_XY_RL( wavesh0 , myThid )
                0369          _EXCH_XY_RL( wavesh1 , myThid )
320727b2eb Jean*0370          ENDIF
d0842ebedb Jean*0371          IF ( useCheapTracer ) THEN
                0372          _EXCH_XY_RL( CheaptracerR0 , myThid )
                0373          _EXCH_XY_RL( CheaptracerR1, myThid )
                0374          ENDIF
                0375 
4fa4901be6 Nico*0376 C     end of loading new fields block
d0842ebedb Jean*0377         ENDIF
4fa4901be6 Nico*0378 
                0379 C--   Interpolate TR, QR, SOLAR
d0842ebedb Jean*0380         DO bj = myByLo(myThid), myByHi(myThid)
                0381          DO bi = myBxLo(myThid), myBxHi(myThid)
                0382           DO j=1-OLy,sNy+OLy
                0383            DO i=1-OLx,sNx+OLx
                0384             TR(i,j,bi,bj)           = bWght*trair0(i,j,bi,bj)
                0385      &                              + aWght*trair1(i,j,bi,bj)   !+273.15
                0386             qr(i,j,bi,bj)           = bWght*qrair0(i,j,bi,bj)
                0387      &                              + aWght*qrair1(i,j,bi,bj)
7c3371c654 Jean*0388             uWind(i,j,bi,bj)        = bWght*uWind0(i,j,bi,bj)
                0389      &                              + aWght*uWind1(i,j,bi,bj)
                0390             vWind(i,j,bi,bj)        = bWght*vWind0(i,j,bi,bj)
                0391      &                              + aWght*vWind1(i,j,bi,bj)
d0842ebedb Jean*0392             solar(i,j,bi,bj)        = bWght*solar0(i,j,bi,bj)
                0393      &                              + aWght*solar1(i,j,bi,bj)
                0394             IF ( useStressOption ) THEN
                0395              ustress(i,j,bi,bj)     = bWght*ustress0(i,j,bi,bj)
                0396      &                              + aWght*ustress1(i,j,bi,bj)
                0397              vstress(i,j,bi,bj)     = bWght*vstress0(i,j,bi,bj)
                0398      &                              + aWght*vstress1(i,j,bi,bj)
                0399             ENDIF
0bcb68cc3c Jean*0400             IF ( useTimeVarBLH ) THEN
7c3371c654 Jean*0401              CheapHgrid(i,j,bi,bj)  = bWght*cheaph0(i,j,bi,bj)
d0842ebedb Jean*0402      &                              + aWght*cheaph1(i,j,bi,bj)
                0403             ENDIF
0bcb68cc3c Jean*0404             IF ( useClouds ) THEN
d0842ebedb Jean*0405              cheapclouds(i,j,bi,bj) = bWght*cheapcl0(i,j,bi,bj)
                0406      &                              + aWght*cheapcl1(i,j,bi,bj)
                0407             ENDIF
0bcb68cc3c Jean*0408             IF ( useDLongWave ) THEN
d0842ebedb Jean*0409              cheapdlongwave(i,j,bi,bj) = bWght*cheaplw0(i,j,bi,bj)
                0410      &                                 + aWght*cheaplw1(i,j,bi,bj)
                0411             ENDIF
cf6b9ab292 Brun*0412             IF ( usePrecip ) THEN
                0413              cheapPrecip(i,j,bi,bj) = bWght*cheappr0(i,j,bi,bj)
                0414      &                                 + aWght*cheappr1(i,j,bi,bj)
                0415             ENDIF
d0842ebedb Jean*0416             IF ( useCheapTracer ) THEN
                0417              CheaptracerR(i,j,bi,bj) = bWght*CheaptracerR0(i,j,bi,bj)
                0418      &                               + aWght*CheaptracerR1(i,j,bi,bj)
                0419             ENDIF
                0420             IF ( FluxFormula.EQ.'COARE3' ) THEN
                0421              IF ( WaveHFile.NE.' ' ) THEN
                0422               wavesh(i,j,bi,bj)     = bWght*wavesh0(i,j,bi,bj)
                0423      &                              + aWght*wavesh1(i,j,bi,bj)
                0424              ENDIF
                0425              IF ( WavePFile.NE.' ' ) THEN
                0426               wavesp(i,j,bi,bj)     = bWght*wavesp0(i,j,bi,bj)
                0427      &                              + aWght*wavesp1(i,j,bi,bj)
                0428              ENDIF
                0429             ELSE
7c3371c654 Jean*0430              u = uWind(i,j,bi,bj)**2 + vWind(i,j,bi,bj)**2
d0842ebedb Jean*0431              u = SQRT(u)
                0432              wavesp(i,j,bi,bj) = 0.729 _d 0 * u
                0433              wavesh(i,j,bi,bj) = 0.018 _d 0 * u*u*(1. + .015 _d 0 *u)
                0434             ENDIF
                0435            ENDDO
                0436           ENDDO
cf5b5345a0 Jean*0437          ENDDO
                0438         ENDDO
4fa4901be6 Nico*0439 
d0842ebedb Jean*0440 C end of periodic forcing options, on to steady option
cf5b5345a0 Jean*0441       ELSE
ced0783fba Jean*0442 
cf5b5345a0 Jean*0443        IF ( myIter .EQ. nIter0 ) THEN
9944ed038a Jean*0444 
d0842ebedb Jean*0445         IF ( SolarFile .NE. ' ' ) THEN
9944ed038a Jean*0446          CALL READ_FLD_XY_RL( SolarFile,' ',solar,0,myThid )
47339ef480 Jean*0447         ELSE
                0448          DO bj = myByLo(myThid), myByHi(myThid)
                0449           DO bi = myBxLo(myThid), myBxHi(myThid)
                0450            DO j=1,sNy
                0451             DO i=1,sNx
d0842ebedb Jean*0452               jG = myYGlobalLo-1+(bj-1)*sNy+j
                0453               local = 225. _d 0 - (jG-1)*recipNym1*37.5 _d 0
                0454               Solar(i,j,bi,bj) = local
cf5b5345a0 Jean*0455             ENDDO
47339ef480 Jean*0456            ENDDO
                0457           ENDDO
cf5b5345a0 Jean*0458          ENDDO
47339ef480 Jean*0459         ENDIF
d0842ebedb Jean*0460         _EXCH_XY_RL( solar, myThid )
                0461 
cf5b5345a0 Jean*0462         IF ( TrFile .NE. ' '  ) THEN
ced0783fba Jean*0463          CALL READ_FLD_XY_RL( TrFile,' ',tr,0,myThid )
47339ef480 Jean*0464         ELSE
                0465          DO bj = myByLo(myThid), myByHi(myThid)
                0466           DO bi = myBxLo(myThid), myBxHi(myThid)
                0467            DO j=1,sNy
                0468             DO i=1,sNx
d0842ebedb Jean*0469               local = solar(i,j,bi,bj)
0bcb68cc3c Jean*0470               local = (2. _d 0*local/stefan)**(0.25 _d 0) - celsius2K
d0842ebedb Jean*0471               TR(i,j,bi,bj) = local
cf5b5345a0 Jean*0472             ENDDO
47339ef480 Jean*0473            ENDDO
                0474           ENDDO
cf5b5345a0 Jean*0475          ENDDO
                0476         ENDIF
d0842ebedb Jean*0477         _EXCH_XY_RL( TR, myThid )
ffe44ab22b Jean*0478 
d0842ebedb Jean*0479 C do specific humidity
4fa4901be6 Nico*0480         IF ( QrFile .NE. ' ') THEN
ffe44ab22b Jean*0481          CALL READ_FLD_XY_RL( QrFile,' ',qr,0,myThid )
47339ef480 Jean*0482         ELSE
d0842ebedb Jean*0483 C default specific humidity profile to 80% relative humidity
47339ef480 Jean*0484          DO bj = myByLo(myThid), myByHi(myThid)
                0485           DO bi = myBxLo(myThid), myBxHi(myThid)
                0486            DO j=1,sNy
                0487             DO i=1,sNx
0bcb68cc3c Jean*0488               local = Tr(i,j,bi,bj) + celsius2K
d0842ebedb Jean*0489               ssqa = ssq0*EXP( lath*(ssq1-ssq2/local)) / p0
                0490               qr(i,j,bi,bj) = 0.8 _d 0*ssqa
cf5b5345a0 Jean*0491             ENDDO
47339ef480 Jean*0492            ENDDO
                0493           ENDDO
cf5b5345a0 Jean*0494          ENDDO
                0495         ENDIF
d0842ebedb Jean*0496         _EXCH_XY_RL( qr, myThid )
                0497 
cf5b5345a0 Jean*0498         IF ( UWindFile .NE. ' '  ) THEN
7c3371c654 Jean*0499          CALL READ_FLD_XY_RL( UWindFile,' ',uWind,0,myThid )
47339ef480 Jean*0500         ELSE
                0501          DO bj = myByLo(myThid), myByHi(myThid)
                0502           DO bi = myBxLo(myThid), myBxHi(myThid)
                0503            DO j=1,sNy
                0504             DO i=1,sNx
d0842ebedb Jean*0505               jG = myYGlobalLo-1+(bj-1)*sNy+j
                0506 C mod for debug
                0507 C to return  to original code, uncomment following line
                0508 C comment out 2nd line
                0509               local = -5. _d 0*COS( 2. _d 0*PI*(jG-1)*recipNym1 )
                0510 c             local =  0. _d 0*COS( 2. _d 0*PI*(jG-1)*recipNym1 )
7c3371c654 Jean*0511               uWind(i,j,bi,bj) = local
cf5b5345a0 Jean*0512             ENDDO
47339ef480 Jean*0513            ENDDO
                0514           ENDDO
cf5b5345a0 Jean*0515          ENDDO
                0516         ENDIF
d0842ebedb Jean*0517 
cf5b5345a0 Jean*0518         IF ( VWindFile .NE. ' '  ) THEN
7c3371c654 Jean*0519          CALL READ_FLD_XY_RL( VWindFile,' ',vWind,0,myThid )
47339ef480 Jean*0520         ELSE
                0521          DO bj = myByLo(myThid), myByHi(myThid)
                0522           DO bi = myBxLo(myThid), myBxHi(myThid)
                0523            DO j=1,sNy
                0524             DO i=1,sNx
7c3371c654 Jean*0525               vWind(i,j,bi,bj) = 0. _d 0
cf5b5345a0 Jean*0526             ENDDO
47339ef480 Jean*0527            ENDDO
                0528           ENDDO
cf5b5345a0 Jean*0529          ENDDO
                0530         ENDIF
7c3371c654 Jean*0531         CALL EXCH_UV_XY_RL( uWind, vWind, .TRUE., myThid )
d0842ebedb Jean*0532 
                0533         IF ( useStressOption ) THEN
                0534          IF ( UStressFile .NE. ' '  ) THEN
                0535           CALL READ_FLD_XY_RL( UStressFile,' ',ustress,0,myThid )
                0536          ELSE
                0537           WRITE(*,*)' U Stress File absent with stress option'
                0538           STOP
                0539          ENDIF
                0540          IF ( VStressFile .NE. ' '  ) THEN
                0541           CALL READ_FLD_XY_RL( VStressFile,' ',vstress,0,myThid )
                0542          ELSE
                0543           WRITE(*,*)' V Stress File absent with stress option'
                0544           STOP
                0545          ENDIF
320727b2eb Jean*0546          CALL EXCH_UV_AGRID_3D_RL( ustress,vstress, .TRUE.,1,myThid )
ced0783fba Jean*0547         ENDIF
d0842ebedb Jean*0548         IF ( useCheapTracer ) THEN
                0549          IF ( TracerRFile .NE. ' ' ) THEN
51132e5783 Nico*0550           CALL READ_FLD_XY_RL( TracerRFile,' ',CheaptracerR,0,myThid )
d0842ebedb Jean*0551          ELSE
51132e5783 Nico*0552            DO bj = myByLo(myThid), myByHi(myThid)
                0553             DO bi = myBxLo(myThid), myBxHi(myThid)
                0554              DO j=1,sNy
                0555               DO i=1,sNx
                0556                CheaptracerR(i,j,bi,bj)=290. _d 0
                0557               ENDDO
                0558              ENDDO
                0559             ENDDO
                0560            ENDDO
d0842ebedb Jean*0561          ENDIF
                0562          _EXCH_XY_RL( CheaptracerR, myThid )
4fa4901be6 Nico*0563         ENDIF
d0842ebedb Jean*0564         IF ( FluxFormula.EQ.'COARE3' ) THEN
                0565          IF ( WaveHFile.NE.' ' ) THEN
                0566           CALL READ_FLD_XY_RL( WaveHFile,' ',wavesh,0,myThid )
                0567          ENDIF
                0568          IF ( WavePFile.NE.' ' ) THEN
                0569           CALL READ_FLD_XY_RL( WavePFile,' ',wavesp,0,myThid )
                0570          ELSE
                0571           DO bj = myByLo(myThid), myByHi(myThid)
                0572            DO bi = myBxLo(myThid), myBxHi(myThid)
                0573             DO j=1,sNy
                0574              DO i=1,sNx
7c3371c654 Jean*0575               u = uWind(i,j,bi,bj)**2 + vWind(i,j,bi,bj)**2
d0842ebedb Jean*0576               u = SQRT(u)
                0577               wavesp(i,j,bi,bj)=0.729 _d 0 * u
                0578               wavesh(i,j,bi,bj)=0.018 _d 0 * u*u*(1. + .015 _d 0 *u)
                0579              ENDDO
ced0783fba Jean*0580             ENDDO
                0581            ENDDO
                0582           ENDDO
d0842ebedb Jean*0583          ENDIF
                0584          _EXCH_XY_RL( wavesp, myThid )
                0585          _EXCH_XY_RL( wavesh, myThid )
                0586         ENDIF
                0587 
2616d73cb2 Nico*0588 C     BL height is done in cheapaml_ini_varia
                0589 
9944ed038a Jean*0590         IF ( useClouds ) THEN
0bcb68cc3c Jean*0591          IF ( cheap_clFile .NE. ' ' ) THEN
                0592           CALL READ_FLD_XY_RL( cheap_clFile,' ',Cheapclouds,0,myThid )
d0842ebedb Jean*0593          ELSE
                0594           DO bj = myByLo(myThid), myByHi(myThid)
                0595            DO bi = myBxLo(myThid), myBxHi(myThid)
                0596             DO j=1,sNy
                0597              DO i=1,sNx
2616d73cb2 Nico*0598                Cheapclouds(i,j,bi,bj)=0.5
                0599              ENDDO
                0600             ENDDO
                0601            ENDDO
d0842ebedb Jean*0602           ENDDO
                0603          ENDIF
                0604          _EXCH_XY_RL( Cheapclouds, myThid )
9944ed038a Jean*0605         ENDIF
2616d73cb2 Nico*0606 
9944ed038a Jean*0607         IF ( useDLongWave ) THEN
0bcb68cc3c Jean*0608          IF ( cheap_dlwFile .NE. ' ' ) THEN
                0609           CALL READ_FLD_XY_RL(cheap_dlwFile,' ',Cheapdlongwave,0,myThid)
d0842ebedb Jean*0610          ELSE
0bcb68cc3c Jean*0611           WRITE(*,*) 'with useDLongWave = true,  you must provide',
d0842ebedb Jean*0612      $               ' a downward longwave file'
                0613           STOP
                0614          ENDIF
                0615          _EXCH_XY_RL( Cheapdlongwave, myThid )
9944ed038a Jean*0616         ENDIF
                0617 
cf6b9ab292 Brun*0618         IF ( usePrecip ) THEN
                0619          IF ( cheap_prFile .NE. ' ' ) THEN
                0620           CALL READ_FLD_XY_RL(cheap_prFile,' ',CheapPrecip,0,myThid)
                0621          ELSE
                0622           DO bj = myByLo(myThid), myByHi(myThid)
                0623            DO bi = myBxLo(myThid), myBxHi(myThid)
                0624             DO j=1,sNy
                0625              DO i=1,sNx
                0626                CheapPrecip(i,j,bi,bj)=0.0
                0627              ENDDO
                0628             ENDDO
                0629            ENDDO
                0630           ENDDO
                0631 
                0632         ENDIF
                0633          _EXCH_XY_RL( CheapPrecip, myThid )
                0634         ENDIF
                0635 
9944ed038a Jean*0636 C--    endif myIter = nIter0
d0842ebedb Jean*0637        ENDIF
93e0447b06 Jean*0638 
ced0783fba Jean*0639 C endif for Steady Option
cf5b5345a0 Jean*0640       ENDIF
                0641 
ced0783fba Jean*0642 C fill in outer edges
4fa4901be6 Nico*0643 
d0842ebedb Jean*0644       DO bj = myByLo(myThid), myByHi(myThid)
                0645        DO bi = myBxLo(myThid), myBxHi(myThid)
                0646          DO j=1-OLy,sNy+OLy
                0647           jG = myYGlobalLo-1+(bj-1)*sNy+j
                0648           DO i=1-OLx,sNx+OLx
                0649            iG=myXGlobalLo-1+(bi-1)*sNx+i
                0650 
7c3371c654 Jean*0651            IF ( .NOT.cheapamlXperiodic .AND. iG.LT.1 ) THEN
d0842ebedb Jean*0652 
4fa4901be6 Nico*0653             Tr(i,j,bi,bj)=Tr(1,j,bi,bj)
                0654             qr(i,j,bi,bj)=qr(1,j,bi,bj)
7c3371c654 Jean*0655             uWind(i,j,bi,bj)=uWind(2,j,bi,bj)
                0656             vWind(i,j,bi,bj)=vWind(1,j,bi,bj)
4fa4901be6 Nico*0657             Solar(i,j,bi,bj)=Solar(1,j,bi,bj)
d0842ebedb Jean*0658             IF ( useStressOption ) THEN
2616d73cb2 Nico*0659               ustress(i,j,bi,bj)=ustress(1,j,bi,bj)
                0660               vstress(i,j,bi,bj)=vstress(1,j,bi,bj)
                0661             ENDIF
d0842ebedb Jean*0662             IF ( useCheapTracer ) THEN
2616d73cb2 Nico*0663               CheaptracerR(i,j,bi,bj)=CheaptracerR(1,j,bi,bj)
ffe44ab22b Jean*0664             ENDIF
d0842ebedb Jean*0665             IF ( FluxFormula.EQ.'COARE3' ) THEN
2616d73cb2 Nico*0666               wavesp(i,j,bi,bj)=wavesp(1,j,bi,bj)
                0667               wavesh(i,j,bi,bj)=wavesh(1,j,bi,bj)
d0842ebedb Jean*0668             ENDIF
0bcb68cc3c Jean*0669             IF ( useClouds ) THEN
2616d73cb2 Nico*0670               Cheapclouds(i,j,bi,bj)=Cheapclouds(1,j,bi,bj)
ffe44ab22b Jean*0671             ENDIF
0bcb68cc3c Jean*0672             IF ( useDLongWave ) THEN
a897f57321 Nico*0673               Cheapdlongwave(i,j,bi,bj)=Cheapdlongwave(1,j,bi,bj)
ffe44ab22b Jean*0674             ENDIF
                0675 
7c3371c654 Jean*0676            ELSEIF ( .NOT.cheapamlXperiodic .AND. iG.EQ.1 ) THEN
                0677 
                0678             uWind(i,j,bi,bj)=uWind(2,j,bi,bj)
                0679 
                0680            ELSEIF ( .NOT.cheapamlXperiodic .AND. iG.GT.Nx ) THEN
d0842ebedb Jean*0681 
4fa4901be6 Nico*0682             Tr(i,j,bi,bj)=Tr(sNx,j,bi,bj)
                0683             qr(i,j,bi,bj)=qr(sNx,j,bi,bj)
7c3371c654 Jean*0684             uWind(i,j,bi,bj)=uWind(sNx,j,bi,bj)
                0685             vWind(i,j,bi,bj)=vWind(sNx,j,bi,bj)
4fa4901be6 Nico*0686             Solar(i,j,bi,bj)=Solar(sNx,j,bi,bj)
d0842ebedb Jean*0687             IF ( useStressOption ) THEN
2616d73cb2 Nico*0688               ustress(i,j,bi,bj)=ustress(sNx,j,bi,bj)
                0689               vstress(i,j,bi,bj)=vstress(sNx,j,bi,bj)
d0842ebedb Jean*0690             ENDIF
                0691             IF ( useCheapTracer ) THEN
2616d73cb2 Nico*0692               CheaptracerR(i,j,bi,bj)=CheaptracerR(sNx,j,bi,bj)
ffe44ab22b Jean*0693             ENDIF
d0842ebedb Jean*0694             IF ( FluxFormula.EQ.'COARE3' ) THEN
2616d73cb2 Nico*0695               wavesp(i,j,bi,bj)=wavesp(sNx,j,bi,bj)
                0696               wavesh(i,j,bi,bj)=wavesh(sNx,j,bi,bj)
d0842ebedb Jean*0697             ENDIF
0bcb68cc3c Jean*0698             IF ( useClouds ) THEN
2616d73cb2 Nico*0699               Cheapclouds(i,j,bi,bj)=Cheapclouds(sNx,j,bi,bj)
ffe44ab22b Jean*0700             ENDIF
0bcb68cc3c Jean*0701             IF ( useDLongWave ) THEN
a897f57321 Nico*0702               Cheapdlongwave(i,j,bi,bj)=Cheapdlongwave(sNx,j,bi,bj)
ffe44ab22b Jean*0703             ENDIF
4fa4901be6 Nico*0704 
7c3371c654 Jean*0705            ELSEIF ( .NOT.cheapamlYperiodic .AND. jG.LT.1 ) THEN
d0842ebedb Jean*0706 
4fa4901be6 Nico*0707             Tr(i,j,bi,bj)=Tr(i,1,bi,bj)
                0708             qr(i,j,bi,bj)=qr(i,1,bi,bj)
7c3371c654 Jean*0709             uWind(i,j,bi,bj)=uWind(i,1,bi,bj)
                0710             vWind(i,j,bi,bj)=vWind(i,2,bi,bj)
4fa4901be6 Nico*0711             Solar(i,j,bi,bj)=Solar(i,1,bi,bj)
d0842ebedb Jean*0712             IF ( useStressOption ) THEN
2616d73cb2 Nico*0713               ustress(i,j,bi,bj)=ustress(i,1,bi,bj)
                0714               vstress(i,j,bi,bj)=vstress(i,1,bi,bj)
d0842ebedb Jean*0715             ENDIF
                0716             IF ( useCheapTracer ) THEN
2616d73cb2 Nico*0717               CheaptracerR(i,j,bi,bj)=CheaptracerR(i,1,bi,bj)
ffe44ab22b Jean*0718             ENDIF
0bcb68cc3c Jean*0719             IF ( useClouds ) THEN
2616d73cb2 Nico*0720               Cheapclouds(i,j,bi,bj)=Cheapclouds(i,1,bi,bj)
ffe44ab22b Jean*0721             ENDIF
0bcb68cc3c Jean*0722             IF ( useDLongWave ) THEN
a897f57321 Nico*0723               Cheapdlongwave(i,j,bi,bj)=Cheapdlongwave(i,1,bi,bj)
ffe44ab22b Jean*0724             ENDIF
d0842ebedb Jean*0725             IF ( FluxFormula.EQ.'COARE3' ) THEN
2616d73cb2 Nico*0726               wavesp(i,j,bi,bj)=wavesp(i,1,bi,bj)
                0727               wavesh(i,j,bi,bj)=wavesh(i,1,bi,bj)
d0842ebedb Jean*0728             ENDIF
                0729 
7c3371c654 Jean*0730            ELSEIF ( .NOT.cheapamlYperiodic .AND. jG.EQ.1 ) THEN
                0731 
                0732             vWind(i,j,bi,bj)=vWind(i,2,bi,bj)
                0733 
                0734            ELSEIF ( .NOT.cheapamlYperiodic .AND. jG.GT.Ny ) THEN
ffe44ab22b Jean*0735 
4fa4901be6 Nico*0736             Tr(i,j,bi,bj)=Tr(i,sNy,bi,bj)
                0737             qr(i,j,bi,bj)=qr(i,sNy,bi,bj)
7c3371c654 Jean*0738             uWind(i,j,bi,bj)=uWind(i,sNy,bi,bj)
                0739             vWind(i,j,bi,bj)=vWind(i,sNy,bi,bj)
4fa4901be6 Nico*0740             Solar(i,j,bi,bj)=Solar(i,sNy,bi,bj)
d0842ebedb Jean*0741             IF ( useStressOption ) THEN
2616d73cb2 Nico*0742               ustress(i,j,bi,bj)=ustress(i,sNy,bi,bj)
                0743               vstress(i,j,bi,bj)=vstress(i,sNy,bi,bj)
d0842ebedb Jean*0744             ENDIF
                0745             IF ( useCheapTracer ) THEN
2616d73cb2 Nico*0746               CheaptracerR(i,j,bi,bj)=CheaptracerR(i,sNy,bi,bj)
ffe44ab22b Jean*0747             ENDIF
d0842ebedb Jean*0748             IF ( FluxFormula.EQ.'COARE3' ) THEN
2616d73cb2 Nico*0749               wavesp(i,j,bi,bj)=wavesp(i,sNy,bi,bj)
                0750               wavesh(i,j,bi,bj)=wavesh(i,sNy,bi,bj)
d0842ebedb Jean*0751             ENDIF
0bcb68cc3c Jean*0752             IF ( useClouds ) THEN
2616d73cb2 Nico*0753               Cheapclouds(i,j,bi,bj)=Cheapclouds(i,sNy,bi,bj)
ffe44ab22b Jean*0754             ENDIF
0bcb68cc3c Jean*0755             IF ( useDLongWave ) THEN
a897f57321 Nico*0756               Cheapdlongwave(i,j,bi,bj)=Cheapdlongwave(i,sNy,bi,bj)
ffe44ab22b Jean*0757             ENDIF
                0758 
d0842ebedb Jean*0759            ENDIF
ced0783fba Jean*0760           ENDDO
4fa4901be6 Nico*0761          ENDDO
d0842ebedb Jean*0762        ENDDO
                0763       ENDDO
                0764 
                0765       RETURN
cf5b5345a0 Jean*0766       END