gnssrefl.snow_functions module

gnssrefl.snow_functions.snow_azimuthal(station, gps, year, longer, doy1, doy2, bs, plt, end_dt, outputpng, outputfile, minS, maxS, barereq_days, end_doy)

azimuthal snow depth algorithm tries to determine the bare soil correction in 20 degree azimuth swaths

Parameters:
  • station (str) – 4 ch station name

  • gps (numpy array) – output of daily average RH file (year,doy,RH etc)

  • year (int) – water year

  • longer (bool) – whether you want the plot to include late summer

  • doy1 (int) – day of year, beginning of bare soil

  • doy2 (int) – day of year, ending of bare soil

  • bs (int) – bare soil year

  • plt (bool) – whether you want the plots displayed to the screen

  • end_dt (datetime) – I think this is the datetime for the optional end of the plot

  • outputpng (str) – name of the output (plot) png file

  • outputfile (str) – name of the output snowdepth txt file

  • minS (float) – minimum snowdepth for plot (m)

  • maxS (float) – maximum snowdepth for plot (m)

  • barereq_days (int) – number of days required to trust a bare soil average

  • end_doy (int) – last day of year you want to compute snow depth for

gnssrefl.snow_functions.snow_simple(station, gps, year, longer, doy1, doy2, bs, plt, end_dt, outputpng, outputfile, minS, maxS, barereq_days, end_doy)

simple snow depth algorithm

Parameters:
  • station (str) – 4 ch station name

  • gps (numpy array) – output of daily average RH file (year,doy,RH etc)

  • year (int) – water year

  • longer (bool) – whether you want the plot to include late summer

  • doy1 (int) – day of year, beginning of bare soil

  • doy2 (int) – day of year, ending of bare soil

  • bs (int) – bare soil year

  • plt (bool) – whether you want the plots displayed to the screen

  • end_dt (datetime) – I think this is the datetime for the optional end of the plot

  • outputpng (str) – name of the output (plot) png file

  • outputfile (str) – name of the output snowdepth txt file

  • minS (float) – minimum snowdepth for plot (m)

  • maxS (float) – maximum snowdepth for plot (m)

  • barereq_days (int) – min number of days to believe a bare soil average

  • end_doy (int) – last day of year you want a snow depth value for

gnssrefl.snow_functions.snowplot(station, gobst, snowAccum, yerr, left, right, minS, maxS, outputpng, pltit, end_dt)

creates and displays snow depth plot. Saves to outputpng

Parameters:
  • station (str) – name of GNSS station

  • gobts (datetime object) – time of measurements in datetime format

  • snowAccum (numpy array) – snow depth (meters)

  • yerr (numpy array) – snow depth error (meters)

  • left (datetime obj) – min x-axis limit

  • right (datetime obj) – max x-axis limit

  • minS (float) – minimum snow depth (m)

  • maxS (float) – maximum snow depth (m)

  • outputpng (str) – name of output png file

  • pltit (bool) – whether plot should be displayed to the screen

  • end_dt (datetime) – user provided override date for the end of the plot if None, then ignore

gnssrefl.snow_functions.time_limits(wateryear, longer, end_doy)

pick up some time values for windowing RH/snow depth data

Parameters:
  • wateryear (int) – water year

  • longer (bool) – whether you want a longer plot

  • end_doy (int) – last day of the year in the water year you want snow depth calculated for

Returns:

  • starting (float) – start time, fractional (year + doy/365.25)

  • ending (float) – end time, fractional (year + doy/365.25)

  • left (datetime) – beginning for the plot in datetime

  • right (datetime) – end for the plot in datetime

gnssrefl.snow_functions.unused(plot_begindate, plot_enddate)
gnssrefl.snow_functions.writeout_azim(station, outputfile, usegps, snowAccum)

writes plain txt file with snow depth results this is for the azimuth leveling version

February 6 2024 no longer setting snowdepth to zero when it is below 5 cm So there will be values above and below zero when there is no snow on the ground but THIS SHOULD NOT be interpreted as negative snow!

Parameters:
  • station (str) – 4 char station name

  • outputfile (str) – location of output file (plain txt)

  • usegps (numpy array) – LSP results (year, doy, RH etc

  • snowAccum (numpy array) – snow accumulation results in meters

Returns:

  • gobst (numpy array) – datetime useful for plotting

  • snowAccum (numpy array) – snow depth that has passed QC (meters)

  • snowAccumError (numpy array) – standard deviation of daily snow depth retrievals (meters)

gnssrefl.snow_functions.writeout_snowdepth_v0(station, outputfile, usegps, snowAccum, yerr)

writes plain txt file with snow depth results

Parameters:
  • station (str) – 4 char station name

  • outputfile (str) – location of output file (plain txt)

  • usegps (numpy array) – LSP results (year, doy, RH etc

  • snowAccum (numpy array) – snow accumulation results in meters

  • yerr (numpy array) – standard deviation of snow depth in meters

Returns:

gobst – datetime useful for plotting

Return type:

numpy array