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

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

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


Revision 1.19 - (show annotations) (download)
Thu Nov 6 22:11:02 2003 UTC (20 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint52d_pre, checkpoint52, checkpoint52b_pre, checkpoint52b_post, checkpoint52c_post, checkpoint52a_pre, branch-netcdf, checkpoint52a_post, ecco_c52_e35, checkpoint51u_post
Changes since 1.18: +4 -6 lines
o merging from ecco-branch
o cleaned some CPP options

1 C
2 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_getffields.F,v 1.18 2003/10/23 04:41:40 edhill Exp $
3 C $Name: $
4
5 #include "PACKAGES_CONFIG.h"
6 #include "EXF_OPTIONS.h"
7
8 subroutine exf_getffields( mycurrenttime, mycurrentiter, mythid )
9
10 c ==================================================================
11 c SUBROUTINE exf_getffields
12 c ==================================================================
13 c
14 c o Read-in atmospheric state and/or surface fluxes from files.
15 c
16 c heimbach@mit.edu, 23-May-2003 totally re-structured
17 c 5-Aug-2003: added USE_EXF_INTERPOLATION for arbitrary input grid
18 c
19 c ==================================================================
20 c SUBROUTINE exf_getffields
21 c ==================================================================
22
23 implicit none
24
25 c == global variables ==
26
27 #include "EEPARAMS.h"
28 #include "SIZE.h"
29 #include "PARAMS.h"
30 #include "DYNVARS.h"
31 #include "GRID.h"
32
33 #include "exf_param.h"
34 #include "exf_fields.h"
35 #include "exf_constants.h"
36
37 #ifdef ALLOW_AUTODIFF
38 # include "ctrl.h"
39 # include "ctrl_dummy.h"
40 #endif
41
42 c == routine arguments ==
43
44 integer mythid
45 integer mycurrentiter
46 _RL mycurrenttime
47
48 c == local variables ==
49
50 c == end of interface ==
51
52 c-- read forcing fields from files and temporal interpolation
53
54 #ifdef ALLOW_ATM_WIND
55
56 c Zonal wind.
57 call exf_set_gen(
58 & uwindfile, uwindstartdate, uwindperiod,
59 & exf_inscal_uwind,
60 & uwind, uwind0, uwind1, uwindmask,
61 #ifdef USE_EXF_INTERPOLATION
62 & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
63 & uwind_nlon, uwind_nlat, xC, yC,
64 #endif
65 & mycurrenttime, mycurrentiter, mythid )
66
67 c Meridional wind.
68 call exf_set_gen(
69 & vwindfile, vwindstartdate, vwindperiod,
70 & exf_inscal_vwind,
71 & vwind, vwind0, vwind1, vwindmask,
72 #ifdef USE_EXF_INTERPOLATION
73 & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
74 & vwind_nlon, vwind_nlat, xC, yC,
75 #endif
76 & mycurrenttime, mycurrentiter, mythid )
77
78 #ifdef ALLOW_UWIND_CONTROL
79 call ctrl_get_gen (
80 & xx_uwind_file, xx_uwindstartdate, xx_uwindperiod,
81 & maskw, uwind, xx_uwind0, xx_uwind1, xx_uwind_dummy,
82 & mycurrenttime, mycurrentiter, mythid )
83 #endif
84
85 #ifdef ALLOW_VWIND_CONTROL
86 call ctrl_get_gen (
87 & xx_vwind_file, xx_vwindstartdate, xx_vwindperiod,
88 & masks, vwind, xx_vwind0, xx_vwind1, xx_vwind_dummy,
89 & mycurrenttime, mycurrentiter, mythid )
90 #endif
91
92 #else /* ifndef ALLOW_ATM_WIND */
93
94 c Zonal wind stress.
95 call exf_set_gen(
96 & ustressfile, ustressstartdate, ustressperiod,
97 & exf_inscal_ustress,
98 & ustress, ustress0, ustress1, ustressmask,
99 #ifdef USE_EXF_INTERPOLATION
100 & ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
101 & ustress_nlon, ustress_nlat, xG, yC,
102 #endif
103 & mycurrenttime, mycurrentiter, mythid )
104
105 c Meridional wind stress.
106 call exf_set_gen(
107 & vstressfile, vstressstartdate, vstressperiod,
108 & exf_inscal_vstress,
109 & vstress, vstress0, vstress1, vstressmask,
110 #ifdef USE_EXF_INTERPOLATION
111 & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
112 & vstress_nlon, vstress_nlat, xC, yG,
113 #endif
114 & mycurrenttime, mycurrentiter, mythid )
115
116 #endif /* ifndef ALLOW_ATM_WIND */
117
118 #ifdef ALLOW_ATM_TEMP
119
120 c Atmospheric temperature.
121 call exf_set_gen(
122 & atempfile, atempstartdate, atempperiod,
123 & exf_inscal_atemp,
124 & atemp, atemp0, atemp1, atempmask,
125 #ifdef USE_EXF_INTERPOLATION
126 & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
127 & atemp_nlon, atemp_nlat, xC, yC,
128 #endif
129 & mycurrenttime, mycurrentiter, mythid )
130
131 c Atmospheric humidity.
132 call exf_set_gen(
133 & aqhfile, aqhstartdate, aqhperiod,
134 & exf_inscal_aqh,
135 & aqh, aqh0, aqh1, aqhmask,
136 #ifdef USE_EXF_INTERPOLATION
137 & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc,
138 & aqh_nlon, aqh_nlat, xC, yC,
139 #endif
140 & mycurrenttime, mycurrentiter, mythid )
141
142 c Net long wave radiative flux.
143 call exf_set_gen(
144 & lwfluxfile, lwfluxstartdate, lwfluxperiod,
145 & exf_inscal_lwflux,
146 & lwflux, lwflux0, lwflux1, lwfluxmask,
147 #ifdef USE_EXF_INTERPOLATION
148 & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
149 & lwflux_nlon, lwflux_nlat, xC, yC,
150 #endif
151 & mycurrenttime, mycurrentiter, mythid )
152
153 c Precipitation.
154 call exf_set_gen(
155 & precipfile, precipstartdate, precipperiod,
156 & exf_inscal_precip,
157 & precip, precip0, precip1, precipmask,
158 #ifdef USE_EXF_INTERPOLATION
159 & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
160 & precip_nlon, precip_nlat, xC, yC,
161 #endif
162 & mycurrenttime, mycurrentiter, mythid )
163
164 #ifdef ALLOW_ATEMP_CONTROL
165 call ctrl_get_gen (
166 & xx_atemp_file, xx_atempstartdate, xx_atempperiod,
167 & maskc, atemp, xx_atemp0, xx_atemp1, xx_atemp_dummy,
168 & mycurrenttime, mycurrentiter, mythid )
169 #endif
170
171 #ifdef ALLOW_AQH_CONTROL
172 call ctrl_get_gen (
173 & xx_aqh_file, xx_aqhstartdate, xx_aqhperiod,
174 & maskc, aqh, xx_aqh0, xx_aqh1, xx_aqh_dummy,
175 & mycurrenttime, mycurrentiter, mythid )
176 #endif
177
178 #else /* ifndef ALLOW_ATM_TEMP */
179
180 c Atmospheric heat flux.
181 call exf_set_gen (
182 & hfluxfile, hfluxstartdate, hfluxperiod, exf_inscal_hflux,
183 & hflux, hflux0, hflux1, hfluxmask,
184 #ifdef USE_EXF_INTERPOLATION
185 & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
186 & hflux_nlon, hflux_nlat, xC, yC,
187 #endif
188 & mycurrenttime, mycurrentiter, mythid )
189
190 c Salt flux.
191 call exf_set_gen (
192 & sfluxfile, sfluxstartdate, sfluxperiod, exf_inscal_sflux,
193 & sflux, sflux0, sflux1, sfluxmask,
194 #ifdef USE_EXF_INTERPOLATION
195 & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
196 & sflux_nlon, sflux_nlat, xC, yC,
197 #endif
198 & mycurrenttime, mycurrentiter, mythid )
199
200 #endif /* ifndef ALLOW_ATM_TEMP */
201
202 #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
203 c Net short wave radiative flux.
204 call exf_set_gen (
205 & swfluxfile, swfluxstartdate, swfluxperiod, exf_inscal_swflux,
206 & swflux, swflux0, swflux1, swfluxmask,
207 #ifdef USE_EXF_INTERPOLATION
208 & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
209 & swflux_nlon, swflux_nlat, xC, yC,
210 #endif
211 & mycurrenttime, mycurrentiter, mythid )
212 #endif
213
214 #ifdef EXF_READ_EVAP
215 c Evaporation
216 call exf_set_gen (
217 & evapfile, evapstartdate, evapperiod, exf_inscal_evap,
218 & evap, evap0, evap1, evapmask,
219 #ifdef USE_EXF_INTERPOLATION
220 & evap_lon0, evap_lon_inc, evap_lat0, evap_lat_inc,
221 & evap_nlon, evap_nlat, xC, yC,
222 #endif
223 & mycurrenttime, mycurrentiter, mythid )
224 #endif
225
226 #ifdef ALLOW_DOWNWARD_RADIATION
227
228 c Downward shortwave radiation.
229 call exf_set_gen (
230 & swdownfile, swdownstartdate, swdownperiod, exf_inscal_swdown,
231 & swdown, swdown0, swdown1, swdownmask,
232 #ifdef USE_EXF_INTERPOLATION
233 & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
234 & swdown_nlon, swdown_nlat, xC, yC,
235 #endif
236 & mycurrenttime, mycurrentiter, mythid )
237
238 c Downward longwave radiation.
239 call exf_set_gen (
240 & lwdownfile, lwdownstartdate, lwdownperiod, exf_inscal_lwdown,
241 & lwdown, lwdown0, lwdown1, lwdownmask,
242 #ifdef USE_EXF_INTERPOLATION
243 & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
244 & lwdown_nlon, lwdown_nlat, xC, yC,
245 #endif
246 & mycurrenttime, mycurrentiter, mythid )
247
248 #endif
249
250 #ifdef ATMOSPHERIC_LOADING
251 c Atmos. pressure forcing
252 call exf_set_gen (
253 & apressurefile, apressurestartdate, apressureperiod,
254 & exf_inscal_apressure,
255 & apressure, apressure0, apressure1, apressuremask,
256 #ifdef USE_EXF_INTERPOLATION
257 & apressure_lon0, apressure_lon_inc, apressure_lat0,
258 & apressure_lat_inc, apressure_nlon, apressure_nlat, xC, yC,
259 #endif
260 & mycurrenttime, mycurrentiter, mythid )
261 #endif
262
263
264 end

  ViewVC Help
Powered by ViewVC 1.1.22