Re: Plotting Problem after reading a variable from ascii file

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 19 2012 - 14:59:58 MDT

Soumik,

Please look at your ascii files and see that many of the numbers that
you wrote do not have spaces separating them. The function asciiread
requires one or more spaces separating the numbers; this is in the
documentation for asciiread.

When you write the ascii files, try increasing the number of
characters for each number. HTH.

   fmtx = "256f10.4" ; not f9.4

--Dave

On Mon, Mar 19, 2012 at 2:00 PM, Soumik Basu <sbasu@iarc.uaf.edu> wrote:
> Hi,
>
> I am calculating eddy kinetic energy and writing it out in ascii file. The
> problem that I am having is that when I am reading this ascii file to make
> plots, the plots look weird. When I am plotting it out after doing the
> calculation in the script in a script calculating kinetic energy the plots
> looks fine. But when I am reading the same KE data from an ascii file and
> making average of the two ascii files in program eke_plot_xseries1.ncl I am
> getting some odd looking plot.
> I am attaching the program script, and two sample ascii files (eke_tes1 and
> eke_test2) and the weird plot showing the mean of the two ascii files.
>
> This is how I am writing the ascii files:
> ;*******************************************************
> ; Write monthly mean to ascii file
> ;*******************************************************
>  fmtx = "256f9.4"
>  opt_1 = True
>  opt_1@fout = "eke_test1"
>  write_matrix(eke_mon_avg,fmtx,opt_1)
>
> When I am plotting this "eke_mon_avg" in this program it is fine.
>
> Thanks,
> Soumik
> --
> "Numbing the pain for a while will make it worse when you finally feel it.
>  ~J.K. Rowling"
> *****************************************
> Soumik Basu
> Graduate Student, Research Assistant
> International Arctic Research Center
> University of Alaska Fairbanks
> Fairbanks,Alaska,USA
> *****************************************
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 19 15:00:10 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 20 2012 - 15:27:15 MDT