/[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.5 - (show annotations) (download) (as text)
Mon Aug 1 22:31:36 2005 UTC (18 years, 9 months ago) by heimbach
Branch: MAIN
Changes since 1.4: +35 -14 lines
File MIME type: application/x-tex
Updating (mostly kpp.tex, and corrections to exf.tex)

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

  ViewVC Help
Powered by ViewVC 1.1.22