Skip to content

Commit a4ab502

Browse files
committed
Fixed CGMS8 agromanagement data provider
1 parent 6d6e95f commit a4ab502

File tree

5 files changed

+126
-46
lines changed

5 files changed

+126
-46
lines changed

doc/downloads/py2_pcse.yml

Lines changed: 26 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,30 @@
1-
name: py2_pcse
1+
name: C:\Miniconda3\envs\py2_pcse
22
dependencies:
3-
- alabaster=0.7.3=py27_0
4-
- babel=1.3=py27_0
5-
- binstar=0.10.3=py27_0
6-
- clyent=0.3.4=py27_0
7-
- colorama=0.3.3=py27_0
8-
- docutils=0.12=py27_1
9-
- ipython=3.1.0=py27_0
10-
- jinja2=2.7.3=py27_2
11-
- jsonschema=2.4.0=py27_0
12-
- line_profiler=1.0=py27_0
13-
- markupsafe=0.23=py27_0
14-
- matplotlib=1.4.3=np19py27_1
15-
- numpy=1.9.2=py27_0
16-
- pandas=0.16.1=np19py27_0
17-
- pip=7.1.2=py27_0
18-
- pygments=2.0.2=py27_0
19-
- pyparsing=2.0.3=py27_0
20-
- pyqt=4.10.4=py27_1
21-
- pyreadline=2.0=py27_0
22-
- python=2.7.10=0
23-
- python-dateutil=2.4.2=py27_0
24-
- pytz=2015.4=py27_0
25-
- pyyaml=3.11=py27_0
26-
- pyzmq=14.6.0=py27_0
27-
- requests=2.7.0=py27_0
28-
- setuptools=18.1=py27_0
29-
- six=1.9.0=py27_0
30-
- snowballstemmer=1.2.0=py27_0
31-
- sphinx=1.3.1=py27_0
32-
- sphinx_rtd_theme=0.1.7=py27_0
33-
- sqlalchemy=1.0.4=py27_0
34-
- ssl_match_hostname=3.4.0.2=py27_0
35-
- tornado=4.1=py27_0
36-
- wheel=0.24.0=py27_0
37-
- xlrd=0.9.3=py27_0
38-
- xlwt=1.0.0=py27_0
3+
- alabaster=0.7.8=py27_0
4+
- babel=2.3.3=py27_0
5+
- colorama=0.3.7=py27_0
6+
- docutils=0.12=py27_2
7+
- imagesize=0.7.1=py27_0
8+
- jinja2=2.8=py27_1
9+
- markupsafe=0.23=py27_2
10+
- mkl=11.3.3=1
11+
- numpy=1.11.1=py27_1
12+
- pip=8.1.2=py27_0
13+
- pygments=2.1.3=py27_0
14+
- python=2.7.12=0
15+
- pytz=2016.6.1=py27_0
16+
- pyyaml=3.11=py27_4
17+
- setuptools=26.1.1=py27_0
18+
- six=1.10.0=py27_0
19+
- snowballstemmer=1.2.1=py27_0
20+
- sphinx=1.4.1=py27_0
21+
- sphinx_rtd_theme=0.1.9=py27_0
22+
- sqlalchemy=1.0.13=py27_0
23+
- vs2008_runtime=9.00.30729.1=2
24+
- wheel=0.29.0=py27_0
25+
- xlrd=1.0.0=py27_0
26+
- xlwt=1.1.2=py27_0
3927
- pip:
40-
- backports.ssl-match-hostname==3.4.0.2
41-
- line-profiler==1.0
42-
- sphinx-rtd-theme==0.1.7
28+
- sphinx-rtd-theme==0.1.9
4329
- tabulate==0.7.5
4430

doc/downloads/py2_pcse_full.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: C:\Miniconda3\envs\py2_pcse_b
2+
dependencies:
3+
- alabaster=0.7.8=py27_0
4+
- babel=2.3.3=py27_0
5+
- backports=1.0=py27_0
6+
- backports_abc=0.4=py27_0
7+
- binstar=0.12=2
8+
- clyent=1.2.2=py27_0
9+
- colorama=0.3.7=py27_0
10+
- configparser=3.5.0=py27_0
11+
- cycler=0.10.0=py27_0
12+
- decorator=4.0.9=py27_0
13+
- docutils=0.12=py27_2
14+
- entrypoints=0.2.2=py27_0
15+
- functools32=3.2.3.2=py27_0
16+
- get_terminal_size=1.0.0=py27_0
17+
- imagesize=0.7.1=py27_0
18+
- ipykernel=4.4.1=py27_0
19+
- ipython=4.2.0=py27_0
20+
- ipython_genutils=0.1.0=py27_0
21+
- ipywidgets=4.1.1=py27_0
22+
- jinja2=2.8=py27_1
23+
- jpeg=8d=vc9_0
24+
- jsonschema=2.5.1=py27_0
25+
- jupyter=1.0.0=py27_3
26+
- jupyter_client=4.3.0=py27_0
27+
- jupyter_console=5.0.0=py27_0
28+
- jupyter_core=4.1.1=py27_0
29+
- libpng=1.6.22=vc9_0
30+
- libtiff=4.0.6=vc9_2
31+
- line_profiler=1.0=py27_0
32+
- markupsafe=0.23=py27_2
33+
- matplotlib=1.5.1=np111py27_0
34+
- mistune=0.7.2=py27_0
35+
- mkl=11.3.3=1
36+
- nbconvert=4.2.0=py27_0
37+
- nbformat=4.1.0=py27_0
38+
- notebook=4.2.2=py27_0
39+
- numpy=1.11.0=py27_1
40+
- openssl=1.0.2h=vc9_0
41+
- pandas=0.18.1=np111py27_0
42+
- path.py=8.2.1=py27_0
43+
- pathlib2=2.1.0=py27_0
44+
- pickleshare=0.7.2=py27_0
45+
- pip=8.1.2=py27_0
46+
- prompt_toolkit=1.0.3=py27_0
47+
- pygments=2.1.3=py27_0
48+
- pyparsing=2.1.4=py27_0
49+
- pyqt=4.11.4=py27_6
50+
- pyreadline=2.1=py27_0
51+
- python=2.7.12=0
52+
- python-dateutil=2.5.3=py27_0
53+
- pytz=2016.4=py27_0
54+
- pyyaml=3.11=py27_4
55+
- pyzmq=15.2.0=py27_0
56+
- qt=4.8.7=vc9_8
57+
- qtconsole=4.2.1=py27_0
58+
- requests=2.10.0=py27_0
59+
- setuptools=22.0.5=py27_0
60+
- simplegeneric=0.8.1=py27_1
61+
- singledispatch=3.4.0.3=py27_0
62+
- sip=4.16.9=py27_2
63+
- six=1.10.0=py27_0
64+
- snowballstemmer=1.2.1=py27_0
65+
- sphinx=1.4.1=py27_0
66+
- sphinx_rtd_theme=0.1.9=py27_0
67+
- sqlalchemy=1.0.13=py27_0
68+
- ssl_match_hostname=3.4.0.2=py27_1
69+
- tk=8.5.18=vc9_0
70+
- tornado=4.3=py27_1
71+
- traitlets=4.2.1=py27_0
72+
- vs2008_runtime=9.00.30729.1=1
73+
- wcwidth=0.1.7=py27_0
74+
- wheel=0.29.0=py27_0
75+
- xlrd=1.0.0=py27_0
76+
- xlwt=1.1.1=py27_0
77+
- zlib=1.2.8=vc9_3
78+
- pip:
79+
- backports-abc==0.4
80+
- backports.shutil-get-terminal-size==1.0.0
81+
- backports.ssl-match-hostname==3.4.0.2
82+
- ipython-genutils==0.1.0
83+
- jupyter-client==4.3.0
84+
- jupyter-console==5.0.0
85+
- jupyter-core==4.1.1
86+
- line-profiler==1.0
87+
- prompt-toolkit==1.0.3
88+
- sphinx-rtd-theme==0.1.9
89+
- tabulate==0.7.5
90+

doc/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
PCSE: The Python Crop Simulation Environment
99
============================================
1010

11-
PCSE (Python Crop Simulation Environment) is a Python package for building crop simulation models, in particular
12-
the crop models developed in Wageningen (Netherlands). PCSE provides the
11+
PCSE (Python Crop Simulation Environment) is a Python package for building crop simulation models,
12+
in particular the crop models developed in Wageningen (Netherlands). PCSE provides the
1313
environment to implement crop simulation models, the tools for reading ancillary
1414
data (weather, soil, agromanagement) and the components for simulating biophysical
1515
processes such as phenology, respiration and evapotranspiration. PCSE also
@@ -21,9 +21,9 @@ the MARS crop yield forecasting system which is used operationally for crop moni
2121
yield prediction in Europe and beyond.
2222

2323
Originally, models developed in Wageningen were often written using FORTRAN or the
24-
FORTRAN Simulation Environment (FSE) both of which
25-
are very good tools, but they lack the capability to work interactively, and make use
26-
of many great tools that are available nowadays (XML, databases, web, etc).
24+
FORTRAN Simulation Environment (FSE). Both are very good tools, but they have become
25+
somewhat outdated and are difficult to integrate with many of the great tools that are available
26+
nowadays (XML, databases, web, etc).
2727
Like so many other software packages, PCSE was developed to facilitate my own research work. I wanted something
2828
that was more easy to work with, more interactive and more flexible while still implementing
2929
the sound computational approach of FSE. For this reason PCSE was developed in Python

pcse/base_classes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ def __init__(self):
11931193
longitude = None
11941194
latitude = None
11951195
elevation = None
1196-
description = None
1196+
description = []
11971197
_first_date = None
11981198
_last_date = None
11991199
angstA = None

pcse/db/cgms8/data_providers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ def __init__(self, engine, grid_no, start_date=None, end_date=None):
5454
# Retrieved meteo data
5555
self._fetch_grid_weather_from_db(metadata)
5656

57+
# Description
58+
self.description = "Weather data derived for grid_no: %i" % grid_no
59+
5760
#---------------------------------------------------------------------------
5861
def _fetch_location_from_db(self, metadata):
5962
"""Retrieves latitude, longitude, elevation from 'grid' table and
@@ -247,6 +250,7 @@ def _parse_yaml(self, input):
247250
except yaml.YAMLError as e:
248251
msg = "Failed parsing agromanagement string %s: %s" % (input, e)
249252
raise exc.PCSEError(msg)
253+
del self[:]
250254
self.extend(items)
251255

252256
def set_campaign_start_date(self, start_date):

0 commit comments

Comments
 (0)