<div dir="ltr"><div>Dear NCL user<br><br></div><div>i tried these command to save my plot in pdf file. but its not working. pdf creating but without map. Here i attached my scripts for plotting map. please look at this and let me know what am i doing wrong.<br><br><span class="im"><tt>wks_type = "pdf" </tt><tt><br></tt><tt>wks_type@wkPaperSize = "A4"</tt><tt><br></tt></span><tt>wks = gsn_open_wks(wks_type,"sample1")</tt><tt><br>
</tt><tt>
</tt><tt><br>
</tt><br><br>My aim to just save my results in pdf format.<br><br><tt><br>
</tt><br></div><div>Thaank YOu<br></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio & Atmospheric Science Division <br></div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br><br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div>
<br><div class="gmail_quote">On Wed, Sep 24, 2014 at 5:14 PM, Karin Meier-Fleischer <span dir="ltr"><<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
You set wks to x11 and create a plot. The second setting of wks do
not have any influence.<br>
Change the the first wks setting to the pdf settings and it should
work.<br>
<br>
<tt>;---Open workstation and change color map</tt><tt><br>
</tt><tt> wks_type = "pdf" </tt><tt><br>
</tt><tt>
wks_type@wkPaperSize = "A4"</tt><tt><br>
</tt><tt>
wks = gsn_open_wks(wks_type,"sample1")</tt><tt><br>
</tt><tt>
</tt><tt><br>
</tt><tt><br>
</tt><tt>;---Set some resources</tt><tt><br>
</tt><tt> res = True</tt><tt><br>
</tt><tt><br>
</tt><tt> res@gsnMaximize = True ; maximize plot in frame</tt><tt><br>
</tt><tt><br>
</tt><tt> res@cnFillOn = True ; turn on contour fill</tt><tt><br>
</tt><tt> res@cnLinesOn = False ; turn off contour lines</tt><tt><br>
</tt><tt> res@cnLineLabelsOn = False ; turn off line labels</tt><tt><br>
</tt><tt><br>
</tt><tt> res@tiMainString = filename</tt><tt><br>
</tt><tt><br>
</tt><tt> res@gsnAddCyclic = False</tt><tt><br>
</tt><tt><br>
</tt><tt> plot = gsn_csm_contour_map(wks,totc,res)</tt><tt><br>
</tt><br>
<br>
Bye,<br>
Karin<br>
<br>
<div>Am 24.09.14 13:16, schrieb Kunal Bali:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>please find the attached file<br>
<br>
</div>
Thank You<br>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr">
<div>Kunal Bali<br>
</div>
<div>Research Scholar <br>
</div>
<div>Radio & Atmospheric Science Division <br>
</div>
<div>CSIR - National Physical Laboratory<br>
</div>
<div>New Delhi - 110012<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br>
</font></p>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Wed, Sep 24, 2014 at 4:22 PM, Karin
Meier-Fleischer <span dir="ltr"><<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Please provide the
script you are using!<br>
<br>
<div>Am 24.09.14 12:34, schrieb Kunal Bali:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Dear Karin<br>
<br>
</div>
Thank You once again. Now its coming properly. <br>
</div>
One more problem i am facing right now is that i
am trying to save the output result in pdf. <br>
</div>
I am using the commands before END command <br>
wks_type = "pdf"<br>
wks_type@wkPaperSize = "A4"<br>
wks = gsn_open_wks(wks_type,"test2") <br>
<br>
</div>
<div>These command are generating the pdf file in
directory but blank without any graphs (0 bytes).<br>
<br>
</div>
<div>So how is the correct way to save the result in
pdf or png format or how to use above commands
correctly.<br>
<br>
</div>
<div>Thank You <br>
</div>
<div><br>
</div>
<br>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr">
<div>Kunal Bali<br>
</div>
<div>Research Scholar <br>
</div>
<div>Radio & Atmospheric Science Division <br>
</div>
<div>CSIR - National Physical Laboratory<br>
</div>
<div>New Delhi - 110012<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br>
</font></p>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Wed, Sep 24, 2014 at 3:30
PM, Karin Meier-Fleischer <span dir="ltr"><<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi Kunal,
<div><br>
</div>
<div>didn’t you use the isnan_ieee section in
the script? You have NaNs in your data and
they should be set to _FillValue.</div>
<div><br>
</div>
<div>
<div><font face="Courier New"> if
(any(isnan_ieee(data))) then</font></div>
<div><font face="Courier New"> value =
1.e20</font></div>
<div><font face="Courier New">
replace_ieeenan (data, value, 0)</font></div>
<div><font face="Courier New">
data@_FillValue = value</font></div>
<div><font face="Courier New"> end if</font></div>
</div>
<div><br>
</div>
<div>Again, without your script we could not
help properly!</div>
<div><br>
</div>
<div>Bye,</div>
<div>Karin</div>
<div><br>
<div>
<div>Am 24.09.2014 um 11:40 schrieb Kunal
Bali <<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>>:</div>
<br>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">
<div>Dear NCL users<br>
<br>
</div>
<div>With the help of NCL users Now
i am able to convert ASCII to
netcdf format. But when i tried to
plot this .nc file the contour map
is not coming out in proper way. <br>
</div>
<div><br>
</div>
<div>But when i use the original .nc
file (without any conversion) then
the plot is coming nicely. Here is
attached the file with figure and
all commands which i am using to
plot. <br>
<br>
</div>
<div>Thank You<br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr">
<div>Kunal Bali<br>
</div>
<div>Research Scholar <br>
</div>
<div>Radio & Atmospheric
Science Division <br>
</div>
<div>CSIR - National Physical
Laboratory<br>
</div>
<div>New Delhi - 110012<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br>
</font></div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Wed, Sep
24, 2014 at 1:54 PM, Karin
Meier-Fleischer <span dir="ltr"><<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi
Kunal,
<div><br>
</div>
<div>you read the data into an
array called data with
nlines=64800 and ncolumns=3
—>
data(nlines,ncolumns)</div>
<div><br>
</div>
<div><font face="Courier New">The
1st column, all lines:
data(:,0)</font></div>
<div><font face="Courier New">The
2nd column, all lines:
data(:,1)</font></div>
<div><font face="Courier New">The
3rd column, all lines:
data(:,2)</font></div>
<div><font face="Courier New"><br>
</font></div>
<div><font face="Courier New">nLongitude
= 360</font></div>
<div><font face="Courier New">Longitude
= data(0:nLongitude-1,1)
—> </font>read 2nd
column, first 360 lines</div>
<span>
<div><br>
</div>
<div>Please, take a look at </div>
<div><br>
</div>
</span>
<div><a href="http://www.ncl.ucar.edu/Document/Manuals/Getting_Started/basics.shtml#ArraySubscripting" target="_blank">http://www.ncl.ucar.edu/Document/Manuals/Getting_Started/basics.shtml#ArraySubscripting</a></div>
<div><br>
</div>
<div>Bye,</div>
<div>Karin</div>
<div><br>
</div>
<div>
<div>
<div>Am 24.09.2014 um
07:10 schrieb Kunal Bali
<<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>>:</div>
<div>
<div><br>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>Dear<span name="Karin
Meier-Fleischer">
<b>Karin
Meier-Fleischer<br>
</b></span></div>
<span name="Karin
Meier-Fleischer"><span style="background-color:rgb(255,255,255)"><span><span style="background-color:rgb(255,255,255)"></span></span></span><br>
Thank You so
much for
helping me.
Your run your
scripts and
working well.
<br>
</span></div>
<span name="Karin
Meier-Fleischer">I
just want know
what is the
means of this
line > </span>
<b>Longitude =
data(</b><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)">0:nLongitude-1</span></span><b>,1)<br>
<br>
</b></div>
<b>Thank You<br>
</b></div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr">
<div>Kunal
Bali<br>
</div>
<div>Research
Scholar <br>
</div>
<div>Radio
&
Atmospheric
Science
Division <br>
</div>
<div>CSIR -
National
Physical
Laboratory<br>
</div>
<div>New Delhi
- 110012<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br>
</font></div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On
Wed, Sep 24,
2014 at 1:01 AM,
Karin
Meier-Fleischer
<span dir="ltr"><<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi
Kunal,
<div><br>
</div>
<div>one
problems
occurred while
reading the
datacaused by
the variable
name TotCH4_A
in the </div>
<div>header
line of your
data file
14-01.txt. NCL
reads the
value 4 in the
name and
writes it as
first </div>
<div>value
into the data
array. After
renaming to
TotCH_A in
14-01.txt file
everything
works well. </div>
<div><br>
</div>
<div>You
missed to
convert the
one
dimensional
variable
TotCH4_A (in
your NCL
script) to a
two </div>
<div>dimensional
array. Also as
described in
the mails
before you
should assign
latitude and </div>
<div>longitude
to the named
variables of
TotCH4_A2D.
See the script
below.</div>
<div><br>
</div>
<div>It is
easier to
write/save the
NCL commands
in a text file
(e.g.
script.ncl)
and run it </div>
<div>using
’ncl
script.ncl'</div>
<div><br>
</div>
<div>Bye,
Karin</div>
<div><br>
</div>
<div>;-----------------------------------------------------------------------------</div>
<div>
<div>load
"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" </div>
<div>load
"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" </div>
<div>load
"$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" </div>
<div><br>
</div>
<div>begin</div>
<div><br>
</div>
<div>
nLatitude =
180</div>
<div>
nLongitude =
360</div>
<div> </div>
<div> data =
asciiread("14-01.txt",(/nLatitude*nLongitude,3/),"float")</div>
<div><br>
</div>
<div>
Latitude =
data(::nLongitude,0)</div>
<div>
Longitude =
data(0:nLongitude-1,1)</div>
<div>
TotCH4_A =
data(:,2) </div>
<div>
TotCH4_A2D =
onedtond(TotCH4_A,(/nLatitude,nLongitude/))</div>
<div><br>
</div>
<div> if
(any(isnan_ieee(TotCH4_A2D)))
then</div>
<div> value
= 1.e20</div>
<div>
replace_ieeenan
(TotCH4_A2D,
value, 0)</div>
<div>
TotCH4_A2D@_FillValue
= value</div>
<div> end if</div>
<div><br>
</div>
<div>
printMinMax(Latitude,0)</div>
<div>
printMinMax(Longitude,0)</div>
<div>
printMinMax(TotCH4_A,0)</div>
<div><br>
</div>
<div>; Assign
named
dimensions </div>
<div><br>
</div>
<div>
TotCH4_A2D!0 =
"lat"</div>
<div>
TotCH4_A2D!1 =
"lon"</div>
<div><br>
</div>
<div>; Assign
coordinate
variables</div>
<div><br>
</div>
<div>
TotCH4_A2D&lat
= Latitude</div>
<div>
TotCH4_A2D&lon
= Longitude</div>
<div><br>
</div>
<div>
TotCH4_A2D&lat@units
=
"degrees_north"</div>
<div>
TotCH4_A2D&lon@units
=
"degrees_east"</div>
<div> </div>
<div>
printVarSummary(TotCH4_A2D)</div>
<div><br>
</div>
<div>; delete
existing
netcdf file to
create a new
one</div>
<div>
system("rm -rf
Sample.nc")</div>
<div> ncdf =
addfile("Sample.nc","c")</div>
<div><br>
</div>
<div>; write
data to netcdf
file</div>
<div><br>
</div>
<div>
ncdf->TotCH4_A
= TotCH4_A2D</div>
<div><br>
</div>
<div>; plot
data</div>
<div><br>
</div>
<div> wks =
gsn_open_wks("x11","test")</div>
<div> plot =
gsn_csm_contour_map(wks,TotCH4_A2D,False)</div>
<div><br>
</div>
<div>end</div>
</div>
<div><br>
</div>
<div>
<div>;-----------------------------------------------------------------------------</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div>
<div>Am
23.09.2014 um
19:45 schrieb
Kunal Bali
<<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>>:</div>
<br>
<blockquote type="cite">
<div>
<div dir="ltr">Here
i attached
scripts which
i am trying to
get the ascii
to netcdf
conversion. <br>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr">
<div>Kunal
Bali<br>
</div>
<div>Research
Scholar <br>
</div>
<div>Radio
&
Atmospheric
Science
Division <br>
</div>
<div>CSIR -
National
Physical
Laboratory<br>
</div>
<div>New Delhi
- 110012<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br>
</font></div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On
Tue, Sep 23,
2014 at 11:03
PM, Karin
Meier-Fleischer
<span dir="ltr"><<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi
Kunal,
<div><br>
</div>
<div>could you
provide the
data file and
your script. </div>
<div><br>
</div>
<div>Bye,</div>
<div>Karin</div>
<div><br>
</div>
<div><br>
<div>
<div>Am
23.09.2014 um
19:05 schrieb
Kunal Bali
<<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>>:</div>
<div><br>
<blockquote type="cite">
<div dir="ltr">
<div>Dear NCL
users<br>
<br>
</div>
I tried
previous mail
scripts for
converting
ASCII to
netcdf format
, the file is
generating but
its without
data
points.Only
variable names
generating. <br>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr">
<div>Kunal
Bali<br>
</div>
<div>Research
Scholar <br>
</div>
<div>Radio
&
Atmospheric
Science
Division <br>
</div>
<div>CSIR -
National
Physical
Laboratory<br>
</div>
<div>New Delhi
- 110012<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br>
</font></div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On
Tue, Sep 23,
2014 at 1:28
PM, Karin
Meier-Fleischer
<span dir="ltr"><<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi Kunal,<br>
<br>
the answer was
given in an
earlier mail:<br>
<br>
<tt>1. read
the ASCII data
variable, lat
and lon<br>
2. create a
output
file:
netcdf =
addfile("<a href="http://simple.nc/" target="_blank">simple.nc</a>","c")</tt><tt><br>
</tt><tt>3.
write your
data variable
to the output
file: </tt><tt>ncdf->values
= values</tt><br>
<br>
<br>
Please read
the 'output to
netcdf'
examples for
more details:<br>
<a href="http://ncl.ucar.edu/Applications/o-netcdf.shtml" target="_blank">http://ncl.ucar.edu/Applications/o-netcdf.shtml</a><br>
<br>
Bye,<br>
Karin<br>
<br>
<div>Am
23.09.14
07:04, schrieb
Kunal Bali:<br>
</div>
<div>
<blockquote type="cite">
<div dir="ltr">
<div>Dear NCL
users<br>
<br>
</div>
I am still not
getting how to
do the
conversion
from ASCII to
netcdf ??<br>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr">
<div>Kunal
Bali<br>
</div>
<div>Research
Scholar <br>
</div>
<div>Radio
&
Atmospheric
Science
Division <br>
</div>
<div>CSIR -
National
Physical
Laboratory<br>
</div>
<div>New Delhi
- 110012<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br>
</font></div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On
Mon, Sep 22,
2014 at 7:35
PM, Yuqiang
Zhang <span dir="ltr"><<a href="mailto:yuqiangzhang.thu@gmail.com" target="_blank">yuqiangzhang.thu@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="color:#1f497d">Hi Kunal,</span></p>
<div><span style="color:#1f497d"> </span><br>
</div>
<p class="MsoNormal"><span style="color:#1f497d">In line 30, “</span><b>ncl 30> TotCH4_A =
data(:,2)</b> “.
You variable
“TotCH4_A” is
only assigned
one
dimension’s
value, so you
can’t assign
two dimension
through line
33 & 34. <span style="color:#1f497d"></span></p>
<span>
<div><span style="color:#1f497d"> </span><br>
</div>
<p class="MsoNormal"><span style="color:#1f497d">Regards,</span></p>
<p class="MsoNormal"><span style="color:#1f497d">Yuqiang</span></p>
<div><span style="color:#1f497d"> </span><br>
</div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>
[mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>]
<b>On Behalf
Of </b>Kunal
Bali<br>
<b>Sent:</b>
Monday,
September 22,
2014 8:53 AM<br>
<b>To:</b>
Karin
Meier-Fleischer<br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
<b>Subject:</b>
Re: [ncl-talk]
query (
CONVERSION
ASCII TO
NetCDF)</span></p>
<div> <br>
</div>
</span>
<div>
<div>
<p class="MsoNormal">Dear
NCL user </p>
</div>
<div>
<div>
<p class="MsoNormal">I
tried this
script from
NCL but still
getting error
</p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
ncl 28>
Longitude =
data(:,1)<br>
ncl 29>
Latitude =
data(:,0) <br>
ncl 30>
TotCH4_A =
data(:,2) <br>
ncl 31>
ncdf =
addfile("/home/kunal/<a href="http://simple1.nc/" target="_blank">simple1.nc</a>","c")<br>
ncl 32>
filedimdef(ncdf,"time",-1,True)
<br>
ncl 33>
TotCH4_A!0 =
"Latitude"<br>
ncl 34>
TotCH4_A!1 =
"Longitude"<br>
<b>fatal:Variable
(TotCH4_A) has
(1) dimensions
can not write
to dimension
(1)<br>
fatal:["Execute.c":8565]:Execute:
Error occurred
at or near
line 34<br>
</b><br>
<br>
</p>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><br clear="all">
</p>
<div>
<div>
<div>
<p class="MsoNormal">Kunal
Bali</p>
</div>
<div>
<p class="MsoNormal">Research
Scholar </p>
</div>
<div>
<p class="MsoNormal">Radio
&
Atmospheric
Science
Division </p>
</div>
<div>
<p class="MsoNormal">CSIR
- National
Physical
Laboratory</p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">New Delhi - 110012</p>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif""> </span></p>
</div>
</div>
</div>
<div> <br>
</div>
<div>
<p class="MsoNormal">On
Mon, Sep 22,
2014 at 5:32
PM, Karin
Meier-Fleischer
<<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>>
wrote:</p>
<div>
<div>
<p class="MsoNormal">Hi
Kunal,</p>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<p class="MsoNormal">Please,
take a look at
the 'output
netcdf'
examples page,
method_1</p>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<p class="MsoNormal"><a href="http://ncl.ucar.edu/Applications/method_1.shtml" target="_blank">http://ncl.ucar.edu/Applications/method_1.shtml</a><br>
<br>
Try this:</p>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<p class="MsoNormal">lat
= data(:,0)</p>
</div>
<div>
<p class="MsoNormal">lat
= data(:,1)</p>
</div>
<div>
<p class="MsoNormal">values=
data(:,2)</p>
</div>
<div>
<p class="MsoNormal"><a href="http://ncl.ucar.edu/Document/Functions/Built-in/system.shtml" target="_blank"><span style="text-decoration:none">system</span></a>("/bin/rm
-f <a href="http://simple.nc/" target="_blank">simple.nc</a>") ; remove any
pre-existing
file </p>
</div>
<div>
<div style="border:solid windowtext 1.0pt;border-bottom:solid windowtext 6.0pt;padding:0in 0in 0in 0in">
<pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:"UICTFontTextStyleBody","serif"">ncdf = addfile("<a href="http://simple.nc/" target="_blank">simple.nc</a>" ,"c") ; output netCDF file</span></pre>
<pre style="border:none;padding:0in;border-color:transparent"><a href="http://ncl.ucar.edu/Document/Functions/Built-in/filedimdef.shtml" target="_blank"><span style="font-family:"UICTFontTextStyleBody","serif";text-decoration:none">filedimdef</span></a><span style="font-family:"UICTFontTextStyleBody","serif"">(ncdf,"time",-1,True) ; recommended</span></pre>
<pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:"UICTFontTextStyleBody","serif"">values!0 = "lat"</span></pre>
<pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:"UICTFontTextStyleBody","serif"">values!1 = "lon"</span></pre>
<pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:"UICTFontTextStyleBody","serif"">values&lat = lat</span></pre>
<pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:"UICTFontTextStyleBody","serif"">values&lon = lon </span></pre>
<pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:"UICTFontTextStyleBody","serif"">ncdf->values = values</span></pre>
</div>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<p class="MsoNormal">Bye,
Karin</p>
</div>
<div>
<div>
<div> <br>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Am 22.09.2014
um 11:40
schrieb Kunal
Bali <<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>>:</p>
</div>
<div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Dear NCL users</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I want to convert ASCII to .nc file format.
Could any one
please
provides me
the link for
this query or
give any
detail about
this ??</p>
</div>
<p class="MsoNormal">I
have data in 3
column (
Latitude
Longitude
Values)</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">More Detail<br>
<br>
<b>Variable:
data<br>
Type: float<br>
Total Size:
777600 bytes<br>
194400 values<br>
Number of
Dimensions: 2<br>
Dimensions and
sizes:
[64800] x [3]<br>
Coordinates: <br>
Number Of
Attributes: 1<br>
_FillValue
:
9.96921e+36<br>
<br>
</b></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b>So is there any ways to convert ASCII to
netcdf format
???</b></p>
</div>
<p class="MsoNormal"><b>Thank
You</b></p>
<div>
<div>
<div>
<p class="MsoNormal"><br clear="all">
</p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Kunal
Bali</p>
</div>
<div>
<p class="MsoNormal">Research
Scholar </p>
</div>
<div>
<p class="MsoNormal">Radio
&
Atmospheric
Science
Division </p>
</div>
<div>
<p class="MsoNormal">CSIR
- National
Physical
Laboratory</p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">New Delhi - 110012</p>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<div> <br>
</div>
</div>
<div>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif""> </span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">_______________________________________________<br>
ncl-talk
mailing list<br>
List
instructions,
subscriber
options,
unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></p>
</div>
</blockquote>
</div>
</div>
<div> <br>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
</div>
</div>
<br>
_______________________________________________<br>
ncl-talk
mailing list<br>
List
instructions,
subscriber
options,
unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
_______________________________________________<br>
ncl-talk
mailing list<br>
List
instructions,
subscriber
options,
unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote>
</div>
</div>
<br>
<div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word"><span style="border-collapse:separate;font-family:Helvetica;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word">____________________________________</div>
</span><span>Dipl.
Geophys. Karin
Meier-Fleischer</span></div>
</span>
<div><font face="Courier
New"><span style="font-size:13px">Visualisierung</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Abteilung
Anwendungen</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px"><br>
</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Deutsches
Klimarechenzentrum
GmbH (DKRZ)</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Bundesstrasse
45a * D-</span></font><span>20146
Hamburg
</span></div>
<div><font face="Courier
New"><span style="font-size:13px">Germany
</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px"><br>
</span></font></div>
<div><span>Phone:<span style="white-space:pre-wrap"> </span><a href="tel:%2B49%20%280%2940%20460094%20126" value="+4940460094126" target="_blank">+49 (0)40 460094 126</a></span></div>
<div>
<div><span>Fax:<span style="white-space:pre-wrap"> </span><a href="tel:%2B49%20%280%2940%20460094%20270" value="+4940460094270" target="_blank">+49 (0)40 460094 270</a></span></div>
<div><font face="Courier
New"><span style="font-size:13px">E-Mail:<span style="white-space:pre-wrap"> </span></span></font><span><a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a></span></div>
</div>
<div><font face="Courier
New"><span style="font-size:13px">URL:<span style="white-space:pre-wrap"> </span></span></font><span><a href="http://www.dkrz.de/" target="_blank">http://www.dkrz.de/</a></span></div>
<div><font face="Courier
New"><span style="font-size:13px"><br>
</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Geschäftsführer:
Prof. Dr.
Thomas Ludwig</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Sitz
der
Gesellschaft:
Hamburg</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Amtsgericht
Hamburg HRB
39784</span></font></div>
<div><br>
</div>
</div>
</span></div>
</div>
</div>
</div>
</div>
<br>
<br>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
<span><14-01.txt></span><span><ASCII
to
netcdf.ncl></span>_______________________________________________<span><br>
ncl-talk
mailing list<br>
List
instructions,
subscriber
options,
unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</span></blockquote>
</div>
<div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><span style="border-collapse:separate;border-spacing:0px">
<div style="word-wrap:break-word"><span style="border-collapse:separate;font-family:Helvetica;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word"><br>
</div>
</span></div>
</span></div>
</span></div>
</div>
</div>
</div>
</div>
<br>
<br>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
_______________________________________________<br>
ncl-talk mailing
list<br>
List instructions,
subscriber options,
unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote>
</div>
</div>
</div>
<div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><span style="border-collapse:separate;border-spacing:0px">
<div style="word-wrap:break-word"><span style="border-collapse:separate;font-family:Helvetica;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word"><br>
</div>
</span></div>
</span></div>
</span></div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<span><contour_error.png></span>_______________________________________________<span><br>
ncl-talk mailing list<br>
List instructions, subscriber options,
unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</span></blockquote>
</div>
<span><br>
<div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><span style="border-collapse:separate;border-spacing:0px">
<div style="word-wrap:break-word"><span style="border-collapse:separate;font-family:Helvetica;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word">____________________________________</div>
</span><span>Dipl.
Geophys. Karin
Meier-Fleischer</span></div>
</span>
<div><font face="Courier
New"><span style="font-size:13px">Visualisierung</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Abteilung
Anwendungen</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px"><br>
</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Deutsches
Klimarechenzentrum
GmbH (DKRZ)</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Bundesstrasse
45a * D-</span></font><span>20146
Hamburg
</span></div>
<div><font face="Courier
New"><span style="font-size:13px">Germany
</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px"><br>
</span></font></div>
<div><span>Phone:<span style="white-space:pre-wrap">
</span><a href="tel:%2B49%20%280%2940%20460094%20126" value="+4940460094126" target="_blank">+49
(0)40 460094 126</a></span></div>
<div>
<div><span>Fax:<span style="white-space:pre-wrap">
</span><a href="tel:%2B49%20%280%2940%20460094%20270" value="+4940460094270" target="_blank">+49
(0)40 460094 270</a></span></div>
<div><font face="Courier
New"><span style="font-size:13px">E-Mail:<span style="white-space:pre-wrap"> </span></span></font><span><a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a></span></div>
</div>
<div><font face="Courier
New"><span style="font-size:13px">URL:<span style="white-space:pre-wrap"> </span></span></font><span><a href="http://www.dkrz.de/" target="_blank">http://www.dkrz.de/</a></span></div>
<div><font face="Courier
New"><span style="font-size:13px"><br>
</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Geschäftsführer:
Prof. Dr. Thomas
Ludwig</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Sitz
der Gesellschaft:
Hamburg</span></font></div>
<div><font face="Courier
New"><span style="font-size:13px">Amtsgericht
Hamburg HRB 39784</span></font></div>
<div><br>
</div>
</div>
</span></div>
</div>
</div>
</div>
</div>
<br>
<br>
</div>
<br>
</span></div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Dipl. Geophys. Karin Meier-Fleischer
Visualization
Application Support
Deutsches Klimarechenzentrum GmbH (DKRZ)
Bundesstrasse 45a - D20146 Hamburg - Germany
Phone: <a href="tel:%2B49%20%280%2940%20460094%20126" value="+4940460094126" target="_blank">+49 (0)40 460094 126</a>
Fax: <a href="tel:%2B49%20%280%2940%20460094%20270" value="+4940460094270" target="_blank">+49 (0)40 460094 270</a>
E-Mail: <a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>
URL: <a href="http://www.dkrz.de" target="_blank">www.dkrz.de</a>
Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784
</pre>
</div>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
</div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>