metloom package

Subpackages

Submodules

metloom.arm_utils module

Utility functions for U.S. Department of Energy’s Atmospheric Radiation Measurement (ARM) User Facility. https://www.arm.gov/

The download tools here will modelled after information from the ARM Live Data Webservice https://adc.arm.gov/armlive/register#web_services

metloom.arm_utils.get_station_data(*, site: str, measurement: str, facility_code: str, data_level: str, variables: list[str], start: date | datetime | None = None, end: date | datetime | None = None, token_json: Path = PosixPath('/home/docs/.arm_token.json'), access_token=None, user_id=None, destination: Path = PosixPath('.armdata'), download_chunk_size: int = 20, url: str = 'https://adc.arm.gov/armlive/data') DataFrame[source]

Get data from the ARM Live Data Webservice as a pandas DataFrame.

This function queries the ARM Live Data Webservice with the provided parameters, downloads the resulting files, and returns their contents as a pandas DataFrame.

Args:

site: Site identifier code (e.g., ‘sgp’, ‘nsa’, etc.) measurement: Measurement identifier code. facility_code: Facility identifier code. data_level: Data processing level (e.g., ‘c1’, ‘b1’, etc.) variables: List of variable names to download. start: Start date/datetime. Defaults to None, which downloads all available data. end: End date/datetime. Defaults to None, which downloads all available data. token_json: Path to a JSON file containing the access token and user ID. Defaults to ~/.arm_token.json.

If provided, it will take precedence over the environment variables for access_token and user_id.

access_token: ARM access token. Defaults to M3W_ARM_ACCESS_TOKEN environment variable. user_id: ARM user ID. Defaults to M3W_ARM_USER_ID environment variable. destination: Directory to save downloaded files. Defaults to “.armdata”. download_chunk_size: Number of files to download in each batch. Defaults to 20. url: Base URL for the ARM Live Data Webservice. Defaults to “https://adc.arm.gov/armlive/data”.

Returns:

pd.DataFrame: DataFrame containing the requested variables with datetime index.

Raises:

AssertionError: If user_id or access_token is not provided. HTTPError: If the API request fails.

metloom.arm_utils.get_station_location(site: str, measurement: str, facility_code: str, data_level: str, start: date | datetime | None = None, end: date | datetime | None = None) Tuple[float, float, float][source]

Get the location of a station from the ARM Live Data Webservice.

metloom.cli module

Console script for metloom.

metloom.cli.main()[source]

Console script for metloom.

metloom.dataframe_utils module

metloom.dataframe_utils.append_df(df: DataFrame | None, new_df: DataFrame | None)[source]

append 2 dfs handling Nones Args:

df: optional dataframe new_df: optional dataframe

Returns:

dataframe or None

metloom.dataframe_utils.join_df(df: DataFrame | None, new_df: DataFrame | None, how='left', on=None, filter_unused=False)[source]

join two dataframes handling None Args:

df: optional dataframe new_df: optional dataframe how: method for merging on: optional kwarg for DataFrame.join filter_unused: boolean, whether to filter out columns with _unused in

then name

Returns:

The joined dataframes. This method prefers values from the first if columns are overlapping and renames the overlapping values from the new_df to <column>_unused

metloom.dataframe_utils.merge_df(df: DataFrame | None, new_df: DataFrame | None, how='left')[source]

join two dataframes. Assumes the dataframes are indexed on datetime Args:

df: optional dataframe new_df: optional dataframe

Returns:

The merged dataframe

metloom.dataframe_utils.resample_df(raw_df: DataFrame, variable: SensorDescription, interval: str = 'H')[source]

Resample an datatime indexed pandas dateframe to hourly or daily timer intervals. Resample a datetime indexed pandas dataframe for 1 variable

Args:
raw_df: Pandas Dataframe containing a datetime index at an interval

smaller than hourly.

variable: SensorDescriptions to be found in the dataframe interval: Interval to resample to. Options are H = Hourly, D=Daily

Returns:
df: Pandas Dataframe of a single variable resampled to the

desired interval

metloom.dataframe_utils.resample_series(raw_series: Series, variable: SensorDescription, interval: str = 'h')[source]

Resample a pandas series to hourly or daily timer intervals. Resample a datetime indexed pandas series for 1 variable

Args:
raw_series: Pandas Series containing a datetime index at an interval

smaller than hourly.

variable: SensorDescriptions to be found in the dataframe interval: Interval to resample to. Options are H = Hourly, D=Daily

Returns:

Pandas Series of a single variable resampled to the desired interval

metloom.dataframe_utils.resample_whole_df(raw_df: DataFrame, variable: SensorDescription, interval: str = 'h')[source]

Resample an datatime indexed pandas dateframe to hourly or daily timer intervals. Resample a datetime indexed pandas dataframe for 1 variable Other columns get resampled with the .first() values

Args:
raw_df: Pandas Dataframe containing a datetime index at an interval

smaller than hourly.

variable: SensorDescriptions to be found in the dataframe interval: Interval to resample to. Options are H = Hourly, D=Daily

Returns:
df: Pandas Dataframe of a single variable resampled to the

desired interval

metloom.dataframe_utils.shp_to_box(geometry)[source]

Convert a shapefiles geodataframe to the bounding box of the shapefile as a new geodataframe

Args:

geometry: geodataframe polygon

Returns:

geodataframe of the bounding box

metloom.request_utils module

Taken from stackoverflow.com/questions/15445981/how-do-i-disable-the-security-certificate-check-in-python-requests This is necessary to make requests to Snotel without exceptions as we are not able to do the SSL verification

metloom.request_utils.no_ssl_verification()[source]

metloom.variables module

class metloom.variables.CSASVariables[source]

Bases: VariableBase

Variable meta for the stations: SASP - https://snowstudies.org/wp-content/uploads/2026/01/SASP_Variable_Table.xlsx SBSP - https://snowstudies.org/wp-content/uploads/2026/01/SBSP_Variable_Table.xlsx PTSP - https://snowstudies.org/wp-content/uploads/2026/01/PTSP_Variable_Table.xlsx SGSB - https://snowstudies.org/wp-content/uploads/2023/11/SBSG_Variable_Table.xlsx

DOWNWELLING_BROADBAND = SensorDescription(code='PyUp_Unfilt_W', name='DOWNWELLING BROADBAND RADIATION', description='Reflected Broadband radiation', accumulated=False, units='w/m^2', extra=None)
DOWNWELLING_NIR_SWIR = SensorDescription(code='PyUp_Filt_W', name='DOWNWELLING NIR/SWIR RADIATION', description='Reflected NIR/SWIR radiation', accumulated=False, units='w/m^2', extra=None)
LOWER_WINDDIR = SensorDescription(code='LoWind_Dir_Uavg', name='LOWER WIND DIRECTION', description='Wind direction at the lower location', accumulated=False, units='degrees', extra=None)
LOWER_WINDSPEED = SensorDescription(code='LoWind_Uavg_MS', name='LOWER WIND SPEED', description='Wind speed at the lower location', accumulated=False, units='m/s', extra=None)
PRECIPITATION = SensorDescription(code='Day_H2O_mm', name='DAILY PRECIP', description='Daily accumulated precipitation in mm', accumulated=False, units='mm', extra=None)
RH_LOWER = SensorDescription(code='Lo_RH', name='RELATIVE HUMIDITY', description=None, accumulated=False, units='%', extra=None)
RH_UPPER = SensorDescription(code='Up_RH', name='RELATIVE HUMIDITY', description=None, accumulated=False, units='%', extra=None)
SNOWDEPTH = SensorDescription(code='Sno_Height_M', name='SNOWDEPTH', description=None, accumulated=False, units='meters', extra=None)
STREAMFLOW_CFS = SensorDescription(code='Discharge_CFS', name='STREAMFLOW', description=None, accumulated=False, units='CFS', extra=None)
SURF_TEMP = SensorDescription(code='Sno_IR_C', name='SURFACE TEMP', description='Snow surface temperature', accumulated=False, units='deg C', extra=None)
TEMPGROUND = SensorDescription(code='Soil_Surf_C', name='GROUND TEMPERATURE', description='Temperature at soil interface', accumulated=False, units='deg C', extra=None)
TEMPGROUND10CM = SensorDescription(code='Soil_10cm_C', name='GROUND TEMPERATURE -10CM', description='Soil temperature at a depth of 10cm', accumulated=False, units='deg C', extra=None)
TEMPGROUND20CM = SensorDescription(code='Soil_20cm_C', name='GROUND TEMPERATURE -20CM', description='Soil temperature at a depth of 20cm', accumulated=False, units='deg C', extra=None)
TEMPGROUND40CM = SensorDescription(code='Soil_40cm_C', name='GROUND TEMPERATURE -40CM', description='Soil temperature at a depth of 40cm', accumulated=False, units='deg C', extra=None)
UPPER_WINDDIR = SensorDescription(code='UpWind_Dir_Uavg', name='UPPER WIND DIRECTION', description='Wind direction at the upper location', accumulated=False, units='degrees', extra=None)
UPPER_WINDSPEED = SensorDescription(code='UpWind_Uavg_MS', name='UPPER WIND SPEED', description='Wind speed at the upper location', accumulated=False, units='m/s', extra=None)
UPWELLING_BROADBAND = SensorDescription(code='PyDwn_Unfilt_W', name='UPWELLING BROADBAND RADIATION', description='Incoming Broadband radiation', accumulated=False, units='w/m^2', extra=None)
UPWELLING_NIR_SWIR = SensorDescription(code='PyDwn_Filt_W', name='UPWELLING NIR/SWIR RADIATION', description='Incoming NIR/SWIR radiation', accumulated=False, units='w/m^2', extra=None)
class metloom.variables.CdecStationVariables[source]

Bases: VariableBase

Available sensors from CDEC. Exhaustive list: http://cdec4gov.water.ca.gov/reportapp/javareports?name=SensList

PRECIPITATION = SensorDescription(code='45', name='PRECIPITATION', description='PRECIPITATION, INCREMENTAL', accumulated=True, units=None, extra=None)
PRECIPITATIONACCUM = SensorDescription(code='2', name='ACCUMULATED PRECIPITATION', description='PRECIPITATION, ACCUMULATED', accumulated=False, units=None, extra=None)
RH = SensorDescription(code='12', name='Relative Humidity', description='RELATIVE HUMIDITY', accumulated=False, units=None, extra=None)
SNOWDEPTH = SensorDescription(code='18', name='SNOWDEPTH', description='SNOW DEPTH', accumulated=False, units=None, extra=None)
SOLARRAD = SensorDescription(code='103', name='SOLAR RADIATION', description='SOLAR RADIATION', accumulated=False, units=None, extra=None)
SWE = SensorDescription(code='3', name='SWE', description='SNOW, WATER CONTENT', accumulated=False, units=None, extra=None)
TEMP = SensorDescription(code='4', name='AIR TEMP', description='TEMPERATURE, AIR', accumulated=False, units=None, extra=None)
TEMPAVG = SensorDescription(code='30', name='AVG AIR TEMP', description='TEMPERATURE, AIR AVERAGE', accumulated=False, units=None, extra=None)
TEMPGROUND = SensorDescription(code='52', name='GROUND TEMPERATURE INT', description='GROUND TEMPERATURE SNOW/SOIL INTERFACE', accumulated=False, units=None, extra=None)
TEMPGROUND100CM = SensorDescription(code='196', name='GROUND TEMPERATURE -100CM', description='GROUND TEMPERATURE OBS -100CM', accumulated=False, units=None, extra=None)
TEMPGROUND25CM = SensorDescription(code='194', name='GROUND TEMPERATURE -25CM', description='GROUND TEMPERATURE OBS -25CM', accumulated=False, units=None, extra=None)
TEMPGROUND50CM = SensorDescription(code='195', name='GROUND TEMPERATURE -50CM', description='GROUND TEMPERATURE OBS -50CM', accumulated=False, units=None, extra=None)
TEMPMAX = SensorDescription(code='31', name='MAX AIR TEMP', description='TEMPERATURE, AIR MAXIMUM', accumulated=False, units=None, extra=None)
TEMPMIN = SensorDescription(code='32', name='MIN AIR TEMP', description='TEMPERATURE, AIR MINIMUM', accumulated=False, units=None, extra=None)
WINDDIR = SensorDescription(code='10', name='WIND DIRECTION', description='WIND DIRECTION', accumulated=False, units=None, extra=None)
WINDSPEED = SensorDescription(code='9', name='WIND SPEED', description='WIND SPEED', accumulated=False, units=None, extra=None)
class metloom.variables.CuesLevel1Variables[source]

Bases: VariableBase

Variables for CUES level1 data https://snow.ucsb.edu/index.php/query-db/

Some variables report back with multiple instruments. See UPSHORTWAVE and UPSHORTWAVE2 for two instrument specific implementations of the same variable.

DOWNSHORTWAVE = InstrumentDescription(code='downward looking solar radiation', name='DOWNWARD SHORTWAVE RADIATION', description=None, accumulated=False, units=None, extra=None, instrument=None)
DOWNSHORTWAVEIR = InstrumentDescription(code='downward looking near-IR radiation', name='DOWNWARD NIR SHORTWAVE RADIATION', description=None, accumulated=False, units=None, extra=None, instrument=None)
LASERSNOWDEPTH = InstrumentDescription(code='laser snow depth', name='LASER SNOWDEPTH', description=None, accumulated=False, units=None, extra=None, instrument=None)
NEWSNOWDEPTH = InstrumentDescription(code='new snow depth', name='NEW SNOWDEPTH', description=None, accumulated=False, units=None, extra=None, instrument=None)
RH = InstrumentDescription(code='RH', name='RELATIVE HUMIDITY', description=None, accumulated=False, units=None, extra=None, instrument=None)
SNOWDEPTH = InstrumentDescription(code='snow depth', name='SNOWDEPTH', description=None, accumulated=False, units=None, extra=None, instrument=None)
SWE = InstrumentDescription(code='Snow Pillow (DWR) SWE', name='SWE', description=None, accumulated=False, units=None, extra=None, instrument=None)
TEMP = InstrumentDescription(code='air temperature', name='AIR TEMP', description=None, accumulated=False, units=None, extra=None, instrument=None)
TEMPSURFSNOW = InstrumentDescription(code='snow surface temperature', name='SNOW SURFACE TEMPERATURE', description=None, accumulated=False, units=None, extra=None, instrument=None)
UPSHORTWAVE = InstrumentDescription(code='upward looking solar radiation', name='UPWARD SHORTWAVE RADIATION', description=None, accumulated=False, units=None, extra=None, instrument='Eppley Lab precision spectral pyranometer')
UPSHORTWAVE2 = InstrumentDescription(code='upward looking solar radiation', name='UPWARD SHORTWAVE RADIATION 2', description=None, accumulated=False, units=None, extra=None, instrument='uplooking Sunshine pyranometer  direct and diffus')
UPSHORTWAVEIR = InstrumentDescription(code='upward looking near-IR radiation', name='UPWARD NIR SHORTWAVE RADIATION', description=None, accumulated=False, units=None, extra=None, instrument=None)
class metloom.variables.GeoSphereCurrentVariables[source]

Bases: VariableBase

PRECIPITATION = SensorDescription(code='RR', name='Rainfall in the last 10 minutes', description=None, accumulated=True, units=None, extra=None)
SNOWDEPTH = SensorDescription(code='SCHNEE', name='Snowdepth', description=None, accumulated=False, units=None, extra=None)
TEMP = SensorDescription(code='TL', name='Air Temperature', description=None, accumulated=False, units=None, extra=None)
TEMPGROUND10CM = SensorDescription(code='TB1', name='Soil temperature at a depth of 10cm', description=None, accumulated=False, units=None, extra=None)
TEMPGROUND20CM = SensorDescription(code='TB2', name='Soil temperature at a depth of 20cm', description=None, accumulated=False, units=None, extra=None)
TEMPGROUND50CM = SensorDescription(code='TB3', name='Soil temperature at a depth of 50cm', description=None, accumulated=False, units=None, extra=None)
class metloom.variables.GeoSphereHistVariables[source]

Bases: VariableBase

Variables that correspond to the DAILY historical Klima dataset

Daily and hourly have different variable names https://dataset.api.hub.geosphere.at/v1/station/historical/klima-v1-1h/metadata https://dataset.api.hub.geosphere.at/v1/station/historical/klima-v1-1d/metadata

PRECIPITATION = SensorDescription(code='nied', name='Precipitation Total', description=None, accumulated=True, units=None, extra=None)
SNOWDEPTH = SensorDescription(code='schnee', name='Snowdepth', description=None, accumulated=False, units=None, extra=None)
TEMP = SensorDescription(code='t7', name='Air temperature 2m on observation date', description=None, accumulated=False, units=None, extra=None)
class metloom.variables.InstrumentDescription(code: str = '-1', name: str = 'basename', description: str | None = None, accumulated: bool = False, units: str | None = None, extra: Any | None = None, instrument: str | None = None)[source]

Bases: SensorDescription

Extend the Sensor Description to include instrument

instrument: str = None
class metloom.variables.MesowestVariables[source]

Bases: VariableBase

Available sensors from Mesowest There are a lot of variables here. Feel free to PR to add some https://developers.synopticdata.com/mesonet/v2/api-variables/

DEWPOINT = SensorDescription(code='dew_point_temperature', name='DEW POINT TEMPERATURE', description=None, accumulated=False, units=None, extra=None)
NETLONGWAVE = SensorDescription(code='net_radiation_lw', name='NET LONGWAVE RADIATION', description=None, accumulated=False, units=None, extra=None)
NETSHORTWAVE = SensorDescription(code='net_radiation_sw', name='NET SHORTWAVE RADIATION', description=None, accumulated=False, units=None, extra=None)
PRESSURE = SensorDescription(code='pressure', name='PRESSURE', description=None, accumulated=False, units=None, extra=None)
RH = SensorDescription(code='relative_humidity', name='RELATIVE HUMIDITY', description=None, accumulated=False, units=None, extra=None)
SNOWDEPTH = SensorDescription(code='snow_depth', name='SNOWDEPTH', description=None, accumulated=False, units=None, extra=None)
SOILTEMP = SensorDescription(code='soil_temp', name='SOIL TEMPERATURE', description=None, accumulated=False, units=None, extra=None)
SOILTEMPIR = SensorDescription(code='soil_temp_ir', name='SOIL TEMPERATURE IR', description=None, accumulated=False, units=None, extra=None)
SOLARRADIATION = SensorDescription(code='solar_radiation', name='SOLAR RADIATION', description=None, accumulated=False, units=None, extra=None)
STREAMFLOW = SensorDescription(code='stream_flow', name='STREAMFLOW', description=None, accumulated=False, units=None, extra=None)
SWE = SensorDescription(code='snow_water_equiv', name='SWE', description=None, accumulated=False, units=None, extra=None)
TEMP = SensorDescription(code='air_temp', name='AIR TEMP', description=None, accumulated=False, units=None, extra=None)
WETBULBTEMPERATURE = SensorDescription(code='wet_bulb_temperature', name='WET BULB TEMPERATURE', description=None, accumulated=False, units=None, extra=None)
WINDDIRECTION = SensorDescription(code='wind_direction', name='WIND DIRECTION', description=None, accumulated=False, units=None, extra=None)
WINDSPEED = SensorDescription(code='wind_speed', name='WIND SPEED', description=None, accumulated=False, units=None, extra=None)
class metloom.variables.MetNorwayVariables[source]

Bases: VariableBase

See https://frost.met.no/concepts2.html#calculationmethod for explanation of variable naming. All available variables are https://frost.met.no/elementtable

PRECIPITATION = SensorDescription(code='precipitation_amount', name='PRECIPITATION', description='Tipping bucket. The gauge tips for every 0.1 mm. Each tip is registered along with the time stamp for the tip. This is the basis for calcutation of precipitation sum per minute', accumulated=False, units=None, extra=None)
PRECIPITATIONACCUM = SensorDescription(code='accumulated(precipitation_amount)', name='ACCUMULATED PRECIPITATION', description='Total precipitation amount in gauge (accumulated since last emptying). Timing for emptying and algorithm for calculating the precipitation amount depends on sensortype', accumulated=False, units=None, extra=None)
SNOWDEPTH = SensorDescription(code='surface_snow_thickness', name='SNOWDEPTH', description="The depth of the snow is measured in cm from the ground to the top of the snow cover. (Code=-1 means 'no snow' and can be presented as '.')", accumulated=False, units=None, extra=None)
SWE = SensorDescription(code='liquid_water_content_of_surface_snow', name='SWE', description='Snow water equivalent is a measure of the amount of water obtained if the snow is melted (as height in mm of a water column)', accumulated=False, units=None, extra=None)
TEMP = SensorDescription(code='air_temperature', name='AIR TEMP', description='Air temperature (default 2 m above ground), present value', accumulated=False, units=None, extra=None)
TEMPAVG = SensorDescription(code='best_estimate_mean(air_temperature P1D)', name='AVG AIR TEMP', description='Homogenised daily mean temperature. The mean is an arithmetic mean of 24 hourly values (00-00 UTC),', accumulated=False, units=None, extra=None)
class metloom.variables.NWSForecastVariables[source]

Bases: VariableBase

See https://api.weather.gov/gridpoints/BOI/28,28 for examples of variables

DEWPOINT = SensorDescription(code='dewpoint', name='DEW POINT TEMPERATURE', description=None, accumulated=False, units=None, extra=None)
PRECIPITATIONACCUM = SensorDescription(code='quantitativePrecipitation', name='ACCUMULATED PRECIPITATION', description=None, accumulated=True, units=None, extra=None)
RH = SensorDescription(code='relativeHumidity', name='RELATIVE HUMIDITY', description=None, accumulated=False, units=None, extra=None)
TEMP = SensorDescription(code='temperature', name='AIR TEMP', description=None, accumulated=False, units=None, extra=None)
class metloom.variables.SAILStationVariables[source]

Bases: VariableBase

https://adc.arm.gov/discovery/#/results/site_code::guc

DOWN_BROADBAND = SensorDescription(code='swdn', name='DOWN SHORTWAVE RADIATION', description='Best estimate of surface downwelling shortwave hemispheric irradiance, hourly mean', accumulated=False, units=None, extra={'site': 'GUC', 'measurement': 'ARMBECLDRAD', 'facility_code': 'M1', 'data_level': 'c1', 'units': 'w/m^2'})
PRECIPITATION = SensorDescription(code='accum_rtnrt', name='PRECIPITATION', description='Accumulated amounts of precipitation over the sampling interval exceeding a threshold of 005mm or the accumulated amount of fine precipitation observed over the last hour', accumulated=False, units=None, extra={'site': 'GUC', 'measurement': 'wbpluvio2', 'facility_code': 'M1', 'data_level': 'a1', 'units': 'mm'})
SNOWDEPTH = SensorDescription(code='snow_depth_intensity', name='SNOWDEPTH', description='New snow height', accumulated=False, units=None, extra={'site': 'GUC', 'measurement': 'LD', 'facility_code': 'M1', 'data_level': 'b1', 'units': 'mm'})
UP_BROADBAND = SensorDescription(code='swup', name='UP SHORTWAVE RADIATION', description='Surface upwelling shortwave hemispheric irradiance, hourly mean', accumulated=False, units=None, extra={'site': 'GUC', 'measurement': 'ARMBECLDRAD', 'facility_code': 'M1', 'data_level': 'c1', 'units': 'w/m^2'})
class metloom.variables.SensorDescription(code: str = '-1', name: str = 'basename', description: str | None = None, accumulated: bool = False, units: str | None = None, extra: Any | None = None)[source]

Bases: object

data class for describing a snow sensor

accumulated: bool = False
code: str = '-1'
description: str = None
extra: Any = None
name: str = 'basename'
units: str = None
class metloom.variables.SnowExVariables[source]

Bases: VariableBase

Variables for SnowEx met stations data, refer to user guide for adding more variables

Metadata: https://nsidc.org/sites/default/files/documents/user-guide/snex_met-v001-userguide.pdf

DOWNSHORTWAVE = SensorDescription(code='SDn_Avg', name='DOWNWARD SHORTWAVE RADIATION', description='Shortwave radiation measured with downward-facing sensor', accumulated=False, units=None, extra=None)
SNOWDEPTH = SensorDescription(code='SnowDepthFilter(m)', name='SNOWDEPTH', description='Snow surface height in meters w/ filtering', accumulated=False, units=None, extra=None)
TEMPGROUND20CM = SensorDescription(code='TC_20cm_Avg', name='SOIL TEMP @ 20cm', description=None, accumulated=False, units=None, extra=None)
TEMPGROUND50CM = SensorDescription(code='TC_50cm_Avg', name='SOIL TEMP @ 50cm', description=None, accumulated=False, units=None, extra=None)
TEMPGROUND5CM = SensorDescription(code='TC_5cm_Avg', name='SOIL TEMP @ 5cm', description=None, accumulated=False, units=None, extra=None)
TEMP_10FT = SensorDescription(code='AirTC_10ft_Avg', name='AIR TEMP @10ft', description='Air temperature measured at 10 ft', accumulated=False, units='deg C', extra=None)
TEMP_20FT = SensorDescription(code='AirTC_20ft_Avg', name='AIR TEMP @20ft', description='Air temperature measured at 20 ft', accumulated=False, units='deg C', extra=None)
UPSHORTWAVE = SensorDescription(code='SUp_Avg', name='UPWARD SHORTWAVE RADIATION', description='Shortwave radiation measured with upward-facing sensor', accumulated=False, units='w/m^2', extra=None)
class metloom.variables.USGSVariables[source]

Bases: VariableBase

To add more sensors: https://help.waterdata.usgs.gov/codes-and-parameters/parameters

DISCHARGE = SensorDescription(code='00060', name='DISCHARGE', description='DISCHARGE (CFS)', accumulated=False, units=None, extra=None)
DOWNLONGWAVE = SensorDescription(code='72175', name='DOWNWARD LONGWAVE RADIATION', description='Longwave radiation, downward intensity, watts per square meter', accumulated=False, units=None, extra=None)
DOWNSHORTWAVE = SensorDescription(code='72186', name='DOWNWARD SHORTWAVE RADIATION', description='Shortwave radiation, downward intensity, watts per square meter', accumulated=False, units=None, extra=None)
NETLONGWAVE = SensorDescription(code='72202', name='NET LONGWAVE RADIATION', description='Net emitted longwave radiation, watts per square meter', accumulated=False, units=None, extra=None)
NETSHORTWAVE = SensorDescription(code='72201', name='NET SHORTWAVE RADIATION', description='Net incident shortwave radiation, watts per square meter', accumulated=False, units=None, extra=None)
SNOWDEPTH = SensorDescription(code='72189', name='SNOWDEPTH', description='Snow depth, Meters', accumulated=False, units=None, extra=None)
SOLARRADIATION = SensorDescription(code='72179', name='SOLAR RADIATION', description='Shortwave solar radiation, watts per square meter', accumulated=False, units=None, extra=None)
STREAMFLOW = SensorDescription(code='74082', name='STREAMFLOW', description='STREAMFLOW, DAILY VOLUME (AC-FT)', accumulated=False, units=None, extra=None)
SURFACETEMP = SensorDescription(code='72405', name='SURFACE TEMPERATURE', description='Surface temperature, non-contact, degrees Celsius', accumulated=False, units=None, extra=None)
SWE = SensorDescription(code='72341', name='SWE', description='Water content of snow, millimeters', accumulated=False, units=None, extra=None)
UPLONGWAVE = SensorDescription(code='72174', name='UPWARD LONGWAVE RADIATION', description='Longwave radiation, upward intensity, watts per square meter', accumulated=False, units=None, extra=None)
UPSHORTWAVE = SensorDescription(code='72185', name='UPWARD SHORTWAVE RADIATION', description='Shortwave radiation, upward intensity, watts per square meter', accumulated=False, units=None, extra=None)
class metloom.variables.VariableBase[source]

Bases: object

Base class to store all variables for a specific datasource. Each datasource should implement the class. The goal is that the variables are synonymous across implementations.(i.e. PRECIPITATION should have the same meaning in each implementation). Additionally, variables with the same meaning should have the same name attribute of the SensorDescription. This way, if multiple datsources are used to sample the same variable, they can be written to the same column in a csv.

Variables in this base class should ideally be implemented by all classes and cannot be directly used from the base class.

PRECIPITATION = SensorDescription(code='-1', name='basename', description=None, accumulated=False, units=None, extra=None)
SNOWDEPTH = SensorDescription(code='-1', name='basename', description=None, accumulated=False, units=None, extra=None)
SWE = SensorDescription(code='-1', name='basename', description=None, accumulated=False, units=None, extra=None)
classmethod from_code(code)[source]

Get the correct sensor description from the code

Module contents

Top-level package for metloom.