Exemplo n.º 1
0
def runSemsvannEB(startDate, endDate):
    # TODO: get coordinates from the ObsLocation in regObs
    location_name = "Semsvannet v/Lo 145 moh"

    wsTemp = gws.getMetData(19710, "TAM", startDate, endDate, 0, "list")
    wsSno = gws.getMetData(19710, "SA", startDate, endDate, 0, "list")
    wsPrec = gws.getMetData(19710, "RR", startDate, endDate, 0, "list")
    wsWind = gws.getMetData(18700, "FFM", startDate, endDate, 0, "list")
    wsCC = gws.getMetData(18700, "NNM", startDate, endDate, 0, "list")

    utm33_y = 6644410
    utm33_x = 243940

    temp, date = we.strip_metadata(wsTemp, get_dates=True)
    sno_tot = we.strip_metadata(wsSno)
    prec_snow = dp.delta_snow_from_total_snow(sno_tot)
    prec = we.strip_metadata(wsPrec)
    wind = we.strip_metadata(wsWind)
    cloud_cover = we.strip_metadata(wsCC)
    rel_hum = [const.rel_hum_air] * len(date)
    pressure_atm = [const.pressure_atm] * len(date)

    observed_ice = gro.get_all_season_ice(location_name, startDate, endDate)

    ice_cover, energy_balance = calculate_ice_cover_eb(
        utm33_x,
        utm33_y,
        date,
        temp,
        prec,
        prec_snow,
        cloud_cover=cloud_cover,
        wind=wind,
        rel_hum=rel_hum,
        pressure_atm=pressure_atm,
        inn_column=copy.deepcopy(observed_ice[0]),
    )

    # Need datetime objects from now on
    from_date = dt.datetime.strptime(startDate, "%Y-%m-%d")
    to_date = dt.datetime.strptime(endDate, "%Y-%m-%d")

    plot_filename = "{0}Semsvann EB {1}-{2}.png".format(plot_folder, from_date.year, to_date.year)
    # pts.plot_ice_cover(ice_cover, observed_ice, date, temp, sno_tot, plot_filename)
    plot_filename = "{0}Semsvann MET with EB {1}-{2}.png".format(plot_folder, from_date.year, to_date.year)
    pts.plot_ice_cover_eb(
        ice_cover,
        energy_balance,
        observed_ice,
        date,
        temp,
        sno_tot,
        plot_filename,
        prec=prec,
        wind=wind,
        clouds=cloud_cover,
    )
Exemplo n.º 2
0
def runOrovannEB(startDate, endDate):

    location_name = "Otrøvatnet v/Nystuen 971 moh"
    wsTemp = gws.getMetData(54710, "TAM", startDate, endDate, 0, "list")
    wsSno = gws.getMetData(54710, "SA", startDate, endDate, 0, "list")
    wsPrec = gws.getMetData(54710, "RR", startDate, endDate, 0, "list")

    utm33_y = 6802070
    utm33_x = 130513

    temp, date = we.strip_metadata(wsTemp, get_dates=True)
    sno_tot = we.strip_metadata(wsSno)
    prec_snow = dp.delta_snow_from_total_snow(sno_tot)
    prec = we.strip_metadata(wsPrec)
    cloud_cover = dp.clouds_from_precipitation(prec)
    wind = [const.avg_wind_const] * len(date)
    rel_hum = [const.rel_hum_air] * len(date)
    pressure_atm = [const.pressure_atm] * len(date)

    # available_elements = gws.getElementsFromTimeserieTypeStation(54710, 0, 'csv')
    observed_ice = gro.get_all_season_ice(location_name, startDate, endDate)

    ice_cover, energy_balance = calculate_ice_cover_eb(
        utm33_x,
        utm33_y,
        date,
        temp,
        prec,
        prec_snow,
        cloud_cover,
        wind,
        rel_hum=rel_hum,
        pressure_atm=pressure_atm,
        inn_column=copy.deepcopy(observed_ice[0]),
    )

    # Need datetime objects from now on
    from_date = dt.datetime.strptime(startDate, "%Y-%m-%d")
    to_date = dt.datetime.strptime(endDate, "%Y-%m-%d")

    plot_filename = "{0}Ortovann MET EB {1}-{2}.png".format(plot_folder, from_date.year, to_date.year)
    # pts.plot_ice_cover(ice_cover, observed_ice, date, temp, sno_tot, plot_filename)
    plot_filename = "{0}Ortovann MET with EB {1}-{2}.png".format(plot_folder, from_date.year, to_date.year)
    pts.plot_ice_cover_eb(
        ice_cover,
        energy_balance,
        observed_ice,
        date,
        temp,
        sno_tot,
        plot_filename,
        prec=prec,
        wind=wind,
        clouds=cloud_cover,
    )
Exemplo n.º 3
0
def runSemsvannEB(startDate, endDate):
    # TODO: get coordinates from the ObsLocation in regObs
    location_name = 'Semsvannet v/Lo 145 moh'

    wsTemp = gws.getMetData(19710, 'TAM', startDate, endDate, 0, 'list')
    wsSno = gws.getMetData(19710, 'SA', startDate, endDate, 0, 'list')
    wsPrec = gws.getMetData(19710, 'RR', startDate, endDate, 0, 'list')
    wsWind = gws.getMetData(18700, 'FFM', startDate, endDate, 0, 'list')
    wsCC = gws.getMetData(18700, 'NNM', startDate, endDate, 0, 'list')

    utm33_y = 6644410
    utm33_x = 243940

    temp, date = we.strip_metadata(wsTemp, get_dates=True)
    sno_tot = we.strip_metadata(wsSno)
    prec_snow = dp.delta_snow_from_total_snow(sno_tot)
    prec = we.strip_metadata(wsPrec)
    wind = we.strip_metadata(wsWind)
    cloud_cover = we.strip_metadata(wsCC)
    rel_hum = [const.rel_hum_air] * len(date)
    pressure_atm = [const.pressure_atm] * len(date)

    observed_ice = gro.get_all_season_ice(location_name, startDate, endDate)

    ice_cover, energy_balance = calculate_ice_cover_eb(
        utm33_x, utm33_y, date,
        temp, prec, prec_snow, cloud_cover=cloud_cover, wind=wind, rel_hum=rel_hum, pressure_atm=pressure_atm,
        inn_column=copy.deepcopy(observed_ice[0]))

    # Need datetime objects from now on
    from_date = dt.datetime.strptime(startDate, "%Y-%m-%d")
    to_date = dt.datetime.strptime(endDate, "%Y-%m-%d")

    plot_filename = '{0}Semsvann EB {1}-{2}.png'.format(plot_folder, from_date.year, to_date.year)
    # pts.plot_ice_cover(ice_cover, observed_ice, date, temp, sno_tot, plot_filename)
    plot_filename = '{0}Semsvann MET with EB {1}-{2}.png'.format(plot_folder, from_date.year, to_date.year)
    pts.plot_ice_cover_eb(ice_cover, energy_balance, observed_ice, date, temp, sno_tot, plot_filename, prec=prec, wind=wind, clouds=cloud_cover)
Exemplo n.º 4
0
def runOrovannEB(startDate, endDate):

    location_name = 'Otrøvatnet v/Nystuen 971 moh'
    wsTemp = gws.getMetData(54710, 'TAM', startDate, endDate, 0, 'list')
    wsSno  = gws.getMetData(54710, 'SA',  startDate, endDate, 0, 'list')
    wsPrec = gws.getMetData(54710, 'RR',  startDate, endDate, 0, 'list')

    utm33_y = 6802070
    utm33_x = 130513

    temp, date = we.strip_metadata(wsTemp, get_dates=True)
    sno_tot = we.strip_metadata(wsSno)
    prec_snow = dp.delta_snow_from_total_snow(sno_tot)
    prec = we.strip_metadata(wsPrec)
    cloud_cover = dp.clouds_from_precipitation(prec)
    wind = [const.avg_wind_const] * len(date)
    rel_hum = [const.rel_hum_air] * len(date)
    pressure_atm = [const.pressure_atm] * len(date)


    # available_elements = gws.getElementsFromTimeserieTypeStation(54710, 0, 'csv')
    observed_ice = gro.get_all_season_ice(location_name, startDate, endDate)

    ice_cover, energy_balance = calculate_ice_cover_eb(
        utm33_x, utm33_y, date, temp, prec, prec_snow, cloud_cover, wind, rel_hum=rel_hum, pressure_atm=pressure_atm,
        inn_column=copy.deepcopy(observed_ice[0]))

    # Need datetime objects from now on
    from_date = dt.datetime.strptime(startDate, "%Y-%m-%d")
    to_date = dt.datetime.strptime(endDate, "%Y-%m-%d")

    plot_filename = '{0}Ortovann MET EB {1}-{2}.png'.format(plot_folder, from_date.year, to_date.year)
    # pts.plot_ice_cover(ice_cover, observed_ice, date, temp, sno_tot, plot_filename)
    plot_filename = '{0}Ortovann MET with EB {1}-{2}.png'.format(plot_folder, from_date.year, to_date.year)
    pts.plot_ice_cover_eb(ice_cover, energy_balance, observed_ice, date, temp, sno_tot, plot_filename,
                       prec=prec, wind=wind, clouds=cloud_cover)