Exemplo n.º 1
0
    nx = ((x1 - x0) / dx) + 1
    ny = ((y1 - y0) / dy) + 1

    gridWidth = nx
    gridHeight = ny

x = np.linspace(x0, x1, gridWidth)
y = np.linspace(y0, y1, gridHeight)

#  Rutgers ROMS ESPRESSO
url = 'http://tds.marine.rutgers.edu:8080/thredds/dodsC/roms/espresso/2009_da/his'
print url
ut, vt = surf_vel_roms.surf_vel_roms(x,
                                     y,
                                     url,
                                     date_mid=date_now,
                                     hours_ave=24,
                                     time_sub=1)
ui = ut
vi = vt

url = 'http://ecowatch.ncddc.noaa.gov/thredds/dodsC/ncom_amseas_agg/AmSeas_Apr_05_2013_to_Current_best.ncd'

print url
ut, vt = surf_vel(x,
                  y,
                  url,
                  uvar='water_u',
                  vvar='water_v',
                  isurf_layer=0,
                  lon360=True,
Exemplo n.º 2
0
gridWidth = int(nx)
gridHeight = int(ny)

x = np.linspace(x0, x1, gridWidth)
y = np.linspace(y0, y1, gridHeight)

#date_mid = datetime.datetime(2011,3,1,12,0)
date_mid = datetime.datetime.utcnow()

# load the COAWST surface currents
url = 'http://geoport.whoi.edu/thredds/dodsC/coawst_2_2/fmrc/coawst_2_2_best.ncd'
ut, vt, actual_date_mid_est = surf_vel_roms.surf_vel_roms(x,
                                                          y,
                                                          url,
                                                          date_mid=date_mid,
                                                          hours_ave=24,
                                                          tvar='time1',
                                                          lonlat_sub=1,
                                                          time_sub=3)
print url
ui = ut
vi = vt

js_header = '''var windData = {
timestamp: "12:00 pm on April 18, 2012",
x0: -130.103438,
y0: 20.191999,
x1: -60.885558,
y1: 52.807669,
gridWidth: 501.0,
gridHeight: 237.0,
Exemplo n.º 3
0
nx = ((x1 - x0) / dx) + 1
ny = ((y1 - y0) / dy) + 1

gridWidth = int(nx)
gridHeight = int(ny)

x = np.linspace(x0, x1, gridWidth)
y = np.linspace(y0, y1, gridHeight)

# date_mid = datetime.datetime(2011,3,1,12,0)
date_mid = datetime.datetime.utcnow()

# load the COAWST surface currents
url = "http://geoport.whoi.edu/thredds/dodsC/coawst_2_2/fmrc/coawst_2_2_best.ncd"
ut, vt, actual_date_mid_est = surf_vel_roms.surf_vel_roms(
    x, y, url, date_mid=date_mid, hours_ave=24, tvar="time1", lonlat_sub=1, time_sub=3
)
print url
ui = ut
vi = vt

js_header = """var windData = {
timestamp: "12:00 pm on April 18, 2012",
x0: -130.103438,
y0: 20.191999,
x1: -60.885558,
y1: 52.807669,
gridWidth: 501.0,
gridHeight: 237.0,
field: [
"""
Exemplo n.º 4
0
    dx = 0.10
    dy = 0.10

    nx = ((x1 - x0) / dx) + 1
    ny = ((y1 - y0) / dy) + 1

    gridWidth = nx
    gridHeight = ny

x = np.linspace(x0, x1, gridWidth)
y = np.linspace(y0, y1, gridHeight)

#  Rutgers ROMS ESPRESSO
url = "http://tds.marine.rutgers.edu:8080/thredds/dodsC/roms/espresso/2009_da/his"
print url
ut, vt = surf_vel_roms.surf_vel_roms(x, y, url, date_mid=date_now, hours_ave=24, time_sub=1)
ui = ut
vi = vt

url = "http://ecowatch.ncddc.noaa.gov/thredds/dodsC/ncom_amseas_agg/AmSeas_Apr_05_2013_to_Current_best.ncd"

print url
ut, vt = surf_vel(x, y, url, uvar="water_u", vvar="water_v", isurf_layer=0, lon360=True, lonlat_sub=2)
ind = ui == 0
ui[ind] = ut[ind]
vi[ind] = vt[ind]

url = "http://ecowatch.ncddc.noaa.gov/thredds/dodsC/ncom_us_east_agg/US_East_Apr_05_2013_to_Current_best.ncd"
print url
ut, vt = surf_vel(x, y, url, uvar="water_u", vvar="water_v", isurf_layer=0, lon360=True, lonlat_sub=2)
ind = ui == 0