/[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.22 - (hide annotations) (download)
Wed Mar 17 23:08:09 2004 UTC (20 years, 6 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint54d_post, checkpoint54e_post, checkpoint55, checkpoint54, checkpoint53, checkpoint54f_post, checkpoint55c_post, checkpoint53d_post, checkpoint54b_post, checkpoint52m_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint54a_post, checkpoint55b_post, checkpoint53a_post, checkpoint53g_post, checkpoint53f_post, checkpoint52n_post, checkpoint53b_pre, checkpoint55a_post, checkpoint53b_post, checkpoint53d_pre, checkpoint54c_post
Changes since 1.21: +45 -57 lines
o Added capability to read-in both atmospheric fluxes and atmospheric
  conditions, needed for running sea-ice model in conjunction with fluxes.
o Removed ALLOW_CLIM_CYCLIC: cyclic monthly forcing is instead diagnosed
  from presence or absence of input parameters clim*period

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

  ViewVC Help
Powered by ViewVC 1.1.22