Commit 9df5c1eb authored by ARCHER's avatar ARCHER 💬
Browse files

python 2 backport

parent d3bfa573
...@@ -394,8 +394,9 @@ def nclight2gridded(filein,fileout): ...@@ -394,8 +394,9 @@ def nclight2gridded(filein,fileout):
for var in list(set(ds_gd.coords.keys()) | set(ds_gd.keys())): for var in list(set(ds_gd.coords.keys()) | set(ds_gd.keys())):
if var in meta_over: if var in meta_over:
# python 3 only (merge dict ) # python 3 only (merge dict )
ds_gd[var].attrs = { **ds_sw[var].attrs,**meta_over[var] } # ds_gd[var].attrs = { **ds_sw[var].attrs,**meta_over[var] }
# python 2 compat:
ds_gd[var].attrs.update(meta_over[var])
ds_gd.rio.set_spatial_dims('x','y', inplace=True) ds_gd.rio.set_spatial_dims('x','y', inplace=True)
......
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