Commit 33b838171c4f634c386eb22bd6c148a8b1304fcb

Authored by dumoda01
1 parent 8b8c0b75
Exists in master and in 1 other branch snow

Depot du modele / Model deposit

Showing 495 changed files with 2703045 additions and 0 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 495 files displayed.

BUGS 0 → 100755
COPYING 0 → 100755
@@ -0,0 +1,340 @@ @@ -0,0 +1,340 @@
  1 + GNU GENERAL PUBLIC LICENSE
  2 + Version 2, June 1991
  3 +
  4 + Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  5 + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  6 + Everyone is permitted to copy and distribute verbatim copies
  7 + of this license document, but changing it is not allowed.
  8 +
  9 + Preamble
  10 +
  11 + The licenses for most software are designed to take away your
  12 +freedom to share and change it. By contrast, the GNU General Public
  13 +License is intended to guarantee your freedom to share and change free
  14 +software--to make sure the software is free for all its users. This
  15 +General Public License applies to most of the Free Software
  16 +Foundation's software and to any other program whose authors commit to
  17 +using it. (Some other Free Software Foundation software is covered by
  18 +the GNU Library General Public License instead.) You can apply it to
  19 +your programs, too.
  20 +
  21 + When we speak of free software, we are referring to freedom, not
  22 +price. Our General Public Licenses are designed to make sure that you
  23 +have the freedom to distribute copies of free software (and charge for
  24 +this service if you wish), that you receive source code or can get it
  25 +if you want it, that you can change the software or use pieces of it
  26 +in new free programs; and that you know you can do these things.
  27 +
  28 + To protect your rights, we need to make restrictions that forbid
  29 +anyone to deny you these rights or to ask you to surrender the rights.
  30 +These restrictions translate to certain responsibilities for you if you
  31 +distribute copies of the software, or if you modify it.
  32 +
  33 + For example, if you distribute copies of such a program, whether
  34 +gratis or for a fee, you must give the recipients all the rights that
  35 +you have. You must make sure that they, too, receive or can get the
  36 +source code. And you must show them these terms so they know their
  37 +rights.
  38 +
  39 + We protect your rights with two steps: (1) copyright the software, and
  40 +(2) offer you this license which gives you legal permission to copy,
  41 +distribute and/or modify the software.
  42 +
  43 + Also, for each author's protection and ours, we want to make certain
  44 +that everyone understands that there is no warranty for this free
  45 +software. If the software is modified by someone else and passed on, we
  46 +want its recipients to know that what they have is not the original, so
  47 +that any problems introduced by others will not reflect on the original
  48 +authors' reputations.
  49 +
  50 + Finally, any free program is threatened constantly by software
  51 +patents. We wish to avoid the danger that redistributors of a free
  52 +program will individually obtain patent licenses, in effect making the
  53 +program proprietary. To prevent this, we have made it clear that any
  54 +patent must be licensed for everyone's free use or not licensed at all.
  55 +
  56 + The precise terms and conditions for copying, distribution and
  57 +modification follow.
  58 +
  59 + GNU GENERAL PUBLIC LICENSE
  60 + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  61 +
  62 + 0. This License applies to any program or other work which contains
  63 +a notice placed by the copyright holder saying it may be distributed
  64 +under the terms of this General Public License. The "Program", below,
  65 +refers to any such program or work, and a "work based on the Program"
  66 +means either the Program or any derivative work under copyright law:
  67 +that is to say, a work containing the Program or a portion of it,
  68 +either verbatim or with modifications and/or translated into another
  69 +language. (Hereinafter, translation is included without limitation in
  70 +the term "modification".) Each licensee is addressed as "you".
  71 +
  72 +Activities other than copying, distribution and modification are not
  73 +covered by this License; they are outside its scope. The act of
  74 +running the Program is not restricted, and the output from the Program
  75 +is covered only if its contents constitute a work based on the
  76 +Program (independent of having been made by running the Program).
  77 +Whether that is true depends on what the Program does.
  78 +
  79 + 1. You may copy and distribute verbatim copies of the Program's
  80 +source code as you receive it, in any medium, provided that you
  81 +conspicuously and appropriately publish on each copy an appropriate
  82 +copyright notice and disclaimer of warranty; keep intact all the
  83 +notices that refer to this License and to the absence of any warranty;
  84 +and give any other recipients of the Program a copy of this License
  85 +along with the Program.
  86 +
  87 +You may charge a fee for the physical act of transferring a copy, and
  88 +you may at your option offer warranty protection in exchange for a fee.
  89 +
  90 + 2. You may modify your copy or copies of the Program or any portion
  91 +of it, thus forming a work based on the Program, and copy and
  92 +distribute such modifications or work under the terms of Section 1
  93 +above, provided that you also meet all of these conditions:
  94 +
  95 + a) You must cause the modified files to carry prominent notices
  96 + stating that you changed the files and the date of any change.
  97 +
  98 + b) You must cause any work that you distribute or publish, that in
  99 + whole or in part contains or is derived from the Program or any
  100 + part thereof, to be licensed as a whole at no charge to all third
  101 + parties under the terms of this License.
  102 +
  103 + c) If the modified program normally reads commands interactively
  104 + when run, you must cause it, when started running for such
  105 + interactive use in the most ordinary way, to print or display an
  106 + announcement including an appropriate copyright notice and a
  107 + notice that there is no warranty (or else, saying that you provide
  108 + a warranty) and that users may redistribute the program under
  109 + these conditions, and telling the user how to view a copy of this
  110 + License. (Exception: if the Program itself is interactive but
  111 + does not normally print such an announcement, your work based on
  112 + the Program is not required to print an announcement.)
  113 +
  114 +These requirements apply to the modified work as a whole. If
  115 +identifiable sections of that work are not derived from the Program,
  116 +and can be reasonably considered independent and separate works in
  117 +themselves, then this License, and its terms, do not apply to those
  118 +sections when you distribute them as separate works. But when you
  119 +distribute the same sections as part of a whole which is a work based
  120 +on the Program, the distribution of the whole must be on the terms of
  121 +this License, whose permissions for other licensees extend to the
  122 +entire whole, and thus to each and every part regardless of who wrote it.
  123 +
  124 +Thus, it is not the intent of this section to claim rights or contest
  125 +your rights to work written entirely by you; rather, the intent is to
  126 +exercise the right to control the distribution of derivative or
  127 +collective works based on the Program.
  128 +
  129 +In addition, mere aggregation of another work not based on the Program
  130 +with the Program (or with a work based on the Program) on a volume of
  131 +a storage or distribution medium does not bring the other work under
  132 +the scope of this License.
  133 +
  134 + 3. You may copy and distribute the Program (or a work based on it,
  135 +under Section 2) in object code or executable form under the terms of
  136 +Sections 1 and 2 above provided that you also do one of the following:
  137 +
  138 + a) Accompany it with the complete corresponding machine-readable
  139 + source code, which must be distributed under the terms of Sections
  140 + 1 and 2 above on a medium customarily used for software interchange; or,
  141 +
  142 + b) Accompany it with a written offer, valid for at least three
  143 + years, to give any third party, for a charge no more than your
  144 + cost of physically performing source distribution, a complete
  145 + machine-readable copy of the corresponding source code, to be
  146 + distributed under the terms of Sections 1 and 2 above on a medium
  147 + customarily used for software interchange; or,
  148 +
  149 + c) Accompany it with the information you received as to the offer
  150 + to distribute corresponding source code. (This alternative is
  151 + allowed only for noncommercial distribution and only if you
  152 + received the program in object code or executable form with such
  153 + an offer, in accord with Subsection b above.)
  154 +
  155 +The source code for a work means the preferred form of the work for
  156 +making modifications to it. For an executable work, complete source
  157 +code means all the source code for all modules it contains, plus any
  158 +associated interface definition files, plus the scripts used to
  159 +control compilation and installation of the executable. However, as a
  160 +special exception, the source code distributed need not include
  161 +anything that is normally distributed (in either source or binary
  162 +form) with the major components (compiler, kernel, and so on) of the
  163 +operating system on which the executable runs, unless that component
  164 +itself accompanies the executable.
  165 +
  166 +If distribution of executable or object code is made by offering
  167 +access to copy from a designated place, then offering equivalent
  168 +access to copy the source code from the same place counts as
  169 +distribution of the source code, even though third parties are not
  170 +compelled to copy the source along with the object code.
  171 +
  172 + 4. You may not copy, modify, sublicense, or distribute the Program
  173 +except as expressly provided under this License. Any attempt
  174 +otherwise to copy, modify, sublicense or distribute the Program is
  175 +void, and will automatically terminate your rights under this License.
  176 +However, parties who have received copies, or rights, from you under
  177 +this License will not have their licenses terminated so long as such
  178 +parties remain in full compliance.
  179 +
  180 + 5. You are not required to accept this License, since you have not
  181 +signed it. However, nothing else grants you permission to modify or
  182 +distribute the Program or its derivative works. These actions are
  183 +prohibited by law if you do not accept this License. Therefore, by
  184 +modifying or distributing the Program (or any work based on the
  185 +Program), you indicate your acceptance of this License to do so, and
  186 +all its terms and conditions for copying, distributing or modifying
  187 +the Program or works based on it.
  188 +
  189 + 6. Each time you redistribute the Program (or any work based on the
  190 +Program), the recipient automatically receives a license from the
  191 +original licensor to copy, distribute or modify the Program subject to
  192 +these terms and conditions. You may not impose any further
  193 +restrictions on the recipients' exercise of the rights granted herein.
  194 +You are not responsible for enforcing compliance by third parties to
  195 +this License.
  196 +
  197 + 7. If, as a consequence of a court judgment or allegation of patent
  198 +infringement or for any other reason (not limited to patent issues),
  199 +conditions are imposed on you (whether by court order, agreement or
  200 +otherwise) that contradict the conditions of this License, they do not
  201 +excuse you from the conditions of this License. If you cannot
  202 +distribute so as to satisfy simultaneously your obligations under this
  203 +License and any other pertinent obligations, then as a consequence you
  204 +may not distribute the Program at all. For example, if a patent
  205 +license would not permit royalty-free redistribution of the Program by
  206 +all those who receive copies directly or indirectly through you, then
  207 +the only way you could satisfy both it and this License would be to
  208 +refrain entirely from distribution of the Program.
  209 +
  210 +If any portion of this section is held invalid or unenforceable under
  211 +any particular circumstance, the balance of the section is intended to
  212 +apply and the section as a whole is intended to apply in other
  213 +circumstances.
  214 +
  215 +It is not the purpose of this section to induce you to infringe any
  216 +patents or other property right claims or to contest validity of any
  217 +such claims; this section has the sole purpose of protecting the
  218 +integrity of the free software distribution system, which is
  219 +implemented by public license practices. Many people have made
  220 +generous contributions to the wide range of software distributed
  221 +through that system in reliance on consistent application of that
  222 +system; it is up to the author/donor to decide if he or she is willing
  223 +to distribute software through any other system and a licensee cannot
  224 +impose that choice.
  225 +
  226 +This section is intended to make thoroughly clear what is believed to
  227 +be a consequence of the rest of this License.
  228 +
  229 + 8. If the distribution and/or use of the Program is restricted in
  230 +certain countries either by patents or by copyrighted interfaces, the
  231 +original copyright holder who places the Program under this License
  232 +may add an explicit geographical distribution limitation excluding
  233 +those countries, so that distribution is permitted only in or among
  234 +countries not thus excluded. In such case, this License incorporates
  235 +the limitation as if written in the body of this License.
  236 +
  237 + 9. The Free Software Foundation may publish revised and/or new versions
  238 +of the General Public License from time to time. Such new versions will
  239 +be similar in spirit to the present version, but may differ in detail to
  240 +address new problems or concerns.
  241 +
  242 +Each version is given a distinguishing version number. If the Program
  243 +specifies a version number of this License which applies to it and "any
  244 +later version", you have the option of following the terms and conditions
  245 +either of that version or of any later version published by the Free
  246 +Software Foundation. If the Program does not specify a version number of
  247 +this License, you may choose any version ever published by the Free Software
  248 +Foundation.
  249 +
  250 + 10. If you wish to incorporate parts of the Program into other free
  251 +programs whose distribution conditions are different, write to the author
  252 +to ask for permission. For software which is copyrighted by the Free
  253 +Software Foundation, write to the Free Software Foundation; we sometimes
  254 +make exceptions for this. Our decision will be guided by the two goals
  255 +of preserving the free status of all derivatives of our free software and
  256 +of promoting the sharing and reuse of software generally.
  257 +
  258 + NO WARRANTY
  259 +
  260 + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  261 +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
  262 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  263 +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  264 +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  265 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
  266 +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
  267 +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  268 +REPAIR OR CORRECTION.
  269 +
  270 + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  271 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  272 +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  273 +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  274 +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  275 +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  276 +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  277 +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  278 +POSSIBILITY OF SUCH DAMAGES.
  279 +
  280 + END OF TERMS AND CONDITIONS
  281 +
  282 + How to Apply These Terms to Your New Programs
  283 +
  284 + If you develop a new program, and you want it to be of the greatest
  285 +possible use to the public, the best way to achieve this is to make it
  286 +free software which everyone can redistribute and change under these terms.
  287 +
  288 + To do so, attach the following notices to the program. It is safest
  289 +to attach them to the start of each source file to most effectively
  290 +convey the exclusion of warranty; and each file should have at least
  291 +the "copyright" line and a pointer to where the full notice is found.
  292 +
  293 + <one line to give the program's name and a brief idea of what it does.>
  294 + Copyright (C) 19yy <name of author>
  295 +
  296 + This program is free software; you can redistribute it and/or modify
  297 + it under the terms of the GNU General Public License as published by
  298 + the Free Software Foundation; either version 2 of the License, or
  299 + (at your option) any later version.
  300 +
  301 + This program is distributed in the hope that it will be useful,
  302 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  303 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  304 + GNU General Public License for more details.
  305 +
  306 + You should have received a copy of the GNU General Public License
  307 + along with this program; if not, write to the Free Software
  308 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  309 +
  310 +
  311 +Also add information on how to contact you by electronic and paper mail.
  312 +
  313 +If the program is interactive, make it output a short notice like this
  314 +when it starts in an interactive mode:
  315 +
  316 + Gnomovision version 69, Copyright (C) 19yy name of author
  317 + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  318 + This is free software, and you are welcome to redistribute it
  319 + under certain conditions; type `show c' for details.
  320 +
  321 +The hypothetical commands `show w' and `show c' should show the appropriate
  322 +parts of the General Public License. Of course, the commands you use may
  323 +be called something other than `show w' and `show c'; they could even be
  324 +mouse-clicks or menu items--whatever suits your program.
  325 +
  326 +You should also get your employer (if you work as a programmer) or your
  327 +school, if any, to sign a "copyright disclaimer" for the program, if
  328 +necessary. Here is a sample; alter the names:
  329 +
  330 + Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  331 + `Gnomovision' (which makes passes at compilers) written by James Hacker.
  332 +
  333 + <signature of Ty Coon>, 1 April 1989
  334 + Ty Coon, President of Vice
  335 +
  336 +This General Public License does not permit incorporating your program into
  337 +proprietary programs. If your program is a subroutine library, you may
  338 +consider it more useful to permit linking proprietary applications with the
  339 +library. If this is what you want to do, use the GNU Library General
  340 +Public License instead of this License.
ChangeLog 0 → 100755
HISTORY 0 → 100755
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +Please read information and documentation on www.gotm.net
  2 +
INSTALL 0 → 100755
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
  1 +For the brave ones:
  2 +cd src; make
  3 +
  4 +If you encounter errors during compilation please check the WWW-page:
  5 +http://www.gotm.net/
  6 +for further information and if that does not
  7 +help, e-mail users@gotm.net of the authors.
  8 +
  9 +For testing we strongly recommaned downloading some of the prepared test caeses
  10 +from the above mentioned web-site.
  11 +
  12 +Good luck, and remember to inform of further developments for inclusion,
  13 +exciting simulations etc.
  14 +
  15 +The GOTM team.
Makefile 0 → 100755
@@ -0,0 +1,66 @@ @@ -0,0 +1,66 @@
  1 +#$Id: Makefile,v 1.16 2007-04-18 10:29:18 kbk Exp $
  2 +#
  3 +# Makefile for making new release of GOTM.
  4 +#
  5 +# Before doing - make release - be sure to commit all files.
  6 +
  7 +# Remember to update - VERSION - for each new release
  8 +
  9 +
  10 +# 20010531
  11 +VERSION=2.3.5
  12 +# 20010531
  13 +VERSION=2.3.6
  14 +# 20010613
  15 +VERSION=2.3.7
  16 +# 20011118
  17 +VERSION=2.3.8
  18 +# 20030327
  19 +VERSION=3.1.0
  20 +# 20050627
  21 +VERSION=3.1.3
  22 +# 20050627
  23 +VERSION=3.1.3_bio
  24 +# 20050817
  25 +VERSION=3.2.0
  26 +# 20050817
  27 +VERSION=3.3.0
  28 +# 20051117
  29 +VERSION=3.3.1
  30 +# 20051228
  31 +VERSION=3.3.2
  32 +# 20070418
  33 +VERSION=4.0.0
  34 +
  35 +all: VERSION
  36 +
  37 +VERSION: Makefile
  38 + $(MAKE) distclean
  39 + @echo $(VERSION) > $@
  40 + @date > timestamp
  41 + @echo \#define RELEASE \"$(VERSION)\" > .ver
  42 + @mv -f .ver include/version.h
  43 +
  44 +Makefile:
  45 +
  46 +exec: VERSION
  47 + make -C src
  48 +
  49 +gui: VERSION
  50 + make -C gui.py
  51 +
  52 +devel stable branch: VERSION
  53 + @echo
  54 + @echo "making a new "$@" release: v"$(VERSION)
  55 + @echo
  56 + @. release.sh $@ $(VERSION)
  57 +
  58 +distclean:
  59 + make -C doc/ $@
  60 + make -C src/ $@
  61 + $(RM) timestep VERSION include/version.h
  62 + $(RM) -r lib/ modules/
  63 +
  64 +#-----------------------------------------------------------------------
  65 +# Copyright (C) 2001 - Hans Burchard and Karsten Bolding (BBH) !
  66 +#-----------------------------------------------------------------------
README 0 → 100755
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +See installation instructions on www.gotm.net
  2 +
VERSION 0 → 100755
@@ -0,0 +1 @@ @@ -0,0 +1 @@
  1 +4.0.0
compilers/compiler.DECFOR 0 → 100755
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
  1 +# Set options for the Compaq fort compiler - on alphas.
  2 +ifeq ($(FORTRAN_COMPILER),DECFOR)
  3 +FC=f90
  4 +DEFINES += -DFORTRAN95
  5 +can_do_F90=false
  6 +can_do_F90=true
  7 +MODULES=-module $(MODDIR)
  8 +EXTRAS =
  9 +DEBUG_FLAGS = -g -arch host -check bounds -check overflow -check nopower -check underflow -std90 -assume gfullpath
  10 +DEBUG_FLAGS = -g -arch host -check bounds -check overflow -check nopower -assume gfullpath
  11 +PROF_FLAGS = -pg -O
  12 +PROD_FLAGS = -O -fast -inline speed -pipeline
  13 +#PROD_FLAGS = -O -fast -inline speed -unroll 1 -pipeline
  14 +DEFINES += -DREAL_4B=real\(4\)
  15 +endif
compilers/compiler.FUJITSU 0 → 100755
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
  1 +# Set options for the Fujitsu compiler - on Linux/Intel and SunOS.
  2 +ifeq ($(FORTRAN_COMPILER),FUJITSU)
  3 +FC=frt
  4 +can_do_F90=true
  5 +DEFINES += -DFORTRAN95
  6 +MODULES=-Am -M$(MODDIR)
  7 +EXTRAS = -ml=cdecl -fw
  8 +EXTRAS = -fw
  9 +DEBUG_FLAGS = -g -H aeus
  10 +PROF_FLAGS = -pg -O3
  11 +PROD_FLAGS = -O -K fast
  12 +DEFINES += -DREAL_4B=real\(4\)
  13 +endif
compilers/compiler.G95 0 → 100755
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
  1 +# Set options for the GNU Fortran 95 compiler
  2 +
  3 +ifeq ($(FORTRAN_COMPILER),G95)
  4 +
  5 +FC = g95
  6 +DEFINES += -DFORTRAN90
  7 +can_do_F90 = true
  8 +F90_to_f90 =
  9 +MODULES = -M $(MODDIR)
  10 +EXTRAS = -ffree-form -Wall -std=f95 -pedantic
  11 +DEBUG_FLAGS = -g
  12 +PROF_FLAGS = -p
  13 +PROD_FLAGS = -O3
  14 +DEFINES += -DREAL_4B=real\(4\)
  15 +NETCDFINC = /opt/local/include
  16 +NETCDFLIBDIR = /opt/local/lib
  17 +
  18 +endif
compilers/compiler.GFORTRAN 0 → 100755
@@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
  1 +# Set options for the GNU Fortran 95 compiler
  2 +
  3 +ifeq ($(FORTRAN_COMPILER),GFORTRAN)
  4 +FC=gfortran
  5 +
  6 +DEFINES += -DFORTRAN95
  7 +can_do_F90 = true
  8 +F90_to_f90 = $(FC) -E $(F90FLAGS) $(EXTRA_FFLAGS) $< > $@
  9 +#MODULES = -M $(MODDIR)
  10 +MODULES = -J $(MODDIR)
  11 +EXTRAS = -ffree-form -Wall -std=f95 -pedantic
  12 +DEBUG_FLAGS = -g
  13 +PROF_FLAGS = -p
  14 +PROD_FLAGS = -O0
  15 +DEFINES += -DREAL_4B=real\(4\)
  16 +
  17 +NETCDFINC = /opt/local/netcdf-3.6.1/include
  18 +NETCDFLIBDIR = /opt/local/netcdf-3.6.1/lib
  19 +
  20 +endif
compilers/compiler.IFC 0 → 100755
@@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
  1 +# Set options for the Intel Fortran 95 compiler.
  2 +ifeq ($(FORTRAN_COMPILER),IFC)
  3 +FC=ifc
  4 +DEFINES += -DFORTRAN95
  5 +can_do_F90=true
  6 +F90_to_f90=$(FC) -E $(F90FLAGS) $(EXTRA_FFLAGS) $< > $@
  7 +F90_to_f90=
  8 +MODULES=
  9 +MODULES=-module $(MODDIR)
  10 +EXTRAS = -w95 -e95 -static
  11 +DEBUG_FLAGS = -g -C
  12 +PROF_FLAGS = -qp -p
  13 +PROD_FLAGS = -O3
  14 +DEFINES += -DREAL_4B=real\(4\)
  15 +EXTRA_LIBS += -lPEPCF90 -lpthread
  16 +endif
compilers/compiler.IFORT 0 → 100755
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
  1 +# Set options for the Intel Fortran 95 compiler - ver. 8.
  2 +ifeq ($(FORTRAN_COMPILER),IFORT)
  3 +FC=ifort
  4 +DEFINES += -DFORTRAN95
  5 +can_do_F90=true
  6 +F90_to_f90=
  7 +MODULES=
  8 +MODULES=-module $(MODDIR)
  9 +EXTRAS = -w95 -e95
  10 +EXTRAS = -w95
  11 +DEBUG_FLAGS = -g -C
  12 +PROF_FLAGS = -qp -p
  13 +PROD_FLAGS = -O3
  14 +DEFINES += -DREAL_4B=real\(4\)
  15 +endif
compilers/compiler.NAG 0 → 100755
@@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
  1 +# Set options for the NAG Fortran compiler.
  2 +ifeq ($(FORTRAN_COMPILER),NAG)
  3 +FC=f95nag
  4 +DEFINES += -DFORTRAN95
  5 +can_do_F90=true
  6 +MODULES=-mdir $(MODDIR)
  7 +EXTRAS = -f77
  8 +DEBUG_FLAGS = -g -C=all -O0
  9 +PROF_FLAGS = -pg -O3
  10 +PROD_FLAGS = -O3
  11 +DEFINES += -DREAL_4B=real\(4\)
  12 +endif
compilers/compiler.PGF90 0 → 100755
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
  1 +# Set options for the Portland Group Fortran 90 compiler.
  2 +
  3 +ifeq ($(FORTRAN_COMPILER),PGF90)
  4 +FC = pgf90
  5 +DEFINES += -DFORTRAN90
  6 +#can_do_F90 = false
  7 +can_do_F90 = true
  8 +F90_to_f90 = $(FC) -E $(F90FLAGS) $(EXTRA_FFLAGS) $< > $@
  9 +MODULES = -module $(MODDIR)
  10 +EXTRAS =
  11 +DEBUG_FLAGS = -g -Ktrap=fp -Mbounds
  12 +PROF_FLAGS = -Mprof=func
  13 +PROD_FLAGS = -O0 -r8 -i4 -byteswapio
  14 +DEFINES += -DREAL_4B=real\(4\)
  15 +NETCDFINC = /usr/local/netcdf-3.6.1/include
  16 +NETCDFLIBDIR = /usr/local/netcdf-3.6.1/lib
  17 +
  18 +endif
compilers/compiler.XLF 0 → 100755
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
  1 +# Set options for "xlf90" compiler on AIX systems
  2 +ifeq ($(FORTRAN_COMPILER),XLF)
  3 +FC=xlf90_r
  4 +DEFINES += -DFORTRAN95
  5 +can_do_F90=true
  6 +F90_to_f90=
  7 +MODULES=-qmoddir=$(MODDIR)
  8 +EXTRAS = -q32 -qsuffix=f=f90:cpp=F90
  9 +DEBUG_FLAGS = -d -g -qcheck
  10 +PROF_FLAGS = -g -pg
  11 +PROD_FLAGS = -O3 -qstrict
  12 +DEFINES += -DREAL_4B=real\(4\)
  13 +DEFINES:=-WF,"$(DEFINES)"
  14 +endif
doc/Makefile 0 → 100644
@@ -0,0 +1,154 @@ @@ -0,0 +1,154 @@
  1 +#$Id: Makefile,v 1.13 2007-04-18 07:11:11 kbk Exp $
  2 +#
  3 +# Makefile for making the source code documentation.
  4 +#
  5 +
  6 +SHELL = /bin/sh
  7 +
  8 +SRCDIR = ../src
  9 +
  10 +PROTEXSRC = gotm.tex \
  11 + meanflow.tex \
  12 + turbulence.tex \
  13 + airsea.tex \
  14 + observations.tex \
  15 + output.tex \
  16 + util.tex \
  17 + seagrass.tex \
  18 + bio.tex
  19 +
  20 +TEXSRC = introduction.tex \
  21 + mainIntro.tex \
  22 + meanflowIntro.tex \
  23 + turbulenceIntro.tex \
  24 + airseaIntro.tex \
  25 + observationsIntro.tex \
  26 + outputIntro.tex \
  27 + utilIntro.tex \
  28 + extraIntro.tex \
  29 + cases.tex \
  30 + gotm.bib
  31 +
  32 +
  33 +TEXHTMLSRC = introduction.tex \
  34 + mainIntro.tex \
  35 + meanflowIntroHTML.tex \
  36 + turbulenceIntro.tex \
  37 + airseaIntro.tex \
  38 + observationsIntro.tex \
  39 + outputIntro.tex \
  40 + utilIntroHTML.tex \
  41 + extraIntro.tex \
  42 + cases.tex \
  43 + gotm.bib
  44 +
  45 +
  46 +
  47 +.PHONY : all clean realclean distclean protex \
  48 + a4_dvi letter_dvi html_dvi \
  49 + a4_ps letter_ps html_ps \
  50 + a4_pdf letter_pdf html_pdf \
  51 + html_web
  52 +
  53 +
  54 +all: a4_pdf letter_pdf html_pdf html_web
  55 +
  56 +
  57 +# do the pdf-versions
  58 +a4_pdf: protex a4.pdf
  59 +
  60 +letter_pdf: protex letter.pdf
  61 +
  62 +html_pdf: protex html.pdf
  63 +
  64 +# do the postscript-versions
  65 +a4_ps: protex a4.ps
  66 +
  67 +letter_ps: protex letter.ps
  68 +
  69 +html_ps: protex html.ps
  70 +
  71 +# do the dvi-versions
  72 +a4_dvi: protex a4.dvi
  73 +
  74 +letter_dvi: protex letter.dvi
  75 +
  76 +html_dvi: protex html.dvi
  77 +
  78 +# do the web-version
  79 +html_web: protex html
  80 +
  81 +protex:
  82 + $(MAKE) realclean -C $(SRCDIR)
  83 + $(MAKE) doc -C $(SRCDIR)
  84 +
  85 +a4.dvi: a4.tex $(TEXSRC) $(PROTEXSRC) figures
  86 + latex a4.tex
  87 + bibtex a4
  88 + latex a4.tex
  89 + latex a4.tex
  90 + latex a4.tex
  91 +
  92 +letter.dvi: letter.tex $(TEXSRC) $(PROTEXSRC) figures
  93 + latex letter.tex
  94 + bibtex letter
  95 + latex letter.tex
  96 + latex letter.tex
  97 + latex letter.tex
  98 +
  99 +html.dvi: html.tex $(TEXSRC) $(PROTEXSRC) figures
  100 + latex html.tex
  101 + bibtex html
  102 + latex html.tex
  103 + latex html.tex
  104 + latex html.tex
  105 +
  106 +a4.ps: a4.dvi
  107 + dvips -o $@ a4.dvi
  108 +
  109 +letter.ps: letter.dvi
  110 + dvips -o $@ letter.dvi
  111 +
  112 +html.ps: html.dvi
  113 + dvips -o $@ html.dvi
  114 +
  115 +a4.pdf: a4.ps
  116 + ps2pdf a4.ps
  117 +
  118 +letter.pdf: letter.ps
  119 + ps2pdf letter.ps
  120 +
  121 +html.pdf: html.ps
  122 + ps2pdf html.ps
  123 +
  124 +html: html.dvi
  125 + latex2html -antialias_text -white html.tex
  126 + touch html
  127 +
  128 +pdf_scp: a4.pdf letter.pdf
  129 + scp -r a4.pdf letter.pdf gotm@80.198.12.199:doc/
  130 + touch pdf_scp
  131 +
  132 +html_scp: html
  133 + scp -r html/* gotm@80.198.12.199:html/
  134 + touch html_scp
  135 +
  136 +
  137 +figures:
  138 + wget -nd -nH -q http://www.gotm.net/data_files/gotm-figs-4.0.gz
  139 + tar -xvzf gotm-figs-4.0.gz
  140 + $(RM) gotm-figs-4.0.gz
  141 +
  142 +clean:
  143 + $(RM) *.log *.toc *.aux *.bbl *.blg *.bac *~
  144 +
  145 +realclean: clean
  146 + $(RM) *.dvi *.ps *.pdf
  147 + $(RM) -rf html/
  148 + $(RM) -rf $(PROTEXSRC)
  149 +
  150 +distclean: realclean
  151 + $(RM) *.gz *.zip *.Z
  152 + $(RM) html html_scp pdf_scp
  153 + $(RM) -rf figures
  154 +
doc/README 0 → 100644
@@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
  1 +#
  2 +#$Id: README,v 1.5 2005-07-18 07:56:19 lars Exp $
  3 +#
  4 +
  5 +Currently, there are three versions of the GOTM documentation with the
  6 +names coded as "papertype.filetype". These are:
  7 +
  8 +a4.filetype
  9 +letter.filetype
  10 +html.filetype
  11 +
  12 +"filetype" can be dvi, ps, or pdf. To produce these files type "make
  13 +"papertype_filetype" in this directory. For example,
  14 +
  15 +"make letter_pdf"
  16 +
  17 +will create the documention in US-letter format, which
  18 +can be display with
  19 +
  20 +"acroread letter.pdf".
  21 +
  22 +Similarly, the files "a4.pdf" and "html.pdf" can be produced, where
  23 +"html.pdf" essentially corresponds to the paper version of the
  24 +GOTM web documentation. The web version is produced from the
  25 +latex source code by typing
  26 +
  27 +"make html_web".
  28 +
  29 +The html-pages are created by "latex2html" such that your result
  30 +depends on the variables you have set in ".latex2html-init" in
  31 +your home directory (or their defaults if you don't have this file).
  32 +
  33 +To copy the html-pages to the server type "make html_scp".
  34 +This option is available only to those that have the password.
doc/a4.tex 0 → 100644
@@ -0,0 +1,153 @@ @@ -0,0 +1,153 @@
  1 +%
  2 +%$Id: a4.tex,v 1.5 2007-03-15 07:47:15 kbk Exp $
  3 +%
  4 +
  5 +\documentclass[a4paper,twoside,11pt]{article}
  6 +
  7 +% AMS math and symbols
  8 +\usepackage{amsmath,amsfonts,amssymb,amsbsy,latexsym}
  9 +
  10 +% natural science bibliography
  11 +\usepackage[round]{natbib}
  12 +
  13 +% definitions used in the GOTM-manual
  14 +\input definitions.tex
  15 +
  16 +% graphics
  17 +\usepackage{graphics}
  18 +
  19 +% to make pdf files look OK
  20 +\usepackage{ae}
  21 +
  22 +% set page margins for print
  23 +\setlength{\evensidemargin}{-0.4mm}
  24 +\setlength{\oddsidemargin}{4.6mm}
  25 +\setlength{\textwidth}{155mm}
  26 +
  27 +\pagestyle{myheadings}
  28 +
  29 +\renewcommand{\baselinestretch}{1.0}
  30 +\begin{document}
  31 +
  32 +
  33 +
  34 +% the titlepage
  35 +\begin{titlepage}
  36 +
  37 +
  38 +{\sf \bf \LARGE
  39 + \begin{center}
  40 + Lars Umlauf $\bs \cdot$ Hans Burchard $\bs \cdot$ Karsten Bolding
  41 + \end{center}
  42 +}
  43 +
  44 +\vspace{14mm}
  45 +
  46 +{\sf \bf \Huge
  47 + \begin{center}
  48 + GOTM
  49 + \end{center}
  50 +}
  51 +
  52 +\vspace{6mm}
  53 +
  54 +{\sf \bf \LARGE
  55 + \begin{center}
  56 + Sourcecode \\
  57 + and \\
  58 +Test Case Documentation
  59 + \end{center}
  60 +}
  61 +
  62 +
  63 +\vspace{5mm}
  64 +
  65 +{\sf \bf \Large
  66 + \begin{center}
  67 + Version 4.0
  68 + \end{center}
  69 +}
  70 +
  71 +\vspace{8mm}
  72 +
  73 +\begin{figure}[!h]
  74 + \begin{center}
  75 + \scalebox{0.6}{\includegraphics{figures/mixerA.eps}}
  76 + \end{center}
  77 +\end{figure}
  78 +
  79 +\vspace{7mm}
  80 +
  81 +{\sf \bf \Large
  82 + \begin{center}
  83 + Flow --- Mixing --- Ecosystem dynamics
  84 +\end{center}
  85 +}
  86 +
  87 +
  88 +\end{titlepage}
  89 +
  90 +% table of contents
  91 +\cleardoublepage
  92 +\tableofcontents
  93 +
  94 +% include the section files
  95 +% the introduction. All files
  96 +% ending with 'Intro.tex' are hand-made,
  97 +% all others come from 'ProTeX'
  98 +
  99 +\cleardoublepage
  100 +
  101 +\include{introduction}
  102 +
  103 +\cleardoublepage
  104 +\include{mainIntro}
  105 +\include{gotm}
  106 +
  107 +\cleardoublepage
  108 +\include{meanflowIntro}
  109 +\include{meanflow}
  110 +
  111 +\cleardoublepage
  112 +\include{turbulenceIntro}
  113 +\include{turbulence}
  114 +
  115 +\cleardoublepage
  116 +\include{airseaIntro}
  117 +\include{airsea}
  118 +
  119 +\cleardoublepage
  120 +\include{observationsIntro}
  121 +\include{observations}
  122 +
  123 +\cleardoublepage
  124 +\include{outputIntro}
  125 +\include{output}
  126 +
  127 +\cleardoublepage
  128 +\include{utilIntro}
  129 +\include{util}
  130 +
  131 +\cleardoublepage
  132 +\include{bioIntro}
  133 +\include{bio}
  134 +
  135 +\cleardoublepage
  136 +\include{extraIntro}
  137 +\include{seagrass}
  138 +\include{sediment}
  139 +
  140 +\cleardoublepage
  141 +\include{guiIntro}
  142 +
  143 +\cleardoublepage
  144 +\include{cases}
  145 +
  146 +% Bibliography with BibTeX:
  147 +\cleardoublepage
  148 +\bibliographystyle{agu}
  149 +\addcontentsline{toc}{section}{Bibliography}
  150 +\bibliography{gotm}
  151 +
  152 +
  153 +\end{document}
doc/airseaIntro.tex 0 → 100644
@@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
  1 +%
  2 +%$Id: airseaIntro.tex,v 1.2 2005-07-06 14:11:27 kbk Exp $
  3 +%
  4 +
  5 +\section{Air--Sea interaction \label{sec:airseaIntro}}
  6 +
  7 +\subsection{Introduction}
  8 +
  9 +This module provides the surface forcing for GOTM. For all dynamic
  10 +equations, surface boundary conditions need to be specified. For the
  11 +momentum equations described in \sect{sec:uequation} and
  12 +\sect{sec:vequation}, these are the surface momentum fluxes $\tau_x^s$ and
  13 +$\tau_y^s$ in N\,m$^{-2}$. For the temperature
  14 +equation described in \sect{sec:temperature}, it is the total surface heat flux,
  15 +\begin{equation}
  16 + Q_{tot}=Q_E+Q_H+Q_B
  17 +\end{equation}
  18 +in W\,m$^{-2}$ that has to be determined\footnote{Note, that $Q_{tot}$
  19 +has to be divided by the mean density and the specific heat capacity
  20 +to be used as a boundary condition in \eq{TEq}, since this equation is
  21 +formulated in terms of the temperature, and the the internal
  22 +energy}. The total surface heat flux $Q_{tot}$ is calculated as the
  23 +sum of the latent heat flux $Q_E$, the sensible heat flux $Q_H$, and
  24 +the long wave back radiation $Q_B$. In contrast to the total surface
  25 +heat flux $Q_{tot}$, the net short wave radiation at the surface,
  26 +$I_0$, is not used as a boundary condition but as a source of heat, as
  27 +calculated by means of equation \eq{Iz}, see \cite{PaulsonSimpson77}.
  28 +For the salinity equation described in \sect{sec:salinity}, the fresh
  29 +water fluxes at the surface are given by the difference
  30 +of the evaporation and the
  31 +precipitation, $p_e$, given in m\,s$^{-1}$, see also the surface boundary
  32 +condition for salinity, \eq{S_sbc}.
  33 +The way how boundary conditions for the
  34 +transport equations of turbulent quantities are derived, is discussed
  35 +in \sect{sec:turbulenceIntro}.
  36 +
  37 +There are basically two ways of calculating the surface heat and
  38 +momentum fluxes implemented into GOTM. They are either prescribed (as
  39 +constant values or to be read in from files) or calculated on the
  40 +basis of standard meteorological data which have to be read in from
  41 +files. The necessary parameters are
  42 +the wind velocity vector at 10 m height in m\,s$^{-1}$,
  43 +the sea surface temperature (SST in Celsius),
  44 +air temperature in Celsius), air humidity (either as relative humidity
  45 +in \%, as wet bulb temperature or as dew point
  46 +temperature in Celsius) and air pressure (in hectopascal), each at 2 m height
  47 +above the sea surface, and
  48 +the wind velocity vector at 10 m height in m\,s$^{-1}$.
  49 +Instead of the observed SST,
  50 +also the SST from the model may be used. For the calculation of these
  51 +fluxes, the bulk formulae of \cite{Kondo75} or \cite{Fairalletal96}
  52 +are used.
doc/bioIntro.tex 0 → 100644
@@ -0,0 +1,374 @@ @@ -0,0 +1,374 @@
  1 +\section{Biogeochemical models \label{sec:bio-intro}}
  2 +
  3 +
  4 +In this module, biogeochemical models are implemented,
  5 +in a two-way coupled mode.
  6 +
  7 +\subsection{Mathematical formulation}\label{sec:bio-math}
  8 +
  9 +The general structure of a biogeochemical model with
  10 +$I$ state variables expressed as ensemble averaged
  11 +concentrations is given by the
  12 +following set of equations:
  13 +\begin{equation}\label{FullSystem}
  14 + \partial_t c_i + \partial_z
  15 +\left(m_i c_i - K_V \partial_z c_i\right)
  16 += P_i(\vec{c}) -D_i(\vec{c}), \;\; i = 1,\ldots,I, \quad j,k = 1,\ldots,3,
  17 +\end{equation}
  18 +with $c_i$ denoting the concentrations of state variables.
  19 +Furthermore, $m_i$ represents the autonomous motion of the ecosystem
  20 +component $c_i$ (e.g. sinking or active swimming),
  21 +and $K_V$ represents the eddy diffusivity.
  22 +The source and sink terms of the ecosystem component
  23 +$c_i$ are summarised in $P_i(\vec{c})$ and $D_i(\vec{c})$, respectively.
  24 +For three-dimensional models, advection with the flow field
  25 +and horizontal advection would have to be accounted for additionally.
  26 +In many biogeochemical models, some of the state variables have positive
  27 +lower limits. In order to account for this,
  28 +we defined all state variables as the difference between
  29 +the actual value and their lower limit, such that
  30 +(for non-negative state variables only)
  31 +the model value $c_i$ represents a concentration of
  32 +$c_i+c_i^{\min}$ where $c_i^{\min}$ is the lower limit of $c_i$.
  33 +
  34 +The gradient term on the left hand side of (\ref{FullSystem})
  35 +is the total transport,
  36 +for which typically surface and bottom boundary conditions
  37 +\begin{equation}
  38 +K_V\partial_z c_i\big|_{z=\eta} = F^s_i,\qquad
  39 +K_V\partial_z c_i\big|_{z=-H} = -F^b_i,
  40 +\end{equation}
  41 +with surface and bottom fluxes, $F^s_i$ and $F^b_i$, respectively,
  42 +are applied.
  43 +The right hand side denotes the reaction terms,
  44 +which are composed of contributions
  45 +$d_{i,j}(\vec{c})$, which represent reactive fluxes from
  46 +$c_i$ to $c_j$, and in turn, $p_{i,j}(\vec{c})$ are reactive fluxes from
  47 +$c_j$ received by $c_i$:
  48 +\begin{equation}\label{eq:am:a}
  49 +P_i(\vec{c}) = \sum^I_{j=1} p_{i,j}(\vec{c}), \;\;\;\;
  50 +D_i(\vec{c}) = \sum^I_{j=1} d_{i,j}(\vec{c}),
  51 +\end{equation}
  52 +with $d_{i,j}\geq 0$ for all $i,j$ and $p_{i,j}\geq 0$
  53 +for all $i\not= j$.
  54 +
  55 +We basically consider two types of ecosystem models.
  56 +In the simple NPZ (nutrient-phytoplankton-zooplankton) type models
  57 +all state variables are based on the same measurable unit
  58 +such as [mmol N m$^{-3}$] for nitrogen-based models.
  59 +In such NPZ models the reactive terms do only exchange mass
  60 +between state variables with
  61 +\begin{equation}\label{eq:am:symmetry}
  62 +p_{i,j}(\vec{c}) = d_{j,i}(\vec{c}), \quad \mbox{ for } i \not= j
  63 +\quad\mbox{ and }\quad
  64 +p_{i,i}(\vec{c}) = d_{i,i}(\vec{c})=0, \quad \mbox{ for } i = j.
  65 +\end{equation}
  66 +Neglecting for a moment all transport terms, it is easily seen that this
  67 +simple type of
  68 +model is conserving mass:
  69 +\begin{equation}
  70 +\begin{array}{l}
  71 +\displaystyle
  72 +d_t\left(\sum_{i=1}^I c_i \right) =
  73 +\sum_{i=1}^I\left( P_i(\vec{c})- D_i(\vec{c})\right) =
  74 +\displaystyle
  75 +\sum_{i=1}^I\sum_{j=1}^I\left(p_{i,j}(\vec{c}) - d_{i,j}(\vec{c})\right)
  76 += \sum_{i=1}^I\left(p_{i,i}(\vec{c}) - d_{i,i}(\vec{c})\right)=0.
  77 +\end{array}
  78 +\end{equation}
  79 +The NPZD model (see section \ref{sec:bio-npzd}) and the
  80 +\cite{Fashametal1990} model discussed in section \ref{sec:bio-fasham}
  81 +are such fully conservative models.
  82 +
  83 +In many biogeochemical models most state variables are known to be positive
  84 +or at least non-negative quantities. For non-negative initial conditions
  85 +$c_i(0) \geq 0$ one can easily show by a simple
  86 +contradiction argument that the condition
  87 +\begin{equation}\label{eq:am:d1}
  88 +d_{i,j}(\vec{c}) \longrightarrow 0 \;\; \mbox{for} \;\; c_i \longrightarrow 0
  89 +\end{equation}
  90 +guarantees that the quantities
  91 +$c_i(t) \geq 0$, remain non-negative for all $t$.
  92 +A typical example is $d_{i,j}(\vec{c}) = f(\vec{c}) c_i$ with a non-negative,
  93 +bounded
  94 +function $f$ which might depend on all $c_i$.
  95 +
  96 +However, for many applications such simple models are
  97 +too restrictive. Often different spatial references
  98 +are involved for the state variables, such as the
  99 +detritus concentration in the water column, measured in [mmol N m$^{-3}$]
  100 +and the fluff layer concentration at the bed, measured in [mmol N m$^{-2}$].
  101 +Many biogeochemical processes
  102 +involve more than two substances such as the photosynthesis
  103 +where different nutrients (e.g.\ nitrate and phosphorus) are taken
  104 +up by phytoplankta and oxygen is produced. The ratios between these
  105 +substances dissipated or produced are usually fixed, in the example
  106 +of photosynthesis uptake of 16 mmol m$^{-3}$ nitrate is
  107 +connected to an uptake of 1 mmol m$^{-3}$ phosphorus
  108 +and a production of 8.125 mmol m$^{-3}$ oxygen.
  109 +
  110 +For state variables which may
  111 +be negative (such as oxygen concentration
  112 +which also includes oxygen demand units,
  113 +all sink and source
  114 +terms are added up in the production terms
  115 +$p_{i,j}$, with a negative sign for the sink terms.
  116 +For the \cite{Neumannetal2002} model discussed in sections
  117 +\ref{sec:bio-iow},
  118 +further deviations from the conservation formulation are introduced since
  119 +biogeochemical reactions include substances which are not budgeted by the
  120 +model (mostly because they are assumed to be not limiting).
  121 +One typical example is nitrogen fixated by blue-green algae which
  122 +builds up biomass by using atmospheric nitrogen which is later recycled to
  123 +nitrate. Such non-conservative terms are lumped into the diagonal terms
  124 +$p_{i,i}$ and $d_{i,i}$.
  125 +
  126 +\subsection{Numerical aspects}\label{sec:bio-num}
  127 +
  128 +Two basic aspects which are included in the mathematical formulation for
  129 +the biogeochemical equations discussed in section \ref{sec:bio-math}
  130 +are to be reproduced by the numerical methods applied: conservation and
  131 +positivity. Another constraint for the choice
  132 +of numerical methods is that they should be sufficiently stable and accurate.
  133 +In order to facilitate this, a split method is applied
  134 +separating the numerical solution of the transport part
  135 +(advection, diffusion) and the reaction part.
  136 +By doing so, we take splitting errors into account which should however
  137 +be not significant as long as the typical reaction time scales are
  138 +much longer than the constant model time step $\Delta t$.
  139 +
  140 +In the transport step
  141 +in which the right hand side is set to zero,
  142 +finite volume discretisations
  143 +are used such that conservation of mass is guaranteed.
  144 +The spatial discretisation is carried out by separating the water column
  145 +into $N$ not necessarily equidistant intervals of height $h_k$.
  146 +The state variables, represented by layer-averaged values,
  147 +are located in the centres of these intervals, the advective and diffusive
  148 +fluxes are located at the interfaces in between.
  149 +The transport step itself is subject to operator splitting.
  150 +The autonomous motion of the state variables (including sinking or
  151 +rising due to negative or positive buoyancy, respectively)
  152 +is discretised by means of
  153 +TVD (Total Variation
  154 +Diminishing) advection schemes, for which several choices are
  155 +available, see \cite{Pietrzak98}.
  156 +These TVD schemes are positivity conserving due to their TVD
  157 +property.
  158 +The most accurate among those
  159 +schemes is the so-called
  160 +PDM-limited P$_2$ scheme which has been described in detail
  161 +by \cite{Leonhard91}.
  162 +
  163 +For the diffusion, a
  164 +central in space scheme is used which is slightly biased towards
  165 +a backward in time scheme in order to avoid asymptotic instability
  166 +(see \cite{Samarskij84}). By doing so, positivity is obtained and the schemes
  167 +are practically second order in time and space.
  168 +
  169 +With the discretisations of the transport terms given above,
  170 +accuracy, positivity and conservation of the state variables are
  171 +guaranteed by means of standard schemes. For the reaction terms,
  172 +\cite{Burchardetal2003b} recently developed schemes which also fulfil these
  173 +requirements.
  174 +Due to the operator split between transport and reaction terms,
  175 +only ordinary differential equations (ODEs)
  176 +have to be treated numerically for the latter terms.
  177 +For the case of conservative biogeochemical models with
  178 +$p_{i,i}=d_{i,i}=0$, these schemes are identical to those given
  179 +by \cite{Burchardetal2003b}.
  180 +For $p_{i,i}\not= 0$, some modifications are necessary.
  181 +Three classes of schemes are considered:
  182 +Explicit schemes such as the Euler-forward scheme and second- and
  183 +fourth-order Runge-Kutta schemes (see section \ref{sec:ode-solver}).
  184 +These schemes are known to be conservative, but for
  185 +sufficiently large time steps they may compute negative values
  186 +of state variables also for non-negative state variables.
  187 +This may be avoided by small time stepping, which however usually
  188 +leads to an enormous increase of the computational effort such that
  189 +these schemes lose their practical relevance in this context.
  190 +In order to solve this problem,
  191 +\cite{Patankar80} had suggested the first-order in time
  192 +positive definite scheme
  193 +(\ref{eq:am:patankar}), and \cite{Burchardetal2003b} have extended this
  194 +to second order, see (\ref{eq:am:PRK}).
  195 +However, these schemes are not conservative, since
  196 +source and sink terms are numerically treated in a different way.
  197 +Fully conservative and non-negative schemes in first- and second-oder
  198 +in time have thus been suggested and tested for
  199 +ordinary differential equations by \cite{Burchardetal2003b},
  200 +with $p_{i,i}=d_{i,i}=0$ in equations.\ (\ref{eq:am:MP}) and (\ref{eq:am:MPRK})
  201 +in section \ref{sec:ode-solver}.
  202 +This equal numerical treatment of sources and sinks
  203 +results in implicit linear systems of equations.
  204 +Since only ordinary differential equations are to be solved in each
  205 +grid point, these systems have small dimensions, for example $I=7$ for
  206 +the \cite{Fashametal1990} model (see section \ref{sec:bio-fasham}) and
  207 +$I=10$ for the \cite{Neumannetal2002} model
  208 +(see section \ref{sec:bio-iow}).
  209 +Thus, these linear systems may be directly solved
  210 +by Gaussian elimination schemes.