diff --git a/docs/toardb_fastapi.md b/docs/toardb_fastapi.md index 9a3e91095e84df0739f9a8c437ff1d7563c5fe4f..836ea8ec0d44f213c16865465c19c32ec8e059c1 100644 --- a/docs/toardb_fastapi.md +++ b/docs/toardb_fastapi.md @@ -124,13 +124,13 @@ | Name | Type | Description | Required | | ---- | ---- | ----------- | -------- | -| datetime | dateTime | | Yes | -| description | string | | Yes | -| old_value | string | | Yes | -| new_value | string | | Yes | -| station_id | integer | | Yes | -| author_id | integer | | Yes | -| type_of_change | integer | | Yes | +| datetime | dateTime | Date of change to the TOAR database | Yes | +| description | string | Description of change | Yes | +| old_value | string | value that has been changed in the TOAR database | Yes | +| new_value | string | new, changed value | Yes | +| station_id | integer | internal ID of station to which this change belongs | Yes | +| author_id | integer | internal ID of person who submitted the change to the TOAR database | Yes | +| type_of_change | integer | Type of change (see controlled vocabulary: Type Of Change) | Yes | #### StationmetaCore @@ -171,18 +171,18 @@ | population_density_year2010 | number | human population per square km for the year 2010 | Yes | | max_population_density_25km_year2010 | number | Year 2010 maximum population density within a radius of 25 km around station location (residents km-2) | Yes | | climatic_zone | string | Climatic zone according to IPCC, 2006. Data from European Soil Data Centre at JRC, Ispra, Italy | Yes | -| nightlight_1km_year2013 | number | Year 2013 nighttime lights brightness values at station location (original 1 km horizontal resolution). Reference: NOAA DMSP stable nighttime lights: a 0.925 km resolution dataset of non-ephemeral visible light intensity at night [Dataset] PID: http://ngdc.noaa.gov/eog/dmsp/downloadV4composites.html | Yes | +| nightlight_1km_year2013 | number | Year 2013 nighttime lights brightness values at station location (original 1 km horizontal resolution). Reference: NOAA DMSP stable nighttime lights: a 0.925 km resolution dataset of non-ephemeral visible light intensity at night (Dataset: http://ngdc.noaa.gov/eog/dmsp/downloadV4composites.html) | Yes | | nightlight_5km_year2013 | number | Nighttime lights brightness values for the year 2013 at 5 km resolution (original 1 km horizontal resolution) | Yes | | max_nightlight_25km_year2013 | number | Maximum nighttime lights brightness values for the year 2013 at 25 km resolution (original 1 km horizontal resolution) | Yes | -| wheat_production_year2000 | number | Wheat production year2000. Y2000 wheat production amount at station location (units: thousand tons). Reference: [Dataset] PID: http://gaez.fao.org/Main.html | Yes | -| rice_production_year2000 | number | Y2000 rice production amount at station location (units: thousand tons). Reference: [Dataset] PID: http://gaez.fao.org/Main.html | Yes | -| edgar_htap_v2_nox_emissions_year2010 | number | EDGAR emissions inventory for nitrogen oxides (NOx) at 0.1° resolution. Reference: Janssens-Maenhout et al., 2015: [Dataset] PID: http://edgar.jrc.ec.europa.eu/htap_v2/index.php?SECURE=123 | Yes | -| omi_no2_column_years2011to2015 | number | Average Y2011-Y2015 tropospheric NO2 columns from OMI at 0.1 degree resolution in units of 10^15 molecules cm-2. Reference: Krotkov et al., 2016 [Dataset] PID: (no public download) | Yes | +| wheat_production_year2000 | number | Wheat production year2000. Y2000 wheat production amount at station location (units: thousand tons). (Reference: Dataset: http://gaez.fao.org/Main.html) | Yes | +| rice_production_year2000 | number | Y2000 rice production amount at station location (units: thousand tons) (Reference: Dataset: http://gaez.fao.org/Main.html) | Yes | +| edgar_htap_v2_nox_emissions_year2010 | number | EDGAR emissions inventory for nitrogen oxides (NOx) at 0.1° resolution (Reference: Janssens-Maenhout et al., 2015: http://edgar.jrc.ec.europa.eu/htap_v2/index.php?SECURE=123) | Yes | +| omi_no2_column_years2011to2015 | number | Average Y2011-Y2015 tropospheric NO2 columns from OMI at 0.1 degree resolution in units of 10^15 molecules cm-2 (Reference: Krotkov et al., 2016: (no public download)) | Yes | | htap_region_tier1 | string | The integer denoting the “tier1” region defined in the task force on hemispheric transport of air pollution (TFHTAP) coordinated model studies | Yes | -| etopo_alt | number | Global digital elevation model from diverse global and regional datasets in 1 arc minute resolution. Reference: Amante and Eakins, 2009 [Dataset] PID: https://www.ngdc.noaa.gov/mgg/global/global.html | Yes | +| etopo_alt | number | Global digital elevation model from diverse global and regional datasets in 1 arc minute resolution (Reference: Amante and Eakins, 2009: https://www.ngdc.noaa.gov/mgg/global/global.html) | Yes | | etopo_min_alt_5km | number | Minimum elevation from the ETOPO1 dataset in an area of 5 km radius around the station location. This can be used to find out if a high altitude station is located in mountaineous terrain or on a plateau (see etopo_relative_alt) | Yes | | etopo_relative_alt | number | Station elevation above the surrounding area. Derived by subtracting the minimum altitude within a 5 km radius around the station location from the actual station altitude | Yes | -| dominant_landcover_year2012 | string | The dominant IGBP landcover classification at the station location extracted from the MODIS MCD12C1 dataset (3 arc minutes resolution of the year 2012). [Dataset] PID: https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mcd12c1 | Yes | +| dominant_landcover_year2012 | string | The dominant IGBP landcover classification at the station location extracted from the MODIS MCD12C1 dataset (3 arc minutes resolution of the year 2012). (Dataset: https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mcd12c1) | Yes | | toar1_category | string | The station classification for the Tropsopheric Ozone Assessment Report based on the station proxy data that are stored in the TOAR database | Yes | | station_id | integer | internal station_id to which these global data belong | Yes | diff --git a/toardb/stationmeta/schemas.py b/toardb/stationmeta/schemas.py index 31c9a7a8a77fe6382f4d1480505edba0d404c97a..6e22677ebdfe283ecfb7f200a22a531c89977a40 100644 --- a/toardb/stationmeta/schemas.py +++ b/toardb/stationmeta/schemas.py @@ -288,18 +288,18 @@ class StationmetaGlobalBase(BaseModel): population_density_year2010: float = Field(..., description="human population per square km for the year 2010") max_population_density_25km_year2010: float = Field(..., description="Year 2010 maximum population density within a radius of 25 km around station location (residents km-2)") climatic_zone: str = Field(..., description="Climatic zone according to IPCC, 2006. Data from European Soil Data Centre at JRC, Ispra, Italy") - nightlight_1km_year2013: float = Field(..., description="Year 2013 nighttime lights brightness values at station location (original 1 km horizontal resolution). Reference: NOAA DMSP stable nighttime lights: a 0.925 km resolution dataset of non-ephemeral visible light intensity at night [Dataset] PID: http://ngdc.noaa.gov/eog/dmsp/downloadV4composites.html") + nightlight_1km_year2013: float = Field(..., description="Year 2013 nighttime lights brightness values at station location (original 1 km horizontal resolution). Reference: NOAA DMSP stable nighttime lights: a 0.925 km resolution dataset of non-ephemeral visible light intensity at night (Dataset: http://ngdc.noaa.gov/eog/dmsp/downloadV4composites.html)") nightlight_5km_year2013: float = Field(..., description="Nighttime lights brightness values for the year 2013 at 5 km resolution (original 1 km horizontal resolution)") max_nightlight_25km_year2013: float = Field(..., description="Maximum nighttime lights brightness values for the year 2013 at 25 km resolution (original 1 km horizontal resolution)") - wheat_production_year2000: float = Field(..., description="Wheat production year2000. Y2000 wheat production amount at station location (units: thousand tons). Reference: [Dataset] PID: http://gaez.fao.org/Main.html") - rice_production_year2000: float = Field(..., description="Y2000 rice production amount at station location (units: thousand tons). Reference: [Dataset] PID: http://gaez.fao.org/Main.html") - edgar_htap_v2_nox_emissions_year2010: float = Field(..., description="EDGAR emissions inventory for nitrogen oxides (NOx) at 0.1° resolution. Reference: Janssens-Maenhout et al., 2015: [Dataset] PID: http://edgar.jrc.ec.europa.eu/htap_v2/index.php?SECURE=123") - omi_no2_column_years2011to2015: float = Field(..., description="Average Y2011-Y2015 tropospheric NO2 columns from OMI at 0.1 degree resolution in units of 10^15 molecules cm-2. Reference: Krotkov et al., 2016 [Dataset] PID: (no public download)") + wheat_production_year2000: float = Field(..., description="Wheat production year2000. Y2000 wheat production amount at station location (units: thousand tons). (Reference: Dataset: http://gaez.fao.org/Main.html)") + rice_production_year2000: float = Field(..., description="Y2000 rice production amount at station location (units: thousand tons) (Reference: Dataset: http://gaez.fao.org/Main.html)") + edgar_htap_v2_nox_emissions_year2010: float = Field(..., description="EDGAR emissions inventory for nitrogen oxides (NOx) at 0.1° resolution (Reference: Janssens-Maenhout et al., 2015: http://edgar.jrc.ec.europa.eu/htap_v2/index.php?SECURE=123)") + omi_no2_column_years2011to2015: float = Field(..., description="Average Y2011-Y2015 tropospheric NO2 columns from OMI at 0.1 degree resolution in units of 10^15 molecules cm-2 (Reference: Krotkov et al., 2016: (no public download))") htap_region_tier1: str = Field(..., description="The integer denoting the “tier1” region defined in the task force on hemispheric transport of air pollution (TFHTAP) coordinated model studies") - etopo_alt: float = Field(..., description="Global digital elevation model from diverse global and regional datasets in 1 arc minute resolution. Reference: Amante and Eakins, 2009 [Dataset] PID: https://www.ngdc.noaa.gov/mgg/global/global.html") + etopo_alt: float = Field(..., description="Global digital elevation model from diverse global and regional datasets in 1 arc minute resolution (Reference: Amante and Eakins, 2009: https://www.ngdc.noaa.gov/mgg/global/global.html)") etopo_min_alt_5km: float = Field(..., description="Minimum elevation from the ETOPO1 dataset in an area of 5 km radius around the station location. This can be used to find out if a high altitude station is located in mountaineous terrain or on a plateau (see etopo_relative_alt)") etopo_relative_alt: float = Field(..., description="Station elevation above the surrounding area. Derived by subtracting the minimum altitude within a 5 km radius around the station location from the actual station altitude") - dominant_landcover_year2012: str = Field(..., description="The dominant IGBP landcover classification at the station location extracted from the MODIS MCD12C1 dataset (3 arc minutes resolution of the year 2012). [Dataset] PID: https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mcd12c1") + dominant_landcover_year2012: str = Field(..., description="The dominant IGBP landcover classification at the station location extracted from the MODIS MCD12C1 dataset (3 arc minutes resolution of the year 2012). (Dataset: https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mcd12c1)") toar1_category: str = Field(..., description="The station classification for the Tropsopheric Ozone Assessment Report based on the station proxy data that are stored in the TOAR database") station_id: int = Field(..., description="internal station_id to which these global data belong") @@ -509,13 +509,14 @@ class StationmetaRole(StationmetaRoleBase): # ======== StationmetaChangelog ========= class StationmetaChangelogBase(BaseModel): - datetime: dt.datetime - description: str - old_value: str - new_value: str - station_id: int - author_id: int - type_of_change: int + datetime: dt.datetime = Field(..., description="Date of change to the TOAR database") + description: str = Field(..., description="Description of change") + old_value: str = Field(..., description="value that has been changed in the TOAR database") + new_value: str = Field(..., description="new, changed value") + station_id: int = Field(..., description="internal ID of station to which this change belongs") + author_id: int = Field(..., description="internal ID of person who submitted the change to the TOAR database") + type_of_change: int = Field(..., description="Type of change (see controlled vocabulary: Type Of Change)") + @validator('type_of_change') def check_role(cls, v):