[gradsusr] Displaying data from NetCDF; outputting text files; using comparitive statistics
Muhammad Rahiz
muhammad.rahiz at ouce.ox.ac.uk
Wed Dec 15 04:46:06 EST 2010
Hi James,
I suspect a corrupted data file. Could you attach the original datafile,
if it's not too big? And attach the commands that you use to plot as well.
--
Muhammad Rahiz
Researcher & DPhil Candidate (Climate Systems & Policy)
School of Geography & the Environment
University of Oxford
On Wed, 15 Dec 2010, James Ciarlo` wrote:
> Dear Muhammad,
> I am sorry it took me so long to answer. Thank you for your
> answer on point 2.
>
> Regarding point 1, opening .nc files. I have attached some
> files.
> The images from file1.jpg and file2.jpg are grads images
> (printim) from nc files produced with RegCM4, one is gxout
> contour and the other is gxout shaded.
> The image from file3.jpg is a grads image (printim) gxout shaded
> for an nc file from the ESRL database.
> The last image was produced with the PANOPLY data viewer from
> the same file that produced file3.jpg
>
> As you can see the data is not being plotted with grads as with
> normal .ctl files (which are working properly).
> I cannot seem to understand why it is not reading it properly.
> Maybe there are some definitions that I have to set? How should
> I check if all the settings are correct?
>
> Regarding point 3, I think I can do them as a normal
> mathematical expression, but I'll be trying that later on.
>
> Regards,
>
> James
>
> On 11 December 2010 12:24, James Ciarlo`
> <james.ciarlo at physics.org> wrote:
> Dear Muhammad,
> I just had a look at it this morning. Unfortunately I
> haven't yet had the time to put it to use. Thank you very
> much for your help. I will get back to you about it for
> sure. Thanks again
>
> Regards,
>
> James
>
>
> On 11 December 2010 09:59, Muhammad Rahiz
> <muhammad.rahiz at ouce.ox.ac.uk> wrote:
> Hi James,
> I was wondering if you got my reply to the
> query you posted because I'm not sure if it
> gets delivered successfully.
>
> Anyway, if you did not, these are what I
> suggested
>
> 1. display error
> - Try set gxout to something other than the
> default e.g. set gxout grfill
> - set clevs
> - check units
>
> 2. print to ascii
> what you need is the fprintf.gs script
> available athttp://cookbooks.opengrads.org/index.php?title=Recipe-002:_Savi
> ng_GrADS_variable_data_to_a_text_file
>
> Copy the code and name the file as fprintf.gs.
> Then do the following,
>
> sdfopen input.nc
> d var # where var = variable
> fprintf var dat.txt # prints data of var
> fprintf lon lon.txt # prints corresponding
> lon
> fprintf lat lat.txt # prints corresponding
> lat
>
> 3. statistical analysis
> I know how to do so in R. If you're interested
> in using R for this purpose, I can help.
>
> HTH,
>
> --
> Muhammad Rahiz
> Researcher & DPhil Candidate (Climate Systems
> & Policy)
> School of Geography & the Environment
> University of Oxford
>
> On Fri, 10 Dec 2010, James Ciarlo` wrote:
>
> Dear all,
> I am using GrADS 2.0.a9 on LINUX. I am
> trying to compare measured and modelled
> data by using GrADS. However since I am
> new with the program, there are
> some issues that I cannot seem to figure
> out, or find a solution to understand.
> I am experiencing:
>
> 1) Difficulty with displaying data from
> NetCDF files
> I have opened the file with the command
> 'sdfopen'
> When I tried 'd prmsl' I got the
> following error:
> Operation error: Invalid dimension
> environment
> Min longitude > max longitude: 320 144
> So I used ' set lon -40 145' and tried
> the display command again
> I got the following line and the image
> attached (ncimage.jpg):
> Contouring: 99000 to 102300 interval 300
> And I am getting similar results with
> other nc files
>
> 2) Difficulty with finding a command to
> output text files, or dat, or anything
> similar.
> I have used set lat, set lon, and set
> lev to obtain one value, and set t to
> get a long time interval, I have used d
> psa to display the time series, I
> can use printim file.jpg to get an
> image, but I cannot find a command to
> produce a file.txt so that I can make
> use of the actual numbers for
> statistical purposes.
>
> 3) Difficulty with finding a command to
> work out comparative statistics,
> particularly correlation and
> significance.
>
> Regards,
>
> James Ciarlo`
>
>
>
>
>
More information about the gradsusr
mailing list