NetCDF: Date and time annotation#
When we visualize and animate time series of climate and earth system data, we would like to keep track of the respective date and time stamps and have this information displayed in the render view. In the latest ParaView version 5.5.2 on Mistral, this has been implemented as the custom filter NetCDF Time Annotation.
To create a date and time annotation, load or create a ParaView state file of your choice with netCDF data covering several time steps. Both regular and ICON grids are supported. NetCDF Time Annotation requires a relative time axis of the data, which can be set using the following CDO command:
cdo -r copy ifile ofile
In the Pipeline Browser, select the visualization module to annotate
Filters -> Alphabetical -> NetCDF Time Annotation
Figure 1: ECHAM5 wind speed data displayed as Surface LIC with date and time annotation (default settings) added
Next we will discuss how to adjust:
Formatting of date & time
The default date and time annotation, as shown in figure 1, is created by the following command in the field Expression, which can be modified by the user:
“On %02i.%02i.%02i at %02i:%02i” % (Date, Date, Date, Date, Date)
The 5 elements of the Date array are:
In case you need the numerals only, you can delete “On” and “at” from the string on the left side, or you may want to replace the dot “.” separating the date by, e.g., a dash “-“. To change the order of the date elements in the annotation, you need to change the order of the Date array elements as in the following example:
“%02i.%02i.%02i %02i:%02i” % (Date, Date, Date, Date, Date) yields:
Press the Play or Next Frame buttons in the toolbar to load a different time step and see how the annotation changes accordingly.** Font properties**
In the Font Properties section of the NetCDF Time Annotation module, you can choose between the fonts Arial, Courier and Times, with Arial as default. Moreover, you could load another font file of your choice and of type .TTF, which needs to be located on Mistral. You can also adjust:
Bold, Italic or Shadow
By default, Text Position is set to Use Window Location and has the upper left corner selected (see figure 2). Moreover, the display option Interactivity is checked.
Figure 2: NetCDF Time Annotation properties for modifying text position and font
Try the other 5 text position buttons to see where the date and time annotation will be positioned in the render view. To drag the text around manually, you will need to uncheck Use Window Location. This activates the option Lower Left Corner. Note how the values in the two respective fields adjust as you drag the annotation to a position of your choice. When done, uncheck the option Interactivity. The annotation will then stay in place unless, of course, you change values of the Lower Left Corner by using the arrows or overwriting the numbers.
Figure 3: Visualization with modified date and time annotation
Compare your own results with figure 3 and remember to save your ParaView project as a state file.* *