/[MITgcm]/MITgcm/pkg/exf/exf_wind.F
ViewVC logotype

Diff of /MITgcm/pkg/exf/exf_wind.F

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

revision 1.11 by gforget, Mon Oct 25 16:21:58 2010 UTC revision 1.12 by gforget, Tue Aug 28 19:17:46 2012 UTC
# Line 45  C     == local variables == Line 45  C     == local variables ==
45        INTEGER bi,bj        INTEGER bi,bj
46        INTEGER i,j        INTEGER i,j
47        _RL     wsLoc(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL     wsLoc(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
 #ifdef ALLOW_ATM_WIND  
48        _RL     wsSq        _RL     wsSq
 #else  
49        _RL     usSq, recip_sqrtRhoA, ustar        _RL     usSq, recip_sqrtRhoA, ustar
50        _RL     tmp1, tmp2, tmp3, tmp4        _RL     tmp1, tmp2, tmp3, tmp4
51        _RL     oneThirdRL        _RL     oneThirdRL
52        PARAMETER ( oneThirdRL = 1.d0 / 3.d0 )        PARAMETER ( oneThirdRL = 1.d0 / 3.d0 )
 #endif  
53    
54  C     == end of interface ==  C     == end of interface ==
55    
# Line 86  C--   Initialise Line 83  C--   Initialise
83           ENDDO           ENDDO
84          ENDDO          ENDDO
85    
86  #ifdef ALLOW_ATM_WIND  #ifdef ALLOW_AUTODIFF_TAMC
87    CADJ STORE uwind (:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte
88    CADJ STORE vwind (:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte
89    CADJ STORE wspeed(:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte
90    #endif
91    
92            IF ( useAtmWind ) THEN
93    
94  C--   Wind speed and direction.  C--   Wind speed and direction.
95          DO j = 1,sNy          DO j = 1,sNy
# Line 113  C-    wind-speed is not loaded from file Line 116  C-    wind-speed is not loaded from file
116            ENDDO            ENDDO
117          ENDIF          ENDIF
118    
119  #else  /* ifndef ALLOW_ATM_WIND */          ELSE
120    
121  C--   Wind stress and direction.  C--   Wind stress and direction.
122          DO j = 1,sNy          DO j = 1,sNy
# Line 181  C-    save local array wind-speed to com Line 184  C-    save local array wind-speed to com
184           ENDDO           ENDDO
185          ENDIF          ENDIF
186    
187    #ifdef ALLOW_AUTODIFF_TAMC
188    CADJ STORE wspeed(:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte
189    CADJ STORE uwind (:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte
190    CADJ STORE vwind (:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte
191    CADJ STORE cw    (:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte
192    CADJ STORE sw    (:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte
193    #endif
194    
195  C--   infer wind field from wind-speed & wind-stress direction  C--   infer wind field from wind-speed & wind-stress direction
196          DO j = 1,sNy          DO j = 1,sNy
197           DO i = 1,sNx           DO i = 1,sNx
# Line 188  C--   infer wind field from wind-speed & Line 199  C--   infer wind field from wind-speed &
199             vwind(i,j,bi,bj) = wspeed(i,j,bi,bj)*sw(i,j,bi,bj)             vwind(i,j,bi,bj) = wspeed(i,j,bi,bj)*sw(i,j,bi,bj)
200           ENDDO           ENDDO
201          ENDDO          ENDDO
202  #endif /* ifndef ALLOW_ATM_WIND */          ENDIF
203    
204  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
205  CADJ STORE wspeed(:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte  CADJ STORE wspeed(:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22