[Thread Prev][Thread Next][Index]

Re: [ferret_users] how to set the axes



Hi,
I think that the file that you're reading does not contain a time series. When a  file has data on a time axis, then you do not need to do anything more than what you've done. In the plot you showed in your first email, the notations in the upper left show this:
 
X: 1
Y: 1
T: 1

This means that when Ferret reads the data, it interprets what is in the file to mean that the variable is defined as varying along a Z axis, and exists at a single location in X, Y, and T.

What does the output of Ferret's "show data" command say? Can you copy and paste the output of these commands:
yes? show data
yes? show data/attributes
If the axis that is interpreted as a Z axis is in fact a time axis, then we can define a time axis with a DEFINE AXIS command, then use the RESHAPE command to put that onto the T axis.
yes? define axis/t=0:24:1/units=hours  hour_axis
yes? let/units='m/s'/title='X-component of current'  uvel_on_time = RESHAPE(uvel, t[gt=hour_axis])
yes? plot uvel_on_time
I would suggest that you check carefully to see if you can understand why the file you're using does not describe the axis as a time axis. I do not have experience with COHERENS but I understand it's a well-established model and it writes correct netCDF files. NetCDF files are designed to be self-documenting, and it would seem unusual to me to have incorrect grid information in an output file written by a model such as this.  So check what you are doing with COHERENS first.

Ansley


On 4/23/2014 1:10 PM, Sara Sari wrote:
You are right and that is exactly what I'm looking for.
I know the use and show data commands, what I don't know and don't get from the manual is how I can define the axes that I want...I want a time series profile of uvel. could you please give me the code? a code or command that produces the time series graph of uvel....time from 0 to 24 hrs in x axis, and uvel in y axis.
Thank you,
On Wednesday, April 23, 2014 4:02 PM, Ansley Manke <ansley.b.manke@xxxxxxxx> wrote:
Hello,
Ferret gets information about the variable from the dataset, including its  grid and the units of the variable and its coordinate axes.  Is this netCDF data?   What Ferret commands did you use to open the data? If it is netCDF, then the commands,
yes? use dataset.nc  ! whatever your file is called
yes? show data
will give you information about what is in the file; the variables and their grid.  Because your plot is labeled with depth and velocity, I am guessing that you are not be looking at the data you're expecting.  Perhaps what you have is one timestep from the result.

Ansley

On 4/23/2014 9:28 AM, 'Sara Sari <sarasari206@xxxxxxxxx>' via _OAR PMEL Ferret Users wrote:
Hello,
I use COHERENS to run a test case  in linux and when I type show data in ferret  my data are uvel (xcomponents of current), drho (density difference) and tke(turbulent kinetic energy). by using the plot command like plot uvel, it automatically sets the y axes to be depth and x axes to be uvel. but I need to set x axis to be time and y axis to be uvel
would you please let me know how I can define x axes to be time from 0 to 24 hours, and y axes to be my uvel (x components of current).
my ferret version is 6.85.
I attached 2 files, the first one is what is given by just  typing :"plot uvel"
the second one is in a sample in the coherens manual....I need to define my axes to be like the second file.
please let me know the command, I couldn't find any thing in the ferret manual....
thank you,





[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement