reading mesh data from separate file

(Igor) #1

Hi everyone!

I have netcdf file with information about grid - lan and lot 2d variables.

For now, to get data into paraview, i append grid file to data file, set “coordinates” attribute and remap it to lonlat grid.

Is there any way to:

  1. set variables from netcdf file as grid information?
  2. use grid from one file for another file
(Igor) #2

No way? (

(Kenneth Moreland) #3

The best way to get ParaView to read grid information from a netCDF file is to follow the CF convention for specifying that a variable (with the same name as its dimension) should be interpreted as latitude, you should give it a units attribute that is something like degrees_north. For example, if you have a dimension named lat, you need a variable named lat with single dimension lat that has the latitude values and has a units attribute set to degrees_north. Likewise longitude should be given a units attribute that is something like degrees_east. For more information you can see this previous post asking a similar question on latitude and longitude in netCDF and the netCDF CF convention’s specification for coordinates. If this does not make sense, you will have to send some example files or at least the results of ncdump -h for more directed advice.

For the second question, if the two data sets in question have the same number of points and cells in the same order, you can use the Append Attributes filter to get the fields of one grid onto another.