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

Diff of /manual/s_phys_pkgs/text/gchem.tex

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

revision 1.2 by edhill, Tue Oct 12 18:16:03 2004 UTC revision 1.9 by stephd, Tue Jan 15 18:03:30 2008 UTC
# Line 1  Line 1 
1  \section {GCHEM Package}  \subsection {GCHEM Package}
2  \label{sec:pkg:gchem}  \label{sec:pkg:gchem}
3  \begin{rawhtml}  \begin{rawhtml}
4  <!-- CMIREDIR:package_gchem: -->  <!-- CMIREDIR:package_gchem: -->
5  \end{rawhtml}  \end{rawhtml}
6    
7  \subsection {Introduction}  \subsubsection {Introduction}
8  This package has been developed as interface to the PTRACERS package.  This package has been developed as interface to the PTRACERS package.
9  The purpose is to provide a structure where various (any)  The purpose is to provide a structure where various (any)
10  tracer experiments can be added to the code.  tracer experiments can be added to the code.
# Line 17  Note that the gchem package itself is on Line 17  Note that the gchem package itself is on
17  the subroutines used by specific biogeochemical experiments,  the subroutines used by specific biogeochemical experiments,
18  and does not "do" anything on its own.  and does not "do" anything on its own.
19    
20  There are two examples: cfc which looks at 2 tracers with a  There are two examples: {\bf cfc} which looks at 2 tracers with a
21  simple external forcing and dic with 5 tracers whose tendency terms  simple external forcing and {\bf dic} with 4,5 or 6 tracers
22    whose tendency terms
23  are related to one another. We will discuss these here only as  are related to one another. We will discuss these here only as
24  how they provide examples to use this package.  how they provide examples to use this package.
25    
26    
27  \subsection {Key subroutines and parameters}  \subsubsection {Key subroutines and parameters}
28    
29  \noindent  \noindent
30  {{\bf FRAMEWORK}} \\  {{\bf FRAMEWORK}} \\
31    The different biogeochemistry frameworks (e.g. cfc of dic)
32    are specified in the packages\_conf file.
33  {\it GCHEM\_OPTIONS.h} includes the compiler options to be used  {\it GCHEM\_OPTIONS.h} includes the compiler options to be used
34  in any experiment. For instance \#define ALLOW\_CFC allows  in any experiment.
35  the CFC code to be run. An important compiler option is  An important compiler option is
36   \#define PTRACERS\_SEPARATE\_FORCING which determined   \#define GCHEM\_SEPARATE\_FORCING which determined
37  how and when the tracer forcing is applied (see discussion  how and when the tracer forcing is applied (see discussion
38  on Forcing below).  on Forcing below). See section on dic for some additional
39    flags that can be set for that experiment.
40   There are further runtime parameters   There are further runtime parameters
41  set in {\it data.gchem} and kept in common block {\it GCHEM.h}.  set in {\it data.gchem} and kept in common block {\it GCHEM.h}.
42  These runtime options include:\\  These runtime options include:\\
43  $\bullet$ {\bf tIter0} which is the integer timestep when the tracer experiment  $\bullet$ Parameters to set the timing for periodic forcing files to
44   is initialized. If {\bf nIter0} $=$ {\bf tIter0} then the tracers  be loaded are: {\it gchem\_ForcingPeriod}, {\it gchem\_ForcingCycle}.
45   are initialized to zero or from initial files. If {\bf nIter0} $>$  The former is how often to load, the latter is how often to cycle
46   {\bf tIter0} then tracers (and previous timestep tendency terms)  through those fields (eg. period couple be monthly and cycle one year).
47    are read in from a the ptracers pickup file. Note that tracers  This is used in {\it dic} and {\it cfc}, with gchem\_ForcingPeriod=0
48    of zeros will be carried around if {\bf nIter0} $<$ {\bf tIter0}.  meaning no periodic forcing.
 \\  
49  $\bullet$ {\bf nsubtime} is the integer number of extra timesteps  $\bullet$ {\bf nsubtime} is the integer number of extra timesteps
50   required by the tracer experiment. This will give a timestep   required by the tracer experiment. This will give a timestep
51   of {\bf deltaTtracer}$/${\bf nsubtime} for the dependencies   of {\bf deltaTtracer}$/${\bf nsubtime} for the dependencies
# Line 53  $\bullet$ File names - these are several Line 56  $\bullet$ File names - these are several
56   wind speed is needed in both DIC and CFC packages to calculate   wind speed is needed in both DIC and CFC packages to calculate
57   the air-sea exchange of gases. Not all file names will be used   the air-sea exchange of gases. Not all file names will be used
58   for every tracer experiment.   for every tracer experiment.
59    \\
60    $\bullet$ {\bf gchem\_int\_*} are variable names for run-time set integer numbers. (Currently 1 through 5).
61    \\
62    $\bullet$ {\bf gchem\_rl\_*} are variable names for run-time set real numbers. (Currently 1 through 5).
63    $\bullet$ Note that the old {\bf tIter0} has been replaced by {\bf PTRACERS\_Iter0} which is
64    set in data.ptracers instead.
65    
66  \vspace{.5cm}  \vspace{.5cm}
67    
# Line 65  forcing files that will be needed by the Line 74  forcing files that will be needed by the
74    
75  There are two routine used to initialize parameters and fields  There are two routine used to initialize parameters and fields
76  needed by the experiment packages. These are  needed by the experiment packages. These are
77  {\it gchem\_init\_fixed.F} which is called from packages\_init\_fixed.F, and  {\it gchem\_init\_fixed.F} which is called from \textit{packages\_init\_fixed.F}, and
78  {\it gchem\_init\_vari.F} called from  {\it gchem\_init\_vari.F} called from
79  packages\_init\_variable.F. The first should  packages\_init\_variable.F. The first should
80  be used to call a subroutine specific to the tracer experiment  be used to call a subroutine specific to the tracer experiment
# Line 80  which sets (or initializes) time fields Line 89  which sets (or initializes) time fields
89  {{\bf LOADING FIELDS}}\\  {{\bf LOADING FIELDS}}\\
90  External forcing fields used by the tracer experiment are read  External forcing fields used by the tracer experiment are read
91  in by a subroutine (specific to the tracer experiment) called from  in by a subroutine (specific to the tracer experiment) called from
92  {\it gchem\_fields\_load.F}. This latter is called from forward\_step.F.  {\it gchem\_fields\_load.F}. This latter is called from \textit{forward\_step.F}.
93    
94  \vspace{.5cm}  \vspace{.5cm}
95    
# Line 93  between tracers) to these fields are tak Line 102  between tracers) to these fields are tak
102  interface. For tracers that are essentially passive (e.g. CFC's)  interface. For tracers that are essentially passive (e.g. CFC's)
103  but may have some surface boundary conditions  but may have some surface boundary conditions
104  this can easily be done within the regular tracer timestep. In this case  this can easily be done within the regular tracer timestep. In this case
105  {\it gchem\_forcing\_int.F} is called from ptracers\_integrate.F.  {\it gchem\_calc\_tendency.F} is called from {\it forward\_step.F}, where the
106    reactive (as opposed to the advective diffusive) tendencies are computed.
107    These tendencies, stored on the 3D field \textbf{gchemTendency}, are added to
108    the passive tracer tendencies \textbf{gPtr} in {\it gchem\_add\_tendency.F},
109    which is called from {\it ptracers\_forcing.F}.
110  For tracers with more complicated dependencies on each other,  For tracers with more complicated dependencies on each other,
111  and especially tracers which require a smaller timestep than  and especially tracers which require a smaller timestep than
112  deltaTtracer, it will be easier to use {\it gchem\_forcing\_sep.F}  deltaTtracer, it will be easier to use {\it gchem\_forcing\_sep.F}
113  which is called from forward\_step.F. There is a  which is called from forward\_step.F. There is a
114  compiler option set in {\it GCHEM\_OPTIONS.h} that determines  compiler option set in {\it GCHEM\_OPTIONS.h} that determines
115  which method is used: \#define PTRACERS\_SEPARATE\_FORCING  which method is used: \#define GCHEM\_SEPARATE\_FORCING
116  does the latter where tracers are forced separately from the  does the latter where tracers are forced separately from the
117  advection-diffusion code, and \#undef PTRACERS\_SEPARATE\_FORCING  advection-diffusion code, and \#undef GCHEM\_SEPARATE\_FORCING
118  includes the forcing in the regular timestepping.  includes the forcing in the regular timestepping.
119    
120  \vspace{.5cm}  \vspace{.5cm}
121    
122  \noindent  \noindent
123  {{\bf DIAGNOSTICS}}\\  {{\bf DIAGNOSTICS}}\\
124  This package also includes routines {\it gchem\_monitor.F} and  This package also also used the passive tracer routine {\it ptracers\_monitor.F}
125  {\it gchem\_mon\_print.F} which print out tracer statistics  which prints out tracer statistics
126  as often as the model dynamic statistic diagnostics (dynsys) are written.  as often as the model dynamic statistic diagnostics (dynsys) are written (or
127    as prescribed by the runtime flag \textbf{PTRACERS\_monitorFreq}, set in {\it data.ptracers}).
128  There is also a placeholder for any tracer experiment  There is also a placeholder for any tracer experiment
129  specific diagnostics to be calculated and printed to files.  specific diagnostics to be calculated and printed to files.
130  This is done in {\it gchem\_diags.F}. For instance the time average CO2  This is done in {\it gchem\_diags.F}. For instance the time average CO2
131  air-sea fluxes, and sea surface pH (among others) are written  air-sea fluxes, and sea surface pH (among others) are written
132  out by dic\_biotic\_diags.F which is called from gchem\_diags.F.  out by {\it dic\_biotic\_diags.F} which is called from {\it gchem\_diags.F}.
133    
134  \subsection{Do's and Don'ts}  \subsubsection{GCHEM Diagnostics}
135    \label{sec:pkg:gchem:diagnostics}
136    
137  The pkg ptracer is required with use with this pkg.  These diagnostics are particularly for the {\bf dic} package.
138  By itself, gchem pkg will read in {\bf data.gchem} and will  
139  write out ptracer diagnostics. It requires tracer experiment  {\footnotesize
140    \begin{verbatim}
141    
142    ------------------------------------------------------------------------
143    <-Name->|Levs|<-parsing code->|<--  Units   -->|<- Tile (max=80c)
144    ------------------------------------------------------------------------
145    DICBIOA | 15 |SM P    MR      |mol/m3/sec      |Biological Productivity (mol/m3/s)
146    DICCARB | 15 |SM P    MR      |mol eq/m3/sec   |Carbonate chg-biol prod and remin (mol eq/m3/s)
147    DICTFLX |  1 |SM P    L1      |mol/m3/sec      |Tendency of DIC due to air-sea exch (mol/m3/s)
148    DICOFLX |  1 |SM P    L1      |mol/m3/sec      |Tendency of O2 due to air-sea exch (mol/m3/s)
149    DICCFLX |  1 |SM P    L1      |mol/m2/sec      |Flux of CO2 - air-sea exch (mol/m2/s)
150    DICPCO2 |  1 |SM P    M1      |atm             |Partial Pressure of CO2 (atm)
151    DICPHAV |  1 |SM P    M1      |dimensionless   |pH (dimensionless)
152    \end{verbatim}
153    }
154    
155    \subsubsection{Do's and Don'ts}
156    
157    The pkg ptracer is required with use with this pkg. Also, as usual, the
158    runtime flag \textbf{useGCHEM} must be set to \textbf{.TRUE.} in \textbf{data.pkg}.
159    By itself, gchem pkg will read in \textbf{data.gchem} and will
160    write out gchem diagnostics. It requires tracer experiment
161  specific calls to do anything else (for instance the calls  specific calls to do anything else (for instance the calls
162  to dic and cfc pkgs).  to dic and cfc pkgs).
163    
164  \subsection{Reference Material}  \subsubsection{Reference Material}
165    
166    \subsubsection{Experiments and tutorials that use gchem}
167    \label{sec:pkg:gchem:experiments}
168    
169    \begin{itemize}
170    \item{Global Ocean biogeochemical tutorial, in tutorial\_global\_oce\_biogeo verification directory,  
171    described in section \ref{sect:eg-biogeochem_tutorial} uses gchem and dic }
172    
173    \item{Global Ocean cfc tutorial, in tutorial\_cfc\_offline verification directory,  
174    uses gchem and cfc (and offline) described in \ref{sect:eg-cfc_offline} }
175    
176    \item{Global Ocean online cfc example in cfc\_example verification directory,  
177    uses gchem and cfc}
178    
179    
180    
181    \end{itemize}
182    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22