&EPA
United States
Environmental
Protection Agency
EPA/600/B-23/215| September 2023 | www.epa.gov/ord
Coastal Generalized
Ecosystem Model
(CGEM)
VERSION 1.0
USER GUIDE
Office of Research and Development
Center for Environmental Measurement and Modeling
-------
EPA/600/B-23/215 | September 2023 | www.epa.gov/ord
Coastal Generalized
Ecosystem Model
(CGEM)
VERSION 1.0
USER GUIDE
U.S. EPA Office of Research and Development
Center for Environmental Measurement and Modeling
-------
Authors and Reviewers
Federal Authors
Brandon Jarvis, M.S.
U.S. EPA
Office of Research and Development
Center for Environmental Measurement and Modeling (CEMM)
Gulf Breeze, Florida
James Pauer, Ph.D.
U.S. EPA
Office of Research and Development
Center for Computational Toxicology and Exposure (CCTE)
Duluth, MN
Contract Authors
Cody Simmons, Ph.D.
Wilson Melendez, Ph.D.
General Dynamics Information Technology
US EPA, 109 T.W. Alexander Dr.
Research Triangle Park, NC 27711
Support for CGEM provided by
U.S. EPA Office of Research and Development
This User Guide was created under the Agency's Quality Assurance (QA) program for
environmental information, with an approved Quality Assurance Project Plan (QAPP) for
Enhancements to Coastal Generalized Ecosystem Model (CGEM), L-HEEAD-0032189-QP-1-2
(approved 9/30/2022).
Page 2 of 64
-------
Contents
1.0 OVERVIEW 6
1.1 WhatisCGEM 6
1.2 Water Quality Models Included in CGEM 6
1.2.1 CGEM 6
1.2.2 WQEM 7
1.3 Hydrodynamic Models Usable by CGEM 7
1.3.1 EFDC 7
1.4 Other Included Models 7
1.4.1 Sediment Diagenesis Model (SDM) 7
1.5 About This User Guide 7
1.6 How EPA Uses CGEM 8
1.7 History of CGEM Development 8
1.8 What's New in CGEM 2.1 9
1.9 Citing CGEM Results 9
1.10 CGEM Resources 9
1.10.1 CGEM Website 9
1.10.2 CGEM Support 9
2.0 GETTING AND BUILDING CGEM 10
2.1 System Requirements 10
2.2 Download CGEM source code 10
2.2.1 Download as a zip file 10
2.2.2 Clone GitHub Repository 10
2.2.3 Latest Release Package 10
2.3 Compilation 10
2.3.1 Serial Compilation 10
2.3.2 Parallel Compilation 11
2.4 Troubleshooting 11
3.0 MODEL INPUTS AND SWITCHES 12
3.1 Required Input Files 12
3.2 Input File Settings 14
3.2.1 CGEM Input File 14
3.2.2 WQEM Input File 19
3.3 ModelDim.txt 26
3.4 Executable Command Line Arguments 27
4.0 MODEL OUTPUT 28
4.1 CGEM 28
4.1.1 cgem.000000.nc 28
4.1.2 CGEM_Dailylntegrated_Rates.nc 30
4.2 WQEM 31
4.2.1 WQEM.000000.nc 31
5.0 TUTORIALS: USING CGEM 33
5.1 Overview 33
5.2 0-D - Single Cell Example 33
5.2.1 Description 33
5.2.2 Files Required 33
5.2.3 Running the simulation 34
5.2.4 Viewing Results 34
5.3 1-D - Vertical Column of Cells 34
5.3.1 Description 34
5.3.2 Files Required 34
5.3.3 Running the simulation 35
Page 3 of 64
-------
5.3.4 Viewing Results 35
5.4 2-D - Area of Cells (Single Layer) 36
5.4.1 Description 36
5.4.2 Files Required 36
5.4.3 Running the simulation 37
5.4.4 Viewing Results 38
5.5 3-D-Full 3-D Grid of Cells 38
5.5.1 Description 38
5.5.2 Files Required 38
5.5.3 Running the simulation 39
5.5.4 Viewing Results 40
6.0 OTHER SCRIPTS AND UTILITIES 41
6.1 EFDC Utility 41
6.2 R Scripts 41
6.2.1 0-D Scripts 41
6.2.2 1-D Scripts 41
6.2.3 2-D & 3-D Scripts 42
6.2.4 Mass Balance Scripts 42
7.0 REFERENCES 44
APPENDIX A: NETCDF INPUT FILE METADATA 45
A.1 Hydrodynamic Data 45
A.1.1 U Flows 45
A.1.2 V Flows 45
A.1.3 W Flows 46
A.1.4 Vertical Mixing Coefficients 47
A.1.5 Surface Elevation 47
A.1.6 Volume 48
A.1.7 Water Depth 49
A.1.8 Layer Depth 49
A.1.9 Temperature 50
A.1.10 Salinity 51
A.2 River Loads 51
A.3 Boundary Conditions 52
APPENDIX B: CGEM DIRECTORY STRUCTURE 54
Page 4 of 64
-------
Abbreviations
CGEM
Coastal Generalized Ecosystem Model
DIC
Dissolved Inorganic Carbon
DIN
Dissolved Inorganic Nitrogen
DIP
Dissolved Inorganic Phosphorus
DOC
Dissolved Organic Carbon
DOP
Dissolved Organic Phosphorus
DON
Dissolved Organic Nitrogen
DSi
Dissolved Silica
EFDC
Environmental Fluid Dynamics Code
FVCOM
Finite Volume Community Ocean Model
GOMDOM
Gulf of Mexico Dissolved Oxygen Model
HYCOM
Hybrid Coordinate Ocean Model
LOC
Labile Organic Carbon
LON
Labile Organic Nitrogen
LOP
Labile Organic Phosphorus
ROC
Refractory Organic Carbon
RON
Refractory Organic Nitrogen
WQEM
Water Quality Eutrophication Model
Page 5 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
1.0 Overview
The U.S. Environmental Protection Agency (EPA) Coastal Generalized Ecosystem Model
(CGEM) is a dynamic three-dimensional ecosystem model with functionality to simulate
biogeochemical processes of coastal, estuarine, and freshwater ecosystems. Originally
developed to address hypoxia in the northern Gulf of Mexico, CGEM has been adapted
for implementation in a diverse range of aquatic ecosystems using customizable spatial
and temporal resolutions. The CGEM codebase includes numerous formulation options
for simulating ecosystem processes and also provides optional model kinetics used in the
LM3 and Gulf of Mexico Dissolved Oxygen Model (GoMDOM) eutrophication models,
hereafter referred to as the Water Quality Eutrophication Model (WQEM).
CGEM includes unlimited number of phytoplankton and zooplankton functional types, six
classes of organic matter, and a state-of-the-art optical model for computing light
attenuation based on inherent optical properties. CGEM also utilizes Droop nutrient
kinetics, offering flexible internal cell nutrient quotas and uptake rates for more realistic
phytoplankton nutrient limitation. CGEM includes an optional sediment diagenesis model
for simulation of oxygen and nutrient fluxes from sediments, as well as simulation of
carbonate chemistry (including pH, DIC, and alkalinity) for acidification and climate
change analysis. As open-source code CGEM allows users to add or modify CGEM
formulations as required and provides easy access to data via open-source NetCDF
formats. CGEM also includes a utility facilitating linkage with the commonly applied EPA's
Environmental Fluid Dynamics Code (EFDC) hydrodynamic model. The CGEM model is
also parallelized to improve mode runtime performance.
1.1 What is CGEM
CGEM is a parallelized community ecosystem model that includes multiple
biogeochemical formulations that can be run with the following options:
• 0D - a user-defined single cell
• 1D - a vertical column of cells
• 2D - an area of cells (single cell depth)
• 3D - a fully 3-dimensional volume of cells
CGEM was designed to address eutrophication, dissolved oxygen, and acidification
dynamics in coastal and freshwater ecosystems. CGEM simulates biogeochemical
processes regulating carbon, oxygen, nutrients, phytoplankton and zooplankton, and
includes numerous model formulations and variable phytoplankton functional types that
can be modified based on site specific model requirements. CGEM also includes a full
sediment diagenesis model as well as formulations representing carbonate chemistry and
pH necessary to address acidification and global climate change.
1.2 Water Quality Models Included in CGEM
CGEM includes two water quality modules that are available to the user within a single
codebase. Users can switch between CGEM and WQEM model formulations based on
specific modeling needs.
1.2.1 CGEM
CGEM is a biogeochemical, lower trophic level ecosystem model that simulates the
biogeochemical processes regulating carbon, oxygen, nutrients, phytoplankton, and
Page 6 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
zooplankton state variables. CGEM is based on the biogeochemical equations described
in Eldridge and Roelke (2010). CGEM utilizes Droop nutrient kinetics and includes
multiple phytoplankton and zooplankton functional types, four classes of organic matter in
particulate and dissolved forms, and numerous formulation options for water column and
sediment processes. A full description of CGEM, including state variables and model
formulations, is provided in the CGEM Model Theory documentation.
1.2.2 WQEM
WQEM is an advanced eutrophication model developed based on the kinetic equations
used in the he Corps of Engineers Water Quality Integrated Compartment Model (CE-
QUAL-ICM) (Cerco and Cole, 1995). WQEM simulates 18 primary state variables that are
common to both Monod and Droop kinetics, 4 Droop-specific state variables, and 1 tracer
state variable. A full description of state variables and kinetic equations used in WQEM
are provided in the WQEM Model Theory Documentation.
1.3 Hydrodynamic Models Usable by CGEM
1.3.1 EFDC
The Environmental Fluid Dynamics Code (EFDC) is a multifunctional surface water
modeling system. EFDC has been applied to over 100 water bodies including rivers,
lakes, reservoirs, wetlands, estuaries, and coastal ocean regions in support of
environmental assessment and management and regulatory requirements.
EFDC is a state-of-the-art hydrodynamic model that can be used to simulate aquatic
systems in one, two, and three dimensions. It has evolved over the past two decades to
become one of the most widely used and technically defensible hydrodynamic models in
the world. EFDC uses stretched or sigma vertical coordinates and Cartesian or
curvilinear, orthogonal horizontal coordinates to represent the physical characteristics of
a waterbody. It solves three-dimensional, vertically hydrostatic, free surface, turbulent
averaged equations of motion for a variable-density fluid. Dynamically coupled transport
equations for turbulent kinetic energy, turbulent length scale, salinity and temperature are
also solved. The EFDC model allows for drying and wetting in shallow areas by a mass
conservation scheme. The EFDC model and associated user documentation are
available for download online (https://www.epa.gov/ceam/environmental-fluid-dynamics-
code-efdc).
1.4 Other Included Models
1.4.1 Sediment Diagenesis Model (SDM)
CGEM includes an optional sediment diagenesis model by Eldridge and Roelke (2010).
The diagenesis equations are run in parallel for the water quality model for simulation of
benthic organic matter mineralization, including nutrient, oxygen, and carbonate fluxes.
1.5 About This User Guide
The aim of this user guide is to get you up and running with the CGEM code.
CGEM is a project under active and ongoing development, and uses a mix of Linux,
Wndows, and open-source technologies, such as Git and R.
Page 7 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
A description of model formulations and equations is provided in separate
documentation. This guide will not describe the scientific research supporting the codes.
1.6 How EPA Uses CGEM
EPA developed CGEM as a state-of-the-art water quality model to assess northern Gulf
of Mexico hypoxia and to predict ecosystem response to reduced nutrient scenarios.
These efforts have resulted in numerous publications that address a range of topics
related to eutrophication and hypoxia in the northern Gulf of Mexico and beyond,
including:
• Effects of nutrient boundaries on primary production (Pauer et. al., 2016)
• Effects of model boundary conditions and river loads on hypoxia (Feist et. al.,
2017)
• Model parameter sensitivity and identifiability (Beck et. al., 2018)
• Effects of model boundary conditions and river loads on hypoxia (Feist et. al.,
2017)
• Effects of climate change on Gulf hypoxia (Lehrter et. al., 2017)
• Spatiotemporal carbon dynamics controlling hypoxia (Jarvis et. al., 2020)
• Impact of model structure on simulation of hypoxia (Pauer et. al., 2020)
• Hypoxic zone effects on State water quality (Jarvis et. al., 2021)
• Intermodel comparison of simulated nutrient load reduction response (Jarvis et.
al., 2022)
• Nearshore phosphorus dynamics in Lake Ontario (Pauer et. al., 2022)
• Diel oxygen dynamics in shallow estuaries (Jarvis et. al., 2023 [in review])
Future CGEM development and application will include integration with the U.S. Navy's
Hybrid Coordinate Ocean Model (HYCOM) to address climate change effects on northern
Gulf of Mexico hypoxia.
1.7 History of CGEM Development
CGEM's initial development began in 2009 as a tool for EPA to assess Gulf hypoxia and
help inform nutrient management policy. CGEM was originally developed using the model
of Eldridge and Roelke (2010), with numerous critical updates including dynamic time-
variable computation and application of the model to a three-dimensional grid.
Since its inception CGEM has been applied to evaluate spatiotemporal hypoxia dynamics
and the underlying mechanisms governing formation and maintenance of the seasonal
hypoxic zone.
CGEM and WQEM have also been utilized for a comparison of model performance and
outcomes in forecasting ecosystem recovery from proposed nutrient management
policies.
In 2015 the CGEM model code was adapted for implementation beyond the Gulf of
Mexico in formats ranging from steady state 0-dimensional models to full 3-dimensional
models indirectly coupled to EFDC hydrodynamics.
In 2020 this new model code was parallelized to improve model runtime performance.
Initial public release of CGEM includes all advancements in model formulations and code
performance updates to allow full functionality and flexibility to the user.
Page 8 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
1.8 What's New in CGEM 2.1
Initial public release of CGEM and associated utilities includes all available model
updates to date. Future releases of updated versions will include expanded descriptions
of added functionality.
1.9 Citing CGEM Results
We suggest the following for citing CGEM:
CGEM (Coastal Generalized Ecosystem Model) is a biogeochemical, lower trophic
level ecosystem model based on the biogeochemical equations described in Eldridge
and Roelke (2010) with enhancements including a sediment diagenesis model,
equations governing carbonate chemistry, and linkage with Environmental Fluid
Dynamics Code (EFDC) hydrodynamic models.
Eldridge, P. M., and Roelke, D. L. (2010). Origins and scales of hypoxia on the
Louisiana shelf: Importance of seasonal plankton dynamics and river nutrients and
discharge, Ecological Modelling, 221, 1028-1042,
http://dx.doi.Org/10.1016/i.ecolmodel.2009.04.054.
1.10 CGEM Resources
1.10.1 CGEM Website
CGEM is available for download from the Center for Exposure Assessment Modeling
CCEAM') website.
1.10.2 CGEM Support
Technical support for CGEM, including questions regarding source code, utilities, and
documentation, should be submitted through the Center for Exposure Assessment
Modeling (CEAM) website.
Page 9 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
2.0 Getting and Building CGEM
2.1 System Requirements
• Linux operating system
• Fortran compiler (either Intel or GNU Fortran compilers are recommended)
• Currently using Intel 18.0.2 and IntelMPI v5.0.3.049 on Atmos
• NetCDF v4 or greater (https://downloads.unidata.ucar.edu/netcdf/)
• CGEM currently uses NetCDF v4.6.3 on Atmos
• PnetCDF (for parallel compilation)
• CGEM currently uses pNetCDF v1.9.0 on Atmos
2.2 Download CGEM source code
CGEM source code is available for download from the CGEM GitHub repository at
https://aithub.com/USEPA/CGEM. Accessing the code requires a GitHub account.
2.2.1 Download as a zip file
A zip file of the source code is available at
https://qithub.com/USEPA/CGEM/archive/refs/heads/master.zip.
2.2.2 Clone GitHub Repository
The Git repository may be cloned by using:
https://oithub.com/USEPA/CGEM.oit for HTTPS
or
qit@qithub.com:USEPA/CGEM.qit for SSH
2.2.3 Latest Release Package
The latest full release package of the source code can be downloaded from the EPA
CEAM website.
2.3 Compilation
2.3.1 Serial Compilation
Use the Makefile_serial_gen file as a template.
1. Modify Makefile_serial_gen as needed for your specific compiler, libraries, etc. in the
"User Modifiable Section" of the makefile. The following examples are for both Intel
and GNU Fortran compilers:
• F90 - specify compiler (ex., ifort, gfortran, etc)
• INC - specify path(s) to NetCDF include files
• LIBS - specify path(s) to NetCDF libraries
• FFLAGS - specify compiler flags as needed
2. Run the command "make -f Makefile_serial_gen" to compile.
Page 10 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Note For Atmos users: the files modulesjntel.sh and modules_gfortran.sh will load
the required modules for compilation for Intel and GNU compilers, respectively.
Use the command "source " to load the appropriate modules to
your environment.
2.3.2 Parallel Compilation
Use the Makefile_par_gen file as a template.
1. Modify Makefile_par_gen as needed for your specific compiler, libraries etc in the
"User Modifiable Section" of the makefile. The following example are for both Intel
and GNU Fortran compilers:
• F90 - specify compiler (ex., mpiifort, mpif90, etc)
• INC - specify path(s) to NetCDF and PnetCDF include files
• LIBS - specify path(s) to NetCDF and PnetCDF libraries
• FFLAGS - specify compiler flags as needed
3. Run the command "make -f Makefile_par_gen" to compile.
Note For Atmos users: the files modulesjntel.sh and modules_gfortran.sh will load
the required modules for compilation for Intel and GNU compilers, respectively.
Use the command "source " to load the appropriate modules to
your environment.
2.4 Troubleshooting
• If using the Linux package Modules, paths for include (INC) and library (LIBS)
directories can be displayed using the command:
module show
• For parallel compilations, specifying a number of tasks greater than the number
of columns in the grid can cause errors. On Atmos, an example error message
for this situation is
PROBLEM: Failed to write output variable A1
NetCDF: Index exceeds dimension bound
• If you have trouble, contact your local sysadmin (system administrator) for
assistance.
Page 11 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
3.0 Model Inputs and Switches
CGEM includes multiple switch options for setting formulation options related to sediment
processes and phytoplankton growth parameters. Detailed information regarding these
switch options is provided in the model framework documents for CGEM and WQEM.
3.1 Required Input Files
User-provided input file
Input file settings for phytoplankton and zooplankton are assigned as tab-spaced entries
based on the number of phytoplankton (nospA) and zooplankton (nospZ), with
phytoplankton entries made first.
For example, if nospA=3 and nospZ=2, three tab-spaced values should be entered for
each phytoplankton parameter under phytoplankton section of the input file and two tab-
spaced values for each zooplankton parameter in the zooplankton section.
Temperature settings for phytoplankton and zooplankton are entered in the temperature
section as phytoplankton first followed by zooplankton.
For the previous example, there should be five tab-spaced entries for each parameter
value, first three for phytoplankton, and the last two for zooplankton.
Initial Conditions File
Model_dim.txt File
Basic Grid
• Dat Files
• d.dat - specifies depth from surface to bottom of cell in the 0-D model
• dxdy.dat - specifies grid cell size
• nz.dat - specifies number of cells in k-dir
• T.dat (if using Read_T = 0, see Input File Setting) - specifies information for
calculating temperature
• /Input/Temp.dat (if using Read_T = 1, see Input File Setting) - specifies
temperature data to be read
• S.dat (if using Read_Sal = 0, see Input File Setting') - specifies constant
salinity value
• /Input/Sal.dat (if using Read_Sal = 1, see Input File Setting) - specifies
salinity data to be read
• /Input/Solar.dat (if using Read_Solar = 1, see Input File Setting) - specifies
solar data to be read
• /Input/Wind.dat (if using Read_Wind = 1, see Input File Setting) - specifies
wind data to be read
EFDC Hydro
• Dat Files
• dxdy.dat - specifies grid cell size
• latlon.dat - specifies latitude and longitude for each grid cell
• mask.dat - specifies land/water mask
• nz.dat - specifies number of cells in k-dir
• NetCDF Files
• Ev.nc - diffusivity coefficients data
• Salt.nc-salinity data
• SurfaceElev.nc
Page 12 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
• Temp.nc-temperature data
• UFIow.nc - current flux data in i-direction
• VFIow.nc - current flux data in j-direction
• WFIow.nc - current flux data in k-direction
• WaterDepth.nc - column depth data
• LayerDepth.nc - layer depth data
Boundary Concentrations for CGEM (optional for EFDC Hydro)
• BCindices.dat
• /INPUT/TN_BoundaryConcentrations.nc
• /INPUT/N03_BoundaryConcentrations.nc
• /INPUT/NH4_BoundaryConcentrations.nc
• /INPUT/DON_BoundaryConcentrations.nc
• /INPUT/TP_BoundaryConcentrations.nc
• /INPUT/DIP_BoundaryConcentrations.nc
• /INPUT/DOP_BoundaryConcentrations.nc
• /INPUT/BOD_BoundaryConcentrations.nc
• /INPUT/DO_BoundaryConcentrations.nc
River Loadings CGEM (optional for EFDC Hydro)
• Riverlndices.dat
• RiverWeights.dat
• /INPUT/TN_RiverLoads.nc
• /INPUT/N03_RiverLoads.nc
• /INPUT/NH3_RiverLoads.nc
• /INPUT/DON_RiverLoads.nc
• /INPUT/TP_RiverLoads.nc
• /INPUT/DIP_RiverLoads.nc
• /INPUT/DOP_RiverLoads.nc
• /INPUT/BOD1_RiverLoads.nc
• /INPUT/DO_RiverLoads.nc
Boundary Concentrations for WQEM (optional for EFDC Hydro)
• BCindices.dat
• /INPUT/N03_BoundaryConcentrations.nc
• /INPUT/NH4_BoundaryConcentrations.nc
• /INPUT/DON_BoundaryConcentrations.nc
• /INPUT/TP_BoundaryConcentrations.nc
• /INPUT/DIP_BoundaryConcentrations.nc
• /INPUT/DOP_BoundaryConcentrations.nc
• /INPUT/DO_BoundaryConcentrations.nc
River Loadings WQEM (optional for EFDC Hydro)
• /INPUT/TP_RiverLoads.nc
• /INPUT/N03_RiverLoads.nc
• /INPUT/NH4_RiverLoads.nc
• /INPUT/DON_RiverLoads.nc
• /INPUT/DIP_RiverLoads.nc
• /INPUT/DOP_RiverLoads.nc
• /INPUT/DO RiverLoads.nc
Page 13 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
3.2 Input File Settings
3.2.1 CGEM Input File
Table 1. Simulation Specifics
Line#
Variable
Description
4
Starting time
year, month, day, hour, minute, second
5
Ending time
year, month, day, hour, minute, second
6
Timesteps
dT (timestep in seconds),
dT_out (output interval in seconds),
dT_sed (sediment diagenesis timestep in seconds)
Table 2. Switches in CGEM
Line#
Variable
Description
9
Which_fluxes
on ==1,
off == 0:
02 surface, DIC surface, Sediment Oxygen Consumption,
Microphytobenthos, Sediment Nutrient Fluxes, Atmospheric
Deposition of Nutrients, Instant Remineralization in Bottom of Layer,
Sediment Diagenesis Model
11
Which_temperature
1 == Sigmoidal,
2 == Optimum Temperature Threshold,
3 == Arrenhius,
4 == WQEM
12
Which_uptake
Nutrient uptake rate:
1 == Michaelis-Menten,
2 == Geider (needs nfQs),
3 == Roelke
13
Which_quota
Nutrient dependent growth:
1 == Droop,
2 == Nyholm,
3 == Flynn,
4 == WQEM
14
Whichjrradiance
1 == IOP(inherent optical properties),
2 == AOP (apparent optical properties),
3 == WQEM
15
Which_chlaC
1 == fixed C:Chl-a,
2 == Cloern Chl:C
16
Which_photosynthesis
1 == photoinhibition,
2 == without photoinhibition,
3 == nutrient dependent,
4 == WQEM
Page 14 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Line#
Variable
Description
17
Which_growth
Specific growth rate:
1 == minimum,
2 == product formulation,
3 == umax is nutrient dependent
18
ReadVars
Solar - Calculate(0)/Read(1),
Wind - 5mph(0)/Read(1),
Temperature - cosine with parameters(0)/Read(1),
Salinity - Read one value(0)/Read(1)
19
InitializeHow
0 == Read File,
1 == Salinity Regression
Table 3. Optics
Line#
Variable
Description
22
Kw
AOP, light attenuation due to water
23
Kcdom
AOP, light attenuation due to CDOM
24
Kspm
AOP, light attenuation due to SPM
25
Kchla
AOP, light attenuation due to chla
26
Astar490
Chla specific absorption at 490 nm
27
Aw490
seawater absorption at 490 nm
28
astarOMA
OM_A specific absorption at 490 nm
29
astarOMZ
OM_Z specific absorption at 490 nm
30
astarOMR
OM_R specific absorption at 490 nm
31
astarOMBC
OM_BC specific absorption at 490 nm
32
PARfac
Multiplies surface PAR
33
Sink CDOM
sinking rate
Table 4. Temperature
Line#
Variable
Description
36
Tref
(nospA + nospZ) - Optimum temperature for growth (°C)
37
KTg1
(nospA + nospZ) - Effect of T below Topt (°C2)
38
KTg2
(nospA + nospZ) - Effect of T above Topt ("C2)
39
Ea
(nospA + nospZ) - Slope of Arrhenius plot (eV)
Table 5. Phytoplankton (up to six types)
Line#
Variable
Description
42
edibleVector (Z1)
edibility vector for Z1
43
edibleVector (Z2)
edibility vector for Z2
44
umax
maximum growth rate
Page 15 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Line#
Variable
Description
45
Fixed C
Chla ratio
46
alpha
initial slop of the photosynthesis/irradiance relationship
47
beta
photoinhibition constant
48
respg
phytoplankton growth respiration coefficient
49
respb
phytoplankton basal respiration coefficient
50
QminN
minimum N cell-quota
51
QminP
minimum P cell-quota
52
QmaxN
maximum N cell-quota
53
QmaxP
maximum P cell-quota
54
Kn
half-saturation constant for N
55
Kp
half-saturation constant for P
56
Ksi
half-saturation constant for Si uptake
57
kQn
Qn constant for Flynn nutrient dependent growth model
58
kQp
Qp constant for Flynn nutrient dependent growth model
59
nfQs
exponent for Geider nutrient uptake model
60
vmaxN
N-uptake rate measured at umax
61
vmaxP
P-uptake rate measured at umax
62
vmaxSi
Si-uptake rate measured at umax
63
aN
coefficient for non-limiting nutrient
64
volcell
phytoplankton volume/cell
65
Qc
phytoplankton carbon/cell
66
Athresh
phytoplankton threshold for grazing (is multiplied by volcell)
67
sink A
sinking rate of phytoplankton cells
68
mA
mortality coefficient
69
A_wt
relative proportion of total chIA for initializing phytoplankton
Table 6. Zooplankton (up to two types)
Line#
Variable
Description
72
Zeffic
assimilation efficiency as a fraction of ingestion
73
Zslop
proportion of grazed phytoplankton lost to sloppy feeding
74
Zvolcell
zooplankton volume/individual
75
ZQc
zooplankton carbon/individual
76
ZQn
zooplankton nitrogen/individual
77
ZQp
zooplankton phosphorus/individual
78
Zka
half saturation coefficient for grazing
Page 16 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Line#
Variable
Description
79
Zrespg
zooplankton growth-dependent respiration factor
80
Zrespb
zooplankton biomass-dependent respiration factor
81
Zumax
maximum growth rate of zooplankton
82
Zm
zooplankton mortality constant for quadratic mortality
Table 7. Organic Matter
Line#
Variable
Description
85
KG1
turnover rate for OM1_A and OM1_Z
86
KG2
turnover rate for OM2_A and OM2_Z
87
KG1_R
OM1 turnover rate for riverine
88
KG2_R
OM2 turnover rate for riverine
89
KG1_BC
OM1 turnover rate for initial and be
90
KG2_BC
OM2 turnover rate for initial and be
91
KNH4
NHV rate constant for nitrification
92
nitmax
maximum rate of nitrification per day
93
K02
half-saturation concentration for 02 utilization
94
Kstar02
02 concentration that inhibits denitrification
95
KN03
half-saturation concentration for N03 used in denitrification
96
pC02
atmospheric C02
97
stoich_x1 R
C:P stoichiometry of OM1_R
98
stoich_y1 R
N:P stoichiometry of OM1_R
99
stoich_x2R
C:P stoichiometry of OM2_R
100
stoich_y2R
N:P stoichiometry of OM2_R
101
stoich_x1 BC
C:P stoichiometry of OM1_BC
102
stoich_y1 BC
N:P stoichiometry of OM1_BC
103
stoich_x2BC
C:P stoichiometry of OM2_BC
104
stoich_y2BC
N:P stoichiometry of OM2_BC
105
sink OM1_A
sinking rate
106
sink OM2_A
sinking rate
107
sink OM1_Z
sinking rate
108
sink OM2_Z
sinking rate
109
sink OM1_R
sinking rate
110
sink OM2_R
sinking rate
111
sink OM1_BC
sinking rate
112
sinkOM2 BC
sinking rate
Page 17 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Line#
Variable
Description
113
Kgcdom
decay rate of CDOM, 1/day
114
CF_SPM
conversion factor for river OM to river SPM
Table 8. Other, Including Boundary Conditions
Line#
Variable
Description
117 Which_Vmix/Adv 0 == No Vmixing/Adv,
1 == Yes VMixing/Adv
118
KH_coeff
multiplying factor for KH in VMixing
119
Which_Outer_BC
0 == salinity,
1 == zero nutrients at lateral be,
2 == zero nutrients lateral and open ocean,
3 == small gradient,
4 == WQEM,
5 == no flow boundaries,
6 == salinity with depth attenuation
121
wt_pl, wt_po
weights for plankton at the lateral and open ocean, Set 1 for normal
salinity BCs
122
wtj, wt_o
weights for small gradient BCs, lateral and open ocean
123
OM_BC multipliers
multipliers for OM_BC at initial conditions and for boundary conditions,
lateral and shelf
124 Stoich_x1_init, initial stoichiometry of all OM1_A
Stoich_y1_init
125
Stoich_x2_init,
Stoich_y2_in it
initial stoichiometry of all OM2_A
126
Stoich_x1Z_init,
Stoich_y1Z_init
initial stoichiometry of all OM1_Z
127
Stoich_x2Z_init,
Stoich_y2Z_init
initial stoichiometry of all OM2_Z
128
KG_bot
turnover rate for k=20 if Instant Remineralization is used (see
Which_fluxes in Table 2)
129
MC
0 == No daily integrated rates output,
1 == Yes daily integrated rates output
130
Which_Output
0 == normal output,
1 == NRL,
2 == ALL_FALSE
Page 18 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
3.2.2 WQEM Input File
Table 9. Simulation Specifics
Line#
Variable
Description
4
Starting time
year, month, day, hour, minute, second (YYYY M D h m s)
5
Ending time
year, month, day, hour, minute, second (YYYY M D h m s)
6
Timesteps
dT (timestep in seconds),
dT_out (output interval in seconds),
dT_sed (sediment diagenesis timestep in seconds)
Table 10. Switches in GEM
Line#
Variable
Description
9
Which_fluxes
on ==1,
off == 0: 02 surface, DIC surface, Sediment Oxygen Consumption,
Microphytobenthos, Sediment Nutrient Fluxes, Atmospheric
Deposition of Nutrients, Instant Remineralization in Bottom of Layer
(1==with Flux, 2==just sinking), Sediment Diagenesis Model, Silica
11
ReadVars
Solar - Calculate(0)/Read(1)/Read PAR(2),
Wind - 5mph(0)/Read(1),
Temperature - cosine with parameters(0)/Read(1),
Salinity - Read one value(0)/Read(1)
12
InitializeHow
0 == Read File,
1 == Salinity Regression
Table 11. Optics
Line#
Variable
Description
15
Whichjrradiance
0 == None,
1 == WQEM,
2 == Inherent Optical Properties
16
Astar490
Chla specific absorption at 490 nm (m1 (mg chla m 3)1)
17
Aw490
seawater absorption at 490 nm (m1)
18
astarOMA
OM_A specific absorption at 490 nm (m1)
19
astarOMZ
OM_Z specific absorption at 490 nm (m1)
20
astarOMR
OM_R specific absorption at 490 nm (m1)
21
astarOMBC
OM_BC specific absorption at 490 nm (m1)
22
PARfac
Multiplies surface PAR
Table 12. River Loads (used in 3D only)
Line#
Variable
Description
25
rcN03
factor multiplying N03 river load
26
rcHN4
factor multiplying NH4 river load
27
rcP04
factor multiplying P04 river load
28
rcSi
factor multiplying Si river load
Page 19 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Table 13. Other including Boundary Conditions
Line#
Variable
Description
31
Which_Vmix
0 == No Vertical Mixing,
1 == Vertical Mixing is on
32
KH_coeff
Scaling factor for vertical mixing coefficients (KH).
33
Which_Outer_BC
0 == Salinity,
1== WQEM original,
2 == WQEM Full Grid
34
DoDroop
0 == No Droop kinetics,
1 == Droop kinetics
40
ALPHA_DIA
Initial slope of diatom's light saturation curve (g C (g Chi a)1 h1 (umol
quanta)"1 rrv2 s_1)
41
ALPHA_GRE
Initial slope of greens' light saturation curve (g C (g Chi a)1 h ^umol
quanta)"1 nr2 s_1)
43
ANCP
N:C ratio for plankton
44
APCP
P:C ratio for plankton
45
ASCD
Si:C ratio for diatoms
46
AVFRAC
Available fraction of DOP
47
AVFRACDON
Available fraction of DON
49
BMRD
Diatom base metabolic rate (s1)
50
BMRG
Non-Diatom algae base metabolic rate (s1)
52
CCHLD
Carbon:chlorophyll ratio for diatoms
53
CCHLG
Carbon:chlorophyll ratio for non-diatom algae
55
CGZ
Zooplankton maximum growth rate (s1)
57
DENIT_CN_RATIO
Denitrification C:N ratio
59
GCDD
Fraction of basal metabolism exuded as DOC by diatoms
60
FCDG
Fraction of basal metabolism exuded as DOC by non-diatoms
61
FCDP
Fraction of DOC produced by predation
62
FCDZ
Fraction of DOC from zooplankton mortality
63
FCLD
Fraction of labile POC produced by diatoms metabolism
64
FCLG
Fraction of labile POC produced by non-diatoms metabolism
65
FCLP
Fraction of labile PDC from predation
66
FCLZ
Fraction of labile PDC from zooplankton mortality
67
FCRD
Fraction of refractory POC produced by diatoms metabolism
68
FCRG
Fraction of refractory POC produced by non-diatoms metabolism
69
FCRP
Fraction of refractory PDC from predation
70
FCRZ
Fraction of refractory PDC from zooplankton mortality
71
FNDD
Fraction of DON produced by diatom metabolism
Page 20 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Line#
Variable
Description
72
FNDG
Fraction of DON produced by non-diatom algae metabolism
73
FNDP
Fraction of DON produced by predation
74
FNDZ
Fraction of DON produced by zooplankton mortality
75
FNID
Fraction of inorganic nitrogen produced by diatom metabolism
76
FNIG
Fraction of Inorganic nitrogen produced by non-diatom algae
metabolism
77
FNIP
Fraction of inorganic nitrogen produced by predation
78
FNIZ
Fraction of inorganic nitrogen produced by zooplankton mortality
79
FNLD
Fraction of labile particulate nitrogen produced by diatom metabolism
80
FNLG
Fraction of labile particulate nitrogen produced by non-diatom algae
metabolism
81
FNLP
Fraction of labile particulate nitrogen produced by predation
82
FNLZ
Fraction of LON produced by zooplankton mortality
83
FNRD
Fraction of refractory particulate nitrogen produced by diatom
metabolism
84
FNRG
Fraction of refractory particulate nitrogen produced by non-diatom
metabolism
85
FNRP
Fraction of RON produced by predation
86
FNRZ
Fraction of RON produced by zooplankton mortality
87
FPDD
Fraction of DOP produced by diatom metabolism
88
FPDG
Fraction of DOP produced by non-diatom algae metabolism
89
FPDP
Fraction of DOP produced by predation
90
FPDZ
Fraction of DOP produced by zooplankton mortality
91
FPID
Fraction of inorganic phosphorus produced by diatom metabolism
92
FPIG
Fraction of inorganic phosphorus produced by non-diatom algae
metabolism
93
FPIP
Fraction of inorganic phosphorus produced by predation
94
FPIZ
Fraction of inorganic phosphorus produced by zooplankton mortality
95
FPLD
Fraction of LOP produced by diatom metabolism
96
FPLG
Fraction of LOP produced by non-diatom algae metabolism
97
FPLP
Fraction of LOP produced by predation
98
FPLZ
Fraction of LOP produced by zooplankton mortality
99
FPRD
Fraction of ROP produced by diatom metabolism
100
FPRG
Fraction of ROP produced by non-diatom algae metabolism
101
FPRP
Fraction of ROP produced by predation
102
FPRZ
Fraction of ROP produced by zooplankton mortality
Page 21 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Line#
Variable
Description
103
FSAP
Fraction of silica made available through predation
105
GREFF
Zooplankton grazing efficiency
107
ILMUL
Scaling factor for surface short wave radiation
109
KDC
Minimum DOC mineralization rate (s1)
110
KDCALG
DOC mineralization rate algal dependence (m3 kg1 s1)
111
KDN
Minimum DON mineralization rate (s1)
112
KDNALG
DON mineralization rate algal dependence (m3 kg1 s1)
113
KDP
Minimum DOP mineralization rate (s1)
114
KDPALG
DOP mineralization rate algal dependence (m3 kg1 s1)
116
KDWD
Specifies light attenuation equation:
0 == regression,
1 == ambient chlorophyll 0
117
KE
Background light attenuation (m1)
118
KECHL
Light attenuation factor for chlorophyll a (mg2 kg1)
120
KHDONT_SED
Half-saturation concentration of dissolved oxygen required for
nitrification in the sediment bed. (kg nr3)
121
KHN
Organic nitrogen decay half-saturation constant (kg nr3)
122
KHND
Mean half-saturation constant for nitrogen uptake by diatoms (kg nr3)
123
KHNG
Mean half-saturation constant for nitrogen uptake by non-diatom algae
(kg nr3)
124
KHN NT
Half-saturation concentration of NH4 required for nitrification (kg nr3)
125
KHODOC_SED
Half-Saturation concentration of 02 required for oxic respiration in the
sediment bed (kg nr3)
126
KHP
Organic phosphorus decay half-saturation constant (kg nr3)
127
KHPD
Mean half-saturation constant for diatom phosphorus uptake (kg nr3)
128
KHPG
Mean half-saturation constant for non-diatom algae phosphorus
uptake (kg nr3)
129
KHSD
Mean half-saturation constant for diatom silica uptake (kg nr3)
130
KLC
Minimum hydrolysis rate of LOC (s1)
131
KLCALG
LOC hydrolysis rate algal dependence (m3 kg1 s1)
132
KLN
Minimum hydrolysis rate of LON (s1)
133
KLNALG
LON hydrolysis rate algal dependence (m3 kg1 s1)
134
KLP
Minimum hydrolysis rate of LOP (s1)
135
KLPALG
LOP hydrolysis rate algal dependence (m3 kg1 s1)
136
KRC
Minimum hydrolysis rate of ROC (s1)
137
KRCALG
ROC hydrolysis rate algal dependence (m3 kg1 s1)
Page 22 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Line#
Variable
Description
138
KRN
Minimum hydrolysis rate of RON (s1)
139
KRNALG
RON hydrolysis rate algal dependence (m3 kg1 s1)
140
KRP
Minimum hydrolysis rate of ROP (s1)
141
KRPALG
ROP hydrolysis rate algal dependence (m3 kg1 s1)
142
KSUA
Particulate silica dissolution rate constant (s1)
143
KSZ
Half-saturation coefficient of zooplankton for phytoplankton (kg nr3)
144
KTBD
Metabolism temperature dependence factor for diatoms ("C1)
145
KTBG
Metabolism temperature dependence factor for non-diatoms ("C1)
146
KTGD1
Effect of temperature below optimal temperature for diatoms (°C-2)
147
KTGD2
Effect of temperature above optimal temperature for diatoms (°C-2)
148
KTGG1
Effect of temperature below optimal temperature for non-diatoms (°C-2)
149
KTGG2
Effect of temperature above optimal temperature for non-diatoms (°C-2)
150
KTHDR
Hydrolysis temperature dependence ("C1)
151
KTMNL
Mineralization temperature dependence ("C1)
152
KTNT1
Effect of temperature below optimal temperature nitrification (°C-2)
153
KTNT2
Effect of temperature above optimal temperature for nitrification (°C-2)
154
KTSUA
Silica dissolution temperature rate constant ("C1)
155
NTM
Nitrification rate coefficient at optimal temperatures (kg nr3 s1)
156
PBMAX_DIA
Photosynthetic rate of diatoms at optimum illumination
(gC [gChl-a]1 h1)
157
PBMAX_GRE
Photosynthetic rate of greens at optimum illumination
(gC [gChl-a]1 h1)
158
PMD
Diatom production under optimal conditions (s1)
159
PMG
Non-diatom algae production under optimal conditions (s1)
161
SILIM
Nutrient limitation:
1 == Minimum of N and P,
2 == Minimum of N, P, and Si,
3 == No minimum
163
TMD
Temperature of optimum growth for diatoms (°C)
164
TMG
Temperature of optimum growth for non-diatoms (°C)
165
TMNT
Optimal temperature for nitrification (°C)
166
TRD
Metabolism reference temperature for diatoms (°C)
167
TRG
Metabolism reference temperature for non-diatoms (°C)
168
TRHDR
Reference temperature for hydrolysis (°C)
169
TRMNL
Reference temperature for mineralization (°C)
170
TRSUA
Silica dissolution reference temperature (°C)
Page 23 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Line#
Variable
Description
171
TZREF
Predation reference temperature (°C)
172
ZDTH
Zooplankton death/die-off coefficient (s1)
173
ZTHET
Temperature coefficient for predation
Table 14. Dissolved Oxygen-Related Parameters
Line#
Variable
Description
177
KCOD
COD oxidation rate (s1)
178
KDENITR
Maximum denitrification rate coefficient (s1)
179
KHDENITR
Half-saturation concentration of N03 required for denitrification (kg nr
3)
180
KHDONT
Half-saturation concentration of dissolved oxygen required for
nitrification (kg nr3)
181
KHOCOD
Half-Saturation concentration of 02 required for exertion of chemical
oxygen demand (kg nr3)
182
KHODOC
Half-Saturation concentration of 02 required for oxic respiration
(kg m-3)
183
KRDO
Reaeration coefficient (m s1)
184
RCDO
Dissolved Oxygen-to-Carbon ratio ((mol of 02)/(mol of c))
185
RNTO
C>2:N conversion factor (kg 02 (kg n)1)
Table 15. Droop Kinetics (not used in Monod and not tested yet)
Line#
Variable
Description
189
FINTNID
Fraction of inorganic nitrogen produced by diatoms metabolism
190
FINTNDD
Fraction of dissolved nitrogen produced by diatoms metabolism
191
FINTNLD
Fraction of labile nitrogen produced by diatoms metabolism
192
FINTNRD
Fraction of refractory nitrogen produced by diatoms metabolism
193
FINTNIG
Fraction of inorganic nitrogen produced by non-diatoms metabolism
194
FINTNDG
Fraction of dissolved nitrogen produced by non-diatoms metabolism
196
FINTNLG
Fraction of labile nitrogen produced by non-diatoms metabolism
197
FINTNRG
Fraction of refractory nitrogen produced by non-diatoms metabolism
199
FINTLUXNIP
Fraction of luxury inorganic nitrogen produced by predation
200
FINTSTRNIP
Fraction of structural inorganic nitrogen produced by predation
201
FINTLUXNDP
Fraction of luxury dissolved organic nitrogen produced by predation
202
FINTSTRNDP
Fraction of structural dissolved organic nitrogen produced by predation
203
FINTLUXNLP
Fraction of luxury labile nitrogen produced by predation
204
FINTSTRNLP
Fraction of structural labile nitrogen produced by predation
205
FINTLUXNRP
Fraction of luxury refractory nitrogen produced by predation
Page 24 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Line#
Variable
Description
206
FINTSTRNRP
Fraction of structural refractory nitrogen produced by predation
208
FINTPID
Fraction of inorganic phosphorus produced by diatoms metabolism
209
FINTPDD
Fraction of dissolved phosphorus produced by diatoms metabolism
210
FINTPLD
Fraction of labile phosphorus produced by diatoms metabolism
211
FINTPRD
Fraction of refractory phosphorus produced by diatoms metabolism
213
FINTPIG
Fraction of inorganic phosphorus produced by non-diatoms
metabolism
214
FINTPDG
Fraction of dissolved phosphorus produced by non-diatoms
metabolism
215
FINTPLG
Fraction of labile phosphorus produced by non-diatoms metabolism
216
FINTPRG
Fraction of refractory phosphorus produced by non-diatoms
metabolism
218
FINTLUXPIP
Fraction of luxury inorganic phosphorus produced by predation
219
FINTSTRPIP
Fraction of structural inorganic phosphorus produced by predation
220
FINTLUXPDP
Fraction of luxury dissolved organic phosphorus produced by
predation
221
FINTSTRPDP
Fraction of structural dissolved organic phosphorus produced by
predation
222
FINTLUXPLP
Fraction of luxury labile phosphorus produced by predation
223
FINTSTRPLP
Fraction of structural labile phosphorus produced by predation
224
FINTLUXPRP
Fraction of luxury refractory phosphorus produced by predation
225
FINTSTRPRP
Fraction of structural refractory phosphorus produced by predation
227
KHINTND
Half-saturation concentration for nitrogen uptake in diatoms (kg nr3)
228
KHINTNG
Half-saturation concentration for nitrogen uptake in non-diatoms (kg nr
3)
229
KHINTPD
Half-saturation concentration for phosphorus uptake in diatoms (kg nr
3)
230
KHINTPG
Half-saturation concentration for phosphorus uptake in non-diatoms
(kg nr3)
232
QMINND
Minimum nitrogen quota for diatoms (kg N kg1 algal c)
233
QMINNG
Minimum nitrogen quota for non-diatoms (kg N kg1 algal c)
234
QMINPD
Minimum phosphorus quota for diatoms (kg N kg1 algal c)
235
QMINPG
Minimum phosphorus quota for non-diatoms (kg N kg1 algal c)
236
QMAXND
Maximum nitrogen quota for diatoms (kg N kg1 algal c)
237
QMAXNG
Maximum nitrogen quota for non-diatoms (kg N kg1 algal c)
238
QMAXPD
Maximum phosphorus quota for diatoms (kg N kg1 algal c)
239
QMAXPG
Maximum phosphorus quota for non-diatoms (kg N kg1 algal c)
Page 25 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Line#
Variable
Description
240
UPNMAXD
Maximum uptake rate of nitrogen by diatoms (kg N kg1 algal c s1)
241
UPNMAXG
Maximum uptake rate of nitrogen by greens (kg N kg1 algal c s1)
242
UPPMAXD
Maximum uptake rate of phosphorus by diatoms (kg P kg1 algal c s1)
243
UPPMAXG
Maximum uptake rate of phosphorus by greens (kg P kg1 algal c s1)
Table 16. Settling Rates
Line#
Variable
Description
247
VDIA
Settling rate for diatoms (m s1)
248
VDIAN
Settling rate for diatom's internal nitrogen (m s1)
249
VDIAP
Settling rate for diatom's internal phosphorus (m s1)
250
VGRE
Settling rate for greens (m s1)
251
VGREN
Settling rate for greens' internal nitrogen (m s1)
252
VGREP
Settling rate for greens' internal phosphorus (m s1)
253
VLOC
Settling rate for labile organic carbon (m s1)
254
VROC
Settling rate for refractory organic carbon (m s1)
255
VLON
Settling rate for labile organic nitrogen (m s1)
256
VRON
Settling rate for refractory organic nitrogen (m s1)
257
VLOP
Settling rate for labile organic phosphorus (m s1)
258
VROP
Settling rate for refractory organic phosphorus (m s1)
259
VSU
Settling rate for unavailable silica (m s1)
260
VTR
Settling rate for tracer (m s1)
3.3
ModelDim.txt
Table 17. ModelDim.txt
Line#
Variable
Description
2
IM
Number of cells in i direction
3
JM
Number of cells in j direction
4
nz_max
Max number of cells in k direction
5
nospA
Number of phytoplankton species
6
nospZ
Number of zooplankton species
7
Which_gridio
Hydrodynamic grid specification
8
iYrO
Start year for timestamps
9
Number of Rivers
Number of Rivers
10
Number of Boundary
Cells
Number of Boundary Cells
Page 26 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
3.4 Executable Command Line Arguments
Command line arguments can be used when calling the executable (Makefile default
executable name is CGEM). You may omit arguments to use default settings. To specify
any particular argument, all previous arguments must be specified. For example, to
specify an initial conditions file (argument 3), the water quality model (argument 1) and
input file (argument 2) must also be specified.
1. Argument 1 - User selected water quality model: Options are "CGEM" or
"WQEM"
• Default is "CGEM"
2. Argument 2 - User selected input file name (path relative to main CGEM
directory). Defaults are:
• "GEMJnputFile" for CGEM WQM
• "WQEMJnputFile" for WQEM WQM
3. Argument 3 - User selected initial conditions file name (path relative to path
located in MyFiles.inp). Defaults are:
• "lnitialConditions.txt" for CGEM WQM
• "lnitialConditions_WQEM.txt" for WQEM WQM
4. Argument 4 - User selected output file name (path relative to main CGEM
directory). Defaults are:
• ",/NETCDF/cgem." for CGEM WQM
• ",/NETCDF/wqem." for WQEM WQM
5. Argument 5 - User selected Daily Integrated Rates filename (path relative to
main CGEM directory):
• Default is ",/NETCDF/CGEM_Dailylntegrated_Rates.nc"
Page 27 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
4.0 Model Output
4.1 CGEM
The model output of CGEM consists of two separate netcdf files. The default names of
these files are CGEM_Dailylntegrated_Rates.nc and cgem.000000.nc.
The cgem.000000.nc file is always generated by default while the generation of
CGEM_Dailylntegrated_Rates.nc can be turned on or off by setting the flag "MC" equal to
1 or 0 in the input deck, respectively.
Output file CGEM_Dailylntegrated_Rates.nc includes daily integrated model output
regardless of the model output timestep included in cgem.000000.nc.
4.1.1 cgem.000000.nc
The variables stored in this netcdf file (assuming 3 phytoplankton and 2 zooplankton
classes) are as follows.
Table 18. cgem.000000.nc file variables
Variable Name
Description
Units
LONGXY
Cell center longitude [-180, 180]
degrees
LATIXY
Cell center latitude [-90, 90]
degrees
h
Depth
m
fm
Mask: 0 = land, 1 = water
NA
dz
Thickness of cell
m
A1
Phytoplankton group 1 number density
organisms nr3
A2
Phytoplankton group 2 number density
organisms nr3
A3
Phytoplankton group 3 number density
organisms nr3
Qn1
Phytoplankton group 1 nitrogen quota
mmol cell-1
Qn2
Phytoplankton group 2 nitrogen quota
mmol cell"1
Qn3
Phytoplankton group 3 nitrogen quota
mmol cell"1
Qp1
Phytoplankton group 1 phosphorus quota
mmol cell"1
Qp2
Phytoplankton group 2 phosphorus quota
mmol cell"1
Qp3
Phytoplankton group 3 phosphorus quota
mmol cell"1
Z1
Zooplankton group 1 number density
organisms nr3
Z2
Zooplankton group 2 number density
organisms nr3
N03
Nitrate
mmol nr3
NH4
Ammonium
mmol nr3
P04
Phosphate
mmol nr3
DIC
Dissolved inorganic carbon
mmol nr3
02
Molecular oxygen
mmol nr3
Page 28 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Variable Name
Description
Units
OM1_A
Particulate organic matter derived from dead algae
mmol nr3
OM2_A
Dissolved organic matter derived from dead algae
mmol nr3
OM1_Z
Particulate organic matter derived from zooplankton fecal
pellets
mmol nr3
OM2_Z
Dissolved organic matter derived from zooplankton fecal
pellets
mmol nr3
OM1_R
Particulate organic matter derived from river outflow
mmol nr3
OM2_R
Dissolved organic matter derived from river outflow
mmol nr3
CDOM
Colored dissolved organic matter
ppb
Si
Silica
mmol nr3
OM1_BC
Particulate organic matter in the initial and boundary
conditions
mmol nr3
OM2_BC
Dissolved organic matter in the initial and boundary
conditions
mmol nr3
ALK
Alkalinity
mmol nr3
Tr
Tracer should be =1
NA
irradiance
Irradiance at depth
photons cm 2 s~1
irradiance_fraction
Fraction of surface irradiance
%
uN1
nitrogen-dependent growth rate for A1
d1
uN2
nitrogen-dependent growth rate for A2
d1
uN3
nitrogen-dependent growth rate for A3
d1
uP1
phosphorus-dependent growth rate for A1
d1
uP2
phosphorus-dependent growth rate for A2
d1
uP3
phosphorus-dependent growth rate for A3
d1
uE1
light-dependent growth rate for A1
d1
uE2
light-dependent growth rate for A2
d1
uE3
light-dependent growth rate for A3
d1
uA1
specific growth rate for A1
d1
uA2
specific growth rate for A2
d1
uA3
specific growth rate for A3
d1
Chla_mg_tot
Total Chla from all phytoplankton
mg nr3
s_x1A
Stoichiometry C:P for OM1_A
mmol/mmol
s_y1A
Stoichiometry N:P for OM1_A
mmol/mmol
s_x2A
Stoichiometry C:P for OM2_A
mmol/mmol
s_y2A
Stoichiometry N:P for OM2_A
mmol/mmol
s_x1Z
Stoichiometry C:P for OM1_Z
mmol/mmol
Page 29 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Variable Name
Description
Units
s_y1Z
Stoichiometry N:P for OM1_Z
mmol/mmol
s_x2Z
Stoichiometry C:P for OM2_Z
mmol/mmol
s_y2Z
Stoichiometry N:P for OM2_Z
mmol/mmol
uSil
silica-dependent growth rate for A1
d"1
uSi2
silica-dependent growth rate for A2
d1
uSi3
silica-dependent growth rate for A3
d1
PH
PH
s.u.
RN2
RN2 Denitrification Term
mmol nr3
R02A
R02A Decay Term
mmol nr3
R02Z
R02Z Decay Term
mmol nr3
R02BC
R02BC Decay Term
mmol nr3
R02R
R02R Decay Term
mmol nr3
Primary_Production
Primary Production
mmol nr3 d~1
4.1.2 CGEM_Dailylntegrated_Rates.nc
Table 19. CGEM_Dailylntegrated_Rates.nc file variables
Variable Name
Description
Units
fm
Mask: 0 = land, 1 = water.
NA
02
Molecular oxygen
mmol nr3
N03
Nitrate
mmol nr3
NH4
Ammonium
mmol nr3
P04
Phosphate
mmol nr3
Total_Phytoplankton
Total Phytoplankton
mmol nr3
Primary_Production
Photosynthesis: Primary production
mmol nr2 d~1
Water_Column_Respiration
Water column respiration
mmol nr2 d~1
Air_Sea_02_Flux
Air-Sea 02 flux
mmol nr2 d~1
FPOM
Particulate Organic Matter Sediment-water Flux
mmol nr2 d~1
F02
02 Sediment-water Flux
mmol nr2 d~1
FN03
N03 Sediment-water Flux
mmol nr2 d~1
FNH4
NH4 Sediment-water Flux
mmol nr2 d~1
FP04
PQ4 Sediment-water Flux
mmol nr2 d~1
Page 30 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
4.2 WQEM
4.2.1 WQEM.000000.nc
Table 20. WQEM. OOOOOO.nc file variables
Variable Name
Description
Units
longitude
longitude
degrees
latitude
latitude
degrees
h
Cell bottom depth.
m
fm
Mask: 0 = land, 1 = water.
NA
dz
Thickness of cell.
NA
Area
Area of cell.
m2
DOC
Dissolved organic Carbon.
kg nr3
DIA
Diatom.
kg nr3
GRE
Algae excluding diatoms.
kg nr3
ZOO
Zooplankton.
kg nr3
LOC
Labile particulate organic carbon.
kg nr3
ROC
Refractory particulate organic carbon.
kg nr3
SRP
Soluble reactive phosphorous.
kg nr3
DOP
Dissolved organic phosphorous.
kg nr3
LOP
Labile particulate organic phosphorous.
kg nr3
ROP
Refractory particulate organic phosphorous.
kg nr3
NH4
Ammonia.
kg nr3
N03
Nitrate plus nitrite nitrogen.
kg nr3
DON
Dissolved organic nitrogen.
kg nr3
LON
Labile particulate organic nitrogen.
kg nr3
RON
Refractory particulate organic nitrogen.
kg nr3
SA
Available silica.
kg nr3
SU
Unavailable silica.
kg nr3
D02
Dissolved oxygen.
kg nr3
TR
Tracer.
kg nr3
DIAN
Diatoms Internal Nitrogen
kg nr3
DIAP
Diatoms Internal Phosphorus
kg nr3
GREN
Greens Internal Nitrogen
kg nr3
GREP
Greens Internal Phosphorus
kg nr3
SUM_DENITR
Denitrification N
kg nr3
SUM_DENITR_C
Denitrification C
kg nr3
Page 31 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Variable Name
Description
Units
SUM_DOCPRD
Carbon loss due to predation
kg nr3
SUM_DOCMET
Carbon loss due to metabolism
kg nr3
SUM_DOCZOO
Carbon loss due to zooplankton mortality
kg nr3
PD
Production for diatoms
kg
PG
Production for greens
kg
NITD02
Nitrification
kg
DOMETD
Diatoms respiration
kg
DOMETG
Greens respiration
kg
DOPREDD
Diatoms predation
kg
DOPREDG
Greens predation
kg
DOZOO
Zooplankton mortality
kg
DOMNLDOC
DOC mineralization
kg
PFD
Phosphorous limitation for diatoms
NA
SFD
Silica limitation for diatoms
NA
NFD
Nitrogen limitation for diatoms
NA
IFD
Light limitation for diatoms
NA
TFD
Temperature limitation for diatoms
NA
PFG
Phosphorous limitation for greens
NA
NFG
Nitrogen limitation for greens
NA
IFG
Light limitation for greens
NA
TFG
Temperature limitation for greens
NA
PAR
Photosynthetic Active Radiation
jjmol quanta m2s~1
Page 32 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
5.0 Tutorials: Using CGEM
5.1 Overview
The following examples describe how to run simulations of varying dimensions (0, 1,2, &
3D) and illustrates a small subset of the possible simulation options available. They are
intended to assist new users with successfully running basic simulations, but do not
attempt to encompass all possible model inputs, options, etc. available with CGEM.
More details on required input files for simulations are described in Section 3.1,
"Required Input Files," on page 12. Sample submit scripts for the SLURM workload
manager are available in the submitFiles directory.
5.2 0-D - Single Cell Example
5.2.1 Description
This example involves running a simulation with a single cell (0-D) grid. It allows for easy
testing of the CGEM or WQEM water quality model without complications from advection,
grid geometries, boundary conditions, etc. It also allows for the use of simple text-based
inputs, as opposed to NetCDF formatted inputs required by higher dimensional
simulations.
Files are supplied for multiple model settings, such as time-series temperature data
(Temp.dat) or temperature data supplied by regression equation (T.dat). These settings
can be controlled by editing the model input file (GEM_lnputFlle_OD_example). For more
details, refer to Section 3.2, "Input File Settings," on page 14.
5.2.2 Files Required
All files required for this example are available in the directory data/OD_example/:
• GEM_lnputFile_OD_example - model input text file containing model
specifications/switches. For more details, refer to Section 3.2, "Input File
Settings," on page 14.
• lnitialConditions.txt (or lnitialConditions_WQEM.txt) - text file containing model
initial conditions for the water quality model, CGEM (or WQEM)
• Model_dim.txt - text file containing model grid specifications
• S.dat - text file containing initialization value for salinity (if using Read_Sal = 0)
• T.dat - text file containing values for temperature regression equation (if using
Read_T = 0)
• d.dat - text file containing depth value from surface to bottom of cell (only used in
the 0-D model)
• d_sfc.dat - text file containing value for distance from cell center to surface
• dxdy.dat - text file containing values for cell length and width
• dz.dat - text file containing value for cell thickness in meters
• latlon.dat - text file containing value for cell latitude and longitude
• nz.dat - text file containing grid layout
• INPUT
• Sal.dat - text file containing time-dependent salinity data (if using
Read_Sal = 1)
• Solar.dat - text file containing time-dependent solar radiation data (if using
Read_Solar = 1)
Page 33 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
• Temp.dat - text file containing time-dependent temperature data (if using
Read_T = 1)
• Wind.dat - text file containing time-dependent wind data (if using
Read_Wind = 1)
5.2.3 Running the simulation
1. Modify MyFiles.inp (located in the "data" directory) to provide a complete path to the
0D_example directory.
Example:
/work/GLFBREEZ/CGEM/data/OD_example
2. Modify InputFile (GEM_lnputFile_OD_example) to set appropriate model settings.
Rename the file to GEM_lnputFile_OD.
3. Compile the serial CGEM executable using instructions in Section 2.3.1, "Serial
Compilation," on page 10.
4. Start simulation (for more information, see Section 3.4, "Executable Command Line
Arguments," on page 27) using a direct command line argument or batch script for a
HPC workload manager.
Example command line argument (from main CGEM directory containing "CGEM"
executable):
./CGEM CGEM ./data/Examples/OD_example/GEM_lnputFile_OD
InitialConditions. txt ./NETCDF/ODexample.
5.2.4 Viewing Results
Results will be written to a NetCDF file with filename and location as specified in the
executable command line argument. For the example above, this file would be located at
./NETCDF/ODexample.nc .
Use the R scripts found in Section 6.2, "R Scripts," on page 41 to visualize the 0-D
results.
5.3 1-D-Vertical Column of Cells
5.3.1 Description
This example describes running a 1D simulation with a grid composed of a single column
of cells. Like the 0D example, it allows for easy testing of the CGEM or WQEM water
quality model without complications from advection, grid geometries, boundary
conditions, etc, while also allowing multi-layer kinetics. It requires NetCDF formatted
inputs similar to higher dimensional (2D & 3D) simulations.
Files are supplied for multiple model settings, such as time-series temperature data
(Temp.dat) or temperature data supplied by regression equation (T.dat). These settings
can be controlled by editing the model input file (GEM_lnputFlle_OD_example). For more
details, refer to Section 3.2, "Input File Settings," on page 14.
5.3.2 Files Required
• GEM_lnputFile_1 D_example - model input text file containing model
specifications/switches. For more details, refer to Section 3.2, "Input File
Settings," on page 14.
Page 34 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
• lnitialConditions.txt - text file containing model initial conditions for the water
quality model (CGEM)
• Model_dim.txt - text file containing model grid specifications
• dxdy.dat - text file containing value for cell length and width
• latlon.dat - text file containing value for cell latitude and longitude
• REQUIRED INPUT (located in INPUT directory)
• Solar.dat - text file containing time-dependent solar radiation data (if using
Read_Solar = 1. For more details, refer to Section 3.2, "Input File Settings,"
on page 14.
• Ev.nc - NetCDF file containing time-dependent diffusivity data
• LayerDepth.nc - NetCDF file containing time-dependent layer depth data
• Salt.nc - NetCDF file containing time-dependent salinity data
• SurfaceElev.nc - NetCDF file containing time-dependent surface elevation
data
• Temp.nc- NetCDF file containing time-dependent temperature data
• WaterDepth.nc - NetCDF file containing time-dependent water depth data
• UFIow.nc - NetCDF file containing time-dependent velocity flux data for the
x-direction
• VFIow.nc - NetCDF file containing time-dependent velocity flux data for the
y-direction
• WFIow.nc - NetCDF file containing time-dependent velocity flux data for the
z-direction
5.3.3 Running the simulation
1. Modify MyFiles.inp (located in the "data" directory) to provide a complete path to the
1 D_example directory.
Example:
/work/GLFBREEZ/CGEM/data/1D_example
2. Modify InputFile (GEM_lnputFile_1 D_example) to set appropriate model settings and
save it as GEM_lnputFile_1 D
3. Compile the serial CGEM executable using instructions in Section 2.3.1, "Serial
Compilation," on page 10.
4. Start simulation (for more information, see Section 3.4, "Executable Command Line
Arguments," on page 27) using a direct command line argument or batch script for a
HPC workload manager.
Example command line argument (from directory containing "CGEM" executable):
./CGEM CGEM Jdata/Examples/1 D_example/GEM_lnputFile_1 D
InitialConditions. txt ./NETCDF/1 Dexample.
5.3.4 Viewing Results
Results will be written to a NetCDF file with filename and location as specified in the
executable command line argument. For the example above, this file would be located at
./NETCDF/1 Dexample.nc .
Use the R scripts found in Section 6.2, "R Scripts," on page 41 to visualize these 1-D
results.
Page 35 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
5.4
5.4.1
• Depth.dat - text file containing depth specifications
• GEM_lnputFile_2D_example - model input text file containing model
specifications/switches (see Input File Settings')
• lnitialConditions.txt - text file containing model initial conditions for the water
quality model (CGEM)
• Model_dim.txt - text file containing model grid specifications
• dxdy.dat - text file containing value for cell length and width
• latlon.dat - text file containing value for cell latitude and longitude
• nz.dat - text file containing number of cells per water column
• REQUIRED INPUT (located in INPUT directory)
• Solar.dat - text file containing time-dependent solar radiation data (if using
Read_Solar = 1, see Input File Setting)
• Ev.nc - NetCDF file containing time-dependent diffusivity data
• LayerDepth.nc - NetCDF file containing time-dependent layer depth data
• Salt.nc - NetCDF file containing time-dependent salinity data
• SurfaceElev.nc - NetCDF file containing time-dependent surface elevation
data
• Temp.nc- NetCDF file containing time-dependent temperature data
• WaterDepth.nc - NetCDF file containing time-dependent water depth data
• UFIow.nc - NetCDF file containing time-dependent velocity flux data for the
x-direction
• VFIow.nc - NetCDF file containing time-dependent velocity flux data for the
y-direction
• WFIow.nc - NetCDF file containing time-dependent velocity flux data for the
z-direction
• OPTIONAL INPUT (requires updates to Model_dim.txt)
• Boundary Concentrations (optional for EFDC Hydro; to turn off boundary
cells set "Number of boundary cells" (line 10) to 0 in Model_dim.txt)
• BCindices.dat
• /INPUT/TN_BoundaryConcentrations.nc
• /INPUT/N03_BoundaryConcentrations.nc
• /INPUT/NH4_BoundaryConcentrations.nc
• /INPUT/DON_BoundaryConcentrations.nc
• /INPUT/TP_BoundaryConcentrations.nc
• /INPUT/DIP_BoundaryConcentrations.nc
• /INPUT/DOP_BoundaryConcentrations.nc
• /INPUT/BOD_BoundaryConcentrations.nc
• /INPUT/DO_BoundaryConcentrations.nc
• River Loadings CGEM (optional for EFDC Hydro; to turn off river loading set
"Number of rivers" (line 9) to 0 in Model_dim.txt)
• Riverlndices.dat
• RiverWeights.dat
2-D - Area of Cells (Single Layer)
Description
This example describes running a 2-D simulation involving an area of cells with single cell
depth. This introduces complexity due to the use of advection and boundary conditions.
This example is based on an EFDC hydrodynamic grid.
Files Required
Page 36 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
• /INPUT/TN_RiverLoads.nc
• /INPUT/N03_RiverLoads.nc
• /INPUT/NH3_RiverLoads.nc
• /INPUT/DON_RiverLoads.nc
• /INPUT/TP_RiverLoads.nc
• /INPUT/DIP_RiverLoads.nc
• /INPUT/DOP_RiverLoads.nc
• /INPUT/BOD1_RiverLoads.nc
• /INPUT/DO_RiverLoads.nc
• River Loadings WQEM (optional for EFDC Hydro)
• /INPUT/TP_RiverLoads.nc
• /INPUT/N03_RiverLoads.nc
• /INPUT/NH4_RiverLoads.nc
• /INPUT/DON_RiverLoads.nc
• /INPUT/DIP_RiverLoads.nc
• /INPUT/DOP_RiverLoads.nc
• /INPUT/DO_RiverLoads.nc
5.4.3 Running the simulation
1. Modify MyFiles.inp (located in the "data" directory) to provide complete path to the
2D_example directory.
Example:
/work/GLFBREEZ/CGEM/data/2D_example
2. Modify InputFile (GEM_lnputFile_2D_example) to set appropriate model settings and
save it as GEM_lnputFile_2D
3. Compile the serial CGEM executable using instructions in Section 2.3.1, "Serial
Compilation," on page 10.
4. Start simulation (for more information, see Section 3.4, "Executable Command Line
Arguments," on page 27) using a direct command line argument or batch script for a
HPC workload manager.
Example sbatch script (for SLURM workload manager) "submit.sh" (placed in main
CGEM directory containing "CGEM" executable):
#!/bin/csh
#SBATCH -D CGEM
#SBATCH -t 4:00:00
#SBATCH -N 2
#SBATCH -n 32
#SBATCH --gid=glfbreez
#SBATCH -A glfbreez
#SBATCH --partition=debug
#SBATCH --output=logfile%j.log
source modules_intel.sh
mpirun ./CGEM CGEM ./data/Examples/2D_example/GEM_InputFile_2D
InitialConditions.txt ./NETCDF/2Dexample.
This sbatch script can be submitted to the SLURM workload manager with the
command:
sbatch submit.sh
Page 37 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
The sbatch example script must be modified for use with a workload manager other
than SLURM, such as PBS, LSF, etc.
5.4.4 Viewing Results
Results will be written to a NetCDF file with filename and location as specified in the
executable command line argument. For the example above, this file would be located at
,/NETCDF/2Dexample.nc .
Use the R scripts found in Section 6.2, "R Scripts," on page 41 to visualize these 2-D
results.
5.5
5.5.1
• GEM_lnputFile_3D_example - model input text file containing model
specifications/switches. For more details, refer to Section 3.2, "Input File
Settings," on page 14.
• lnitialConditions.txt - text file containing model initial conditions for the water
quality model (CGEM)
• Model_dim.txt - text file containing model grid specifications
• dxdy.dat - text file containing value for cell length and width
• latlon.dat - text file containing value for cell latitude and longitude
• nz.dat - text file containing number of cells per water column
• REQUIRED INPUT (located in INPUT directory)
• Solar.dat - text file containing time-dependent solar radiation data (if using
Read_Solar = 1, see Section 3.2, "Input File Settings," on page 14)
• Ev.nc - NetCDF file containing time-dependent diffusivity data
• LayerDepth.nc - NetCDF file containing time-dependent layer depth data
• Salt.nc - NetCDF file containing time-dependent salinity data
• SurfaceElev.nc - NetCDF file containing time-dependent surface elevation
data
• Temp.nc- NetCDF file containing time-dependent temperature data
• WaterDepth.nc - NetCDF file containing time-dependent water depth data
• UFIow.nc - NetCDF file containing time-dependent velocity flux data for the
x-direction
• VFIow.nc - NetCDF file containing time-dependent velocity flux data for the
y-direction
• WFIow.nc - NetCDF file containing time-dependent velocity flux data for the
z-direction
• OPTIONAL INPUT (requires updates to Model_dim.txt)
• Boundary Concentrations (optional for EFDC Hydro; to turn off boundary
cells set "Number of boundary cells" (line 10) to 0 in Model_dim.txt))
• BCindices.dat
• /INPUT/TN_BoundaryConcentrations.nc
• /INPUT/N03_BoundaryConcentrations.nc
3-D-Full 3-D Grid of Cells
Description
This example describes running a 3-D simulation involving an area of cells with multi-cell
depth. This introduces complexity due to the use of advection and boundary conditions.
This example is based on an EFDC hydrodynamic grid.
Files Required
Page 38 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
• /INPUT/NH4_BoundaryConcentrations.nc
• /INPUT/DON_BoundaryConcentrations.nc
• /INPUT/TP_BoundaryConcentrations.nc
• /INPUT/DIP_BoundaryConcentrations.nc
• /INPUT/DOP_BoundaryConcentrations.nc
• /INPUT/BOD_BoundaryConcentrations.nc
• /INPUT/DO_BoundaryConcentrations.nc
• River Loadings CGEM (optional for EFDC Hydro; to turn off river loading set
"Number of rivers" (line 9) to 0 in Model_dim.txt)
• Riverlndices.dat
• RiverWeights.dat
• /INPUT/TN_RiverLoads.nc
• /INPUT/N03_RiverLoads.nc
• /INPUT/NH3_RiverLoads.nc
• /INPUT/DON_RiverLoads.nc
• /INPUT/TP_RiverLoads.nc
• /INPUT/DIP_RiverLoads.nc
• /INPUT/DOP_RiverLoads.nc
• /INPUT/BOD1_RiverLoads.nc
• /INPUT/DO_RiverLoads.nc
• River Loadings WQEM (optional for EFDC Hydro)
• /INPUT/TP_RiverLoads.nc
• /INPUT/N03_RiverLoads.nc
• /INPUT/NH4_RiverLoads.nc
• /INPUT/DON_RiverLoads.nc
• /INPUT/DIP_RiverLoads.nc
• /INPUT/DOP_RiverLoads.nc
• /INPUT/DO RiverLoads.nc
5.5.3 Running the simulation
1. Modify MyFiles.inp (located in the "data" directory) to provide complete path to the
3D_example directory.
Example:
/work/GLFBREEZ/CGEM/data/3D_example
2. Modify InputFile (GEM_lnputFile_3D_example) to set appropriate model settings and
save it as GEM_lnputFile_3D
3. Compile the serial CGEM executable using instructions in Section 2.3.1, "Serial
Compilation," on page 10.
4. Start simulation (for more information, see Section 3.4, "Executable Command Line
Arguments," on page 27) using a direct command line argument or batch script for a
HPC workload manager.
Example sbatch script (for SLURM workload manager) "submit.sh" (placed in main
CGEM directory containing "CGEM" executable):
#!/bin/csh
#SBATCH -D CGEM
#SBATCH -t 4:00:00
#SBATCH -N 2
#SBATCH -n 32
#SBATCH --gid=glfbreez
Page 39 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
#SBATCH -A glfbreez
#SBATCH --partition=debug
#SBATCH --output=logfile%j.log
source modules_intel.sh
mpirun ./CGEM CGEM ./data/Examples/3D_example/GEM_InputFile_3D
InitialConditions.txt ./NETCDF/3Dexample.
This sbatch script can be submitted to the SLURM workload manager with the
command:
sbatch submit.sh
The sbatch example script must be modified for use with a workload manager other
than SLURM, such as PBS, LSF, etc.
5.5.4 Viewing Results
Results will be written to a NetCDF file with filename and location as specified in the
executable command line argument. For the example above, this file would be located at
,/NETCDF/3Dexample.nc .
Use the R scripts found in Section 6.2, "R Scripts," on page 41 to visualize these 3-D
results.
Page 40 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
6.0 Other Scripts and Utilities
6.1 EFDC Utility
Coupling of the Environmental Fluid Dynamics Code (EFDC) with CGEM/WQEM is
facilitated by a standalone utility developed to post-process a hydrodynamic output file
from EFDC, labeled with the suffix ".hyd." This utility converts binary model output from
the .hyd file into netcdf formats required by CGEM/WQEM for advection and mixing in 1-
D, 2-D, and 3-D models. Detailed instructions for the compilation and application of the
EFDC utility is provided in the EFDC Utility User Guide.
6.2 R Scripts
Several R scripts are included with the distribution of the CGEM source code. These R
scripts perform various tasks such as generating timeseries plots of state variable
concentrations, mass balance checks, and state variable comparisons, among others.
All R scripts listed below assume the default names of the CGEM and WQEM outputs are
cgem.000000.nc and wqem.000000.nc, respectively. These default names can be
changed to some other name within the scripts. Before attempting to run any of these
scripts, place copies of them on the same directory where the model output is. The
general command to run any of these scripts on the command line is:
Rscript
where
= name of script including the "R" extension
= cgem or wqem
The R scripts can be grouped by the number of dimensions used in the CGEM run: 0D,
1D, and 3D.
6.2.1 0-D Scripts
• make_plots_0D.R - This script makes plots for the 0D models. To run this script
enter "Rscript make_plots_0D.R cgem" or "Rscript make_plots_0D.R wqem" at
the command-line prompt. It uses the scripts below.
• allvars OD.R - This script loops over every state variable and generates
timeseries plots. It uses the following script:
• timeseries plot.R - This script generates a timeseries plot.
6.2.2 1-D Scripts
• make_plots_1 D.R - This is the main script for plotting a timeseries of every
variable in the output of the 1D model. To run this script enter "Rscript
make_plots_1 D.R cgem" or "Rscript make_plots_1 D.R wqem" at the command-
line prompt. This script uses the following scripts:
• allvars_1 D.R - This script loops over every variable and calls functions
contained in the script below. The indices of the vertical layers must be set
inside the script.
• timeseries_plot.R - This script generates a timeseries plot.
• allvars_1 D_depth.R - This script plots depth profiles at selected days. The
days must be set inside the script.
Page 41 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
• make_plots_1 D_EFDC.R - This is the main script for plotting timeseries
of every state variable in the output of the EFDC-1D model for selected
vertical layers. This script is similar to "make_plots_1D.R" except it
handles EFDC output.
To run the script enter "Rscript make_plots_1D_EFDC.R cgem" or
"Rscript make_plots_1 D_EFDC.R wqem" at the command-line prompt.
This script uses the scripts below.
• allvars_1 D_EFDC.R - This script loops over every variable and calls
functions contained in the script below. The indices of the vertical layers
must be set inside this script.
• timeseries_plot.R - This script generates a timeseries plot.
• allvars_1 D_separate.R - This script is similar to "allvars_1 D.R" except that it
processes separate timeseries plots (as opposed to putting multiple plots in
the same page). This script is meant to be called by "make_plots_1 D.R". It
calls the functions contained in the script below.
• timeseries_plot.R - This script generates a timeseries plot.
• massTR_1 D.R - This script calculates the percent difference of the Tracer
concentration with respect to its initial value for each timestep, plots the
results, and stores the plots in a PDF file. It can only be run for the 1D
model.
6.2.3 2-D & 3-D Scripts
• make_plots_3D_EFDC.R - This is the main script for plotting a timeseries of
every state variable in the output of the EFDC-3D model for selected vertical
layers. This script is similar to "make_plots_1D_EFDC.R". To run the script enter
"Rscript make_plots_3D_EFDC.R cgem" or "Rscript make_plots_3D_EFDC.R
wqem" at the command-line prompt. It uses the scripts below.
• allvars_3D_EFDC.R - This script loops over every state variable and calls the
script below to generate timeseries plots. The indices of the vertical layers
must be set inside the script.
• timeseries_plot.R - This script generates a timeseries plot.
• massTR.R - This script calculates the percent difference of the Tracer
concentration with respect to its initial value for each timestep, plots the
results, and stores the plots in a PDF file. It is set up to be used for the 3D
model. The dimensions of the grid must be set inside the script.
6.2.4 Mass Balance Scripts
• MB_C.R - This script calculates the total carbon in the system as a function of
time and stores the results in a text file. This script only works for CGEM output.
The script is currently set up for the 1D model with six phytoplankton classes
although it can be easily generalized to the 3D case. To run the script enter
"Rscript MB_C.R" at the command-line prompt.
• MB_N.R - This script calculates the total nitrogen in the system as a function of
time and stores the results in a text file. This script only works for CGEM output.
The script is currently set up for the 1D model with six phytoplankton classes
although it can be easily generalized to the 3D case. To run the script enter
"Rscript MB_N.R" at the command-line prompt.
• MB_P04.R - This script calculates the total phosphate in the system as a
function of time and stores the results in a text file. This script only works for
CGEM output. The script is currently set up for the 1D model with six
Page 42 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
phytoplankton classes although it can be easily generalized to the 3D case. To
run the script enter "Rscript MB_P04.R" at the command-line prompt.
Page 43 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
7.0 References
Beck, M., Lehrter, J.C., Lowe, L.L., Jarvis, B.M. (2018). Parameter sensitivity and identifiability for a
biogeochemical model of hypoxia in the northern Gulf of Mexico. Ecol Modell. 2017 Nov 10; 363: 17-30.
Cerco, C. and T. Cole. 1995. User's Guide to the CE-QUAL-ICM Three-Dimensional Eutrophication Model.
U.S. Army Corps of Engineers, U.S. Army Engineer Waterways Experiment Station, Vicksburg, Mississippi.
Technical Report EL-95-15, 2,420 pp.
Eldridge, P. M., and Roelke, D. L.: Origins and scales of hypoxia on the Louisiana shelf: Importance of
seasonal plankton dynamics and river nutrients and discharge, Ecological Modelling, 221, 1028-1042,
http://dx.doi.orq/10.1016/i.ecolmodel.2009.04.054, 2010.
Feist, T.J., Pauer, J.J., Melendez, W. Lehrter, J.C., DePetro, P.A., Rygwelski, K.R., Ko, D.S., Kreis, R.G.
Jr. 2016. Modeling the Relative Importance of Nutrient and Carbon Loads, Boundary Fluxes, and
Sediment Fluxes on Gulf of Mexico Hypoxia. Environ. Sci. Technol. 50, 8713-8721
Jarvis, Brandon and Hagy, James D. and Melendez, Wilson and Simmons, Cody W. and Wan,
Yongshan, Measuring and Modeling Diel Oxygen Dynamics in a Shallow Hypereutrophic Estuary:
Implications of Low Oxygen Exposure on Aquatic Life, http://dx.doi.org/10.2139/ssrn.4333571
Jarvis B, Greene RM, Wan Y, Lehrter JC, Lowe LL, Ko DS (2021) Contiguous Low Oxygen Waters
between the Continental Shelf Hypoxia Zone and Nearshore Coastal Waters of Louisiana, USA:
Interpreting 30 Years of Profiling Data and Three-Dimensional Ecosystem Modeling. Environ. Sci.
Technol. https://dx.doi.org/10.1021 /acs.est.0c05973
Jarvis, B., Pauer, J., Melendez, W., Simmons, C., Wan, Y. et al. (2021) Inter-model comparison of
simulated Gulf of Mexico hypoxia in response to reduced nutrient loads: Effects of phytoplankton and
organic matter parameterization. Environmental Modelling & Software.
https://doi.ora/10.1016/i.envsoft.2022.105365
Jarvis B., Lehrter, J., Lowe, L., Hagy, J., Wan, Y., Murrell, M., Ko, D., Penta, B., Gould, R. (2020).
Modeling Spatiotemporal Patterns of Ecosystem Metabolism and Organic Carbon Dynamics Affecting
Hypoxia on the Louisiana Continental Shelf. JGR-Oceans. https://doi.org/10.1029/2019JC01563Q
Lehrter JC, Ko DS, Lowe L, Penta B. 2017. Predicted Effects of Climate Change on Northern Gulf of
Mexico Hypoxia. Chapter 8 in: Justic et al. (eds.). Modeling Coastal Hypoxia: Numerical simulations of
Patterns, Controls, and Effect of Dissolved Oxygen Dynamics. Springer, New York.
Pauer, J., W. Melendez, T. Feist, J. Lehrter, B. Rashleigh, L. Lowe, and R. Greene (2020). "The impact of
an alternative model structure and computational grid size on model predicted primary production and
hypoxic area in the northern Gulf of Mexico". Environmental Modelling and Software.
https://doi.Org/10.1016/i.envsoft.2020.104661
Pauer, J., Rowe, M.D., Melendez, W., Robertson, D., Alsip, P., Lowe, L., and Hollenhorst, T. A (2022).
modeling study to describe and predict nearshore phosphorus concentrations in Lake Michigan. Journal
of Great Lakes Research. 48, 2. 343-358. https://doi.Org/10.1016/i.jglr.2021.09.014
Pauer, J.J., Feist, T.J., Anstead, A.M., DePetro, P.A., Melendez, W., Lehrter, J.C., Murrell, M.C., Zhang,
X., Ko, D.S., 2016. A modeling study examining the impact of nutrient boundaries on primary production
on the Louisiana continental shelf. Ecol Modell 328, 136-147.
Page 44 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Appendix A:NetCDF Input File Metadata
A.1 Hydrodynamic Data
A. 1.1 U Flows
netcdf UFlow {
dimensions:
X = 24;
Y = 24;
Z = 4;
Time = 2881 ;
variables:
intX(X);
X: units = "meters" ;
X:iong_name = "X";
int Y(Y) ;
Y.units = "meters" ;
Y:iong_name = "Y";
intZ(Z);
Z: units = "meters" ;
Z:iong_name = "Z" ;
double Time(Time) ;
Time.units = "seconds" ;
Time:long_name = "Time";
float UFIow(Time, Z, Y, X) ;
UFlow: units = "m3/s";
UFIow:_FillValue = -9999. f;
}
A.1.2 V Flows
netcdf VFlow {
dimensions:
X = 24;
Y = 24;
Z = 4;
Time = 2881 ;
Page 45 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
variables:
intX(X);
X: units = "meters" ;
X:iong_name = "X";
int Y(Y) ;
Y.units = "meters" ;
Y:long_name = "Y";
intZ(Z);
Z: units = "meters" ;
Z:iong_name = "Z" ;
double Time(Time) ;
Time.units = "seconds" ;
Time:long_name = "Time";
float VFIow(Time, Z, Y, X) ;
VFlow: units = "m3/s";
VFIow:_FillValue = -9999. f;
}
A. 1.3 W Flows
netcdf WFlow {
dimensions:
X = 24;
Y = 24;
Z = 4;
Time = 2881 ;
variables:
int X(X);
X: units = "meters" ;
X:long_name = "X";
int Y(Y) ;
Y.units = "meters" ;
Y:long_name = "Y";
intZ(Z);
Z: units = "meters" ;
Z:long_name = "Z" ;
double Time(Time) ;
Time.units = "seconds" ;
Page 46 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Time:long_name = "Time";
float WFIow(Time, Z, Y, X) ;
WFIow:units = "m3/s";
WFIow:_FillValue = -9999. f;
}
A.1.4 Vertical Mixing Coefficients
netcdfEv {
dimensions:
X = 24;
Y = 24;
Z = 4;
Time = 2881 ;
variables:
intX(X);
X: units = "meters" ;
X:long_name = "X";
int Y(Y) ;
Y.units = "meters" ;
Y:long_name = "Y";
intZ(Z);
Z: units = "meters" ;
Z:long_name = "Z" ;
double Time(Time) ;
Time.units = "seconds" ;
Time:long_name = "Time";
float Ev(Time, Z, Y, X) ;
Ev.units = "m2/s" ;
:_FillValue = -9999. f;
A.1.5 Surface Elevation
netcdf SurfaceElev {
dimensions:
X = 24;
Y = 24;
Page 47 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Time = 2881;
variables:
intX(X);
X: units = "meters" ;
X:iong_name = "X";
int Y(Y) ;
Y.units = "meters" ;
Y:iong_name = "Y";
intZ(Time) ;
Z: units = "meters" ;
Z:iong_name = "Z" ;
double Time(Time) ;
Time.units = "seconds" ;
Time:long_name = "Time";
float SurfaceElev(Time, Y, X) ;
SurfaceElev.units = "meters" ;
SurfaceElev:_FillValue = -9999. f;
}
A.1.6 Volume
netcdf Volume {
dimensions:
X = 24;
Y = 24;
Z = 4;
Time = 2881 ;
variables:
int X(X);
X: units = "meters" ;
X:long_name = "X";
int Y(Y) ;
Y.units = "meters" ;
Y:long_name = "Y";
intZ(Z);
Z: units = "meters" ;
Z:long_name = "Z" ;
double Time(Time) ;
Page 48 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Time:units = "seconds";
Time:long_name = "Time";
float Volume(Time, Z, Y, X) ;
Volume.units = "m3";
Volume :_FillValue = -9999. f;
}
A. 1.7 Water Depth
netcdf WaterDepth {
dimensions:
X = 24;
Y = 24;
Time = 2881 ;
variables:
intX(X);
X: units = "meters" ;
X:long_name = "X";
int Y(Y) ;
Y.units = "meters" ;
Y:long_name = "Y";
intZ(Time) ;
Z: units = "meters" ;
Z:long_name = "Z" ;
double Time(Time) ;
Time.units = "seconds" ;
Time:long_name = "Time";
float WaterDepth(Time, Y, X) ;
WaterDepth.units = "meters" ;
WaterDepth:_FillValue = -9999. f;
}
A. 1.8 Layer Depth
netcdf LayerDepth {
dimensions:
X = 24;
Y = 24;
Page 49 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Z = 4;
Time = 2881 ;
variables:
intX(X);
X: units = "meters" ;
X:iong_name = "X";
int Y(Y) ;
V.units = "meters" ;
Y:iong_name = "Y";
intZ(Z);
Z: units = "meters" ;
Z:iong_name = "Z" ;
double Time(Time) ;
Time.units = "seconds" ;
Time:long_name = "Time";
float LayerDepth(Time, Z, Y, X) ;
LayerDepth: units = "meters" ;
LayerDepth:_FillValue = -9999. f;
}
A.1.9 Temperature
netcdf Temp {
dimensions:
X = 24;
Y = 24;
Z = 4;
Time = 2881 ;
variables:
int X(X);
X: units = "meters" ;
X:long_name = "X";
int Y(Y) ;
Y.units = "meters" ;
Y:long_name = "Y";
intZ(Z);
Z: units = "meters" ;
Z:long_name = "Z" ;
Page 50 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
double Time(Time);
Time.units = "seconds" ;
Time:long_name = "Time";
float Temp(Time, Z, Y, X) ;
Temp.units = "Celsius" ;
Temp:_FillValue = -9999. f;
}
A.1.10Salinity
netcdf Salt {
dimensions:
X = 24;
Y = 24;
Z = 4;
Time = 2881 ;
variables:
intX(X);
X: units = "meters" ;
X:long_name = "X";
int Y(Y) ;
Y.units = "meters" ;
Y:long_name = "Y";
intZ(Z);
Z: units = "meters" ;
Z:long_name = "Z" ;
double Time(Time) ;
Time.units = "seconds" ;
Time:long_name = "Time";
float Salt(Time, Z, Y, X) ;
Salt: units = "ppt";
Salt:_FillValue = -9999. f;
}
A.2 River Loads
The current CGEM model can input river loads for 9 state variables: BOD1, DIP, DON,
DOP, DO, NH3, N03, TN, and TP. The current WQEM model can input river loads for 7
state variables: DIP, DON, DOP, DO, NH3, N03, and TP.
Page 51 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Each state variable has its own netcdf file containing its river loads. The format of these
files is the same for all state variables. An example of this format is:
netcdf _RiverLoads {
dimensions:
Number_Rivers = 8 ;
Time = 304 ;
variables:
int Number_Rivers(Number_Rivers) ;
Number_Rivers: units = "unitiess" ;
Number_Rivers:iong_name = "Number_Rivers" ;
double Time(Time) ;
Time.units = "seconds" ;
Time:long_name = "Time";
float (Time, Number_Rivers) ;
:units = "kg/s";
}
where = BOD1, DIP, DON, DOP, DO, NH3, N03, TN, or TP.
A.3 Boundary Conditions
The current CGEM model can input boundary concentrations for 9 state variables: BOD,
DIP, DON, DOP, DO, NH3, N03, TN, and TP. The current WQEM model can input
boundary concentrations for seven state variables: DIP, DON, DOP, DO, NH3, N03, and
TP.
Each state variable has its own netcdf file containing its boundary concentrations. The
format of these files is the same for all state variables. An example of this format is:
netcdf _BoundaryConcentrations {
dimensions:
Number_BoundaryCells = 12 ;
Time = 2 ;
variables:
int Number_BoundaryCells(Number_BoundaryCells) ;
Number_BoundaryCells: units = "unitiess" ;
Number_BoundaryCells:long_name = "Number_BoundaryCells" ;
double Time(Time) ;
Time.units = "seconds" ;
Time:long_name = "Time";
Page 52 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
float (Time, Number_BoundaryCells) ;
:units = "mg/l";
}
where = BOD, DIP, DON, DOP, DO, NH3, N03, TN, or TP.
Page 53 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
Appendix B: CGEM Directory Structure
|- CGEM
| |~ GEMJnputFile
| I- GEM_lnputFile_save
| I- Makefile
| I- Makefile_par_gen
| I- Makefile_serial_gen
| I- NETCDF
| | |--AIIVars_GoMDOM.R
| | I™ MB_C.R
| | I™ MB_N.R
| | |" MB_P04.R
| | I- MultiVarPng.R
| | I- R3D_timeseries.R
| | I- allvars_0D.R
| | I- allvars_1D.R
| | I— allvars_1D_EFDC.R
| | |-allvars_1D_depth.R
| | I- allvars_1D_separate.R
| | I- allvars_3D_EFDC.R
| | |~ compare_vars_1 D.R
| | |-compare_vars_1 D_4.R
| | I- compare_vars_1 D_4_all.R
| | I- compare_vars_depth.R
| | I- compare_vars_depth7.R
| | I- compare_vars_sub_1 D.R
| | I- debug.R
| | I- make_plots_0D.R
| | I- make_plots_1 D.R
| | I- make_plots_1 D_EFDC.R
| | |-make_plots_1 D_compare.R
| | I- make_plots_1 D_compare4.R
| | I- make_plots_1 D_compare7.R
| | I- make_plots_3D_EFDC.R
| | I- massTR.R
I I I-massTR 1D.R
Page 54 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
timeseries_plot.R
- SDM
I— hypox_input.csv
I- normoxia.dat
ph2bprofile.dat
- WQEMJnputFile
- WQEM_lnputFile_LakeOntario
- WQEM_lnputFile_save
- cgem_src
|~ Allocate_lnput_CGEM.F90
|-- CGEM.F90
|-- CGEM_Flux.F90
|-- CGEM_vars.F90
|-- Calc_Chla.F90
|-- Call_IOP_PAR.F90
I- Check_lnputFile_CGEM.F90
|~ DailyRad.F90
|~ DailyRad_init.F90
|-- Flux_CGEM.F90
|-- INPUT_VARS_CGEM.F90
I- lnitError_Check_CGEM.F90
|~ lnit_Output_CGEM.F90
|-- JWMod.F90
|-- JW_SOC.F90
|-- Light_WQEM.F90
|-- MASS_BALANCE_CGEM.F90
|-- MATLAB.F90
|-- MC_Flux.F90
|-- MC_GEM.F90
|-- Meta_SOC.F90
|-- Mod_Filedata2.F90
|~ Model_Compare.F90
|~ Model_Diagenesis.F90
|- Model_Finalize_CGEM.F90
|~ Model_Output_CGEM.F90
|-- OUTPUT_NETCDF_CGEM.F90
I- OUTPUT NOTCLOERN.F90
Page 55 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
|-- OUTPUT_NRL.F90
I- Read_lnputFile_CGEM.F90
|-- SDM.F90
|-- STOICH_VARS.F90
I- Salinity_Regression_lnit_CGEM.F90
I- Sediment_Diagenesis_Flux.F90
|~ Sediment_Diagenesis_Routines.F90
|~ Set_lnitial_Conditions_CGEM.F90
|-- T_WQEM.F90
|~ Transport_CGEM.F90
|-- Write_lnputFile_CGEM.F90
|~ calc_Agrow.F90
|~ changeA.F90
|-- func_E.F90
|~ func_Qs.F90
I- func_S.F90
|-- func_T.F90
|~ nparray.F90
src_files
- data
I- Examples
| I- 0D_example
| | I- GEM_lnputFile_OD_example
| | |--INPUT
| | | l~Sal.dat
I I I |~ Solar.dat
| | | l~Temp.dat
| | | '--Wind.dat
| | |~ lnitialConditions.txt
| | |~ lnitialConditions_GD.txt
| | I- Model_dim.txt
| | l--S.dat
| | l--T.dat
| | l--Vol.dat
| | l--d.dat
| | I- d_sfc.dat
| | I- dxdy.dat
Page 56 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
I- dz.dat
I- latlon.dat
nz.dat
- 1 D_example
I- Depth.dat
I- GEM_lnputFile_1 D_example
|-- INPUT
| |-E.nc
| I- Ev.nc
| |-KH.nc
| I- LayerDepth.nc
| |-S.nc
| |~ Salt.nc
| I- Solar.dat
| I- SurfaceElev.nc
| |-T.nc
| |~Temp.nc
| |~ U.nc
| I- UFIow.nc
| |~V.nc
| I- VFIow.nc
| |-W.nc
| I- WFIow.nc
| WaterDepth.nc
I- lnitialConditions.txt
|~ lnitialConditions_WQEM.txt
|~ Model_dim.txt
|~ TopoS.dat
|~ d.dat
I- dxdy.dat
I- latlon.dat
I- lxly.dat
I- mask.dat
nz.dat
- 2D_example
|~ GEM_lnputFile_2d_example
I-- INPUT
Page 57 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
I- BOD1_RiverLoads.nc
I- BOD_BoundaryConcentrations.nc
I- DIP_BoundaryConcentrations.nc
I- DIP_RiverLoads.nc
I- DON_BoundaryConcentrations.nc
I- DON_RiverLoads.nc
|~ DOP_BoundaryConcentrations.nc
|~ DOP_RiverLoads.nc
|~ DO_BoundaryConcentrations.nc
|~ DO_RiverLoads.nc
I- Ev.nc
I- LayerDepth.nc
|~ NH3_RiverLoads.nc
|~ NH4_BoundaryConcentrations.nc
|~ N03_BoundaryConcentrations.nc
I- N03_RiverLoads.nc
|~ Salt.nc
|~ Solar.dat
I- SurfaceElev.nc
|~ TN_BoundaryConcentrations.nc
I- TN_RiverLoads.nc
|~ TP_BoundaryConcentrations.nc
|~ TP_RiverLoads.nc
|~ Temp.nc
|~ UFIow.nc
I- VFIow.nc
I- Volume.nc
I- WFIow.nc
WaterDepth.nc
- lnitialConditions.txt
- lnitialConditions_WQEM.txt
- Model_dim.txt
- WQEM_lnputFile_2D_example
- cell.inp
- control.dat
- d.dat
- dxdy.dat
Page 58 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
I- dxdy.inp
I- latlon.dat
I- lxly.dat
I- Ixly.inp
nz.dat
- 3D_example
I- GEM_lnputFile_3d_example
|-- INPUT
| I- BOD1_RiverLoads.nc
| I- BOD_BoundaryConcentrations.nc
| |~ DIP_BoundaryConcentrations.nc
| I- DIP_RiverLoads.nc
| |~ DON_BoundaryConcentrations.nc
| |~ DON_RiverLoads.nc
| I- DOP_BoundaryConcentrations.nc
| |~ DOP_RiverLoads.nc
| I- DO_BoundaryConcentrations.nc
| |~ DO_RiverLoads.nc
| |~ Ev.nc
| I- LayerDepth.nc
| |~ NH3_RiverLoads.nc
| I- NH4_BoundaryConcentrations.nc
| |~ N03_BoundaryConcentrations.nc
| |~ N03_RiverLoads.nc
| I- Salt.nc
| I- Solar.dat
| I- SurfaceElev.nc
| I- TN_BoundaryConcentrations.nc
| I- TN_RiverLoads.nc
| I- TP_BoundaryConcentrations.nc
| |~ TP_RiverLoads.nc
| |~Temp.nc
| |~ UFIow.nc
| I- VFIow.nc
| I- Volume.nc
| I- WFIow.nc
| WaterDepth.nc
Page 59 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
| | I- lnitialConditions.txt
| | I- lnitialConditions_WQEM.txt
| | I- Model_dim.txt
| | I- WQEM_lnputFile_3D_example
| | l--d.dat
| | I- dxdy.dat
| | I- latlon.dat
| | I- lxly.dat
| | nz.dat
I- MyFiles.inp
MyFiles.inp_save
- main_src
|-- Adv3D.F90
|~ AdvNeighborsOrdered.F90
|~ AdvNeighborsOrdered_fake.F90
|~ Allocate_lnput_Vars.F90
I- Ave_istep_Offset.F90
|~ BoundaryConcentration.F90
|-- Calc_Sal.F90
|~ Calc_Temp.F90
|~ Command_Line_Args.F90
|~ Conversions.F90
|-- DATE_TIME.F90
|~ Decomp1D.F90
|-- Flux.F90
|~ Get_Vars.F90
|-- Grid.F90
|-- Hydro.F90
|-- INPUT_VARS.F90
|~ lnitialize_Output.F90
|~ lnitialize_State_Vars.F90
I- lnterp_utils.F90
|-- JY.F90
|-- LIGHT_VARS.F90
|-- MOD_UTILITIES.F90
|~ MPI_dummy.F90
I- Model Finalize.F90
Page 60 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
- Model_Output.F90
- Model_dim.F90
-- NETCDFJJTILITIES.F90
- Nitrification.F90
-- OUTPUT.F90
-- OUTPUT_ALL_FALSE.F90
-- PNETCDF_UTILITIES.F90
-- Q10_T.F90
-- Read_CMAQ_NH4_SVflux_bin.F90
-- Read_CMAQ_NO3_SVflux_bin.F90
- Read_lnputFile.F90
- RiverLoad.F90
- State_Vars.F90
-- TEMP_VARS.F90
- Transport.F90
-- USER_Read_Sal.F90
-- USER_Read_Solar.F90
- USER_Read_Temp.F90
-- USER_Read_Wind.F90
- USER_Set_lnitial_Conditions.F90
- USER_getLonLat.F90
-- USER_get_EFDC_grid.F90
-- USER_get_NCOM_grid.F90
-- USER_get_POM_grid.F90
- USER_get_basic_grid.F90
- USER_get_masks.F90
- VMixing.F90
-- WQ_Model.F90
-- Which_Flux.F90
- blah
- calc_solar_zenith.F90
- error.F90
- fake_mpi_interface.F90
-- fillval.F90
- getSolar.F90
- main.F90
- mpi_interface.F90
Page 61 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
I- my_wtime.F90
I- netcdf_utils.F90
I- p_netcdf.F90
I- reaction.F90
I- rnitrate.F90
I- s_mpi.F90
I- s_netcdf.F90
|~ serial.F90
I- serial_fake.F90
|~ src_files_par
I- src_files_serial
sunang.F90
- moc_src
|~ constants.F90
|~ depth2press.F90
|-- f2pCO2.F90
|~ gasx.F90
|-- p2fCO2.F90
|-- p80.F90
|~ phsolvers.F90
|-- rho.F90
|~ rhoinsitu.F90
|~ singledouble.F90
|~ src_files
|~ sw_adtg.F90
I- sw_ptmp.F90
|~ sw_temp.F90
|~ vars.F90
varsolver.F90
- modules_gfortran.sh
- modules_gfortran_iris.sh
- modules_intel.sh
- modulesjnteljris.sh
- mpi_interface.h
- sdm_src
|-- MATLAB.f
I- coupleRate.f
Page 62 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
| I- model.f
| I- src_files
| vode.f
I- submitFiles
| I- submit.par.cgem.sh
| I- submit.par.gd.sh
| I- submit.serial.cgem.sh
| submit.serial.gd.sh
wqem_src
I- Allocate_lnput_WQEM.F90
I- Brad_Light_Model.F90
|-- Flux_WQEM.F90
|-- INPUT_VARS_WQEM.F90
|~ lnRemin.F90
I- lnitError_Check_WQEM.F90
|~ lnit_Output_WQEM.F90
|-- MASS_BALANCE_WQEM.F90
|-- Model_Finalize_WQEM.F90
|-- Model_Output_WQEM.F90
|-- OUTPUT_NETCDF_WQEM.F90
|-- Read_lnputFile_WQEM.F90
|~ Salinity_Regression_lnit_WQEM.F90
|~ Set_lnitial_Conditions_WQEM.F90
|~ Transport_WQEM.F90
|-- WQEM.F90
|-- WQEM_Light_Model.F90
|-- Write_lnputFile_WQEM.F90
|~ carbon.F90
|~ diatoms.F90
I- diatoms_droop.F90
|~ dissolved_oxygen.F90
|~ eut.F90
|~ exchange.F90
|~ exchange_droop.F90
I- flags.F90
I- greens.F90
I- greens_droop.F90
Page 63 of 64
-------
Coastal Generalized Ecosystem Model (CGEM) Version 1.0
User Guide
| I- nitrog.F90
| I- nitrog_droop.F90
| I- phosph.F90
| I- phosph_droop.F90
| I- silica.F90
| I- src_files
| I- states.F90
| zoo.F90
I- CGEM_User_Guide_V1 .docx
README.md
Page 64 of 64
-------
vvEPA
United States
Environmental Protection
Agency
PRESORTED STANDARD
POSTAGE & FEES PAID
EPA
PERMIT NO. G-35
Office of Research and Development (8101R)
Washington, DC 20460
Official Business
Penalty for Private Use
$300
Recycled/Recyclable Printed on paper that contains a minimum of
50% postoonsumer fiber content processed chlorine free
------- |