1 |
\section{EXF: The external forcing package |
\subsection{EXF: The external forcing package |
2 |
\label{sec:pkg:exf}} |
\label{sec:pkg:exf}} |
3 |
\begin{rawhtml} |
\begin{rawhtml} |
4 |
<!-- CMIREDIR:sectionexf: --> |
<!-- CMIREDIR:sectionexf: --> |
5 |
\end{rawhtml} |
\end{rawhtml} |
6 |
|
|
7 |
|
Authors: Patrick Heimbach and Dimitris Menemenlis |
8 |
|
|
9 |
\subsection{Introduction |
\subsubsection{Introduction |
10 |
\label{sec:pkg:exf:intro}} |
\label{sec:pkg:exf:intro}} |
11 |
|
|
12 |
The external forcing package, in conjunction with the |
The external forcing package, in conjunction with the |
32 |
|
|
33 |
%---------------------------------------------------------------------- |
%---------------------------------------------------------------------- |
34 |
|
|
35 |
\subsection{EXF configuration, compiling \& running} |
\subsubsection{EXF configuration, compiling \& running} |
36 |
|
|
37 |
\subsubsection{Compile-time options |
\paragraph{Compile-time options |
38 |
\label{sec:pkg:exf:config}} |
\label{sec:pkg:exf:config}} |
39 |
|
~ |
40 |
|
|
41 |
As with all MITgcm packages, EXF can be turned on or off at compile time |
As with all MITgcm packages, EXF can be turned on or off at compile time |
42 |
using the \texttt{packages.conf} file or the \texttt{genmake2} |
% |
43 |
\texttt{-enable=exf} or \texttt{-disable=exf} switches. |
\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 |
Parts of the EXF code can be enabled or disabled at compile time |
61 |
via CPP preprocessor flags. These options are set in either |
via CPP preprocessor flags. These options are set in either |
62 |
\texttt{EXF\_OPTIONS.h} or in \texttt{ECCO\_CPPOPTIONS.h}. |
\texttt{EXF\_OPTIONS.h} or in \texttt{ECCO\_CPPOPTIONS.h}. |
63 |
Table \ref{tab:pkg:exf:cpp} summarizes these options. |
Table \ref{tab:pkg:exf:cpp} summarizes these options. |
64 |
|
|
65 |
\begin{table}[b!] |
\begin{table}[b!] |
66 |
|
\centering |
67 |
\label{tab:pkg:exf:cpp} |
\label{tab:pkg:exf:cpp} |
68 |
{\footnotesize |
{\footnotesize |
69 |
\begin{tabular}{|l|l|} |
\begin{tabular}{|l|l|} |
86 |
\hline |
\hline |
87 |
\multicolumn{2}{|c|}{\textit{used in conjunction with relaxation to prescribed (climatological) fields}} \\ |
\multicolumn{2}{|c|}{\textit{used in conjunction with relaxation to prescribed (climatological) fields}} \\ |
88 |
\hline |
\hline |
|
\texttt{ALLOW\_CLIMTEMP\_RELAXATION} & |
|
|
relaxation to 3-D temperature climatology \\ |
|
|
\texttt{ALLOW\_CLIMSALT\_RELAXATION} & |
|
|
relaxation to 3-D salinity climatology \\ |
|
89 |
\texttt{ALLOW\_CLIMSST\_RELAXATION} & |
\texttt{ALLOW\_CLIMSST\_RELAXATION} & |
90 |
relaxation to 2-D SST climatology \\ |
relaxation to 2-D SST climatology \\ |
91 |
\texttt{ALLOW\_CLIMSSS\_RELAXATION} & |
\texttt{ALLOW\_CLIMSSS\_RELAXATION} & |
107 |
\subsubsection{Run-time parameters |
\subsubsection{Run-time parameters |
108 |
\label{sec:pkg:exf:runtime}} |
\label{sec:pkg:exf:runtime}} |
109 |
|
|
110 |
Run-time parameters are set in files \texttt{data.pkg}, |
Run-time parameters are set in files |
111 |
and \texttt{data.pkg\_clim} (for relaxation/climatological fields) |
\texttt{data.pkg}, \texttt{data.exf}, and |
112 |
|
\texttt{data.exf\_clim} (for relaxation/climatological fields) |
113 |
which are read in \texttt{exf\_readparms.F}. |
which are read in \texttt{exf\_readparms.F}. |
114 |
Run-time parameters may be broken into 2 categories: |
Run-time parameters may be broken into 3 categories: |
115 |
(i) general flags and parameters, and |
(i) switching on/off the package at runtime, |
116 |
(ii) attributes for each forcing and climatological field. |
(ii) general flags and parameters, and |
117 |
|
(iii) attributes for each forcing and climatological field. |
118 |
|
|
119 |
\paragraph{General flags and parameters} |
\paragraph{Enabling the package} |
120 |
|
~ \\ |
121 |
~ |
% |
122 |
|
A package is usually switched on/off at runtime by setting |
123 |
|
(e.g. for EXF) \texttt{useEXF = .TRUE.} in \texttt{data.pkg}. |
124 |
|
For EXF this flag is omitted, i.e. EXF is always ON if it is compiled. |
125 |
|
|
126 |
|
\paragraph{General flags and parameters} |
127 |
|
~ \\ |
128 |
|
% |
129 |
\begin{table}[h!] |
\begin{table}[h!] |
130 |
|
\centering |
131 |
\label{tab:pkg:exf:runtime_flags} |
\label{tab:pkg:exf:runtime_flags} |
132 |
{\footnotesize |
{\footnotesize |
133 |
\begin{tabular}{|l|c|l|} |
\begin{tabular}{|l|c|l|} |
160 |
\end{table} |
\end{table} |
161 |
|
|
162 |
|
|
163 |
\paragraph{Field attributes} ~ \\ |
\paragraph{Field attributes} |
164 |
|
~ \\ |
165 |
% |
% |
166 |
All EXF fields are listed in Section \ref{sec:pkg:exf:fields_units}. |
All EXF fields are listed in Section \ref{sec:pkg:exf:fields_units}. |
167 |
Each field has a number of attributes which can be customized. |
Each field has a number of attributes which can be customized. |
180 |
% |
% |
181 |
|
|
182 |
\begin{table}[h!] |
\begin{table}[h!] |
183 |
|
\centering |
184 |
\label{tab:pkg:exf:runtime_attributes} |
\label{tab:pkg:exf:runtime_attributes} |
185 |
{\footnotesize |
{\footnotesize |
186 |
\begin{tabular}{|l|c|l|} |
\begin{tabular}{|l|c|l|} |
256 |
|
|
257 |
%---------------------------------------------------------------------- |
%---------------------------------------------------------------------- |
258 |
|
|
259 |
\subsection{EXF input fields and units |
\subsubsection{EXF input fields and units |
260 |
\label{sec:pkg:exf:fields_units}} |
\label{sec:pkg:exf:fields_units}} |
261 |
|
|
262 |
The following list is taken from the header file \texttt{exf\_fields.h}. |
The following list is taken from the header file \texttt{exf\_fields.h}. |
266 |
\textbf{fu}, \textbf{fv}, \textbf{Qnet}, \textbf{Qsw}, \textbf{EmPmR}, |
\textbf{fu}, \textbf{fv}, \textbf{Qnet}, \textbf{Qsw}, \textbf{EmPmR}, |
267 |
and \textbf{pload}. They are defined in \texttt{FFIELDS.h}. |
and \textbf{pload}. They are defined in \texttt{FFIELDS.h}. |
268 |
|
|
269 |
{\scriptsize |
{\footnotesize |
270 |
\begin{verbatim} |
\begin{verbatim} |
271 |
|
|
272 |
c---------------------------------------------------------------------- |
c---------------------------------------------------------------------- |
288 |
c | Southwest C-grid V point |
c | Southwest C-grid V point |
289 |
c | Input field |
c | Input field |
290 |
c---------------------------------------------------------------------- |
c---------------------------------------------------------------------- |
291 |
|
c hs :: sensible heat flux into ocean in W/m^2 |
292 |
|
c | > 0 for increase in theta (ocean warming) |
293 |
|
c---------------------------------------------------------------------- |
294 |
|
c hl :: latent heat flux into ocean in W/m^2 |
295 |
|
c | > 0 for increase in theta (ocean warming) |
296 |
|
c---------------------------------------------------------------------- |
297 |
c hflux :: Net upward surface heat flux in W/m^2 |
c hflux :: Net upward surface heat flux in W/m^2 |
298 |
c | excluding shortwave (on input) |
c | excluding shortwave (on input) |
299 |
c | hflux = latent + sensible + lwflux |
c | hflux = latent + sensible + lwflux |
330 |
c | Southwest C-grid V point |
c | Southwest C-grid V point |
331 |
c | Input or input/output field |
c | Input or input/output field |
332 |
c---------------------------------------------------------------------- |
c---------------------------------------------------------------------- |
333 |
|
c wspeed :: Surface (10-m) wind speed in m/s |
334 |
|
c | >= 0 sqrt(u^2+v^2) |
335 |
|
c | Typical range: 0 < wspeed < 10 |
336 |
|
c | Input or input/output field |
337 |
|
c---------------------------------------------------------------------- |
338 |
c atemp :: Surface (2-m) air temperature in deg K |
c atemp :: Surface (2-m) air temperature in deg K |
339 |
c | Typical range: 200 < atemp < 300 |
c | Typical range: 200 < atemp < 300 |
340 |
c | Southwest C-grid tracer point |
c | Southwest C-grid tracer point |
364 |
c | Southwest C-grid tracer point |
c | Southwest C-grid tracer point |
365 |
c | Input or input/output field |
c | Input or input/output field |
366 |
c---------------------------------------------------------------------- |
c---------------------------------------------------------------------- |
367 |
|
c snowprecip :: snow in m/s |
368 |
|
c | > 0 for decrease in salt (ocean salinity) |
369 |
|
c | Typical range: 0 < precip < 5e-7 |
370 |
|
c | Input or input/output field |
371 |
|
c---------------------------------------------------------------------- |
372 |
c runoff :: River and glacier runoff in m/s |
c runoff :: River and glacier runoff in m/s |
373 |
c | > 0 for decrease in salt (ocean salinity) |
c | > 0 for decrease in salt (ocean salinity) |
374 |
c | Typical range: 0 < runoff < ???? |
c | Typical range: 0 < runoff < ???? |
401 |
|
|
402 |
%---------------------------------------------------------------------- |
%---------------------------------------------------------------------- |
403 |
|
|
404 |
\subsection{Key subroutines |
\subsubsection{Key subroutines |
405 |
\label{sec:pkg:exf:subroutines}} |
\label{sec:pkg:exf:subroutines}} |
406 |
|
|
407 |
\subsubsection{Top-level routine: \texttt{exf\_getforcing.F}} |
Top-level routine: \texttt{exf\_getforcing.F} |
408 |
|
|
409 |
{\scriptsize |
{\footnotesize |
410 |
\begin{verbatim} |
\begin{verbatim} |
411 |
|
|
412 |
C !CALLING SEQUENCE: |
C !CALLING SEQUENCE: |
414 |
c exf_getforcing (TOP LEVEL ROUTINE) |
c exf_getforcing (TOP LEVEL ROUTINE) |
415 |
c | |
c | |
416 |
c |-- exf_getclim (get climatological fields used e.g. for relax.) |
c |-- exf_getclim (get climatological fields used e.g. for relax.) |
|
c | |--- exf_set_climtemp (relax. to 3-D temperature field) |
|
|
c | |--- exf_set_climsalt (relax. to 3-D salinity field) |
|
417 |
c | |--- exf_set_climsst (relax. to 2-D SST field) |
c | |--- exf_set_climsst (relax. to 2-D SST field) |
418 |
c | |--- exf_set_climsss (relax. to 2-D SSS field) |
c | |--- exf_set_climsss (relax. to 2-D SSS field) |
419 |
c | o |
c | o |
424 |
c | | consecutive in time are read in and interpolated onto |
c | | consecutive in time are read in and interpolated onto |
425 |
c | | current time step). |
c | | current time step). |
426 |
c | | 2. If forcing is atmos. state and control is atmos. state, |
c | | 2. If forcing is atmos. state and control is atmos. state, |
427 |
c | | then the control variable anomalies are read here |
c | | then the control variable anomalies are read here via ctrl_get_gen |
428 |
c | | * ctrl_getatemp |
c | | (atemp, aqh, precip, swflux, swdown, uwind, vwind). |
|
c | | * ctrl_getaqh |
|
|
c | | * ctrl_getuwind |
|
|
c | | * ctrl_getvwind |
|
429 |
c | | If forcing and control are fluxes, then |
c | | If forcing and control are fluxes, then |
430 |
c | | controls are added later. |
c | | controls are added later. |
431 |
c | o |
c | o |
432 |
c | |
c | |
433 |
c |-- exf_check_range |
c |-- exf_radiation |
434 |
c | | 1. Check whether read fields are within assumed range |
c | | Compute net or downwelling radiative fluxes via |
435 |
c | | (may capture mismatches in units) |
c | | Stefan-Boltzmann law in case only one is known. |
436 |
|
c | o |
437 |
|
c |-- exf_wind |
438 |
|
c | | Computes wind speed and stresses, if required. |
439 |
c | o |
c | o |
440 |
c | |
c | |
441 |
c |-- exf_bulkformulae |
c |-- exf_bulkformulae |
442 |
c | | 1. Compute net or downwelling radiative fluxes via |
c | | Compute air-sea buoyancy fluxes from |
443 |
c | | Stefan-Boltzmann law in case only one is known. |
c | | atmospheric state following Large and Pond, JPO, 1981/82 |
|
c | | 2. Compute air-sea momentum and buoyancy fluxes from |
|
|
c | | atmospheric state following Large and Pond, JPO, 1981/82 |
|
444 |
c | o |
c | o |
445 |
c | |
c | |
446 |
c |-- < add time-mean river runoff here, if available > |
c |-- < hflux is sum of sensible, latent, longwave rad. > |
447 |
|
c |-- < sflux is sum of evap. minus precip. minus runoff > |
448 |
|
c | |
449 |
|
c |-- exf_getsurfacefluxes |
450 |
|
c | If forcing and control is flux, then the |
451 |
|
c | control vector anomalies are read here via ctrl_get_gen |
452 |
|
c | (hflux, sflux, ustress, vstress) |
453 |
c | |
c | |
454 |
c |-- < update tile edges here > |
c |-- < update tile edges here > |
455 |
c | |
c | |
456 |
c |-- exf_getsurfacefluxes |
c |-- exf_check_range |
457 |
c | | 1. If forcing and control are fluxes, then |
c | | Check whether read fields are within assumed range |
458 |
c | | controls are added here. |
c | | (may capture mismatches in units) |
459 |
c | o |
c | o |
460 |
c | |
c | |
461 |
c |-- < treatment of hflux w.r.t. swflux > |
c |-- < add shortwave to hflux for diagnostics > |
462 |
c | |
c | |
463 |
c |-- exf_diagnostics_fill |
c |-- exf_diagnostics_fill |
464 |
c | | 1. Do EXF-related diagnostics output here. |
c | | Do EXF-related diagnostics output here. |
465 |
c | o |
c | o |
466 |
c | |
c | |
467 |
c |-- exf_mapfields |
c |-- exf_mapfields |
468 |
c | | 1. Map the EXF variables onto the core MITgcm |
c | | Forcing fields from exf package are mapped onto |
469 |
c | | forcing fields. |
c | | mitgcm forcing arrays. |
470 |
|
c | | Mapping enables a runtime rescaling of fields |
471 |
c | o |
c | o |
472 |
c | |
C o |
|
c |-- exf_bulkformulae |
|
|
c | If ALLOW_BULKFORMULAE, compute fluxes via bulkformulae |
|
|
c | |
|
|
c |-- exf_getsurfacefluxes |
|
|
c | If forcing and control is flux, then the |
|
|
c | control vector anomalies are read here |
|
|
c | * ctrl_getheatflux |
|
|
c | * ctrl_getsaltflux |
|
|
c | * ctrl_getzonstress |
|
|
c | * call ctrl_getmerstress |
|
|
c | |
|
|
c |-- exf_mapfields |
|
|
c | Forcing fields from exf package are mapped onto |
|
|
c | mitgcm forcing arrays. |
|
|
c | Mapping enables a runtime rescaling of fields |
|
|
|
|
473 |
\end{verbatim} |
\end{verbatim} |
474 |
} |
} |
475 |
|
|
476 |
\subsubsection{Bulk formula routine: \texttt{exf\_bulkformulae.F}} |
Radiation calculation: \texttt{exf\_radiation.F} |
477 |
|
|
478 |
|
Wind speed and stress calculation: \texttt{exf\_wind.F} |
479 |
|
|
480 |
\subsubsection{Generic I/O routine: \texttt{exf\_set\_gen.F}} |
Bulk formula: \texttt{exf\_bulkformulae.F} |
481 |
|
|
482 |
\subsubsection{Interpolation routine: \texttt{exf\_interp.F}} |
Generic I/O: \texttt{exf\_set\_gen.F} |
483 |
|
|
484 |
\subsubsection{Header routines} |
Interpolation: \texttt{exf\_interp.F} |
485 |
|
|
486 |
|
Header routines |
487 |
|
|
488 |
%---------------------------------------------------------------------- |
%---------------------------------------------------------------------- |
489 |
|
|
490 |
\subsection{EXF diagnostics |
\subsubsection{EXF diagnostics |
491 |
\label{sec:pkg:exf:diagnostics}} |
\label{sec:pkg:exf:diagnostics}} |
492 |
|
|
493 |
Diagnostics output is available via the diagnostics package |
Diagnostics output is available via the diagnostics package |
496 |
Table \ref{tab:pkg:exf:diagnostics}. |
Table \ref{tab:pkg:exf:diagnostics}. |
497 |
|
|
498 |
\begin{table}[h!] |
\begin{table}[h!] |
499 |
|
\centering |
500 |
\label{tab:pkg:exf:diagnostics} |
\label{tab:pkg:exf:diagnostics} |
501 |
{\footnotesize |
{\footnotesize |
502 |
\begin{verbatim} |
\begin{verbatim} |
503 |
------------------------------------------------------ |
------------------------------------------------------ |
504 |
<-Name->|Levs|grid|<-- Units -->|<- Tile (max=80c) |
<-Name->|Levs|grid|<-- Units -->|<- Tile (max=80c) |
505 |
------------------------------------------------------ |
------------------------------------------------------ |
506 |
|
EXFhs | 1 | SM | W/m^2 | Sensible heat flux into ocean, >0 increases theta |
507 |
|
EXFhl | 1 | SM | W/m^2 | Latent heat flux into ocean, >0 increases theta |
508 |
|
EXFlwnet| 1 | SM | W/m^2 | Net upward longwave radiation, >0 decreases theta |
509 |
|
EXFswnet| 1 | SM | W/m^2 | Net upward shortwave radiation, >0 decreases theta |
510 |
EXFlwdn | 1 | SM | W/m^2 | Downward longwave radiation, >0 increases theta |
EXFlwdn | 1 | SM | W/m^2 | Downward longwave radiation, >0 increases theta |
511 |
EXFswdn | 1 | SM | W/m^2 | Downward shortwave radiation, >0 increases theta |
EXFswdn | 1 | SM | W/m^2 | Downward shortwave radiation, >0 increases theta |
512 |
EXFqnet | 1 | SM | W/m^2 | Net upward heat flux (turb+rad), >0 decreases theta |
EXFqnet | 1 | SM | W/m^2 | Net upward heat flux (turb+rad), >0 decreases theta |
514 |
EXFtauy | 1 | SV | N/m^2 | meridional surface wind stress, >0 increases vVel |
EXFtauy | 1 | SV | N/m^2 | meridional surface wind stress, >0 increases vVel |
515 |
EXFuwind| 1 | SM | m/s | zonal 10-m wind speed, >0 increases uVel |
EXFuwind| 1 | SM | m/s | zonal 10-m wind speed, >0 increases uVel |
516 |
EXFvwind| 1 | SM | m/s | meridional 10-m wind speed, >0 increases uVel |
EXFvwind| 1 | SM | m/s | meridional 10-m wind speed, >0 increases uVel |
517 |
|
EXFwspee| 1 | SM | m/s | 10-m wind speed modulus ( >= 0 ) |
518 |
EXFatemp| 1 | SM | degK | surface (2-m) air temperature |
EXFatemp| 1 | SM | degK | surface (2-m) air temperature |
519 |
EXFaqh | 1 | SM | kg/kg | surface (2-m) specific humidity |
EXFaqh | 1 | SM | kg/kg | surface (2-m) specific humidity |
520 |
EXFevap | 1 | SM | m/s | evaporation, > 0 increases salinity |
EXFevap | 1 | SM | m/s | evaporation, > 0 increases salinity |
521 |
EXFpreci| 1 | SM | m/s | evaporation, > 0 decreases salinity |
EXFpreci| 1 | SM | m/s | evaporation, > 0 decreases salinity |
522 |
|
EXFsnow | 1 | SM | m/s | snow precipitation, > 0 decreases salinity |
523 |
EXFempmr| 1 | SM | m/s | net upward freshwater flux, > 0 increases salinity |
EXFempmr| 1 | SM | m/s | net upward freshwater flux, > 0 increases salinity |
524 |
EXFpress| 1 | SM | N/m^2 | atmospheric pressure field |
EXFpress| 1 | SM | N/m^2 | atmospheric pressure field |
525 |
\end{verbatim} |
\end{verbatim} |
529 |
|
|
530 |
%---------------------------------------------------------------------- |
%---------------------------------------------------------------------- |
531 |
|
|
532 |
\subsection{Reference experiments} |
\subsubsection{Experiments and tutorials that use exf} |
533 |
|
\label{sec:pkg:exf:experiments} |
|
\subsubsection{global\_with\_exf} |
|
534 |
|
|
535 |
\subsubsection{lab\_sea} |
\begin{itemize} |
536 |
|
\item{Global Ocean experiment, in global\_with\_exf verification directory } |
537 |
|
\item{Labrador Sea experiment, in lab\_sea verification directory } |
538 |
|
\end{itemize} |
539 |
|
|
540 |
%---------------------------------------------------------------------- |
%---------------------------------------------------------------------- |
541 |
|
|
542 |
\subsection{References} |
\subsubsection{References} |