/[MITgcm]/manual/s_phys_pkgs/text/exf.tex
ViewVC logotype

Contents of /manual/s_phys_pkgs/text/exf.tex

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


Revision 1.6 - (show annotations) (download) (as text)
Wed Aug 3 04:00:31 2005 UTC (19 years, 11 months ago) by heimbach
Branch: MAIN
Changes since 1.5: +5 -0 lines
File MIME type: application/x-tex
Updating

1 \subsection{EXF: The external forcing package
2 \label{sec:pkg:exf}}
3 \begin{rawhtml}
4 <!-- CMIREDIR:sectionexf: -->
5 \end{rawhtml}
6
7 Authors: Patrick Heimbach and Dimitris Menemenlis
8
9 \subsubsection{Introduction
10 \label{sec:pkg:exf:intro}}
11
12 The external forcing package, in conjunction with the
13 calendar package (cal), enables the handling of real-time
14 (or ``model-time'') forcing
15 fields of differing temporal forcing patterns.
16 It comprises climatological restoring and relaxation.
17 Bulk formulae are implemented to convert atmospheric fields
18 to surface fluxes.
19 An interpolation routine provides on-the-fly interpolation of
20 forcing fields an arbitrary grid onto the model grid.
21
22 CPP options enable or disable different aspects of the package
23 (Section \ref{sec:pkg:exf:config}).
24 Runtime options, flags, filenames and field-related dates/times are
25 set in \texttt{data.exf} and \texttt{data.exf\_clim}
26 (Section \ref{sec:pkg:exf:runtime}).
27 A description of key subroutines is given in Section
28 \ref{sec:pkg:exf:subroutines}.
29 Input fields, units and sign conventions are summarized in
30 Section \ref{sec:pkg:exf:fields_units}, and available diagnostics
31 output is listed in Section \ref{sec:pkg:exf:fields_diagnostics}.
32
33 %----------------------------------------------------------------------
34
35 \subsubsection{EXF configuration, compiling \& running}
36
37 \paragraph{Compile-time options
38 \label{sec:pkg:exf:config}}
39 ~
40
41 As with all MITgcm packages, EXF can be turned on or off at compile time
42 %
43 \begin{itemize}
44 %
45 \item
46 using the \texttt{packages.conf} file by adding \texttt{exf} to it,
47 %
48 \item
49 or using \texttt{genmake2} adding
50 \texttt{-enable=exf} or \texttt{-disable=exf} switches
51 %
52 \item
53 \textit{required packages and CPP options}: \\
54 EXF requires the calendar package \texttt{cal} to be enabled;
55 no additional CPP options are required.
56 %
57 \end{itemize}
58 (see Section \ref{sect:buildingCode}).
59
60 Parts of the EXF code can be enabled or disabled at compile time
61 via CPP preprocessor flags. These options are set in either
62 \texttt{EXF\_OPTIONS.h} or in \texttt{ECCO\_CPPOPTIONS.h}.
63 Table \ref{tab:pkg:exf:cpp} summarizes these options.
64
65 \begin{table}[b!]
66 \label{tab:pkg:exf:cpp}
67 {\footnotesize
68 \begin{tabular}{|l|l|}
69 \hline
70 \textbf{CPP option} & \textbf{Description} \\
71 \hline \hline
72 \texttt{EXF\_VERBOSE} &
73 verbose mode (recommended only for testing) \\
74 \texttt{ALLOW\_ATM\_TEMP} &
75 compute heat/freshwater fluxes from atmos. state input \\
76 \texttt{ALLOW\_ATM\_WIND} &
77 compute wind stress from wind speed input\\
78 \texttt{ALLOW\_BULKFORMULAE} &
79 is used if \texttt{ALLOW\_ATM\_TEMP} or
80 \texttt{ALLOW\_ATM\_WIND} is enabled \\
81 \texttt{EXF\_READ\_EVAP} & read evaporation instead of computing it \\
82 \texttt{ALLOW\_RUNOFF} & read time-constant river/glacier run-off field \\
83 \texttt{ALLOW\_DOWNWARD\_RADIATION} & compute net from downward or downward from net radiation \\
84 \texttt{USE\_EXF\_INTERPOLATION} & enable on-the-fly bilinear or bicubic interpolation of input fields \\
85 \hline
86 \multicolumn{2}{|c|}{\textit{used in conjunction with relaxation to prescribed (climatological) fields}} \\
87 \hline
88 \texttt{ALLOW\_CLIMTEMP\_RELAXATION} &
89 relaxation to 3-D temperature climatology \\
90 \texttt{ALLOW\_CLIMSALT\_RELAXATION} &
91 relaxation to 3-D salinity climatology \\
92 \texttt{ALLOW\_CLIMSST\_RELAXATION} &
93 relaxation to 2-D SST climatology \\
94 \texttt{ALLOW\_CLIMSSS\_RELAXATION} &
95 relaxation to 2-D SSS climatology \\
96 \hline
97 \multicolumn{2}{|c|}{\textit{these are set outside of EXF in} \texttt{CPP\_OPTIONS.h}} \\
98 \hline
99 \texttt{SHORTWAVE\_HEATING} & enable shortwave radiation \\
100 \texttt{ATMOSPHERIC\_LOADING} & enable surface pressure forcing \\
101 \hline
102 \end{tabular}
103 }
104 \caption{~}
105 \end{table}
106
107
108 %----------------------------------------------------------------------
109
110 \subsubsection{Run-time parameters
111 \label{sec:pkg:exf:runtime}}
112
113 Run-time parameters are set in files
114 \texttt{data.pkg}, \texttt{data.exf}, and
115 \texttt{data.exf\_clim} (for relaxation/climatological fields)
116 which are read in \texttt{exf\_readparms.F}.
117 Run-time parameters may be broken into 3 categories:
118 (i) switching on/off the package at runtime,
119 (ii) general flags and parameters, and
120 (iii) attributes for each forcing and climatological field.
121
122 \paragraph{Enabling the package}
123 ~ \\
124 %
125 A package is usually switched on/off at runtime by setting
126 (e.g. for EXF) \texttt{useEXF = .TRUE.} in \texttt{data.pkg}.
127 For EXF this flag is omitted, i.e. EXF is always ON if it is compiled.
128
129 \paragraph{General flags and parameters}
130 ~ \\
131 %
132 \begin{table}[h!]
133 \label{tab:pkg:exf:runtime_flags}
134 {\footnotesize
135 \begin{tabular}{|l|c|l|}
136 \hline
137 \textbf{Flag/parameter} & \textbf{default} & \textbf{Description} \\
138 \hline \hline
139 useExfCheckRange & \texttt{.TRUE.} &
140 check range of input fields and stop if out of range \\
141 useExfYearlyFields & \texttt{.FALSE.} &
142 append current year postfix of form \texttt{\_YYYY} on filename \\
143 twoDigitYear & \texttt{.FALSE.} &
144 instead of appending \texttt{\_YYYY} append \texttt{YY} \\
145 repeatPeriod & \texttt{0.0} & $ > 0 $ :
146 cycle through all input fields at the same period (in seconds) \\
147 ~ & ~ & $ = 0 $ :
148 use period assigned to each field \\
149 exf\_offset\_atemp & \texttt{0.0} & set to 273.16 to convert from deg. Kelvin (assumed input) to Celsius \\
150 windstressmax & \texttt{2.0} &
151 max. allowed wind stress $N/m^2$ \\
152 exf\_albedo & \texttt{0.1} &
153 surface albedo used to compute downward vs. net radiative fluxes \\
154 exf\_iprec & \texttt{32} &
155 precision of input fields (32-bit or 64-bit) \\
156 exf\_yftype & \texttt{'RL'} &
157 precision of arrays ('RL' vs. 'RS') \\
158 \hline
159 \end{tabular}
160 }
161 \caption{~}
162 \end{table}
163
164
165 \paragraph{Field attributes}
166 ~ \\
167 %
168 All EXF fields are listed in Section \ref{sec:pkg:exf:fields_units}.
169 Each field has a number of attributes which can be customized.
170 They are summarized in
171 Table \ref{tab:pkg:exf:runtime_attributes}.
172 To obtain an attribute for a specific field, e.g. \texttt{uwind}
173 prepend the field name to the listed attribute, e.g. for attribute
174 \texttt{period} this yields \texttt{uwindperiod}:
175 %
176 \begin{eqnarray*}
177 \begin{array}{cccccc}
178 ~ & \texttt{field} & \& & \texttt{attribute} & \longrightarrow & \texttt{parameter} \\
179 \text{e.g.} & \text{uwind} & \& & \text{period} & \longrightarrow & \text{uwindperiod} \\
180 \end{array}
181 \end{eqnarray*}
182 %
183
184 \begin{table}[h!]
185 \label{tab:pkg:exf:runtime_attributes}
186 {\footnotesize
187 \begin{tabular}{|l|c|l|}
188 \hline
189 \textbf{attribute} & \textbf{Default} & \textbf{Description} \\
190 \hline \hline
191 \textit{field}\texttt{file} & ' ' &
192 filename; if left empty no file will be read; \texttt{const} will be used instead \\
193 \textit{field}\texttt{const} & 0. &
194 constant that will be used if no file is read \\
195 \textit{field}\texttt{startdate1} & 0. &
196 format: \texttt{YYYYMMDD}; start year (YYYY), month (MM), day (YY) \\
197 ~&~& of field to determine record number \\
198 \textit{field}\texttt{startdate2} & 0. &
199 format: \texttt{HHMMSS}; start hour (HH), minute (MM), second(SS) \\
200 ~&~& of field to determine record number\\
201 \textit{field}\texttt{period} & 0. &
202 interval in seconds between two records \\
203 \texttt{exf\_inscal\_}\textit{field}& ~ &
204 optional rescaling of input fields to comply with EXF units \\
205 \texttt{exf\_outscal\_}\textit{field}& ~ &
206 optional rescaling of EXF fields when mapped onto MITgcm fields \\
207 \hline
208 \multicolumn{3}{|c|}{\textit{used in conjunction with}
209 \texttt{EXF\_USE\_INTERPOLATION}} \\
210 \hline
211 \textit{field}\texttt{\_lon0} & $thetaMin+delX/2$ &
212 starting longitude of input \\
213 \textit{field}\texttt{\_lon\_inc} & $delX$ &
214 increment in longitude of input \\
215 \textit{field}\texttt{\_lat0} & $phiMin+delY/2$ &
216 starting latitude of input \\
217 \textit{field}\texttt{\_lat\_inc} & $delY$ &
218 increment in latitude of input \\
219 \textit{field}\texttt{\_nlon} & $Nx$ &
220 number of grid points in longitude of input \\
221 \textit{field}\texttt{\_nlat} & $Ny$ &
222 number of grid points in longitude of input \\
223 \hline
224 \end{tabular}
225 }
226 \caption{\newline
227 Note one exception for the default of
228 \texttt{atempconst} = celsius2K = 273.16}
229 \end{table}
230
231 \paragraph{Example configuration} ~ \\
232 %
233 The following block is taken from the \texttt{data.exf} file
234 of the veification experiment \texttt{global\_with\_exf/}.
235 It defines attributes for the heat flux variable \texttt{hflux}:
236
237 \begin{verbatim}
238 hfluxfile = 'ncep_qnet.bin',
239 hfluxstartdate1 = 19920101,
240 hfluxstartdate2 = 000000,
241 hfluxperiod = 2592000.0,
242 hflux_lon0 = 2
243 hflux_lon_inc = 4
244 hflux_lat0 = -78
245 hflux_lat_inc = 39*4
246 hflux_nlon = 90
247 hflux_nlat = 40
248 \end{verbatim}
249
250 EXF will read a file of name 'ncep\_qnet.bin'.
251 Its first record represents January 1st, 1991 at 00:00 UTC.
252 Next record is 2592000 seconds (or 30 days) later.
253 Interpolation on-the-fly is used (in the present case trivially
254 on the same grid, but included nevertheless for illustration),
255 and input field grid starting coordinates and increments are
256 supplied as well.
257
258 %----------------------------------------------------------------------
259
260 \subsubsection{EXF input fields and units
261 \label{sec:pkg:exf:fields_units}}
262
263 The following list is taken from the header file \texttt{exf\_fields.h}.
264 It comprises all EXF input fields.
265
266 Output fields which EXF provides to the MITgcm are fields
267 \textbf{fu}, \textbf{fv}, \textbf{Qnet}, \textbf{Qsw}, \textbf{EmPmR},
268 and \textbf{pload}. They are defined in \texttt{FFIELDS.h}.
269
270 {\footnotesize
271 \begin{verbatim}
272
273 c----------------------------------------------------------------------
274 c |
275 c field :: Description
276 c |
277 c----------------------------------------------------------------------
278 c ustress :: Zonal surface wind stress in N/m^2
279 c | > 0 for increase in uVel, which is west to
280 c | east for cartesian and spherical polar grids
281 c | Typical range: -0.5 < ustress < 0.5
282 c | Southwest C-grid U point
283 c | Input field
284 c----------------------------------------------------------------------
285 c vstress :: Meridional surface wind stress in N/m^2
286 c | > 0 for increase in vVel, which is south to
287 c | north for cartesian and spherical polar grids
288 c | Typical range: -0.5 < vstress < 0.5
289 c | Southwest C-grid V point
290 c | Input field
291 c----------------------------------------------------------------------
292 c hflux :: Net upward surface heat flux in W/m^2
293 c | excluding shortwave (on input)
294 c | hflux = latent + sensible + lwflux
295 c | > 0 for decrease in theta (ocean cooling)
296 c | Typical range: -250 < hflux < 600
297 c | Southwest C-grid tracer point
298 c | Input field
299 c----------------------------------------------------------------------
300 c sflux :: Net upward freshwater flux in m/s
301 c | sflux = evap - precip - runoff
302 c | > 0 for increase in salt (ocean salinity)
303 c | Typical range: -1e-7 < sflux < 1e-7
304 c | Southwest C-grid tracer point
305 c | Input field
306 c----------------------------------------------------------------------
307 c swflux :: Net upward shortwave radiation in W/m^2
308 c | swflux = - ( swdown - ice and snow absorption - reflected )
309 c | > 0 for decrease in theta (ocean cooling)
310 c | Typical range: -350 < swflux < 0
311 c | Southwest C-grid tracer point
312 c | Input field
313 c----------------------------------------------------------------------
314 c uwind :: Surface (10-m) zonal wind velocity in m/s
315 c | > 0 for increase in uVel, which is west to
316 c | east for cartesian and spherical polar grids
317 c | Typical range: -10 < uwind < 10
318 c | Southwest C-grid U point
319 c | Input or input/output field
320 c----------------------------------------------------------------------
321 c vwind :: Surface (10-m) meridional wind velocity in m/s
322 c | > 0 for increase in vVel, which is south to
323 c | north for cartesian and spherical polar grids
324 c | Typical range: -10 < vwind < 10
325 c | Southwest C-grid V point
326 c | Input or input/output field
327 c----------------------------------------------------------------------
328 c atemp :: Surface (2-m) air temperature in deg K
329 c | Typical range: 200 < atemp < 300
330 c | Southwest C-grid tracer point
331 c | Input or input/output field
332 c----------------------------------------------------------------------
333 c aqh :: Surface (2m) specific humidity in kg/kg
334 c | Typical range: 0 < aqh < 0.02
335 c | Southwest C-grid tracer point
336 c | Input or input/output field
337 c----------------------------------------------------------------------
338 c lwflux :: Net upward longwave radiation in W/m^2
339 c | lwflux = - ( lwdown - ice and snow absorption - emitted )
340 c | > 0 for decrease in theta (ocean cooling)
341 c | Typical range: -20 < lwflux < 170
342 c | Southwest C-grid tracer point
343 c | Input field
344 c----------------------------------------------------------------------
345 c evap :: Evaporation in m/s
346 c | > 0 for increase in salt (ocean salinity)
347 c | Typical range: 0 < evap < 2.5e-7
348 c | Southwest C-grid tracer point
349 c | Input, input/output, or output field
350 c----------------------------------------------------------------------
351 c precip :: Precipitation in m/s
352 c | > 0 for decrease in salt (ocean salinity)
353 c | Typical range: 0 < precip < 5e-7
354 c | Southwest C-grid tracer point
355 c | Input or input/output field
356 c----------------------------------------------------------------------
357 c runoff :: River and glacier runoff in m/s
358 c | > 0 for decrease in salt (ocean salinity)
359 c | Typical range: 0 < runoff < ????
360 c | Southwest C-grid tracer point
361 c | Input or input/output field
362 c | !!! WATCH OUT: Default exf_inscal_runoff !!!
363 c | !!! in exf_readparms.F is not 1.0 !!!
364 c----------------------------------------------------------------------
365 c swdown :: Downward shortwave radiation in W/m^2
366 c | > 0 for increase in theta (ocean warming)
367 c | Typical range: 0 < swdown < 450
368 c | Southwest C-grid tracer point
369 c | Input/output field
370 c----------------------------------------------------------------------
371 c lwdown :: Downward longwave radiation in W/m^2
372 c | > 0 for increase in theta (ocean warming)
373 c | Typical range: 50 < lwdown < 450
374 c | Southwest C-grid tracer point
375 c | Input/output field
376 c----------------------------------------------------------------------
377 c apressure :: Atmospheric pressure field in N/m^2
378 c | > 0 for ????
379 c | Typical range: ???? < apressure < ????
380 c | Southwest C-grid tracer point
381 c | Input field
382 c----------------------------------------------------------------------
383
384 \end{verbatim}
385 }
386
387 %----------------------------------------------------------------------
388
389 \subsubsection{Key subroutines
390 \label{sec:pkg:exf:subroutines}}
391
392 Top-level routine: \texttt{exf\_getforcing.F}
393
394 {\footnotesize
395 \begin{verbatim}
396
397 C !CALLING SEQUENCE:
398 c ...
399 c exf_getforcing (TOP LEVEL ROUTINE)
400 c |
401 c |-- exf_getclim (get climatological fields used e.g. for relax.)
402 c | |--- exf_set_climtemp (relax. to 3-D temperature field)
403 c | |--- exf_set_climsalt (relax. to 3-D salinity field)
404 c | |--- exf_set_climsst (relax. to 2-D SST field)
405 c | |--- exf_set_climsss (relax. to 2-D SSS field)
406 c | o
407 c |
408 c |-- exf_getffields <- this one does almost everything
409 c | | 1. reads in fields, either flux or atmos. state,
410 c | | depending on CPP options (for each variable two fields
411 c | | consecutive in time are read in and interpolated onto
412 c | | current time step).
413 c | | 2. If forcing is atmos. state and control is atmos. state,
414 c | | then the control variable anomalies are read here
415 c | | * ctrl_getatemp
416 c | | * ctrl_getaqh
417 c | | * ctrl_getuwind
418 c | | * ctrl_getvwind
419 c | | If forcing and control are fluxes, then
420 c | | controls are added later.
421 c | o
422 c |
423 c |-- exf_check_range
424 c | | 1. Check whether read fields are within assumed range
425 c | | (may capture mismatches in units)
426 c | o
427 c |
428 c |-- exf_bulkformulae
429 c | | 1. Compute net or downwelling radiative fluxes via
430 c | | Stefan-Boltzmann law in case only one is known.
431 c | | 2. Compute air-sea momentum and buoyancy fluxes from
432 c | | atmospheric state following Large and Pond, JPO, 1981/82
433 c | o
434 c |
435 c |-- < add time-mean river runoff here, if available >
436 c |
437 c |-- < update tile edges here >
438 c |
439 c |-- exf_getsurfacefluxes
440 c | | 1. If forcing and control are fluxes, then
441 c | | controls are added here.
442 c | o
443 c |
444 c |-- < treatment of hflux w.r.t. swflux >
445 c |
446 c |-- exf_diagnostics_fill
447 c | | 1. Do EXF-related diagnostics output here.
448 c | o
449 c |
450 c |-- exf_mapfields
451 c | | 1. Map the EXF variables onto the core MITgcm
452 c | | forcing fields.
453 c | o
454 c |
455 c |-- exf_bulkformulae
456 c | If ALLOW_BULKFORMULAE, compute fluxes via bulkformulae
457 c |
458 c |-- exf_getsurfacefluxes
459 c | If forcing and control is flux, then the
460 c | control vector anomalies are read here
461 c | * ctrl_getheatflux
462 c | * ctrl_getsaltflux
463 c | * ctrl_getzonstress
464 c | * call ctrl_getmerstress
465 c |
466 c |-- exf_mapfields
467 c | Forcing fields from exf package are mapped onto
468 c | mitgcm forcing arrays.
469 c | Mapping enables a runtime rescaling of fields
470
471 \end{verbatim}
472 }
473
474 Bulk formula routine: \texttt{exf\_bulkformulae.F}
475
476 Generic I/O routine: \texttt{exf\_set\_gen.F}
477
478 Interpolation routine: \texttt{exf\_interp.F}
479
480 Header routines
481
482 %----------------------------------------------------------------------
483
484 \subsubsection{EXF diagnostics
485 \label{sec:pkg:exf:diagnostics}}
486
487 Diagnostics output is available via the diagnostics package
488 (see Section \ref{sec:pkg:diagnostics}).
489 Available output fields are summarized in
490 Table \ref{tab:pkg:exf:diagnostics}.
491
492 \begin{table}[h!]
493 \label{tab:pkg:exf:diagnostics}
494 {\footnotesize
495 \begin{verbatim}
496 ------------------------------------------------------
497 <-Name->|Levs|grid|<-- Units -->|<- Tile (max=80c)
498 ------------------------------------------------------
499 EXFlwdn | 1 | SM | W/m^2 | Downward longwave radiation, >0 increases theta
500 EXFswdn | 1 | SM | W/m^2 | Downward shortwave radiation, >0 increases theta
501 EXFqnet | 1 | SM | W/m^2 | Net upward heat flux (turb+rad), >0 decreases theta
502 EXFtaux | 1 | SU | N/m^2 | zonal surface wind stress, >0 increases uVel
503 EXFtauy | 1 | SV | N/m^2 | meridional surface wind stress, >0 increases vVel
504 EXFuwind| 1 | SM | m/s | zonal 10-m wind speed, >0 increases uVel
505 EXFvwind| 1 | SM | m/s | meridional 10-m wind speed, >0 increases uVel
506 EXFatemp| 1 | SM | degK | surface (2-m) air temperature
507 EXFaqh | 1 | SM | kg/kg | surface (2-m) specific humidity
508 EXFevap | 1 | SM | m/s | evaporation, > 0 increases salinity
509 EXFpreci| 1 | SM | m/s | evaporation, > 0 decreases salinity
510 EXFempmr| 1 | SM | m/s | net upward freshwater flux, > 0 increases salinity
511 EXFpress| 1 | SM | N/m^2 | atmospheric pressure field
512 \end{verbatim}
513 }
514 \caption{~}
515 \end{table}
516
517 %----------------------------------------------------------------------
518
519 \subsubsection{Reference experiments}
520
521 global\_with\_exf:
522
523 lab\_sea:
524
525 %----------------------------------------------------------------------
526
527 \subsubsection{References}

  ViewVC Help
Powered by ViewVC 1.1.22