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

Fix heatcsum units assignation bug

parent f7d65327
......@@ -262,7 +262,7 @@ class HeatContentLayer(Diagnostic):
var = handler_results.createVariable(
"heatc", float, ("time", "j", "i"), fill_value=1.0e20
)
var.units = "J m-2" ""
var.units = "J m-2"
var.coordinates = " ".join((lat_name, lon_name))
handler_results.sync()
# temporary fix, needs to loop over layers
......@@ -281,11 +281,12 @@ class HeatContentLayer(Diagnostic):
"heatcsum", float, ("time", "region",),
)
handler_results_1d.sync()
var_ohc_1d.units = "J"
for i, basin in enumerate(self.basins):
var_region[i, ...] = netCDF4.stringtoarr(basin.name, 50)
var_ohc_1d[..., i] = heatc_sl_1d[i]
handler_results_1d.close()
var_ohc_1d.units = "J" ""
Utils.setminmax(results, "heatc")
self.heatc.set_local_file(results)
self.heatcsum.set_local_file(results_1d)
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