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

Contents of /MITgcm/pkg/exf/exf_getforcing.F

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


Revision 1.8 - (show annotations) (download)
Thu Oct 9 04:19:19 2003 UTC (20 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, hrcube4, checkpoint52d_pre, checkpoint52j_pre, checkpoint51o_pre, checkpoint51l_post, checkpoint52k_post, checkpoint52, checkpoint52f_post, checkpoint51t_post, checkpoint51n_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint52e_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint52b_pre, checkpoint51l_pre, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint52f_pre, checkpoint51r_post, checkpoint51i_post, checkpoint52d_post, checkpoint52a_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint52j_post, branch-netcdf, checkpoint51o_post, checkpoint52a_post, ecco_c52_e35, checkpoint51m_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.7: +3 -3 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 c $Header: /u/u3/gcmpack/MITgcm/pkg/exf/exf_getforcing.F,v 1.7.2.1 2003/10/02 18:30:07 adcroft Exp $
2
3 #include "EXF_OPTIONS.h"
4
5 CBOI
6 C
7 C !TITLE: EXTERNAL FORCING
8 C !AUTHORS: mitgcm developers ( support@mitgcm.org )
9 C !AFFILIATION: Massachussetts Institute of Technology
10 C !DATE:
11 C !INTRODUCTION: External forcing package
12 c \bv
13 c * The external forcing package, in conjunction with the
14 c calendar package, enables the handling of realistic forcing
15 c fields of differing temporal forcing patterns.
16 c * It comprises climatological restoring and relaxation
17 c * Bulk formulae are implemented to convert atmospheric fields
18 c to surface fluxes.
19 c
20 C !CALLING SEQUENCE:
21 c ...
22 c exf_getforcing
23 c |
24 c |-- exf_getclim (get climatological fields used e.g. for relax.)
25 c |
26 c |-- exf_getffields <- this one does almost everything
27 c | | 1. reads in fields, either flux or atmos. state,
28 c | | depending on CPP options
29 c | | 2. If forcing and control is flux, we're already done here
30 c | | 3. If forcing is atmos. state, then
31 c | | (a) if control is atmos. state, then the control variable
32 c | | anomalies are read here
33 c | | * ctrl_getatemp
34 c | | * ctrl_getaqh
35 c | | * ctrl_getuwind
36 c | | * ctrl_getvwind
37 c | | 4. flux fields are interpolated on current time
38 c | | (b) next the flux fields are computed via bulk formulae
39 c | |
40 c | |-- exf_obcs
41 c | If open boundaries are prescribed externally,
42 c | OB values for current time step are read here
43 c | 1. for each boundary (north, south, west, east)
44 c | sliced fields are read for T,S,U,V
45 c | 2. if OB's are part of control vector,
46 c | control variable anomalies are added to OB values
47 c | * ctrl_getobcsn
48 c | * ctrl_getobcss
49 c | * ctrl_getobcsw
50 c | * ctrl_getobcse
51 c |
52 c |-- exf_bulkformulae
53 c | If ALLOW_BULKFORMULAE, compute fluxes via bulkformulae
54 c |
55 c |-- exf_getsurfacefluxes
56 c | If forcing and control is flux, then the
57 c | control vector anomalies are read here
58 c | * ctrl_getheatflux
59 c | * ctrl_getsaltflux
60 c | * ctrl_getzonstress
61 c | * call ctrl_getmerstress
62 c |
63 c |-- exf_mapfields
64 c | Forcing fields from exf package are mapped onto
65 c | mitgcm forcing arrays.
66 c | Mapping enables a runtime rescaling of fields
67 c
68 c \ev
69 CEOI
70
71 CBOP
72 C !ROUTINE: exf_getforcing
73 C !INTERFACE:
74 subroutine exf_getforcing( mytime, myiter, mythid )
75
76 C !DESCRIPTION: \bv
77 c *=================================================================
78 c | SUBROUTINE exf_getforcing
79 c *=================================================================
80 c o Get the forcing fields for the current time step. The switches
81 c for the inclusion of the individual forcing components have to
82 c be set in EXF_OPTIONS.h (or ECCO_CPPOPTIONS.h).
83 c A note on surface fluxes:
84 c The MITgcmUV's vertical coordinate z is positive upward.
85 c This implies that a positive flux is out of the ocean
86 c model. However, the wind stress forcing is not treated
87 c this way. A positive zonal wind stress accelerates the
88 c model ocean towards the east.
89 c started: eckert@mit.edu, heimbach@mit.edu, ralf@ocean.mit.edu
90 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
91 c *=================================================================
92 c | SUBROUTINE exf_getforcing
93 c *=================================================================
94 C \ev
95
96 C !USES:
97 implicit none
98
99 #include "EEPARAMS.h"
100 #include "SIZE.h"
101 #include "PARAMS.h"
102 #include "GRID.h"
103
104 #include "exf_param.h"
105 #include "exf_fields.h"
106 #include "exf_constants.h"
107
108 c == global variables ==
109
110 C !INPUT/OUTPUT PARAMETERS:
111 c == routine arguments ==
112 integer mythid
113 integer myiter
114 _RL mytime
115
116 C !LOCAL VARIABLES:
117 c == local variables ==
118
119 integer bi,bj
120 integer i,j,k
121
122 c == end of interface ==
123 CEOP
124
125 c Get values of climatological fields.
126 call exf_getclim( mytime, myiter, mythid )
127
128 c Get the surface forcing fields.
129 call exf_getffields( mytime, myiter, mythid )
130
131 c Compute bulk formulae
132 #ifdef ALLOW_BULKFORMULAE
133 call exf_bulkformulae( mytime, myiter, mythid )
134 #endif
135
136 c Apply runoff, masks and exchanges
137 do bj = mybylo(mythid),mybyhi(mythid)
138 do bi = mybxlo(mythid),mybxhi(mythid)
139 k = 1
140 do j = 1,sny
141 do i = 1,snx
142 #ifdef ALLOW_RUNOFF
143 sflux(i,j,bi,bj) = sflux(i,j,bi,bj) - runoff(i,j,bi,bj)
144 #endif
145
146 hflux(i,j,bi,bj) = hflux(i,j,bi,bj)*maskc(i,j,1,bi,bj)
147 sflux(i,j,bi,bj) = sflux(i,j,bi,bj)*maskc(i,j,1,bi,bj)
148 enddo
149 enddo
150 enddo
151 enddo
152
153 c Update the tile edges.
154 _EXCH_XY_R8(hflux, mythid)
155 _EXCH_XY_R8(sflux, mythid)
156 CALL EXCH_UV_XY_RL(ustress, vstress, .TRUE., myThid)
157 #ifdef SHORTWAVE_HEATING
158 _EXCH_XY_R8(swflux, mythid)
159 #endif
160 #ifdef ATMOSPHERIC_LOADING
161 _EXCH_XY_R8(apressure, mythid)
162 #endif
163
164 c Get values of the surface flux anomalies.
165 call exf_getsurfacefluxes( mytime, myiter, mythid )
166
167 c Map the forcing fields onto the corresponding model fields.
168 call exf_mapfields( mythid )
169
170 end
171

  ViewVC Help
Powered by ViewVC 1.1.22