openModeller  Version 1.5.0
aquamaps.hh File Reference
#include <openmodeller/om.hh>
#include <string.h>
#include <sqlite3.h>
Include dependency graph for aquamaps.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  AquaMaps
 

Variables

const Scalar DEPTH_LIMIT = 200.0
 
const Scalar MINIMUM_MAXDEPTH = 0.0
 
const Scalar MAXIMUM_MAXDEPTH = 9999.0
 
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_MAXDEPTH = 0.0
 
const Scalar MINIMUM_MINDEPTH = 0.0
 
const Scalar MAXIMUM_MINDEPTH = 9999.0
 
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_MINDEPTH = 0.0
 
const Scalar MINIMUM_ICE_CONCENTRATION = 0.0
 
const Scalar MAXIMUM_ICE_CONCENTRATION = 1.5
 
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_ICE_CONCENTRATION = 0.0
 
const Scalar MINIMUM_DISTANCE_TO_LAND = 0.0
 
const Scalar MAXIMUM_DISTANCE_TO_LAND = 4200.0
 
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_DISTANCE_TO_LAND = 2.0
 
const Scalar MINIMUM_PRIMARY_PRODUCTION = 0.0
 
const Scalar MAXIMUM_PRIMARY_PRODUCTION = 6000.0
 
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_PRIMARY_PRODUCTION = 2.0
 
const Scalar MINIMUM_SURFACE_SALINITY = 3.56
 
const Scalar MAXIMUM_SURFACE_SALINITY = 40.2
 
const Scalar MINIMUM_BOTTOM_SALINITY = 3.5
 
const Scalar MAXIMUM_BOTTOM_SALINITY = 40.9
 
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_SALINITY = 1.0
 
const Scalar MINIMUM_SURFACE_TEMPERATURE = -2.0
 
const Scalar MAXIMUM_SURFACE_TEMPERATURE = 30.0
 
const Scalar MINIMUM_BOTTOM_TEMPERATURE = -2.0
 
const Scalar MAXIMUM_BOTTOM_TEMPERATURE = 30.0
 
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_TEMPERATURE = 1.0
 
const Scalar SURFACE_LOWER_LIMIT [7]
 
const Scalar BOTTOM_LOWER_LIMIT [7]
 
const Scalar SURFACE_UPPER_LIMIT [7]
 
const Scalar BOTTOM_UPPER_LIMIT [7]
 
const Scalar INNER_SIZE [7]
 
const std::string NAME [7]
 
const int MAXDEPTH = 0
 
const int MINDEPTH = 1
 
const int ICE_CONCENTRATION = 2
 
const int DISTANCE_TO_LAND = 3
 
const int PRIMARY_PRODUCTION = 4
 
const int SALINITY = 5
 
const int TEMPERATURE = 6
 

Variable Documentation

const Scalar BOTTOM_LOWER_LIMIT[7]
Initial value:
const Scalar MINIMUM_ICE_CONCENTRATION
Definition: aquamaps.hh:93
const Scalar MINIMUM_BOTTOM_TEMPERATURE
Definition: aquamaps.hh:116
const Scalar MINIMUM_MINDEPTH
Definition: aquamaps.hh:89
const Scalar MINIMUM_DISTANCE_TO_LAND
Definition: aquamaps.hh:97
const Scalar MINIMUM_PRIMARY_PRODUCTION
Definition: aquamaps.hh:101
const Scalar MINIMUM_BOTTOM_SALINITY
Definition: aquamaps.hh:108
const Scalar MINIMUM_MAXDEPTH
Definition: aquamaps.hh:85

Definition at line 129 of file aquamaps.hh.

Referenced by AquaMaps::_calculateEnvelopes().

const Scalar BOTTOM_UPPER_LIMIT[7]
Initial value:
const Scalar MAXIMUM_BOTTOM_TEMPERATURE
Definition: aquamaps.hh:117
const Scalar MAXIMUM_BOTTOM_SALINITY
Definition: aquamaps.hh:109
const Scalar MAXIMUM_MINDEPTH
Definition: aquamaps.hh:90
const Scalar MAXIMUM_DISTANCE_TO_LAND
Definition: aquamaps.hh:98
const Scalar MAXIMUM_MAXDEPTH
Definition: aquamaps.hh:86
const Scalar MAXIMUM_ICE_CONCENTRATION
Definition: aquamaps.hh:94
const Scalar MAXIMUM_PRIMARY_PRODUCTION
Definition: aquamaps.hh:102

Definition at line 145 of file aquamaps.hh.

Referenced by AquaMaps::_calculateEnvelopes().

const Scalar DEPTH_LIMIT = 200.0

Declaration of AquaMaps Algorithm.

Author
Renato De Giovanni <renato [at] cria dot org dot br>
Date
2006-08-07
Id:
aquamaps.hh 5928 2014-03-17 21:22:24Z rdg

LICENSE INFORMATION

Copyright(c) 2006 by CRIA - Centro de Referência em Informação Ambiental

http://www.cria.org.br

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:

http://www.gnu.org/copyleft/gpl.html Notes

This algorithm requires access to a SQLite database (aquamaps.db) which contains depth range information about marine species.

The original database comes from the Incofish projet (http://www.incofish.org/). It is an Access database with the main tables: HCAF (env data), HSPEC (probabilities), HSPEN (species data).

To export data to the SQLite database it is necessary to create a query in the Access database using this SQL statement:

SELECT HSPEN.SpeciesID, SpeciesOccursum.genus+' '+SpeciesOccursum.species AS name, hspen.pelagic, Speciesaddinfo.Provider, hspen.depthmin, hspen.depthprefmin, hspen.depthprefmax, hspen.depthmax, hspen.tempmin, hspen.tempmax, hspen.tempprefmin, hspen.tempprefmax, hspen.salinitymin, hspen.salinitymax, hspen.salinityprefmin, hspen.salinityprefmax, hspen.primprodmin, hspen.primprodmax, hspen.primprodprefmin, hspen.primprodprefmax, hspen.iceconmin, hspen.iceconmax, hspen.iceconprefmin, hspen.iceconprefmax, hspen.landdistmin, hspen.landdistmax, hspen.landdistprefmin, hspen.landdistprefmax FROM (hspen INNER JOIN SpeciesOccursum ON HSPEN.SpeciesID=SpeciesOccursum.SPECIESID) LEFT JOIN Speciesaddinfo ON HSPEN.SpeciesID=Speciesaddinfo.SpeciesID WHERE hspen.depthmin Is Not Null And Speciesaddinfo.Provider = "MM" UNION SELECT HSPEN.SpeciesID, SpeciesOccursum.genus+' '+SpeciesOccursum.species AS name, hspen.pelagic, Speciesaddinfo.Provider, hspen.depthmin, hspen.depthprefmin, hspen.depthprefmax, hspen.depthmax, Null AS tempmin, Null AS tempmax, Null AS tempprefmin, Null AS tempprefmax, Null AS salinitymin, Null AS salinitymax, Null AS salinityprefmin, Null AS salinityprefmax, Null AS primprodmin, Null AS primprodmax, Null AS primprodprefmin, Null AS primprodprefmax, Null AS iceconmin, Null AS iceconmax, Null AS iceconprefmin, Null AS iceconprefmax, Null AS landdistmin, Null AS landdistmax, Null AS landdistprefmin, Null AS landdistprefmax FROM (hspen INNER JOIN SpeciesOccursum ON HSPEN.SpeciesID=SpeciesOccursum.SPECIESID) LEFT JOIN Speciesaddinfo ON HSPEN.SpeciesID=Speciesaddinfo.SpeciesID WHERE hspen.depthmin Is Not Null And Speciesaddinfo.Provider <> "MM";

The result of this query must be exported to a csv file in US-ASCII, without header, separated by TABs, without text qualifier and using "." as the decimal separator.

To create and import data to a SQLite database, use:

sqlite3 aquamaps.db sqlite> CREATE TABLE spinfo (id TEXT, species TEXT, pelagic INTEGER, provider TEXT, depthmin REAL, depthprefmin REAL, depthprefmax REAL, depthmax REAL, tempmin REAL, tempmax REAL, tempprefmin REAL, tempprefmax REAL, salinitymin REAL, salinitymax REAL, salinityprefmin REAL, salinityprefmax REAL, primprodmin REAL, primprodmax REAL, primprodprefmin REAL, primprodprefmax REAL, iceconmin REAL, iceconmax REAL, iceconprefmin REAL, iceconprefmax REAL, landdistmin REAL, landdistmax REAL, landdistprefmin REAL, landdistprefmax REAL); sqlite> .separator sqlite> .import location_of_csv_file spinfo sqlite> CREATE INDEX idx_species ON spinfo(species); sqlite> .q

In case you are wondering why this algorithm requires all 9 layers to be specified (instead of letting the user specify a smaller set only with bottom layers or surface layers) the reason is that users may not know whether to choose bottom or surface layers. In this case, if the species has depth ranges in the local database, then the algorithm will be able to decide what subset of layers to use.

Definition at line 83 of file aquamaps.hh.

Referenced by AquaMaps::_calculateEnvelopes().

const int DISTANCE_TO_LAND = 3

Definition at line 174 of file aquamaps.hh.

Referenced by AquaMaps::_hasExpertRange(), and AquaMaps::initialize().

const int ICE_CONCENTRATION = 2
const Scalar INNER_SIZE[7]
Initial value:
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_PRIMARY_PRODUCTION
Definition: aquamaps.hh:103
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_TEMPERATURE
Definition: aquamaps.hh:119
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_MAXDEPTH
Definition: aquamaps.hh:87
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_DISTANCE_TO_LAND
Definition: aquamaps.hh:99
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_ICE_CONCENTRATION
Definition: aquamaps.hh:95
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_MINDEPTH
Definition: aquamaps.hh:91
const Scalar MINIMUM_ENVELOPE_SIZE_FOR_SALINITY
Definition: aquamaps.hh:111

Definition at line 153 of file aquamaps.hh.

const int MAXDEPTH = 0
const Scalar MAXIMUM_BOTTOM_SALINITY = 40.9

Definition at line 109 of file aquamaps.hh.

const Scalar MAXIMUM_BOTTOM_TEMPERATURE = 30.0

Definition at line 117 of file aquamaps.hh.

const Scalar MAXIMUM_DISTANCE_TO_LAND = 4200.0

Definition at line 98 of file aquamaps.hh.

const Scalar MAXIMUM_ICE_CONCENTRATION = 1.5

Definition at line 94 of file aquamaps.hh.

const Scalar MAXIMUM_MAXDEPTH = 9999.0

Definition at line 86 of file aquamaps.hh.

const Scalar MAXIMUM_MINDEPTH = 9999.0

Definition at line 90 of file aquamaps.hh.

const Scalar MAXIMUM_PRIMARY_PRODUCTION = 6000.0

Definition at line 102 of file aquamaps.hh.

const Scalar MAXIMUM_SURFACE_SALINITY = 40.2

Definition at line 106 of file aquamaps.hh.

const Scalar MAXIMUM_SURFACE_TEMPERATURE = 30.0

Definition at line 114 of file aquamaps.hh.

const int MINDEPTH = 1
const Scalar MINIMUM_BOTTOM_SALINITY = 3.5

Definition at line 108 of file aquamaps.hh.

const Scalar MINIMUM_BOTTOM_TEMPERATURE = -2.0

Definition at line 116 of file aquamaps.hh.

const Scalar MINIMUM_DISTANCE_TO_LAND = 0.0

Definition at line 97 of file aquamaps.hh.

const Scalar MINIMUM_ENVELOPE_SIZE_FOR_DISTANCE_TO_LAND = 2.0

Definition at line 99 of file aquamaps.hh.

const Scalar MINIMUM_ENVELOPE_SIZE_FOR_ICE_CONCENTRATION = 0.0

Definition at line 95 of file aquamaps.hh.

const Scalar MINIMUM_ENVELOPE_SIZE_FOR_MAXDEPTH = 0.0

Definition at line 87 of file aquamaps.hh.

const Scalar MINIMUM_ENVELOPE_SIZE_FOR_MINDEPTH = 0.0

Definition at line 91 of file aquamaps.hh.

const Scalar MINIMUM_ENVELOPE_SIZE_FOR_PRIMARY_PRODUCTION = 2.0

Definition at line 103 of file aquamaps.hh.

const Scalar MINIMUM_ENVELOPE_SIZE_FOR_SALINITY = 1.0

Definition at line 111 of file aquamaps.hh.

const Scalar MINIMUM_ENVELOPE_SIZE_FOR_TEMPERATURE = 1.0

Definition at line 119 of file aquamaps.hh.

const Scalar MINIMUM_ICE_CONCENTRATION = 0.0

Definition at line 93 of file aquamaps.hh.

const Scalar MINIMUM_MAXDEPTH = 0.0

Definition at line 85 of file aquamaps.hh.

const Scalar MINIMUM_MINDEPTH = 0.0

Definition at line 89 of file aquamaps.hh.

const Scalar MINIMUM_PRIMARY_PRODUCTION = 0.0

Definition at line 101 of file aquamaps.hh.

const Scalar MINIMUM_SURFACE_SALINITY = 3.56

Definition at line 105 of file aquamaps.hh.

const Scalar MINIMUM_SURFACE_TEMPERATURE = -2.0

Definition at line 113 of file aquamaps.hh.

const std::string NAME[7]
Initial value:
= { "maximum depth",
"minimum depth",
"ice concentration",
"distance to land",
"primary production",
"salinity",
"temperature" }

Definition at line 161 of file aquamaps.hh.

Referenced by AquaMaps::_readSpeciesData().

const int PRIMARY_PRODUCTION = 4

Definition at line 175 of file aquamaps.hh.

Referenced by AquaMaps::_hasExpertRange(), and AquaMaps::initialize().

const int SALINITY = 5
const Scalar SURFACE_LOWER_LIMIT[7]
Initial value:
const Scalar MINIMUM_ICE_CONCENTRATION
Definition: aquamaps.hh:93
const Scalar MINIMUM_MINDEPTH
Definition: aquamaps.hh:89
const Scalar MINIMUM_DISTANCE_TO_LAND
Definition: aquamaps.hh:97
const Scalar MINIMUM_SURFACE_SALINITY
Definition: aquamaps.hh:105
const Scalar MINIMUM_PRIMARY_PRODUCTION
Definition: aquamaps.hh:101
const Scalar MINIMUM_SURFACE_TEMPERATURE
Definition: aquamaps.hh:113
const Scalar MINIMUM_MAXDEPTH
Definition: aquamaps.hh:85

Definition at line 121 of file aquamaps.hh.

const Scalar SURFACE_UPPER_LIMIT[7]
Initial value:
const Scalar MAXIMUM_SURFACE_TEMPERATURE
Definition: aquamaps.hh:114
const Scalar MAXIMUM_MINDEPTH
Definition: aquamaps.hh:90
const Scalar MAXIMUM_DISTANCE_TO_LAND
Definition: aquamaps.hh:98
const Scalar MAXIMUM_SURFACE_SALINITY
Definition: aquamaps.hh:106
const Scalar MAXIMUM_MAXDEPTH
Definition: aquamaps.hh:86
const Scalar MAXIMUM_ICE_CONCENTRATION
Definition: aquamaps.hh:94
const Scalar MAXIMUM_PRIMARY_PRODUCTION
Definition: aquamaps.hh:102

Definition at line 137 of file aquamaps.hh.