Skip to content

Commit

Permalink
Check pressure level dimension size attribute for pressure levels tes…
Browse files Browse the repository at this point in the history
…t in PrePARE.
mauzey1 committed Jul 1, 2019
1 parent 2e9f6b2 commit 9a0d421
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LibCV/PrePARE/PrePARE.py
Original file line number Diff line number Diff line change
@@ -309,17 +309,17 @@ def has_3_dimensions(infile, variable, **kwargs):
@staticmethod
def has_27_pressure_levels(infile, **kwargs):
dim = [d for d in list(infile.dimensions.keys()) if 'plev' in d]
return True if len(dim) == 1 and infile.dimensions[dim[0]] == 27 else False
return True if len(dim) == 1 and infile.dimensions[dim[0]].size == 27 else False

@staticmethod
def has_7_pressure_levels(infile, **kwargs):
dim = [d for d in list(infile.dimensions.keys()) if 'plev' in d]
return True if len(dim) == 1 and infile.dimensions[dim[0]] == 7 else False
return True if len(dim) == 1 and infile.dimensions[dim[0]].size == 7 else False

@staticmethod
def has_4_pressure_levels(infile, **kwargs):
dim = [d for d in list(infile.dimensions.keys()) if 'plev' in d]
return True if len(dim) == 1 and infile.dimensions[dim[0]] == 4 else False
return True if len(dim) == 1 and infile.dimensions[dim[0]].size == 4 else False

@staticmethod
def has_land_in_cell_methods(infile, variable, **kwargs):

0 comments on commit 9a0d421

Please sign in to comment.