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

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

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


Revision 1.20 - (hide annotations) (download)
Wed Dec 10 19:37:25 2003 UTC (20 years, 6 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint52d_post
Branch point for: netcdf-sm0
Changes since 1.19: +50 -36 lines
o changes to permit hi-res, cubed-sphere, configuration
  - added useSingleCpuIO capability to mdsio_readfield.F and exf_interp.F
  - added "#undef ALLOW_USE_MPI" support to eesupp/src/scatter_2d.F
  - added pkg/exf/exf_set_uv.F for on-the-fly interpolation and rotation
    of surface winds for the cube
  (A verification experiment, based on global_ocean.cs32x15, but with
   pkg/seaice turned on and with on-the-fly interpolation from the NCEP
   Gaussian grid is described in MITgcm_contrib/high_res_cube/README_ice,
   complete with example surface forcing files and matlab scripts to look
   at the output and compare it with that of global_ocean.cs32x15.)

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

  ViewVC Help
Powered by ViewVC 1.1.22