Re: Writing ascii file

From: Hobbs, Will R (3244-CalTech) <William.R.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Sat Sep 04 2010 - 00:43:58 MDT

Soumik

On looking at your script, your are trying to write an empty array to the ascii file; you populate the 'data' array before you've added values to the one-dimensional lat, lon, slp arrays.

I've attached a modified version; I don't have your data so I haven't tested it, but it should work fine.

Will

On 9/3/10 8:15 PM, "sbasu@iarc.uaf.edu" <sbasu@iarc.uaf.edu> wrote:

Hello,

I am trying to write monthly mean of 128 X 256 resolution into an ascii file.
I tried write_matrix function and asciiwrite function but I couldn't get
any of them right. The printVarSummary output of the variable that I want
to write is :

Variable: slp_mon
Type: float
Total Size: 131072 bytes
            32768 values
Number of Dimensions: 2
Dimensions and sizes: [128] x [256]
Coordinates:

I also want to use actual lat and lon from the netcdf file that i am using
to calculate slp_mon.
I want to write in this format: lon,lat,slp_mon

I am attaching the code also if somebody could please suggest me how to do
that.

Thanks,

--
*************************************
Soumik Basu
Graduate Student, Research Assistant
International Arctic Research Center
University of Alaska Fairbanks
Fairbanks,Alaska,USA
**************************************
-----------------------------------------
This email was sent using SquirrelMail.
   "Webmail for nuts!"
http://squirrelmail.org/
**********************************************************
Will Hobbs, Ph.D.             William.R.Hobbs@jpl.nasa.gov
Jet Propulsion Laboratory
4800 Oak Grove Dr.               office:  300-324a
M/S 300-323                       phone:  (818) 354-0466
Pasadena, CA  91109                 fax:  (818) 354-0966
**********************************************************


_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Fri Sep 3 23:44:13 2010

This archive was generated by hypermail 2.1.8 : Thu Sep 16 2010 - 11:05:25 MDT