OBCS tutorial: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
=== Introduction === | === Introduction === | ||
The purpose of this tutorial is to introduce you to the OBCS (Open Boundaries) and PTRACERS (Passive Tracers) modules. It assumes that you're comfortable building and running the model, and using your chosen method of data visualization (gcmpy, ParaView, VisIt, etc.) It's recommended to run the other two tutorials first. | The purpose of this tutorial is to introduce you to the <code>OBCS</code> (Open Boundaries) and <code>PTRACERS</code> (Passive Tracers) modules. It assumes that you're comfortable building and running the model, and using your chosen method of data visualization (gcmpy, ParaView, VisIt, etc.) It's recommended to run the other two tutorials first. | ||
=== General Considerations=== | === General Considerations=== | ||
Remember that when using OBCS, opening or closing a boundary is a compile-time option which must be declared in OBCS_OPTIONS.h. In addition, every boundary needs a .bin file for each tracer diagnostic you're using (e.g. temperature, passive tracer). Failure to provide such a file will likely cause the model to break. Finally, with PTRACERS, the advection scheme for each tracer needs to be set manually in data.ptracers to match the one you're using, usually 33 or 77. Using differing advection schemes causes strange behavior and sometimes NaNs. | Remember that when using <code>OBCS</code>, opening or closing a boundary is a compile-time option which must be declared in <code>OBCS_OPTIONS.h</code>. In addition, every boundary needs a .bin file for each tracer diagnostic you're using (e.g. temperature, passive tracer). Failure to provide such a file will likely cause the model to break (an exception seems to be passive tracer in an outflow). Finally, with <code>PTRACERS</code>, the advection scheme for each tracer needs to be set manually in <code>data.ptracers</code> to match the one you're using, usually 33 or 77. Using differing advection schemes causes strange behavior and sometimes NaNs. | ||
==Case 1: Warm inflow== | ==Case 1: Warm inflow== | ||
This tutorial uses a very simple setup, with an inflow in the north boundary and an outflow in the east boundary. The lake floor is sloped downwards in the direction of the outflow. Initial temperature is stratified between 10 and 20 °C, and the inflow temperature is 25 °C. The inflow is also configured to have some passive tracer coming in. Finally, wind is added in the direction of the outflow (the same script as in the SEAICE tutorial is used with only minor changes). | This tutorial uses a very simple setup, with an inflow in the north boundary and an outflow in the east boundary. The lake floor is sloped downwards in the direction of the outflow. Initial temperature is stratified between 10 and 20 °C, and the inflow temperature is 25 °C. The inflow is also configured to have some passive tracer coming in. Finally, wind is added in the direction of the outflow (the same script as in the <code>SEAICE</code> tutorial is used with only minor changes). | ||
Take a look at the python scripts <code>inflow_outflow.py</code> and <code>initial_tracers.py</code> You'll need to run these (as well as the other python scripts in this folder) to generate the .bin files for the model to read. | Take a look at the python scripts <code>inflow_outflow.py</code> and <code>initial_tracers.py</code> You'll need to run these (as well as the other python scripts in this folder) to generate the .bin files for the model to read. Note how the inflow and outflow temperatures are set for the entirety of the boundary. Whether the boundary is actually open depends on | ||
==Case 2: Cold inflow== | ==Case 2: Cold inflow== | ||
==Case 3: Adding SEAICE== | ==Case 3: Adding SEAICE== | ||
Revision as of 16:10, 2 February 2019
Introduction
The purpose of this tutorial is to introduce you to the OBCS
(Open Boundaries) and PTRACERS
(Passive Tracers) modules. It assumes that you're comfortable building and running the model, and using your chosen method of data visualization (gcmpy, ParaView, VisIt, etc.) It's recommended to run the other two tutorials first.
General Considerations
Remember that when using OBCS
, opening or closing a boundary is a compile-time option which must be declared in OBCS_OPTIONS.h
. In addition, every boundary needs a .bin file for each tracer diagnostic you're using (e.g. temperature, passive tracer). Failure to provide such a file will likely cause the model to break (an exception seems to be passive tracer in an outflow). Finally, with PTRACERS
, the advection scheme for each tracer needs to be set manually in data.ptracers
to match the one you're using, usually 33 or 77. Using differing advection schemes causes strange behavior and sometimes NaNs.
Case 1: Warm inflow
This tutorial uses a very simple setup, with an inflow in the north boundary and an outflow in the east boundary. The lake floor is sloped downwards in the direction of the outflow. Initial temperature is stratified between 10 and 20 °C, and the inflow temperature is 25 °C. The inflow is also configured to have some passive tracer coming in. Finally, wind is added in the direction of the outflow (the same script as in the SEAICE
tutorial is used with only minor changes).
Take a look at the python scripts inflow_outflow.py
and initial_tracers.py
You'll need to run these (as well as the other python scripts in this folder) to generate the .bin files for the model to read. Note how the inflow and outflow temperatures are set for the entirety of the boundary. Whether the boundary is actually open depends on