Esempio n. 1
0
max_records = 2000

# <markdowncell>

# ### Is data available for the basic oceanography variables in the CSW endpoints for multiple locations?
#
# #### Check the CSW endpoints for each variable and location

# <markdowncell>

# <div class="warning"><strong>This next cell takes a long time to process!</strong>  <br>Go grab a coffee</div>

# <codecell>

# Add a waitbar to monitor status
divid = insert_progress_bar(title='Searching catalogs. Please wait...',
                            color='red')

# Save all of the results in a list of Dataframes
results = {}
all_data = []

count = 0
# Loop through the csw endpoints
for endpoint in endpoints:
    print '\n' + endpoint

    csw = CatalogueServiceWeb(endpoint, timeout=60)
    # loop through the variables
    for var_name in names_dict:
        #         print '\n' + var_name.upper()
        num_recs = []
Esempio n. 2
0
# <div class="error"><strong>Processing long time series</strong> -
# The CO-OPS Server responds really slow (> 30 secs, for what should be
# a 5 sec request) to multiple requests, so getting long time series
# data is almost impossible.</div>

# <markdowncell>

# <div class="info">
# <strong>Use NDBC DAP endpoints to get time-series data</strong> -
# The DAP server for met data is available for NDBC, we use that
# to get long time series data.</div>

# <codecell>

divid = insert_progress_bar(title='Please wait...', color='red')
# Used to define the number of days allowable by the service.
coops_point_max_days = ndbc_point_max_days = 30
print("start & end dates: %s, %s\n" % (jd_start, jd_stop))
num_stations = len(st_list.keys())
count = 0
for station in st_list.keys():
    count += 1
    # Set it so we can use it later.
    st = station.split(":")[-1]
    print('[%s]: %s' % (st_list[station]['source'], st))

    if st_list[station]['source'] == 'coops':
        # Coops fails for large requests.
        master_df = pd.DataFrame()
    elif st_list[station]['source'] == 'ndbc':
Esempio n. 3
0
# <div class="error"><strong>Processing long time series</strong> -
# The CO-OPS Server responds really slow (> 30 secs, for what should be
# a 5 sec request) to multiple requests, so getting long time series
# data is almost impossible.</div>

# <markdowncell>

# <div class="info">
# <strong>Use NDBC DAP endpoints to get time-series data</strong> -
# The DAP server for met data is available for NDBC, we use that
# to get long time series data.</div>

# <codecell>

divid = insert_progress_bar(title='Please wait...', color='red')
# Used to define the number of days allowable by the service.
coops_point_max_days = ndbc_point_max_days = 30
print("start & end dates: %s, %s\n" % (jd_start, jd_stop))
num_stations = len(st_list.keys())
count = 0
for station in st_list.keys():
    count += 1
    # Set it so we can use it later.
    st = station.split(":")[-1]
    print('[%s]: %s' % (st_list[station]['source'], st))

    if st_list[station]['source'] == 'coops':
        # Coops fails for large requests.
        master_df = pd.DataFrame()
    elif st_list[station]['source'] == 'ndbc':
max_records = 2000

# <markdowncell>

# ### Is data available for the basic oceanography variables in the CSW endpoints for multiple locations?
# 
# #### Check the CSW endpoints for each variable and location

# <markdowncell>

# <div class="warning"><strong>This next cell takes a long time to process!</strong>  <br>Go grab a coffee</div>

# <codecell>

# Add a waitbar to monitor status
divid = insert_progress_bar(title='Searching catalogs. Please wait...', color='red')

# Save all of the results in a list of Dataframes
results = {}
all_data = []

count = 0
# Loop through the csw endpoints
for endpoint in endpoints:
    print '\n' + endpoint
    
    csw = CatalogueServiceWeb(endpoint, timeout=60)
    # loop through the variables
    for var_name in names_dict:
#         print '\n' + var_name.upper()
        num_recs = []