Example #1
0
date_now = datetime.datetime.utcnow()

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)


for nam in ['superior']:
    url=('http://michigan.glin.net:8080/thredds/dodsC/glos/glcfs/%s/ncas_his3d' % nam)
    print url
    ut,vt,u1,v1,lon2d,lat2d = surf_vel.surf_vel(x,y,url,date_mid=date_now,uvar='u',vvar='v',isurf_layer=0)
    ui=ut
    vi=vt
 
if 1: 
    for nam in ['michigan','huron','erie','ontario']:
        url=('http://michigan.glin.net:8080/thredds/dodsC/glos/glcfs/%s/ncas_his3d' % nam)
        print url
        ut,vt,u1,v1,lon2d,lat2d = surf_vel.surf_vel(x,y,url,date_mid=date_now,uvar='u',vvar='v',isurf_layer=0)
        ind = (ui==0)
        ui[ind] = ut[ind]
        vi[ind] = vt[ind]
    
ui2d=ui
vi2d=vi
Example #2
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_now = datetime.datetime.utcnow()

url='http://www.smast.umassd.edu:8080/thredds/dodsC/FVCOM/NECOFS/Forecasts/NECOFS_GOM3_FORECAST.nc'
print url
ut,vt,actual_date_mid_est = surf_vel.surf_vel(x,y,url,date_mid=datetime.datetime.utcnow(),lonvar='lonc',latvar='latc',isurf_layer=0,ugrid=True,time_sub=3)

ui=ut
vi=vt


ui=ui.T   # transpose to convention for javascript
vi=vi.T   # transpose
ui=ui.flatten()
vi=vi.flatten()
nvals=len(ui)

ui[np.isnan(ui)]=0.0
vi[np.isnan(vi)]=0.0

Example #3
0
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_now = datetime.datetime.utcnow()

url = 'http://www.smast.umassd.edu:8080/thredds/dodsC/FVCOM/NECOFS/Forecasts/NECOFS_GOM3_FORECAST.nc'
print url
ut, vt, actual_date_mid_est = surf_vel.surf_vel(
    x,
    y,
    url,
    date_mid=datetime.datetime.utcnow(),
    lonvar='lonc',
    latvar='latc',
    isurf_layer=0,
    ugrid=True,
    time_sub=3)

ui = ut
vi = vt

ui = ui.T  # transpose to convention for javascript
vi = vi.T  # transpose
ui = ui.flatten()
vi = vi.flatten()
nvals = len(ui)

ui[np.isnan(ui)] = 0.0
Example #4
0
    
x=np.linspace(x0,x1,gridWidth)
y=np.linspace(y0,y1,gridHeight)

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

date_now = datetime.datetime.utcnow()

#  Rutgers ROMS ESPRESSO
#url='http://oceanmodeling.pmc.ucsc.edu:8080/thredds/dodsC/ccsnrt/fmrc/CCSNRT_Aggregation_best.ncd'

#ut,vt=surf_vel_roms.surf_vel_roms(x,y,url,date_mid=date_now,hours_ave=24,time_sub=1)

# CCROMS
url ='http://thredds.axiomalaska.com/thredds/dodsC/CA_FCST.nc'
ut,vt = surf_vel.surf_vel(x,y,url,lonvar='lon',latvar='lat',isurf_layer=0,ugrid=False,time_sub=3)

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

if 0:
    #  JPL ROMS SCB 
    url='http://ourocean.jpl.nasa.gov:8080/thredds/dodsC/SCBfcst/scb_latest_fcst_roms.nc'
    print url
    ut,vt=surf_vel_scb.surf_vel_scb(x,y,url,lonlat_sub=2,time_sub=1)
    ui=ut
    vi=vt

if 0: