[vtkusers] Timestep name

Biddiscombe, John A. biddisco at cscs.ch
Mon Sep 1 02:57:11 EDT 2014


https://hpcforge.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=pv-echam/pv-echam.git;a=tree;h=5f8410b1879178a4a114a279b8bd9463825e507d;hb=5f8410b1879178a4a114a279b8bd9463825e507d

Chris,

If you do as Ken says and use a  numeric time, then ....

There is some very old code in that repo linked above which includes a JulianDayToText class. I used to use this in paraview to take netCDF times and convert them to a string, then add this to my plots with a text source object in paraview which displayed the string.

The code is ancient, and you should not use the netCDF stuff as this was superseded some time back by the one in vtk/paraview. However the text source might give you an idea of how to do what you want, (I just looked in my archive and saw this ftp://ftp.cscs.ch/out/biddisco/netCDF/SO2-1950-2050-5yr-2.avi which was made in 2009 and uses the date/time source to display a simple yyyy/mm/dd dormat time.

JB

From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Moreland, Kenneth
Sent: 25 August 2014 14:13
To: Chris Marsh; vtkusers at vtk.org
Subject: Re: [vtkusers] Timestep name


Chris,



In the pvd file, which is just an XML metadata file, you will see tags named DataSet that point to the vtu files. The DataSet tag supports a timestep attribute that takes a number that represents the time value. These time values do not have to be integers and do not have to be regularly spaced.



However, the timestep attribute does have to be a number. You will have to convert your time to some seconds/hours/days from some reference point.



-Ken



Kenneth Moreland
Sandia National Laboratories
email: kmorel at sandia.gov<mailto:kmorel at sandia.gov>
phone: (505) 844-8919
web:   http://www.sandia.gov/~kmorel
________________________________
From: vtkusers <vtkusers-bounces at vtk.org<mailto:vtkusers-bounces at vtk.org>> on behalf of Chris Marsh <chris.marsh at usask.ca<mailto:chris.marsh at usask.ca>>
Sent: Friday, August 22, 2014 2:14 PM
To: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: [EXTERNAL] [vtkusers] Timestep name

I have a timeseries of data that I am saving to a set of vtu files. These load in paraview nicely and play as an animation. However, each timestep corresponds to a date/time (e.g., Oct-01-2010 14:00:00) and I would like this to be displayed. For example, 'Timestep 758' isn't intuitive when dealing with realworld datetimes.
I have tried making a pvd file, but it wasn't not clear how to rename a timestep.

Is there a way of doing this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140901/4f03f670/attachment.html>


More information about the vtkusers mailing list