This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> > I'm looking for a way to "clip" a netcdf file to a shapefile. Is there > a feature for this in IDV? > > I know I can clip to a polygon defined by four corner coordinates, > however, in this case, I'm interested in taking a netcdf file of > gridded met data and 'clipping' it to a watershed boundary. > > Is this possible with available IDV features, or would it require some > pretty in depth scripting? > > Any suggestions you may have would be appreciated! > Hi Lee, If you mean actually change the spatial domain of a netcdf file then you, you cannot do that. But, you can fill everything outside of a given set of polygons with missing values and write it out. This only works for a single parameter. Load in your shapefile and your netcdf file as data sources in the IDV. In the field selector under Formulas->Maps select Subset field from Map. Choose some display to see the results or right click and choose Evaluate and Save. When prompted select the map data and the field from the netcdf file. -Jeff Ticket Details =================== Ticket ID: SYQ-534123 Department: Support IDV Priority: Normal Status: Closed