I am using Windows 11 and using meteorological netcdf data to draw a 3D flow field. I am using the stream tracer filter and the seed type is point cloud. In addition to longitude, latitude and altitude, there is also a radius parameter. I checked the documentation and found that this radius represents the range of seed points in the xyz direction. However, the xy direction is longitude and latitude (50-150°), and the z direction is the pressure layer height (1100~100hPa). The units of these three directions are inconsistent. Using only one parameter is not enough. Is there any other solution? Thank you.
The units of these three directions are inconsistent.
There is no units in ParaView
Is there any other solution? Thank you.
Use stream tracer with custom source to use seeds of any shape and distribution
Hi, as a further explanation to Mathieus answer, as this is already a quite complex application:
Paraview doesn’t evaluate the units in the netCDF metadata. Given that you have a field with lat lon coordinates in [deg], and velocity is defined in [m/s], Paraview would presumably interprete the velocity as if would have been given in the same spatial unit - in this case [deg/s].
To compute correct streamlines or trajectories, you could either use the calculator or use separate postprocessing tools such as cdo (CDO - CDO - Project Management Service) to convert the horizontal velocity components to a unit that corresponds to the coordinates (e.g. deg/s). Note, if you would like to colormap the velocity magnitude with [m/s], you will have to compute this first. As the the actual horizotal extent of a degree in [m] depends on the latitude, you will need to do a latitude-dependent correction of the u-velocity.
With cdo this would be
cdo -O -r expr,“UK = u / ( 111111.11 * cos ( clat ( u ) * 0.017453292 ) ) ; VK = v / 111111.11; WK = w / 111111.11” <fileIn.nc> <fileOut.nc>
[note: the factor 0.017453292 is Pi/180, and 111111.11 is the length of a degree in m]
By the way, we have some best practices for using paraview with weather/climate data in our (DKRZ’s) documentation:
https://docs.dkrz.de/doc/visualization/sw/paraview/index.html#
Cheers,
Michael
Thank you for your reply. I will learn about cdo and best practices to see if I can solve it. I would like to describe the situation I encountered. The horizontal coordinate is deg and the vertical coordinate is hPa. In fact, I don’t need paraview to evaluate the coordinate unit. I just hope that in addition to the radius parameter, two more parameters can be added to indicate the rendering range in the three directions of x, y, and z. In this way, my problem may be solved. I also raised the requirement in Feature Requests.
This is great! We added it to the ParaView Tutorials and Webinars page.