cgeniepy.ecology#
Classes#
EcoModel is an subclass of GenieModel, as EcoGENIE to cGENIE |
Module Contents#
- class cgeniepy.ecology.EcoModel(*args, **kwargs)#
Bases:
cgeniepy.model.GenieModelEcoModel is an subclass of GenieModel, as EcoGENIE to cGENIE
It facilitates the access of ecophysiological parameters and plankton variables
Initialise a EcoModel object with a path to cGENIE output directory
Example#
>>> from cgeniepy.ecology import EcoModel >>> model = EcoModel("path_to_GENIE_output")
- eco_varlist#
- plank_n#
- phyto_indices#
- zoo_indices#
- mixo_indices#
- phyto_n#
- zoo_n#
- mixo_n#
- eco_pars()#
Get all the ecophysiological parameters used in the model
- Returns:
a pandas DataFrame object
- get_pft(pft_index, prefix='Plankton', element='C')#
a variant of GenieModel’s get_var, to select plankton functional type
- Parameters:
pft_index – the index of plankton functional type
prefix – ‘Plankton’ or ‘Export’
element – ‘C’, ‘Fe’, ‘P’, ‘Si’, ‘N’
- Returns:
a GenieArray object
Example#
>>> from cgeniepy.ecology import EcoModel
>>> ### initialise a model object >>> model = EcoModel("path_to_GENIE_output")
>>> ### get PFT-1 carbon biomass data >>> model.get_pft(1, "Plankton", "C")
>>> ### get a list of PFT carbon biomass data >>> model.get_pft([1, 2, 3], "Plankton", "C")
>>> ### get all phytoplankton carbon biomass data >>> model.get_pft('phyto', "Plankton", "C")
>>> ### get all zooplankton carbon biomass data >>> model.get_pft('zoo', "Plankton", "C")
>>> ### get all plankton carbon biomass data >>> model.get_pft('all', "Plankton", "C")