/[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.3 by heimbach, Tue Nov 12 20:34:41 2002 UTC revision 1.14 by heimbach, Tue Jul 31 16:08:16 2012 UTC
# Line 1  Line 1 
1  c $Header$  C $Header$
2    C $Name$
3    
4  #include "EXF_CPPOPTIONS.h"  #include "EXF_OPTIONS.h"
5    
6        subroutine exf_GetSurfaceFluxes(        subroutine exf_GetSurfaceFluxes(
7       I                                 mytime,       I                                 mytime,
# Line 18  c Line 19  c
19  c     started: Christian Eckert eckert@mit.edu  30-Jun-1999  c     started: Christian Eckert eckert@mit.edu  30-Jun-1999
20  c  c
21  c     changed: Christian Eckert eckert@mit.edu  14-Jan-2000  c     changed: Christian Eckert eckert@mit.edu  14-Jan-2000
 c  
22  c              - Restructured the code in order to create a package  c              - Restructured the code in order to create a package
23  c                for the MITgcmUV.  c                for the MITgcmUV.
24  c  c
25  c              Christian Eckert eckert@mit.edu  12-Feb-2000  c              Christian Eckert eckert@mit.edu  12-Feb-2000
 c  
26  c              - Changed Routine names (package prefix: exf_)  c              - Changed Routine names (package prefix: exf_)
27  c  c
28    c     mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
29    c
30  c     ==================================================================  c     ==================================================================
31  c     SUBROUTINE exf_GetSurfaceFluxes  c     SUBROUTINE exf_GetSurfaceFluxes
32  c     ==================================================================  c     ==================================================================
33    
34        implicit none        implicit none
35    
36    c     == global variables ==
37    #include "EEPARAMS.h"
38    #include "SIZE.h"
39    #include "PARAMS.h"
40    #include "GRID.h"
41    
42    #include "EXF_FIELDS.h"
43    #include "EXF_PARAM.h"
44    #ifdef ALLOW_AUTODIFF
45    # include "CTRL_SIZE.h"
46    # include "ctrl.h"
47    # include "ctrl_dummy.h"
48    #endif
49    
50  c     == routine arguments ==  c     == routine arguments ==
51    
52        _RL mytime        _RL mytime
# Line 40  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_getheatflux ( mytime, myiter, mythid )        call ctrl_get_gen (
71         &     xx_hflux_file, xx_hfluxstartdate, xx_hfluxperiod,
72         &     maskc, hflux, xx_hflux0, xx_hflux1, xx_hflux_dummy,
73         &     xx_hflux_remo_intercept, xx_hflux_remo_slope,
74         &     mytime, myiter, mythid )
75  #endif  #endif
76    
77  #ifdef ALLOW_SFLUX_CONTROL  #ifdef ALLOW_SFLUX_CONTROL
78        call ctrl_getsaltflux ( mytime, myiter, mythid )        call ctrl_get_gen (
79         &     xx_sflux_file, xx_sfluxstartdate, xx_sfluxperiod,
80         &     maskc, sflux, xx_sflux0, xx_sflux1, xx_sflux_dummy,
81         &     xx_sflux_remo_intercept, xx_sflux_remo_slope,
82         &     mytime, myiter, mythid )
83  #endif  #endif
84    
85    #ifndef ALLOW_ROTATE_UV_CONTROLS
86    
87  #ifdef ALLOW_USTRESS_CONTROL  #ifdef ALLOW_USTRESS_CONTROL
88        call ctrl_getzonstress ( mytime, myiter, mythid )        call ctrl_get_gen (
89         &     xx_tauu_file, xx_tauustartdate, xx_tauuperiod,
90         &     maskw, ustress, xx_tauu0, xx_tauu1, xx_tauu_dummy,
91         &     xx_tauu_remo_intercept, xx_tauu_remo_slope,
92         &     mytime, myiter, mythid )
93  #endif  #endif
94    
95  #ifdef ALLOW_VSTRESS_CONTROL  #ifdef ALLOW_VSTRESS_CONTROL
96        call ctrl_getmerstress ( mytime, myiter, mythid )        call ctrl_get_gen (
97  #endif       &     xx_tauv_file, xx_tauvstartdate, xx_tauvperiod,
98         &     masks, vstress, xx_tauv0, xx_tauv1, xx_tauv_dummy,
99         &     xx_tauv_remo_intercept, xx_tauv_remo_slope,
100         &     mytime, myiter, mythid )
101    #endif
102    
103    #else
104    
105    #if defined(ALLOW_USTRESS_CONTROL) && defined(ALLOW_VSTRESS_CONTROL)
106    
107            do bj = mybylo(mythid),mybyhi(mythid)
108             do bi = mybxlo(mythid),mybxhi(mythid)
109              do j = 1-oly,sny+oly
110               do i = 1-olx,snx+olx
111                 tmpUE(i,j,bi,bj) = 0. _d 0
112                 tmpVN(i,j,bi,bj) = 0. _d 0
113                 tmpUX(i,j,bi,bj) = 0. _d 0
114                 tmpVY(i,j,bi,bj) = 0. _d 0
115               enddo
116              enddo
117             enddo
118            enddo
119    
120          call ctrl_get_gen (
121         &     xx_tauu_file, xx_tauustartdate, xx_tauuperiod,
122         &     maskc, tmpUE, xx_tauu0, xx_tauu1, xx_tauu_dummy,
123         &     xx_tauu_remo_intercept, xx_tauu_remo_slope,
124         &     mytime, myiter, mythid )
125    
126          call ctrl_get_gen (
127         &     xx_tauv_file, xx_tauvstartdate, xx_tauvperiod,
128         &     maskc, tmpVN, xx_tauv0, xx_tauv1, xx_tauv_dummy,
129         &     xx_tauv_remo_intercept, xx_tauv_remo_slope,
130         &     mytime, myiter, mythid )
131    
132          _EXCH_XY_RL(tmpUE,myThid)
133          _EXCH_XY_RL(tmpVN,myThid)
134    
135          call rotate_uv2en_rl(tmpUX,tmpVY,tmpUE,tmpVN,
136         &     .FALSE.,stressIsOnCgrid,.TRUE.,1,mythid)
137    
138          IF ( stressIsOnCgrid ) THEN
139            CALL EXCH_UV_XY_RL( tmpUX, tmpVY, .TRUE., myThid )
140          ELSE
141            CALL EXCH_UV_AGRID_3D_RL( tmpUX, tmpVY, .TRUE., 1, myThid)
142          ENDIF  
143    
144            do bj = mybylo(mythid),mybyhi(mythid)
145             do bi = mybxlo(mythid),mybxhi(mythid)
146              do j = 1-oly,sny+oly
147               do i = 1-olx,snx+olx
148                 ustress(i,j,bi,bj)=ustress(i,j,bi,bj)+tmpUX(i,j,bi,bj)
149                 vstress(i,j,bi,bj)=vstress(i,j,bi,bj)+tmpVY(i,j,bi,bj)
150               enddo
151              enddo
152             enddo
153            enddo
154    
 #ifdef ALLOW_SWFLUX_CONTROL  
       call ctrl_getswflux ( mytime, myiter, mythid )  
155  #endif  #endif
156    #endif /* ALLOW_ROTATE_UV_CONTROLS */
157    
 #ifdef ALLOW_LWFLUX_CONTROL  
       call ctrl_getlwflux ( mytime, myiter, mythid )  
 #endif  
158    
 #ifdef ALLOW_CONTROL_NEW  
 c     Get the surface forcing control fields.  
       call exfa_GetFFields( mytime, myiter, mythid )  
 #endif  
159    
160        end        end
   

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.22