juseg / hyoga

Paleoglacier modelling framework
https://hyoga.io
GNU General Public License v3.0
8 stars 0 forks source link

Rename grid_mapping in reprojected data. #81

Closed juseg closed 5 months ago

juseg commented 5 months ago

Always rename grid_mapping to 'spatial_ref' in reprojected data. This avoids multiple (identical) mappings in datasets containing variables from different sources. It allows plotting vectors on these datasets. The only case for now concerns atmosphere data.

domain = {'crs':  'epsg:32632', 'bounds': [150e3, 4820e3, 1050e3, 5420e3]}
with hyoga.open.atmosphere(**domain) as ds:
    ds.hyoga.plot.surface_hillshade()
    ds.hyoga.plot.paleoglaciers(alpha=0.75)

As an added bonus, to_netcdf() files should be GDAL-compatible (untested). Close #72.