1 |
dimitri |
1.5 |
c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_getforcing.F,v 1.4 2002/11/12 20:34:41 heimbach Exp $ |
2 |
heimbach |
1.1 |
|
3 |
|
|
#include "CPP_OPTIONS.h" |
4 |
|
|
|
5 |
heimbach |
1.2 |
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 |
dimitri |
1.5 |
c |-- exf_getffields <- this one does almost everything |
27 |
heimbach |
1.2 |
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 |
dimitri |
1.5 |
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_getsurfacefluxes |
53 |
|
|
c | If forcing and control is flux, then the |
54 |
|
|
c | control vector anomalies are read here |
55 |
|
|
c | * ctrl_getheatflux |
56 |
|
|
c | * ctrl_getsaltflux |
57 |
|
|
c | * ctrl_getzonstress |
58 |
|
|
c | * call ctrl_getmerstress |
59 |
|
|
c | |
60 |
|
|
c |-- exf_mapfields |
61 |
|
|
c | Forcing fields from exf package are mapped onto |
62 |
|
|
c | mitgcm forcing arrays. |
63 |
|
|
c | Mapping enables a runtime rescaling of fields |
64 |
heimbach |
1.2 |
c |
65 |
|
|
c \ev |
66 |
|
|
CEOI |
67 |
|
|
|
68 |
|
|
CBOP |
69 |
|
|
C !ROUTINE: exf_getforcing |
70 |
|
|
C !INTERFACE: |
71 |
|
|
subroutine exf_getforcing( mytime, myiter, mythid ) |
72 |
|
|
|
73 |
|
|
C !DESCRIPTION: \bv |
74 |
|
|
c *================================================================= |
75 |
|
|
c | SUBROUTINE exf_getforcing |
76 |
|
|
c *================================================================= |
77 |
heimbach |
1.1 |
c o Get the forcing fields for the current time step. The switches |
78 |
|
|
c for the inclusion of the individual forcing components have to |
79 |
heimbach |
1.2 |
c be set in EXF_CPPOPTIONS.h (or ECCO_CPPOPTIONS.h). |
80 |
heimbach |
1.1 |
c A note on surface fluxes: |
81 |
|
|
c The MITgcmUV's vertical coordinate z is positive upward. |
82 |
|
|
c This implies that a positive flux is out of the ocean |
83 |
|
|
c model. However, the wind stress forcing is not treated |
84 |
|
|
c this way. A positive zonal wind stress accelerates the |
85 |
|
|
c model ocean towards the east. |
86 |
heimbach |
1.2 |
c started: eckert@mit.edu, heimbach@mit.edu, ralf@ocean.mit.edu |
87 |
dimitri |
1.5 |
c changed: menemenlis@jpl.nas.gov |
88 |
heimbach |
1.2 |
c *================================================================= |
89 |
|
|
c | SUBROUTINE exf_getforcing |
90 |
|
|
c *================================================================= |
91 |
|
|
C \ev |
92 |
heimbach |
1.1 |
|
93 |
heimbach |
1.2 |
C !USES: |
94 |
heimbach |
1.1 |
implicit none |
95 |
|
|
|
96 |
|
|
c == global variables == |
97 |
|
|
|
98 |
heimbach |
1.2 |
C !INPUT/OUTPUT PARAMETERS: |
99 |
heimbach |
1.1 |
c == routine arguments == |
100 |
|
|
integer mythid |
101 |
|
|
integer myiter |
102 |
|
|
_RL mytime |
103 |
|
|
|
104 |
heimbach |
1.2 |
C !LOCAL VARIABLES: |
105 |
heimbach |
1.1 |
c == local variables == |
106 |
|
|
|
107 |
|
|
c == end of interface == |
108 |
heimbach |
1.2 |
CEOP |
109 |
heimbach |
1.1 |
|
110 |
|
|
c Get values of climatological fields. |
111 |
heimbach |
1.3 |
call exf_getclim( mytime, myiter, mythid ) |
112 |
|
|
|
113 |
|
|
c Get the surface forcing fields. |
114 |
|
|
call exf_getffields( mytime, myiter, mythid ) |
115 |
|
|
|
116 |
|
|
c Get values of the surface flux anomalies. |
117 |
|
|
call exf_getsurfacefluxes( mytime, myiter, mythid ) |
118 |
heimbach |
1.1 |
|
119 |
|
|
c Map the forcing fields onto the corresponding model fields. |
120 |
heimbach |
1.3 |
call exf_mapfields( mythid ) |
121 |
heimbach |
1.1 |
|
122 |
|
|
end |
123 |
|
|
|