Hi all,
I wrote a user-friendly Python filter that adds date (DD/MM/YYYY) and time (hours:min::sec) to NetCDF files, that is easily loaded via the Plugin Manager in a single step.
I put the filter on GitHub with instructions and example files:
The filter uses the netcdf4-python module, which you can easily install via Anaconda:
conda install -c anaconda netcdf4 (Netcdf4 :: Anaconda.org )
This filter is based on an older Python script I wrote, but it’s a lot more user-friendly.
To get an image how the result looks, the old script can be seen in action in this 2016 video: Particles simulation of North Atlantic salinity at 20m depth - YouTube or in this 2018 one: A tropical-like cyclone in the Mediterranean Sea - YouTube where the date is in the lower left corner.
Should this be useful, my conda and ParaView configuration (on Windows10):
- I installed first ParaView 5.8.1 (which works with Python3.7)
- In the Anaconda prompt(console), I created a Python3.7 environment in conda:
conda create --name PYTHON37 python=3.7
2A. Then the env. has to be activated:
conda activate PYTHON37
2B. Install netcdf4-python in this environment:
conda install -c anaconda netcdf4
2C. Point the system to your conda paths:
set PYTHONHOME=C:\your_path\anaconda3\envs\PYTHON37
set PYTHONPATH=C:\your_path\anaconda3\envs\PYTHON37\Lib - And finally start ParaView in this same conda prompt:
D:\your_path_to_ParaView581\bin\paraview.exe - And if you wish to use the NetCDF_DateAndTime filter, follow the steps form the Instructions pdf on Github - it’s just a few mouse clicks
Repeat then step 2A,2C and 3 whenever you start ParaView
(I also added this in a reply on the ParaView Support forum, but thought it might be useful as a tip as well)
Best,
Felicia