Commit 628d8cb8 authored by Lee de Mora's avatar Lee de Mora

First change.

parent 2b56e664
#
# Copyright 2015, Plymouth Marine Laboratory
#
# This file is part of the GMD-2015-135 toolkit, associated with the Geoscientific
# Model Development paper: gmd-2015-135,
# Submitted on 26 Jun 2015
# The role of ecosystem function and emergent relationships in the assessment of global marine ecosystem models: a case study with ERSEM
# L. de Mora, M. Butenschon, and J. I. Allen.
# Geosci. Model Dev. Discuss., 8, 6095-6141, 2015
# www.geosci-model-dev-discuss.net/8/6095/2015/
# doi:10.5194/gmdd-8-6095-2015
#
# The GMD-2015-135 toolkit is free software: you can redistribute it and/or modify it
# under the terms of the Revised Berkeley Software Distribution (BSD) 3-clause license.
# The GMD-2015-135 toolkit 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 revised BSD license for more details.
# You should have received a copy of the revised BSD license along with ukesm-validation.
# If not, see <http://opensource.org/licenses/BSD-3-Clause>.
#
# Address:
# Plymouth Marine Laboratory
# Prospect Place, The Hoe
# Plymouth, PL1 3DH, UK
#
# Email:
# ledm@pml.ac.uk
#
class C2Chl:
"""class for relationships of carbon to chlorophyll following
Sathyendranath et al. 2009.
......
......@@ -31,11 +31,13 @@
This toolkit was used to produce the plots from the paper:
The role of ecosystem function and emergent relationships in the assessment of global marine ecosystem models: a case study with ERSEM
L. de Mora, M. Butenschön, and J. I. Allen.
Geosci. Model Dev. Discuss., 8, 6095-6141, 2015
www.geosci-model-dev-discuss.net/8/6095/2015/
doi:10.5194/gmdd-8-6095-2015
The role of ecosystem function and emergent relationships in the assessment of global marine ecosystem models: a case study with ERSEM
L. de Mora, M. Butenschön, and J. I. Allen.
Geosci. Model Dev. Discuss., 8, 6095-6141, 2015
www.geosci-model-dev-discuss.net/8/6095/2015/
doi:10.5194/gmdd-8-6095-2015
Please note the following caveats:
......@@ -49,9 +51,16 @@ Please note the following caveats:
in the ORCA1 global model grid, accessing data on the PML local network,
so changes to the code WILL be required to apply them in any other environment.
5. All these toolks use command line arguments to load specific model runs and years.
These command line arguments will not be useful outside.
6. All tools produces plots beyond those used in the publication.
These tools require the followin python dictionaries:
These tools require the following python dictionaries:
matplotlib
netCDF4
numpy
......@@ -59,6 +68,36 @@ These tools require the followin python dictionaries:
shelve
pandas
They also require the following gitlab tools:
communitystructure
C2Chl
The tools are:
pftHistograms.py:
this produces the community structure plots from section 3.1 of the paper.
c2chlplots.py:
Produces the carbon:chlorophyll plots from section 3.2
cnRatio.py:
Produces the POC:PON plots (and others) from section 3.3
stoichio_dict.py:
Produces the Stoichiometric plots (and others) from section 3.4
The other files are:
ncdfView.py:
A handy way to inspect netcdf files in python.
communitystructure:
some tools required to simplify the plotting of community structure.
C2Chl:
A tool to load the historic c:Chl measurements. (Sathyendranath and Buck)
iMarNetPython.py:
A huge set of python routines that fulfill a range of functions.
This was the hold all for every algorithm I thought I might re-use over the course of the project.
It is chronically underdocumented; enter at your own risk!
......@@ -6,7 +6,7 @@
# Model Development paper: gmd-2015-135,
# Submitted on 26 Jun 2015
# The role of ecosystem function and emergent relationships in the assessment of global marine ecosystem models: a case study with ERSEM
# L. de Mora, M. Butenschön, and J. I. Allen.
# L. de Mora, M. Butenschon, and J. I. Allen.
# Geosci. Model Dev. Discuss., 8, 6095-6141, 2015
# www.geosci-model-dev-discuss.net/8/6095/2015/
# doi:10.5194/gmdd-8-6095-2015
......@@ -31,7 +31,6 @@
#
# Very basic algorithm to output a hexbin plot of c:chl vs EIR
from glob import glob
from os.path import exists
from sys import argv
......
......@@ -6,7 +6,7 @@
# Model Development paper: gmd-2015-135,
# Submitted on 26 Jun 2015
# The role of ecosystem function and emergent relationships in the assessment of global marine ecosystem models: a case study with ERSEM
# L. de Mora, M. Butenschön, and J. I. Allen.
# L. de Mora, M. Butenschon, and J. I. Allen.
# Geosci. Model Dev. Discuss., 8, 6095-6141, 2015
# www.geosci-model-dev-discuss.net/8/6095/2015/
# doi:10.5194/gmdd-8-6095-2015
......@@ -726,6 +726,7 @@ def main():
#jobs = [j for j in argv[1:]]
print "Using command line arguments:", jobID, timestamp
except:
print "No command line arguments provided."
return
#jobs = ['xhonp', 'xhonu',]
......
#
# Copyright 2015, Plymouth Marine Laboratory
#
# This file is part of the GMD-2015-135 toolkit, associated with the Geoscientific
# Model Development paper: gmd-2015-135,
# Submitted on 26 Jun 2015
# The role of ecosystem function and emergent relationships in the assessment of global marine ecosystem models: a case study with ERSEM
# L. de Mora, M. Butenschon, and J. I. Allen.
# Geosci. Model Dev. Discuss., 8, 6095-6141, 2015
# www.geosci-model-dev-discuss.net/8/6095/2015/
# doi:10.5194/gmdd-8-6095-2015
#
# The GMD-2015-135 toolkit is free software: you can redistribute it and/or modify it
# under the terms of the Revised Berkeley Software Distribution (BSD) 3-clause license.
# The GMD-2015-135 toolkit 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 revised BSD license for more details.
# You should have received a copy of the revised BSD license along with ukesm-validation.
# If not, see <http://opensource.org/licenses/BSD-3-Clause>.
#
# Address:
# Plymouth Marine Laboratory
# Prospect Place, The Hoe
# Plymouth, PL1 3DH, UK
#
# Email:
# ledm@pml.ac.uk
#
""" Toolkit for calculating the communicty structure.
It should work for single values and for array.
"""
......
#
# Copyright 2015, Plymouth Marine Laboratory
#
# This file is part of the GMD-2015-135 toolkit, associated with the Geoscientific
# Model Development paper: gmd-2015-135,
# Submitted on 26 Jun 2015
# The role of ecosystem function and emergent relationships in the assessment of global marine ecosystem models: a case study with ERSEM
# L. de Mora, M. Butenschon, and J. I. Allen.
# Geosci. Model Dev. Discuss., 8, 6095-6141, 2015
# www.geosci-model-dev-discuss.net/8/6095/2015/
# doi:10.5194/gmdd-8-6095-2015
#
# The GMD-2015-135 toolkit is free software: you can redistribute it and/or modify it
# under the terms of the Revised Berkeley Software Distribution (BSD) 3-clause license.
# The GMD-2015-135 toolkit 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 revised BSD license for more details.
# You should have received a copy of the revised BSD license along with ukesm-validation.
# If not, see <http://opensource.org/licenses/BSD-3-Clause>.
#
# Address:
# Plymouth Marine Laboratory
# Prospect Place, The Hoe
# Plymouth, PL1 3DH, UK
#
# Email:
# ledm@pml.ac.uk
#
from scipy.optimize import curve_fit
from numpy import ma,exp, arange, logspace,isnan, isinf, sqrt, diag
......
#
# Copyright 2015, Plymouth Marine Laboratory
#
# This file is part of the GMD-2015-135 toolkit, associated with the Geoscientific
# Model Development paper: gmd-2015-135,
# Submitted on 26 Jun 2015
# The role of ecosystem function and emergent relationships in the assessment of global marine ecosystem models: a case study with ERSEM
# L. de Mora, M. Butenschon, and J. I. Allen.
# Geosci. Model Dev. Discuss., 8, 6095-6141, 2015
# www.geosci-model-dev-discuss.net/8/6095/2015/
# doi:10.5194/gmdd-8-6095-2015
#
# The GMD-2015-135 toolkit is free software: you can redistribute it and/or modify it
# under the terms of the Revised Berkeley Software Distribution (BSD) 3-clause license.
# The GMD-2015-135 toolkit 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 revised BSD license for more details.
# You should have received a copy of the revised BSD license along with ukesm-validation.
# If not, see <http://opensource.org/licenses/BSD-3-Clause>.
#
# Address:
# Plymouth Marine Laboratory
# Prospect Place, The Hoe
# Plymouth, PL1 3DH, UK
#
# Email:
# ledm@pml.ac.uk
#
from os.path import exists
from os import mkdir, makedirs
from ncdfView import ncdfView
......
......@@ -18,7 +18,7 @@ from scipy.stats.mstats import scoreatpercentile
from xtraPlots import mapIrregularGrid
from calendar import month_name
from re import findall
from CumulativeSum import CumulativeSum
#from CumulativeSum import CumulativeSum
#ROC curve stuff
from sklearn.metrics import roc_curve, auc
from sklearn import svm, datasets, linear_model
......
#!/usr/bin/ipython
#
# Copyright 2015, Plymouth Marine Laboratory
#
......@@ -5,7 +6,7 @@
# Model Development paper: gmd-2015-135,
# Submitted on 26 Jun 2015
# The role of ecosystem function and emergent relationships in the assessment of global marine ecosystem models: a case study with ERSEM
# L. de Mora, M. Butenschön, and J. I. Allen.
# L. de Mora, M. Butenschon, and J. I. Allen.
# Geosci. Model Dev. Discuss., 8, 6095-6141, 2015
# www.geosci-model-dev-discuss.net/8/6095/2015/
# doi:10.5194/gmdd-8-6095-2015
......@@ -40,8 +41,7 @@ from netCDF4 import num2date
from glob import glob
from ncdfView import ncdfView
from numpy.ma import array as marray, sqrt,masked_where
from xhonhPlots import getJobID
from iMarNetPython import shouldIMakeFile,depthKeys,getCalendar,makeThisSafe,getDateFromMEANfile,sliceA, getLongName
from iMarNetPython import shouldIMakeFile,depthKeys,getCalendar,makeThisSafe,getDateFromMEANfile,sliceA, getLongName, getJobID
from os.path import abspath
from sys import argv
from communitystructure import chlPercent,comstrucFit#, CSparameterisations
......
......@@ -6,7 +6,7 @@
# Model Development paper: gmd-2015-135,
# Submitted on 26 Jun 2015
# The role of ecosystem function and emergent relationships in the assessment of global marine ecosystem models: a case study with ERSEM
# L. de Mora, M. Butenschön, and J. I. Allen.
# L. de Mora, M. Butenschon, and J. I. Allen.
# Geosci. Model Dev. Discuss., 8, 6095-6141, 2015
# www.geosci-model-dev-discuss.net/8/6095/2015/
# doi:10.5194/gmdd-8-6095-2015
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment