Skip to content
Snippets Groups Projects
Commit fbd9c75a authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Add WeatherElements

parent d23d9f0a
Branches
Tags
No related merge requests found
......@@ -162,3 +162,55 @@ class WeatherObservation(BaseModel):
raise ValueError("%s must be timezone aware" % v)
return v
class WeatherElements():
# Mean temp (Celcius)
TEMPERATURE_MEAN = "TM"
# Minimum temperature (Celcius)
TEMPERATURE_MINIMUM = "TN"
# Maximum temperature (Celcius)
TEMPERATURE_MAXIMUM = "TX"
# Instantaneous temperature (Celcius)
TEMPERATURE_INSTANTANEOUS = "TT"
#Soil temperatures at various depths
SOIL_TEMPERATURE_5CM_MEAN ="TJM5"
SOIL_TEMPERATURE_10CM_MEAN ="TJM10"
SOIL_TEMPERATURE_25CM_MEAN ="TJM25"
SOIL_TEMPERATURE_50CM_MEAN ="TJM50"
# Dew point temperature (Celcius)
DEW_POINT_TEMPERATURE = "TD"
# Aggregated rainfall (millimeters)
PRECIPITATION = "RR"
# Average relative humidity (%)
RELATIVE_HUMIDITY_MEAN = "UM"
# Instantaneous relative humidity (%)
RELATIVE_HUMIDITY_INSTANTANEOUS = "UU"
# Global radiation (W/sqm)
GLOBAL_RADIATION = "Q0"
# Immmediate calculated clear sky solar radiation (clear sky)
GLOBAL_RADIATION_CLEAR_SKY_CALCULATED = "Q0c"
# Leaf wetness (Minutes per hour)
LEAF_WETNESS_DURATION = "BT"
# Leaf wetness at ground level (Minutes per hour)
LEAF_WETNESS_DURATION_GROUND_LEVEL = "BTg"
# Soil water content at various depths
SOIL_WATER_CONTENT_5CM = "VAN5"
SOIL_WATER_CONTENT_10CM = "VAN10"
SOIL_WATER_CONTENT_25CM = "VAN25"
SOIL_WATER_CONTENT_50CM = "VAN50"
# Soil conductivity at various depths
SOIL_CONDUCTIVITY_5CM = "LEJ5"
# Average wind speed (meters / second) for the last 60 minutes, measured at 2 meter height
WIND_SPEED_2M = "FM2"
# Average wind speed (meters / second) for the last 60 minutes, measured at 10 meter height
WIND_SPEED_10M = "FM"
# Average wind speed (meters / second) for the last 10 minutes, measured at 2 meter height
WIND_SPEED_10MIN_2M = "FF2"
# Average wind speed (meters / second) for the last 10 minutes, measured at 10 meter height
WIND_SPEED_10MIN_10M = "FF"
# Average wind direction for the last 10 minutes, measured at 2 meter height
WIND_DIR_10MIN_2M = "DD2"
# Average wind direction for the last 10 minutes, measured at 10 meter height
WIND_DIR_10MIN_10M = "DD"
# Potential evapotranspiration by the Penman equation
POTENTIAL_EVAPORATION = "EPP"
\ No newline at end of file
......@@ -20,4 +20,7 @@ class TestEntities(unittest.TestCase):
warning_status = 2
)
r.set_value("TM",2)
\ No newline at end of file
r.set_value("TM",2)
def test_weather_elements(self):
self.assertEquals("TM",WeatherElements.TEMPERATURE_MEAN)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment