/[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.15 - (hide annotations) (download)
Tue Aug 28 19:17:46 2012 UTC (11 years, 8 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65d, checkpoint64, checkpoint65, checkpoint63s, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f
Changes since 1.14: +3 -2 lines
- pkg/exf : added run time switch useAtmWind to replace ALLOW_ATM_WIND
  cpp switch. ALLOW_ATM_WIND now just sets the useAtmWind default (see
  exf_readparms.F) and force defines ALLOW_BULKFORMULAE (EXF_OPTIONS.h).
- pkg/exf, autodiff, ctrl, ecco and seaice : remove ALLOW_ATM_WIND
  brackets, or replace them with useAtmWind ones.
- pkg/ctrl, ecco : allow to compile both ALLOW_U/VSTRESS_CONTROL and
  ALLOW_U/VWIND_CONTROL. Depending on useAtmWind, one is inactive,
  and the other is active (see exf_getffields.F/exf_getsurfacefluxes.F).

1 gforget 1.15 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_getsurfacefluxes.F,v 1.14 2012/07/31 16:08:16 heimbach 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.14 # include "CTRL_SIZE.h"
46 heimbach 1.5 # include "ctrl.h"
47     # include "ctrl_dummy.h"
48     #endif
49    
50 heimbach 1.1 c == routine arguments ==
51    
52     _RL mytime
53     integer myiter
54     integer mythid
55    
56     c == global variables ==
57    
58 gforget 1.13 #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 heimbach 1.1 c == end of interface ==
68    
69     #ifdef ALLOW_HFLUX_CONTROL
70 heimbach 1.5 call ctrl_get_gen (
71     & xx_hflux_file, xx_hfluxstartdate, xx_hfluxperiod,
72     & maskc, hflux, xx_hflux0, xx_hflux1, xx_hflux_dummy,
73 heimbach 1.11 & xx_hflux_remo_intercept, xx_hflux_remo_slope,
74 heimbach 1.5 & mytime, myiter, mythid )
75 heimbach 1.1 #endif
76    
77     #ifdef ALLOW_SFLUX_CONTROL
78 heimbach 1.5 call ctrl_get_gen (
79     & xx_sflux_file, xx_sfluxstartdate, xx_sfluxperiod,
80     & maskc, sflux, xx_sflux0, xx_sflux1, xx_sflux_dummy,
81 heimbach 1.11 & xx_sflux_remo_intercept, xx_sflux_remo_slope,
82 heimbach 1.5 & mytime, myiter, mythid )
83 heimbach 1.1 #endif
84    
85 gforget 1.15 IF ( .NOT.useAtmWind ) THEN
86 gforget 1.13 #ifndef ALLOW_ROTATE_UV_CONTROLS
87    
88 heimbach 1.1 #ifdef ALLOW_USTRESS_CONTROL
89 heimbach 1.5 call ctrl_get_gen (
90     & xx_tauu_file, xx_tauustartdate, xx_tauuperiod,
91     & maskw, ustress, xx_tauu0, xx_tauu1, xx_tauu_dummy,
92 heimbach 1.11 & xx_tauu_remo_intercept, xx_tauu_remo_slope,
93 heimbach 1.5 & mytime, myiter, mythid )
94 heimbach 1.1 #endif
95    
96     #ifdef ALLOW_VSTRESS_CONTROL
97 heimbach 1.5 call ctrl_get_gen (
98     & xx_tauv_file, xx_tauvstartdate, xx_tauvperiod,
99     & masks, vstress, xx_tauv0, xx_tauv1, xx_tauv_dummy,
100 heimbach 1.11 & xx_tauv_remo_intercept, xx_tauv_remo_slope,
101 heimbach 1.5 & mytime, myiter, mythid )
102 heimbach 1.1 #endif
103    
104 gforget 1.13 #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 gforget 1.15 ENDIF
159 gforget 1.13
160    
161 heimbach 1.1 end

  ViewVC Help
Powered by ViewVC 1.1.22