- Timestamp:
- Jun 12, 2016, 10:26:51 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r822 r823 14927 14927 14928 14928 Lncfile = len(ncfile) 14929 14930 if ncfile[Lncfile-10:Lncfile] == 'routing.nc': 14929 filen = ncfile[Lncfile-10:Lncfile] 14930 14931 if filen == 'routing.nc': 14931 14932 lonname = 'nav_lon' 14932 14933 latname = 'nav_lat' … … 14952 14953 isub = gen.index_mat(difflonlat, mindifflonlat) 14953 14954 print ' ' + fname + "initial point of subbasin '" + subname + "' in the " + \ 14954 'matrix:', isub 14955 'matrix:', isub, 'mindiff:', mindifflonlat 14955 14956 14956 14957 masksubbasin, subflows, subflowspt = gen.subbasin_point(outflows, isub) … … 14981 14982 newdim = onewnc.createDimension('outflow', Ndiroutflow) 14982 14983 14983 if ncfile== 'routing.nc':14984 if filen == 'routing.nc': 14984 14985 lonlatvarsFile(lons, lats[::-1,:], 'x', 'y', onewnc) 14985 14986 else: … … 15001 15002 newvar = onewnc.createVariable('subbasinmask','i',('y','x')) 15002 15003 vardef = basicvardef(newvar, 'subbasinmask', 'mask of the subbasin','1') 15003 if ncfile== 'routing.nc':15004 if filen == 'routing.nc': 15004 15005 newvar[:] = masksubbasin[::-1,:] 15005 15006 else:
Note: See TracChangeset
for help on using the changeset viewer.