M3Works / metloom

Location Oriented Observed Meteorology
Other
16 stars 4 forks source link

Adding Irwin SP #111

Open micahjohnson150 opened 3 months ago

micahjohnson150 commented 3 months ago

Creating this to continue a convo with Joe.

Would be cool to add in the csv data from the Irwin Study plot to be used from metloom.

There doesn't sound like a publicly available API or link but we could still make a class to read the csv that is often emailed around when updated. We could also add a variables class to map variables. Here is what I am picturing.

from metloom.pointdata import IrwinPointData 
from metloom.variables import IrwinVariables

pnt = IrwinPointData(csv=file)
df = pnt.get_daily_data(start, end, [IrwinVariables.SNOWDEPTH])

The variables are a straightforward mapping of their names to a more useful or readable name. e.g.

in variables.py

class IrwinVariables(VariableBase):
    SNOWDEPTH = InstrumentDescription("Sno_Height_M", "SNOWDEPTH")

While this effort wouldnt solve much in the way of getting the data, it would help standardize the use of individual energy balance sites that all seem to do things a scosh different.

jomey commented 3 months ago

Just checked what I remember being the 'raw' file and it was an Excel sheet, which I then exported as CSV. The site has Temperature and the four component data in this format:

TIMESTAMP, RECORD, Batt_volt_Min, PTemp, Incoming) Solar_Wm2_1_Avg, Incoming_NIR_Wm2_2_Avg, Outgoing_Solar_Wm2_3_Avg, Outoging_NIR_Wm2_4_Avg

Sample row:

4/27/2019 18:00, 0, 13.61, 9.5, 556.1829, 232.8276, 361.8972, 112.1594

I manually added some spaces here after the comma for readability

micahjohnson150 commented 3 months ago

Sweet pretty simple. The advantage will be variable mapping which is still nice.