Skip to content

Commit

Permalink
Update code style
Browse files Browse the repository at this point in the history
  • Loading branch information
mkstratos committed Feb 24, 2020
1 parent fc5a787 commit 788b684
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions fix_missing_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,21 @@
dat[var] = dat[var].assign_attrs(
{
"missing_value": np.float32(masked_vars[var]),
"_FillValue": np.float32(masked_vars[var])
"_FillValue": np.float32(masked_vars[var]),
}
)
dat["x1"] = dat["x1"].assign_attrs({"axis": "X"})
dat["y1"] = dat["y1"].assign_attrs({"axis": "Y"})

if grid == "mcb":
dat["usrf"] = dat["usrf"].assign_attrs({"units": "m"})
dat["acab"] = dat["acab"].assign_attrs({"_FillValue": dat["acab"].missing_value})
dat["acab"] = dat["acab"].assign_attrs(
{"_FillValue": dat["acab"].missing_value}
)
dat["bheatflx"] = dat["bheatflx"].assign_attrs(
{"standard_name": "upward_geothermal_heat_flux_at_ground_level_in_land_ice"}
{
"standard_name": "upward_geothermal_heat_flux_at_ground_level_in_land_ice"
}
)

if grid == "epsg3413":
Expand Down Expand Up @@ -88,4 +92,4 @@
"Conventions": "CF-1.7",
}
dat = dat.assign_attrs(output_metadata)
dat.to_netcdf(data_file)
dat.to_netcdf(data_file)

0 comments on commit 788b684

Please sign in to comment.