Skip to content

Commit

Permalink
Merge 4b17afd into 87ea295
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioSeixas committed May 30, 2020
2 parents 87ea295 + 4b17afd commit 2dba7c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tradssat/mgrs/out.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
class DSSATResults(object):
"""
Facilitates the reading of DSSAT results. Instead of having to read each output file individually, you can simply
point this class to a DSSAT run output folder containing the output files and it will find the desired variables
point this class to a DSSAT run output folder containing the output files and it will find the desired variables
for you.
"""

def __init__(self, folder):
"""
Initialise with the base folder.
Parameters
----------
folder: str
Expand All @@ -38,7 +38,7 @@ def reload(self):
def get_value(self, var, trt, t=None, at='YEAR DOY'):
"""
Returns the value (point or time-series) of a variable from a DSSAT run.
Parameters
----------
var: str
Expand Down Expand Up @@ -76,7 +76,7 @@ def get_value(self, var, trt, t=None, at='YEAR DOY'):

if var in f.variables():
if t is None:
return f.get_value(var)
return f.get_value(var, sect={'TREATMENT': trt})
return f.get_value(var, sect={'TREATMENT': trt}, cond=cond)

raise ValueError('Output variable "{}" could not be found in any output file.'.format(var))
Expand Down

0 comments on commit 2dba7c5

Please sign in to comment.