Hi, One way to do this for an ascii dataset is to use a linux command to get the length of the file. That's shown here, http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2001/msg00311.html But to do the job with Ferret, commands, for any variable there are RETURN= commands that give you information about the variable and its grid. (http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/EMBEDDED-XPRESSIONS#_VPINDEXENTRY_576) They work like this: load var ! Necessary for a variable in an ascii dataset, not a netcdf datasetNote that this wouldn't work if you had just used the default abstract axis to open an ascii dataset. If you had said this, yes? file file.datyou'd always get the length of the abstract axis, 20408 points. But instead, if you define an axis and a grid and use that to read the dataset, then you can get the variable's size. Define an axis that's always going to be longer than the length of the ascii dataset, and use that to initialize the file, then you can get the size, whatever it is in that dataset: yes? define axis/x=1:10000:1 inaxis On 12/8/2012 11:14 PM, Akshay Hegde
wrote:
|