예제 #1
0
def main():
    print('Getting Stations')
    snotel_list = snotel.get_station_list(local=False)
    snotel_ak = [id_ for id_ in snotel_list if ":AK:" in id_]
    # update stations
    snotel.update_station_list(snotel_ak)  # DONE
    # update elements
    for trip_ in snotel_ak:
        print('Updating Station: {}'.format(trip_))
        element_list = snotel.get_element_bystationtriplet(trip_,
                                                           local=True,
                                                           filters=FILTERS)
        snotel.update_element_data_list_inpool(element_list)
예제 #2
0
def test_get_remotestation():
    print('Testing get station')
    snotel.get_element_bystationtriplet(TEST_STATION_TRIPLET, local=False)
예제 #3
0
def test_update_station_element_data_pool():
    print('Testing one element from server...')
    element_list = snotel.get_element_bystationtriplet(TEST_STATION_TRIPLET, local=False, filters=FILTERS)
    # el_ = [el for el in element_list if el.ElementCd == 'TOBS'][0]
    snotel.update_element_data(element_list[0], in_pool=True, data_format='sql')
예제 #4
0
def test_set_element_data():
    print('Testing one element from server...')
    element_list = snotel.get_element_bystationtriplet(TEST_STATION_TRIPLET, local=True, filters=FILTERS)
    el_ = [el for el in element_list if el.ElementCd == 'TOBS'][0]
    # el_ = [el for el in element_list if el.ElementCd == 'STO'][-1]
    el_.set_dataframe(data_format='par')
예제 #5
0
def test_update_elements():
    print('Testing update station data ...')
    print('Testing one element from local...')
    element_list = snotel.get_element_bystationtriplet(TEST_STATION_TRIPLET, local=False, filters=FILTERS)
    snotel.add_elements(element_list)