Commit e1dbf8f6 authored by Javier Vegas-Regidor's avatar Javier Vegas-Regidor
Browse files

Fixed module diagnostic

parent e04dfc07
......@@ -202,9 +202,9 @@ class DataFile(Publisher):
else:
valid_max = ''
Utils.nco.ncatted(input=self.local_file, output=self.local_file,
options='-O -a _FillValue,{0},o,{1},"1.e20" '
'-a missingValue,{0},o,{1},"1.e20" {2}{3}'.format(self.final_name, var_type.char,
valid_min, valid_max))
options=('-O -a _FillValue,{0},o,{1},"1.e20" '
'-a missingValue,{0},o,{1},"1.e20" {2}{3}'.format(self.final_name, var_type.char,
valid_min, valid_max),))
def _fix_coordinate_variables_metadata(self, handler):
if 'lev' in handler.variables:
......
......@@ -79,10 +79,10 @@ class Module(Diagnostic):
return job_list
def request_data(self):
self.component_u_file = self.data_manager.get_file(self.domain, self.componentu, self.startdate, self.member,
self.chunk, grid=self.grid)
self.component_v_file = self.data_manager.get_file(self.domain, self.componentv, self.startdate, self.member,
self.chunk, grid=self.grid)
self.component_u_file = self.request_chunk(self.domain, self.componentu, self.startdate, self.member,
self.chunk, grid=self.grid)
self.component_v_file = self.request_chunk(self.domain, self.componentv, self.startdate, self.member,
self.chunk, grid=self.grid)
def declare_data_generated(self):
self.module_file = self.declare_chunk(self.domain, self.module, self.startdate, self.member, self.chunk,
......@@ -93,9 +93,9 @@ class Module(Diagnostic):
Runs the diagnostic
"""
temp = TempFile.get()
Utils.copy_file(self.component_u_file, temp)
Utils.copy_file(self.component_u_file.local_file, temp)
component_u = Utils.openCdf(temp)
component_v = Utils.openCdf(self.component_v_file)
component_v = Utils.openCdf(self.component_v_file.local_file)
variable_u = component_u.variables[self.componentu]
variable_v = component_v.variables[self.componentv]
......@@ -109,4 +109,4 @@ class Module(Diagnostic):
component_u.close()
component_v.close()
self.module_file.set_local_file(temp, rename_var=self.componentu)
self.module_file.set_local_file(temp, rename_var=self.componentu)
\ No newline at end of file
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