ICOS-Carbon-Portal / pylib

Python library for direct access to ICOS time series data.
12 stars 3 forks source link

Some issues in the station object #134

Open altix opened 1 year ago

altix commented 1 year ago
  1. Documentation issue In station.getIdList() there are two parameters: project and theme. The default return value of the function is a dataframe df with the columns: ['uri', 'id', 'name', 'icosClass', 'country', 'lat', 'lon', 'elevation', 'stationTheme', 'firstName', 'lastName', 'email', 'siteType', 'project', 'theme']

Solution for 1: update the documentations.

  1. Bug Using station.getIdList() we find two station ids ES-Cra and JFJ having two different uris
    IE-Cra: 
    http://meta.icos-cp.eu/resources/stations/FLUXNET_IE-Cra
    http://meta.icos-cp.eu/resources/stations/ES_IE-Cra
    JFJ:
    http://meta.icos-cp.eu/resources/stations/AS_JFJ
    http://meta.icos-cp.eu/resources/stations/Jungfraujoch%20Laboratory

    of these only AS_JFJ has an icosClass, however the df.project of the station http://meta.icos-cp.eu/resources/stations/ES_IE-Cra is set to ICOS because of the ES in ES_IE-Cra.

This is handled by the internal function station.__project() which is just looking at the uri, but it should consider the icosClass too.

Moreover, the station object of JFJ fetch some data from the ICOS station: Jungfraujoch and some data from non-ICOS station: Jungfraujoch Laboratory Solution for 2: Add the parameter icosClass into station.__project()

  1. Bug: Running station.get('IE-CRA') leads to a crash because the station 'IE-Cra' lacks information such as elevation (None can not be casted to a float). Solution for 3: add validation of the entries, replace 'None' values by relevant types.