xarray 0.19 compatibility (#158)

This commit is contained in:
Fabian Neumann 2021-08-18 12:17:31 +02:00 committed by GitHub
parent 87596dd015
commit 5b9f64354f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -66,6 +66,7 @@ Future release
* The share of shipping transformed into hydrogen fuel cell can be now defined for different years in the ``config.yaml`` file. The carbon emission from the remaining share is treated as a negative load on the atmospheric carbon dioxide bus, just like aviation and land transport emissions. * The share of shipping transformed into hydrogen fuel cell can be now defined for different years in the ``config.yaml`` file. The carbon emission from the remaining share is treated as a negative load on the atmospheric carbon dioxide bus, just like aviation and land transport emissions.
* The transformation of the Steel and Aluminium production can be now defined for different years in the ``config.yaml`` file. * The transformation of the Steel and Aluminium production can be now defined for different years in the ``config.yaml`` file.
* Include the option to alter the maximum energy capacity of a store via the ``carrier+factor`` in the ``{sector_opts}`` wildcard. This can be useful for sensitivity analyses. Example: ``co2 stored+e2`` multiplies the ``e_nom_max`` by factor 2. In this example, ``e_nom_max`` represents the CO2 sequestration potential in Europe. * Include the option to alter the maximum energy capacity of a store via the ``carrier+factor`` in the ``{sector_opts}`` wildcard. This can be useful for sensitivity analyses. Example: ``co2 stored+e2`` multiplies the ``e_nom_max`` by factor 2. In this example, ``e_nom_max`` represents the CO2 sequestration potential in Europe.
* Compatibility with ``xarray`` version 0.19.
PyPSA-Eur-Sec 0.5.0 (21st May 2021) PyPSA-Eur-Sec 0.5.0 (21st May 2021)
=================================== ===================================

View File

@ -90,8 +90,8 @@ if __name__ == '__main__':
for key, pop in pop_cells.items(): for key, pop in pop_cells.items():
ycoords = ('y', cutout.coords['y']) ycoords = ('y', cutout.coords['y'].data)
xcoords = ('x', cutout.coords['x']) xcoords = ('x', cutout.coords['x'].data)
values = pop.values.reshape(cutout.shape) values = pop.values.reshape(cutout.shape)
layout = xr.DataArray(values, [ycoords, xcoords]) layout = xr.DataArray(values, [ycoords, xcoords])