'time':'time', \ 'u_velocity':'u', \ 'v_velocity':'v', \ 'nodes_surrounding_ele':'nv',\ 'eles_surrounding_ele':'nbe',\ } # class instantiation creates a netCDF Dataset object as an attribute stclair = tri_grid.ugrid(data_url) # get longitude, latitude, and time variables print('Downloading data dimensions') stclair.get_dimensions(var_map) #display available time range for model output nctools.show_tbounds(stclair.Dataset.variables['time']) # get grid topo variables (nbe, nv) print('Downloading grid topo variables') stclair.get_grid_topo(var_map) # GNOME needs to know whether the elements are ordered clockwise (FVCOM) or counter-clockwise (SELFE) stclair.atts['nbe']['order'] = 'cw' # find and order the boundary print('Finding boundary') bnd = stclair.find_bndry_segs() print('Ordering boundary') if grid.lower() == 'hecwfs': ow = [1,2,20688,20689] elif grid.lower() == 'stclair': ow = list(range(1,19))
'latitude':'lat', \ 'time':'time', \ 'u_velocity':'u', \ 'v_velocity':'v', \ 'nodes_surrounding_ele':'nv',\ } # class instantiation creates a netCDF Dataset object as an attribute wfs = tri_grid.ugrid(data_url) # get longitude, latitude, and time variables print('Downloading data dimensions') wfs.get_dimensions(var_map) #display available time range for model output nctools.show_tbounds(wfs.Dataset.variables['time']) # get grid topo variables (nbe, nv) print('Downloading grid topo variables') wfs.get_grid_topo(var_map) # find and order the boundary print('Finding boundary segs') bnd = wfs.find_bndry_segs() print('Ordering boundary segs and assigning types') ow1 = 1; ow2 = 190; #nodes defining start/end of open water boundary seg_types = [] for b in bnd: if max(b) <= ow2 and min(b) >=ow1: #open water seg_types.append(1) else:
'time':'time', \ 'u_velocity':'u', \ 'v_velocity':'v', \ 'nodes_surrounding_ele':'nv',\ 'eles_surrounding_ele':'nbe',\ } # class instantiation creates a netCDF Dataset object as an attribute stclair = tri_grid.ugrid(data_url) # get longitude, latitude, and time variables print 'Downloading data dimensions' stclair.get_dimensions(var_map) #display available time range for model output nctools.show_tbounds(stclair.Dataset.variables['time']) # get grid topo variables (nbe, nv) print 'Downloading grid topo variables' stclair.get_grid_topo(var_map) # GNOME needs to know whether the elements are ordered clockwise (FVCOM) or counter-clockwise (SELFE) stclair.atts['nbe']['order'] = 'cw' # find and order the boundary print 'Finding boundary' bnd = stclair.find_bndry_segs() print 'Ordering boundary' if grid.lower() == 'hecwfs': ow = [1, 2, 20688, 20689] elif grid.lower() == 'stclair': ow = range(1, 19)