ixmp icon indicating copy to clipboard operation
ixmp copied to clipboard

List/add default units of a Platform

Open khaeru opened this issue 4 years ago • 0 comments

Related to iiasa/message_ix#254.

The Java code under JDBCBackend pre-populates every Platform with the following units:

-
%
cases
G$
GW
GWa
kg
kg/kWa
km
MW
MWa
t
T$
tC
tCO2
USD
USD/GWa
USD/kg
USD/km
USD/kWa
USD/tC
USD/tCO2
y

This happens at the SQL schema level; see https://github.com/iiasa/ixmp_source/blob/4f96133a8ad152aa6aadf9436ab7bb3010f0c0de/src/main/resources/db/migration/hsql/V1__hsql_base_version.sql#L418-L443

This list should be:

  • Reproduced in the (open source) Python code and API. It seems like altering earlier versions of the SQL schema is not possible or advisable.
  • Applied to all new Platforms, even if they don't use JDBCBackend.
  • Cleaned of values such as "-" or "%" that are not parseable by pint, nor SI units.

khaeru avatar Nov 18 '20 11:11 khaeru