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

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

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


Revision 1.13 - (hide annotations) (download)
Tue Jul 13 00:02:10 2010 UTC (13 years, 10 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63g, checkpoint63, checkpoint63p, checkpoint63q, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c
Changes since 1.12: +70 -1 lines
ALLOW_ROTATE_UV_CONTROLS: when defined, we
rotate wind/stress controls adjustments
from Eastward/Northward to model grid directions.

1 gforget 1.13 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_getsurfacefluxes.F,v 1.12 2007/04/16 23:27:21 jmc Exp $
2 heimbach 1.8 C $Name: $
3 heimbach 1.1
4 edhill 1.6 #include "EXF_OPTIONS.h"
5 heimbach 1.1
6     subroutine exf_GetSurfaceFluxes(
7     I mytime,
8     I myiter,
9     I mythid
10     & )
11    
12     c ==================================================================
13     c SUBROUTINE exf_GetSurfaceFluxes
14     c ==================================================================
15     c
16     c o Mid-level routine for enabling the use of flux fields as control
17     c variables.
18     c
19     c started: Christian Eckert eckert@mit.edu 30-Jun-1999
20     c
21     c changed: Christian Eckert eckert@mit.edu 14-Jan-2000
22     c - Restructured the code in order to create a package
23     c for the MITgcmUV.
24     c
25     c Christian Eckert eckert@mit.edu 12-Feb-2000
26 dimitri 1.4 c - Changed Routine names (package prefix: exf_)
27 heimbach 1.1 c
28 dimitri 1.4 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
29 heimbach 1.1 c
30     c ==================================================================
31     c SUBROUTINE exf_GetSurfaceFluxes
32     c ==================================================================
33    
34     implicit none
35    
36 heimbach 1.5 c == global variables ==
37     #include "EEPARAMS.h"
38     #include "SIZE.h"
39     #include "PARAMS.h"
40     #include "GRID.h"
41    
42 jmc 1.12 #include "EXF_FIELDS.h"
43 gforget 1.13 #include "EXF_PARAM.h"
44 heimbach 1.8 #ifdef ALLOW_AUTODIFF
45 heimbach 1.5 # include "ctrl.h"
46     # include "ctrl_dummy.h"
47     #endif
48    
49 heimbach 1.1 c == routine arguments ==
50    
51     _RL mytime
52     integer myiter
53     integer mythid
54    
55     c == global variables ==
56    
57 gforget 1.13 #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 heimbach 1.1 c == end of interface ==
67    
68     #ifdef ALLOW_HFLUX_CONTROL
69 heimbach 1.5 call ctrl_get_gen (
70     & xx_hflux_file, xx_hfluxstartdate, xx_hfluxperiod,
71     & maskc, hflux, xx_hflux0, xx_hflux1, xx_hflux_dummy,
72 heimbach 1.11 & xx_hflux_remo_intercept, xx_hflux_remo_slope,
73 heimbach 1.5 & mytime, myiter, mythid )
74 heimbach 1.1 #endif
75    
76     #ifdef ALLOW_SFLUX_CONTROL
77 heimbach 1.5 call ctrl_get_gen (
78     & xx_sflux_file, xx_sfluxstartdate, xx_sfluxperiod,
79     & maskc, sflux, xx_sflux0, xx_sflux1, xx_sflux_dummy,
80 heimbach 1.11 & xx_sflux_remo_intercept, xx_sflux_remo_slope,
81 heimbach 1.5 & mytime, myiter, mythid )
82 heimbach 1.1 #endif
83    
84 gforget 1.13 #ifndef ALLOW_ROTATE_UV_CONTROLS
85    
86 heimbach 1.1 #ifdef ALLOW_USTRESS_CONTROL
87 heimbach 1.5 call ctrl_get_gen (
88     & xx_tauu_file, xx_tauustartdate, xx_tauuperiod,
89     & maskw, ustress, xx_tauu0, xx_tauu1, xx_tauu_dummy,
90 heimbach 1.11 & xx_tauu_remo_intercept, xx_tauu_remo_slope,
91 heimbach 1.5 & mytime, myiter, mythid )
92 heimbach 1.1 #endif
93    
94     #ifdef ALLOW_VSTRESS_CONTROL
95 heimbach 1.5 call ctrl_get_gen (
96     & xx_tauv_file, xx_tauvstartdate, xx_tauvperiod,
97     & masks, vstress, xx_tauv0, xx_tauv1, xx_tauv_dummy,
98 heimbach 1.11 & xx_tauv_remo_intercept, xx_tauv_remo_slope,
99 heimbach 1.5 & mytime, myiter, mythid )
100 heimbach 1.1 #endif
101    
102 gforget 1.13 #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 heimbach 1.1 end

  ViewVC Help
Powered by ViewVC 1.1.22