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

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

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

revision 1.12 by jmc, Mon Apr 16 23:27:21 2007 UTC revision 1.13 by gforget, Tue Jul 13 00:02:10 2010 UTC
# Line 40  c     == global variables == Line 40  c     == global variables ==
40  #include "GRID.h"  #include "GRID.h"
41    
42  #include "EXF_FIELDS.h"  #include "EXF_FIELDS.h"
43    #include "EXF_PARAM.h"
44  #ifdef ALLOW_AUTODIFF  #ifdef ALLOW_AUTODIFF
45  # include "ctrl.h"  # include "ctrl.h"
46  # include "ctrl_dummy.h"  # include "ctrl_dummy.h"
# Line 53  c     == routine arguments == Line 54  c     == routine arguments ==
54    
55  c     == global variables ==  c     == global variables ==
56    
57    #ifdef ALLOW_ROTATE_UV_CONTROLS
58          _RL     tmpUE(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
59          _RL     tmpVN(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
60          _RL     tmpUX(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
61          _RL     tmpVY(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
62          integer i,j,bi,bj
63    #endif
64    
65    
66  c     == end of interface ==  c     == end of interface ==
67    
68  #ifdef ALLOW_HFLUX_CONTROL  #ifdef ALLOW_HFLUX_CONTROL
# Line 71  c     == end of interface == Line 81  c     == end of interface ==
81       &     mytime, myiter, mythid )       &     mytime, myiter, mythid )
82  #endif  #endif
83    
84    #ifndef ALLOW_ROTATE_UV_CONTROLS
85    
86  #ifdef ALLOW_USTRESS_CONTROL  #ifdef ALLOW_USTRESS_CONTROL
87        call ctrl_get_gen (        call ctrl_get_gen (
88       &     xx_tauu_file, xx_tauustartdate, xx_tauuperiod,       &     xx_tauu_file, xx_tauustartdate, xx_tauuperiod,
# Line 87  c     == end of interface == Line 99  c     == end of interface ==
99       &     mytime, myiter, mythid )       &     mytime, myiter, mythid )
100  #endif  #endif
101    
102    #else
103    
104    #if defined(ALLOW_USTRESS_CONTROL) && defined(ALLOW_VSTRESS_CONTROL)
105    
106            do bj = mybylo(mythid),mybyhi(mythid)
107             do bi = mybxlo(mythid),mybxhi(mythid)
108              do j = 1-oly,sny+oly
109               do i = 1-olx,snx+olx
110                 tmpUE(i,j,bi,bj) = 0. _d 0
111                 tmpVN(i,j,bi,bj) = 0. _d 0
112                 tmpUX(i,j,bi,bj) = 0. _d 0
113                 tmpVY(i,j,bi,bj) = 0. _d 0
114               enddo
115              enddo
116             enddo
117            enddo
118    
119          call ctrl_get_gen (
120         &     xx_tauu_file, xx_tauustartdate, xx_tauuperiod,
121         &     maskc, tmpUE, xx_tauu0, xx_tauu1, xx_tauu_dummy,
122         &     xx_tauu_remo_intercept, xx_tauu_remo_slope,
123         &     mytime, myiter, mythid )
124    
125          call ctrl_get_gen (
126         &     xx_tauv_file, xx_tauvstartdate, xx_tauvperiod,
127         &     maskc, tmpVN, xx_tauv0, xx_tauv1, xx_tauv_dummy,
128         &     xx_tauv_remo_intercept, xx_tauv_remo_slope,
129         &     mytime, myiter, mythid )
130    
131          _EXCH_XY_RL(tmpUE,myThid)
132          _EXCH_XY_RL(tmpVN,myThid)
133    
134          call rotate_uv2en_rl(tmpUX,tmpVY,tmpUE,tmpVN,
135         &     .FALSE.,stressIsOnCgrid,.TRUE.,1,mythid)
136    
137          IF ( stressIsOnCgrid ) THEN
138            CALL EXCH_UV_XY_RL( tmpUX, tmpVY, .TRUE., myThid )
139          ELSE
140            CALL EXCH_UV_AGRID_3D_RL( tmpUX, tmpVY, .TRUE., 1, myThid)
141          ENDIF  
142    
143            do bj = mybylo(mythid),mybyhi(mythid)
144             do bi = mybxlo(mythid),mybxhi(mythid)
145              do j = 1-oly,sny+oly
146               do i = 1-olx,snx+olx
147                 ustress(i,j,bi,bj)=ustress(i,j,bi,bj)+tmpUX(i,j,bi,bj)
148                 vstress(i,j,bi,bj)=vstress(i,j,bi,bj)+tmpVY(i,j,bi,bj)
149               enddo
150              enddo
151             enddo
152            enddo
153    
154    #endif
155    #endif /* ALLOW_ROTATE_UV_CONTROLS */
156    
157    
158    
159        end        end

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

  ViewVC Help
Powered by ViewVC 1.1.22