-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[request] tseries of time-less snapshots #115
Comments
It has been a long time since I have looked at this, but I thought one could do a tseries assembly which uses the order of the files as given, ignores any timestamps in the files, and uses a time axis given in the command with the '@asn'. You do have to provide the time axis to associate, so not an abstract axis as proposed, but one could use a trivial time axis. |
I did a quick test of the syntax "TSERIES/TAXIS=axis_name", and if the files have no timestamps it results in an error message. I suspect that at the point of checking the datasets for consistent grids, the code requires a time axis for a time aggregation, and that it stops things before the code goes any farther. If so it should be easy to remove that restriction, just checking that none of the files has a timestamp and then proceed, using the axis given with the /TAXIS= qualifier. However I think that as things stand there's a pretty easy workaround. It's really not any more work than doing a TSERIES aggregation and fixing up the time axis. Do an ensemble aggregation, then define the desired time axis and use RESHAPE to put the XYZE aggregated variable(s) onto an XYZT grid defined with that time axis. |
Thank you folks for the responses.
Actually I tried this for two cases. In one, each timestep had an ensemble dimension. So,
(Does reshape actually allocate the whole array for |
To see what's being loaded, turn on "SET MODE DIAGNOSTIC" before the SHADE command and look for the lines which say "reading..." That will show the indices of the chunk of data being read. I did an example trying RESHAPE on an X-Y variable in the member files, which works fine if I ask it to load, say, a timeseries of the reshaped variable. It reads only the X-Y data needed to pick out that location at each timestep. But somehow for loading an XY slab at one timestep, in my example it returns an error saying the argument isn't 2-D. So that isn't working as I'd expected. I'll keep thinking. |
It's good to know that RESHAPE doesn't copy the underlying array. It attaches a new grid to the underlying data. |
The ability to do a TSERIES aggregation on a set of files that don't have time coordinate is added to upcoming versions. If the first file listed has no time information, then it'll go like this:
Where the time axis is by default just an abstract L axis. Or, any time axis can be defined, and given to the command using /TAXIS= . Then the data will be assigned to that axis. The code does not do any checking for time axes in any but the first file listed. The upcoming documentation update will have an update too. |
It would be nice if
tseries
accepted a set of netCDF files without timestamps in the same way thatensemble
accepts a set of files without ensemble dimension.tseries
would assign an abstract L axis to the dataset. If necessary, the user can then give it a proper time axis withdefine axis/t . . .
and@ASN
.Motivation: You are often given a set of files whose timestamps are expressed in the filename, e.g.,
somevariable-2011-05-31.nc
, instead of axis metadata in the file. Moreover, it's not easy to give a proper timestamp to each snapshot because the calculation of dates isn't trivial in ordinary programming languages. In contrast, it's not hard to set up a proper time axis in Ferret, with thedays1900()
function anddefine axis
.The text was updated successfully, but these errors were encountered: