/[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.10 by heimbach, Thu Jul 28 19:52:33 2005 UTC revision 1.15 by gforget, Tue Aug 28 19:17:46 2012 UTC
# Line 1  Line 1 
 C  
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
# Line 40  c     == global variables == Line 39  c     == global variables ==
39  #include "PARAMS.h"  #include "PARAMS.h"
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_SIZE.h"
46  # include "ctrl.h"  # include "ctrl.h"
47  # include "ctrl_dummy.h"  # include "ctrl_dummy.h"
48  #endif  #endif
# Line 54  c     == routine arguments == Line 55  c     == routine arguments ==
55    
56  c     == global variables ==  c     == global variables ==
57    
58    #ifdef ALLOW_ROTATE_UV_CONTROLS
59          _RL     tmpUE(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
60          _RL     tmpVN(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
61          _RL     tmpUX(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
62          _RL     tmpVY(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
63          integer i,j,bi,bj
64    #endif
65    
66    
67  c     == end of interface ==  c     == end of interface ==
68    
69  #ifdef ALLOW_HFLUX_CONTROL  #ifdef ALLOW_HFLUX_CONTROL
70        call ctrl_get_gen (        call ctrl_get_gen (
71       &     xx_hflux_file, xx_hfluxstartdate, xx_hfluxperiod,       &     xx_hflux_file, xx_hfluxstartdate, xx_hfluxperiod,
72       &     maskc, hflux, xx_hflux0, xx_hflux1, xx_hflux_dummy,       &     maskc, hflux, xx_hflux0, xx_hflux1, xx_hflux_dummy,
73         &     xx_hflux_remo_intercept, xx_hflux_remo_slope,
74       &     mytime, myiter, mythid )       &     mytime, myiter, mythid )
75  #endif  #endif
76    
# Line 67  c     == end of interface == Line 78  c     == end of interface ==
78        call ctrl_get_gen (        call ctrl_get_gen (
79       &     xx_sflux_file, xx_sfluxstartdate, xx_sfluxperiod,       &     xx_sflux_file, xx_sfluxstartdate, xx_sfluxperiod,
80       &     maskc, sflux, xx_sflux0, xx_sflux1, xx_sflux_dummy,       &     maskc, sflux, xx_sflux0, xx_sflux1, xx_sflux_dummy,
81         &     xx_sflux_remo_intercept, xx_sflux_remo_slope,
82       &     mytime, myiter, mythid )       &     mytime, myiter, mythid )
83  #endif  #endif
84    
85          IF ( .NOT.useAtmWind ) THEN
86    #ifndef ALLOW_ROTATE_UV_CONTROLS
87    
88  #ifdef ALLOW_USTRESS_CONTROL  #ifdef ALLOW_USTRESS_CONTROL
89        call ctrl_get_gen (        call ctrl_get_gen (
90       &     xx_tauu_file, xx_tauustartdate, xx_tauuperiod,       &     xx_tauu_file, xx_tauustartdate, xx_tauuperiod,
91       &     maskw, ustress, xx_tauu0, xx_tauu1, xx_tauu_dummy,       &     maskw, ustress, xx_tauu0, xx_tauu1, xx_tauu_dummy,
92         &     xx_tauu_remo_intercept, xx_tauu_remo_slope,
93       &     mytime, myiter, mythid )       &     mytime, myiter, mythid )
94  #endif  #endif
95    
# Line 81  c     == end of interface == Line 97  c     == end of interface ==
97        call ctrl_get_gen (        call ctrl_get_gen (
98       &     xx_tauv_file, xx_tauvstartdate, xx_tauvperiod,       &     xx_tauv_file, xx_tauvstartdate, xx_tauvperiod,
99       &     masks, vstress, xx_tauv0, xx_tauv1, xx_tauv_dummy,       &     masks, vstress, xx_tauv0, xx_tauv1, xx_tauv_dummy,
100         &     xx_tauv_remo_intercept, xx_tauv_remo_slope,
101       &     mytime, myiter, mythid )       &     mytime, myiter, mythid )
102  #endif  #endif
103    
104    #else
105    
106    #if defined(ALLOW_USTRESS_CONTROL) && defined(ALLOW_VSTRESS_CONTROL)
107    
108            do bj = mybylo(mythid),mybyhi(mythid)
109             do bi = mybxlo(mythid),mybxhi(mythid)
110              do j = 1-oly,sny+oly
111               do i = 1-olx,snx+olx
112                 tmpUE(i,j,bi,bj) = 0. _d 0
113                 tmpVN(i,j,bi,bj) = 0. _d 0
114                 tmpUX(i,j,bi,bj) = 0. _d 0
115                 tmpVY(i,j,bi,bj) = 0. _d 0
116               enddo
117              enddo
118             enddo
119            enddo
120    
121          call ctrl_get_gen (
122         &     xx_tauu_file, xx_tauustartdate, xx_tauuperiod,
123         &     maskc, tmpUE, xx_tauu0, xx_tauu1, xx_tauu_dummy,
124         &     xx_tauu_remo_intercept, xx_tauu_remo_slope,
125         &     mytime, myiter, mythid )
126    
127          call ctrl_get_gen (
128         &     xx_tauv_file, xx_tauvstartdate, xx_tauvperiod,
129         &     maskc, tmpVN, xx_tauv0, xx_tauv1, xx_tauv_dummy,
130         &     xx_tauv_remo_intercept, xx_tauv_remo_slope,
131         &     mytime, myiter, mythid )
132    
133          _EXCH_XY_RL(tmpUE,myThid)
134          _EXCH_XY_RL(tmpVN,myThid)
135    
136          call rotate_uv2en_rl(tmpUX,tmpVY,tmpUE,tmpVN,
137         &     .FALSE.,stressIsOnCgrid,.TRUE.,1,mythid)
138    
139          IF ( stressIsOnCgrid ) THEN
140            CALL EXCH_UV_XY_RL( tmpUX, tmpVY, .TRUE., myThid )
141          ELSE
142            CALL EXCH_UV_AGRID_3D_RL( tmpUX, tmpVY, .TRUE., 1, myThid)
143          ENDIF  
144    
145            do bj = mybylo(mythid),mybyhi(mythid)
146             do bi = mybxlo(mythid),mybxhi(mythid)
147              do j = 1-oly,sny+oly
148               do i = 1-olx,snx+olx
149                 ustress(i,j,bi,bj)=ustress(i,j,bi,bj)+tmpUX(i,j,bi,bj)
150                 vstress(i,j,bi,bj)=vstress(i,j,bi,bj)+tmpVY(i,j,bi,bj)
151               enddo
152              enddo
153             enddo
154            enddo
155    
156    #endif
157    #endif /* ALLOW_ROTATE_UV_CONTROLS */
158          ENDIF
159    
160    
161        end        end

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22