Hi, Here are some general suggestions for asking questions on this list, and for debugging Ferret scripts. Then I do have a couple of suggestions for your script. It's often quite complex to read ascii data. This is a really useful technique that I don't think we've really developed before. We'll gather this into an FAQ to add to the documentation. - First, when asking a question, make the subject line something that relates to the question. For instance, "reading station data from an ascii file" is more likely to get answers than "ferret question" or "please help". - If you see error messages, tell us what those messages say. In general people don't want to start by downloading your data and your script and run it, but they will look at an error message and tell you what it's about. It's not a bad idea to include your data and script, but your description of what's happening and why the results don't seem right, is where the list members start when answering questions. - We're already doing some of this but when working on a script, at various stages along the way, use Ferret to check what the variables look like. I think you've done the first steps correctly, but any time I read a new data source, particularly ascii data, I plot some of it to make sure the read I've got the right fields: yes? plot/vs lon, lat ! shows the locations of the stationsOr use the STAT command to see what the range of data for variables looks like. After defining sal_xz, you could visualize it: yes? shade sal_xzUsing Ferret to list or plot your variables will often suggest to you the changes you need. As you said, and as you see from the SHADE command above, the max_profile_len is larger than it needed to be. Now that the profiles have been split up, Ferret can tell you what the longest profile was. The @NGD transformation tells you how many valid data there are for a variable on an axis. Try this: yes? list sal_xz[k=@ngd]That's the number of valid data in each profile. So, in the script, define sal_xz and so forth as you're doing, then redefine max_profile_len. let max_profile_len = 9999Now you do not need to re-define sal_xz and temp_xz - they are defined in terms of the variable max_profile_len, so changing max_profile_len is all that's needed. Have a look at this again: yes? shade sal_xz To define the depth axis, you could define a variable "depth_xz" with expndi_by, and then find the longest profile, and use the depths listed there to define the z axis. let depth_xz = expndi_by_z(salt, mask, n_profiles, max_profile_len The definition of the X and Y axes in
longitude look fine to me, but you might try different values for
the delta-x and delta y, perhaps making a coarser grid. The range
should cover the range of the longitudes and latitudes in your
data and ideally the grid cells would contain multiple stations.
In the documentation of SCAT2GRIDGAUSS_XY, there is a discussion of the scale and cutoff parameters for the scat2gridgauss functions. If you make these numbers larger, or define a coarser grid, the interpolation to the grid will cover more area because you are bringing in more data to fill each grid cell. Ansley On 11/15/2012 4:53 AM, Akshay Hegde wrote: Kindly help...not able to get right output |