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

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

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


Revision 1.4 - (hide annotations) (download) (as text)
Mon Jul 18 20:45:27 2005 UTC (18 years, 10 months ago) by molod
Branch: MAIN
Changes since 1.3: +16 -16 lines
File MIME type: application/x-tex
Reorganization of chap 6 and 7 -- move some tex files, demote many
sections in section hierarchy

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

  ViewVC Help
Powered by ViewVC 1.1.22