[ncl-talk] Fwd: Re: query ( CONVERSION ASCII TO NetCDF)
Karin Meier-Fleischer
meier-fleischer at dkrz.de
Wed Sep 24 09:22:01 MDT 2014
The pdf file is corrupted and can't be read.
When I run your script with the new netCDF file it works fine and I've
got the attached pdf file!
Please send the emails to ncl-talk only.
Am 24.09.14 15:36, schrieb Kunal Bali:
> Here 14-01.nc <http://14-01.nc> is the file. In this file 2 variable
> you will find, one is TotCH4_A and another one is CH4_VMR_A.
>
> So i am using only TotCH4_A as you know already.Â
> sample3 is output pdf file
>
> Kunal Bali
> Research Scholar
> Radio & Atmospheric Science Division
> CSIR - National Physical Laboratory
> New Delhi - 110012
>
>
>
>
>
>
> On Wed, Sep 24, 2014 at 6:58 PM, Karin Meier-Fleischer
> <meier-fleischer at dkrz.de <mailto:meier-fleischer at dkrz.de>> wrote:
>
> That's an information you have to tell first. Without knowing
> anything
> about the new netcdf file I can't help you!
>
> - provide the file and the script.
> - send the complete output from NCL runing the script.
> - send the pdf output file (or files ?)
>
>
>
> Am 24.09.14 15:16, schrieb Kunal Bali:
>> I downloaded the new netcdf file. i did not created ascii to
>> netcdf this time.
>> So i am using netcdf file directly.
>>
>> I am using NCL 6.2.0. version
>>
>> Kunal Bali
>> Research Scholar
>> Radio & Atmospheric Science Division
>> CSIR - National Physical Laboratory
>> New Delhi - 110012
>>
>>
>>
>>
>>
>>
>> On Wed, Sep 24, 2014 at 6:34 PM, Karin Meier-Fleischer
>> <meier-fleischer at dkrz.de <mailto:meier-fleischer at dkrz.de>> wrote:
>>
>> Please rename your netcdf file and run my script it will
>> create the netCDF file
>> and use it for plotting. The NaNs in your original and netCDF
>> file could cause
>> the problems.
>>
>> Which version of NCL you are using?
>>
>>
>> Am 24.09.14 14:55, schrieb Kunal Bali:
>>> Karin
>>>
>>> I edit the scripts according to you but when i run it first
>>> time the pdf file created with map but then again i run the
>>> same script, nothing was coming out only blank pdf created.
>>>
>>> Kunal Bali
>>> Research Scholar
>>> Radio & Atmospheric Science Division
>>> CSIR - National Physical Laboratory
>>> New Delhi - 110012
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Sep 24, 2014 at 6:12 PM, Karin Meier-Fleischer
>>> <meier-fleischer at dkrz.de <mailto:meier-fleischer at dkrz.de>>
>>> wrote:
>>>
>>> I'm a little bit confused about this email. Didn't you
>>> read my last mail 45 min ago?
>>> There you can find the answer. See attachment. Please do
>>> not send the same request
>>> more than one time!
>>>
>>>
>>> Am 24.09.14 14:33, schrieb Kunal Bali:
>>>> Dear NCL user
>>>>
>>>> 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.
>>>>
>>>> wks_type =
>>>> "pdf"Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
>>>> wks_type at wkPaperSize = "A4"
>>>> wks = gsn_open_wks(wks_type,"sample1")
>>>>
>>>>
>>>>
>>>> My aim to just save my results in pdf format.
>>>>
>>>>
>>>>
>>>> Thaank YOu
>>>>
>>>> Kunal Bali
>>>> Research Scholar
>>>> Radio & Atmospheric Science Division
>>>> CSIR - National Physical Laboratory
>>>> New Delhi - 110012
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Sep 24, 2014 at 5:14 PM, Karin Meier-Fleischer
>>>> <meier-fleischer at dkrz.de
>>>> <mailto:meier-fleischer at dkrz.de>> wrote:
>>>>
>>>> You set wks to x11 and create a plot. The second
>>>> setting of wks do not have any influence.
>>>> Change the the first wks setting to the pdf
>>>> settings and it should work.
>>>>
>>>> ;---Open workstation and change color map
>>>> Â wks_type =
>>>> "pdf"Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
>>>> Â wks_type at wkPaperSize = "A4"
>>>> Â wks = gsn_open_wks(wks_type,"sample1")
>>>>
>>>>
>>>> ;---Set some resources
>>>>  res                  = True
>>>>
>>>>  res at gsnMaximize      = True    ;
>>>> maximize plot in frame
>>>>
>>>>  res at cnFillOn         = True    ;
>>>> turn on contour fill
>>>>  res at cnLinesOn        = False   ; turn
>>>> off contour lines
>>>>  res at cnLineLabelsOn   = False   ; turn off
>>>> line labels
>>>>
>>>>  res at tiMainString     = filename
>>>>
>>>>  res at gsnAddCyclic     = False
>>>>
>>>> Â plot = gsn_csm_contour_map(wks,totc,res)
>>>>
>>>>
>>>> Bye,
>>>> Karin
>>>>
>>>> Am 24.09.14 13:16, schrieb Kunal Bali:
>>>>> please find the attached file
>>>>>
>>>>> Thank You
>>>>>
>>>>> Kunal Bali
>>>>> Research Scholar
>>>>> Radio & Atmospheric Science Division
>>>>> CSIR - National Physical Laboratory
>>>>> New Delhi - 110012
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Sep 24, 2014 at 4:22 PM, Karin
>>>>> Meier-Fleischer <meier-fleischer at dkrz.de
>>>>> <mailto:meier-fleischer at dkrz.de>> wrote:
>>>>>
>>>>> Please provide the script you are using!
>>>>>
>>>>> Am 24.09.14 12:34, schrieb Kunal Bali:
>>>>>> Dear Karin
>>>>>>
>>>>>> Thank You once again. Now its coming properly.
>>>>>> One more problem i am facing right now is
>>>>>> that i am trying to save the output result in
>>>>>> pdf.
>>>>>> I am using the commands before END command
>>>>>> Â wks_type = "pdf"
>>>>>> Â wks_type at wkPaperSize = "A4"
>>>>>> Â wks = gsn_open_wks(wks_type,"test2")
>>>>>>
>>>>>> These command are generating the pdf file in
>>>>>> directory but blank without any graphs (0 bytes).
>>>>>>
>>>>>> So how is the correct way to save the result
>>>>>> in pdf or png format or how to use above
>>>>>> commands correctly.
>>>>>>
>>>>>> Thank You
>>>>>>
>>>>>>
>>>>>>
>>>>>> Kunal Bali
>>>>>> Research Scholar
>>>>>> Radio & Atmospheric Science Division
>>>>>> CSIR - National Physical Laboratory
>>>>>> New Delhi - 110012
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Sep 24, 2014 at 3:30 PM, Karin
>>>>>> Meier-Fleischer <meier-fleischer at dkrz.de
>>>>>> <mailto:meier-fleischer at dkrz.de>> wrote:
>>>>>>
>>>>>> Hi Kunal,Â
>>>>>>
>>>>>> didnâ??t you use the isnan_ieee section
>>>>>> in the script? You have NaNs in your data
>>>>>> and they should be set to _FillValue.
>>>>>>
>>>>>> Â if (any(isnan_ieee(data))) then
>>>>>> Â Â Â value = 1.e20
>>>>>> Â Â Â replace_ieeenan (data, value, 0)
>>>>>> Â Â Â data at _FillValue = value
>>>>>> Â end if
>>>>>>
>>>>>> Again, without your script we could not
>>>>>> help properly!
>>>>>>
>>>>>> Bye,
>>>>>> Karin
>>>>>>
>>>>>> Am 24.09.2014 um 11:40 schrieb Kunal Bali
>>>>>> <kunal.bali9 at gmail.com
>>>>>> <mailto:kunal.bali9 at gmail.com>>:
>>>>>>
>>>>>>> Dear NCL users
>>>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>>> Thank You
>>>>>>>
>>>>>>> Kunal Bali
>>>>>>> Research Scholar
>>>>>>> Radio & Atmospheric Science Division
>>>>>>> CSIR - National Physical Laboratory
>>>>>>> New Delhi - 110012
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Sep 24, 2014 at 1:54 PM, Karin
>>>>>>> Meier-Fleischer <meier-fleischer at dkrz.de
>>>>>>> <mailto:meier-fleischer at dkrz.de>> wrote:
>>>>>>>
>>>>>>> Hi Kunal,
>>>>>>>
>>>>>>> you read the data into an array
>>>>>>> called data with nlines=64800 and
>>>>>>> ncolumns=3 Â â??>
>>>>>>> Â data(nlines,ncolumns)
>>>>>>>
>>>>>>> The 1st column, all lines: Â data(:,0)
>>>>>>> The 2nd column, all lines: Â data(:,1)
>>>>>>> The 3rd column, all lines: Â data(:,2)
>>>>>>>
>>>>>>> nLongitude = 360
>>>>>>> Longitude = data(0:nLongitude-1,1)
>>>>>>> Â Â â??>Â read 2nd column, first 360
>>>>>>> lines
>>>>>>>
>>>>>>> Please, take a look atÂ
>>>>>>>
>>>>>>> http://www.ncl.ucar.edu/Document/Manuals/Getting_Started/basics.shtml#ArraySubscripting
>>>>>>>
>>>>>>> Bye,
>>>>>>> Karin
>>>>>>>
>>>>>>> Am 24.09.2014 um 07:10 schrieb Kunal
>>>>>>> Bali <kunal.bali9 at gmail.com
>>>>>>> <mailto:kunal.bali9 at gmail.com>>:
>>>>>>>
>>>>>>>> Dear*Karin Meier-Fleischer
>>>>>>>> *
>>>>>>>>
>>>>>>>> Thank You so much for helping me.
>>>>>>>> Your run your scripts and working
>>>>>>>> well.
>>>>>>>> I just want know what is the means
>>>>>>>> of this line > *Longitude =
>>>>>>>> data(*0:nLongitude-1*,1)
>>>>>>>>
>>>>>>>> *
>>>>>>>> *Thank You
>>>>>>>> *
>>>>>>>>
>>>>>>>> Kunal Bali
>>>>>>>> Research Scholar
>>>>>>>> Radio & Atmospheric Science Division
>>>>>>>> CSIR - National Physical Laboratory
>>>>>>>> New Delhi - 110012
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Sep 24, 2014 at 1:01 AM,
>>>>>>>> Karin Meier-Fleischer
>>>>>>>> <meier-fleischer at dkrz.de
>>>>>>>> <mailto:meier-fleischer at dkrz.de>>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Hi Kunal,
>>>>>>>>
>>>>>>>> one problems occurred while
>>>>>>>> reading the datacaused by the
>>>>>>>> variable name TotCH4_A in theÂ
>>>>>>>> header line of your data file
>>>>>>>> 14-01.txt. NCL reads the value
>>>>>>>> 4 in the name and writes it as
>>>>>>>> firstÂ
>>>>>>>> value into the data array.
>>>>>>>> After renaming to TotCH_A in
>>>>>>>> 14-01.txt file everything works
>>>>>>>> well.Â
>>>>>>>>
>>>>>>>> You missed to convert the one
>>>>>>>> dimensional variable TotCH4_A
>>>>>>>> (in your NCL script) to a twoÂ
>>>>>>>> dimensional array. Also as
>>>>>>>> described in the mails before
>>>>>>>> you should assign latitude andÂ
>>>>>>>> longitude to the named
>>>>>>>> variables of TotCH4_A2D. See
>>>>>>>> the script below.
>>>>>>>>
>>>>>>>> It is easier to write/save the
>>>>>>>> NCL commands in a text file
>>>>>>>> (e.g. script.ncl) and run itÂ
>>>>>>>> using â??ncl script.ncl'
>>>>>>>>
>>>>>>>> Bye, Karin
>>>>>>>>
>>>>>>>> ;-----------------------------------------------------------------------------
>>>>>>>> load
>>>>>>>> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"Â
>>>>>>>>
>>>>>>>> load
>>>>>>>> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"Â
>>>>>>>>
>>>>>>>> load
>>>>>>>> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"Â
>>>>>>>>
>>>>>>>>
>>>>>>>> begin
>>>>>>>>
>>>>>>>> Â nLatitude = 180
>>>>>>>> Â nLongitude = 360
>>>>>>>> Â Â
>>>>>>>> Â data =
>>>>>>>> asciiread("14-01.txt",(/nLatitude*nLongitude,3/),"float")
>>>>>>>>
>>>>>>>>  Latitude  = data(::nLongitude,0)
>>>>>>>> Â Longitude =
>>>>>>>> data(0:nLongitude-1,1)
>>>>>>>> Â TotCH4_A Â = data(:,2) Â
>>>>>>>> Â TotCH4_A2D =
>>>>>>>> onedtond(TotCH4_A,(/nLatitude,nLongitude/))
>>>>>>>>
>>>>>>>> Â if
>>>>>>>> (any(isnan_ieee(TotCH4_A2D))) then
>>>>>>>> Â Â value = 1.e20
>>>>>>>> Â Â replace_ieeenan
>>>>>>>> (TotCH4_A2D, value, 0)
>>>>>>>> Â Â TotCH4_A2D at _FillValue = value
>>>>>>>> Â end if
>>>>>>>>
>>>>>>>> Â printMinMax(Latitude,0)
>>>>>>>> Â printMinMax(Longitude,0)
>>>>>>>> Â printMinMax(TotCH4_A,0)
>>>>>>>>
>>>>>>>> ; Assign named dimensionsÂ
>>>>>>>>
>>>>>>>> Â TotCH4_A2D!0 = "lat"
>>>>>>>> Â TotCH4_A2D!1 = "lon"
>>>>>>>>
>>>>>>>> ; Assign coordinate variables
>>>>>>>>
>>>>>>>> Â TotCH4_A2D&lat = Latitude
>>>>>>>> Â TotCH4_A2D&lon = Longitude
>>>>>>>>
>>>>>>>> Â TotCH4_A2D&lat at units =
>>>>>>>> "degrees_north"
>>>>>>>> Â TotCH4_A2D&lon at units =
>>>>>>>> "degrees_east"
>>>>>>>> Â Â
>>>>>>>> Â printVarSummary(TotCH4_A2D)
>>>>>>>>
>>>>>>>> ; delete existing netcdf file
>>>>>>>> to create a new one
>>>>>>>> Â system("rm -rf Sample.nc")
>>>>>>>> Â ncdf = addfile("Sample.nc","c")
>>>>>>>>
>>>>>>>> ; write data to netcdf file
>>>>>>>>
>>>>>>>> Â ncdf->TotCH4_A = TotCH4_A2D
>>>>>>>>
>>>>>>>> ; plot data
>>>>>>>>
>>>>>>>> Â wks = gsn_open_wks("x11","test")
>>>>>>>> Â plot =
>>>>>>>> gsn_csm_contour_map(wks,TotCH4_A2D,False)
>>>>>>>>
>>>>>>>> end
>>>>>>>>
>>>>>>>> ;-----------------------------------------------------------------------------
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Am 23.09.2014 um 19:45 schrieb
>>>>>>>> Kunal Bali
>>>>>>>> <kunal.bali9 at gmail.com
>>>>>>>> <mailto:kunal.bali9 at gmail.com>>:
>>>>>>>>
>>>>>>>>> Here i attached scripts which
>>>>>>>>> i am trying to get the ascii
>>>>>>>>> to netcdf conversion.
>>>>>>>>>
>>>>>>>>> Kunal Bali
>>>>>>>>> Research Scholar
>>>>>>>>> Radio & Atmospheric Science
>>>>>>>>> Division
>>>>>>>>> CSIR - National Physical
>>>>>>>>> Laboratory
>>>>>>>>> New Delhi - 110012
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Sep 23, 2014 at 11:03
>>>>>>>>> PM, Karin Meier-Fleischer
>>>>>>>>> <meier-fleischer at dkrz.de
>>>>>>>>> <mailto:meier-fleischer at dkrz.de>>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Hi Kunal,
>>>>>>>>>
>>>>>>>>> could you provide the data
>>>>>>>>> file and your script.Â
>>>>>>>>>
>>>>>>>>> Bye,
>>>>>>>>> Karin
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Am 23.09.2014 um 19:05
>>>>>>>>> schrieb Kunal Bali
>>>>>>>>> <kunal.bali9 at gmail.com
>>>>>>>>> <mailto:kunal.bali9 at gmail.com>>:
>>>>>>>>>
>>>>>>>>>> Dear NCL users
>>>>>>>>>>
>>>>>>>>>> I tried previous mail
>>>>>>>>>> scripts for converting
>>>>>>>>>> ASCII to netcdf format ,
>>>>>>>>>> the file is generating
>>>>>>>>>> but its without data
>>>>>>>>>> points.Only variable
>>>>>>>>>> names generating.
>>>>>>>>>>
>>>>>>>>>> Kunal Bali
>>>>>>>>>> Research Scholar
>>>>>>>>>> Radio & Atmospheric
>>>>>>>>>> Science Division
>>>>>>>>>> CSIR - National Physical
>>>>>>>>>> Laboratory
>>>>>>>>>> New Delhi - 110012
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Tue, Sep 23, 2014 at
>>>>>>>>>> 1:28 PM, Karin
>>>>>>>>>> Meier-Fleischer
>>>>>>>>>> <meier-fleischer at dkrz.de
>>>>>>>>>> <mailto:meier-fleischer at dkrz.de>>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Kunal,
>>>>>>>>>>
>>>>>>>>>> the answer was given
>>>>>>>>>> in an earlier mail:
>>>>>>>>>>
>>>>>>>>>> 1. read the ASCII
>>>>>>>>>> data variable, lat
>>>>>>>>>> and lon
>>>>>>>>>> 2. create a output
>>>>>>>>>> file:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
>>>>>>>>>> netcdf =
>>>>>>>>>> addfile("simple.nc
>>>>>>>>>> <http://simple.nc/>","c")
>>>>>>>>>> 3. write your data
>>>>>>>>>> variable to the
>>>>>>>>>> output file:Â
>>>>>>>>>> ncdf->values = values
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Please read the
>>>>>>>>>> 'output to netcdf'
>>>>>>>>>> examples for more
>>>>>>>>>> details:
>>>>>>>>>> http://ncl.ucar.edu/Applications/o-netcdf.shtml
>>>>>>>>>>
>>>>>>>>>> Bye,
>>>>>>>>>> Karin
>>>>>>>>>>
>>>>>>>>>> Am 23.09.14 07:04,
>>>>>>>>>> schrieb Kunal Bali:
>>>>>>>>>>> Dear NCL users
>>>>>>>>>>>
>>>>>>>>>>> I am still not
>>>>>>>>>>> getting how to do
>>>>>>>>>>> the conversion from
>>>>>>>>>>> ASCII to netcdf ??
>>>>>>>>>>>
>>>>>>>>>>> Kunal Bali
>>>>>>>>>>> Research Scholar
>>>>>>>>>>> Radio & Atmospheric
>>>>>>>>>>> Science Division
>>>>>>>>>>> CSIR - National
>>>>>>>>>>> Physical Laboratory
>>>>>>>>>>> New Delhi - 110012
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Sep 22, 2014
>>>>>>>>>>> at 7:35 PM, Yuqiang
>>>>>>>>>>> Zhang
>>>>>>>>>>> <yuqiangzhang.thu at gmail.com
>>>>>>>>>>> <mailto:yuqiangzhang.thu at gmail.com>>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Kunal,
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> In line 30,
>>>>>>>>>>> â??*ncl 30>
>>>>>>>>>>> TotCH4_A =
>>>>>>>>>>> data(:,2)*Â â??.
>>>>>>>>>>> You variable
>>>>>>>>>>> â??TotCH4_Aâ??
>>>>>>>>>>> is only assigned
>>>>>>>>>>> one
>>>>>>>>>>> dimensionâ??s
>>>>>>>>>>> value, so you
>>>>>>>>>>> canâ??t assign
>>>>>>>>>>> two dimension
>>>>>>>>>>> through line 33
>>>>>>>>>>> & 34.
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>>
>>>>>>>>>>> Yuqiang
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> *From:*ncl-talk-bounces at ucar.edu
>>>>>>>>>>> <mailto:ncl-talk-bounces at ucar.edu>
>>>>>>>>>>> [mailto:ncl-talk-bounces at ucar.edu
>>>>>>>>>>> <mailto:ncl-talk-bounces at ucar.edu>]
>>>>>>>>>>> *On Behalf Of
>>>>>>>>>>> *Kunal Bali
>>>>>>>>>>> *Sent:* Monday,
>>>>>>>>>>> September 22,
>>>>>>>>>>> 2014 8:53 AM
>>>>>>>>>>> *To:* Karin
>>>>>>>>>>> Meier-Fleischer
>>>>>>>>>>> *Cc:*
>>>>>>>>>>> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>>>>>>>>>>> *Subject:* Re:
>>>>>>>>>>> [ncl-talk] query
>>>>>>>>>>> ( CONVERSION
>>>>>>>>>>> ASCII TO NetCDF)
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> Dear NCL user
>>>>>>>>>>>
>>>>>>>>>>> I tried this
>>>>>>>>>>> script from NCL
>>>>>>>>>>> but still
>>>>>>>>>>> getting error
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ncl 28>
>>>>>>>>>>> Longitude =
>>>>>>>>>>> data(:,1)
>>>>>>>>>>> ncl 29> Latitude
>>>>>>>>>>> = data(:,0)Â
>>>>>>>>>>> ncl 30> TotCH4_A
>>>>>>>>>>> = data(:,2)Â
>>>>>>>>>>> ncl 31> ncdf =
>>>>>>>>>>> addfile("/home/kunal/simple1.nc
>>>>>>>>>>> <http://simple1.nc/>","c")
>>>>>>>>>>> ncl 32>
>>>>>>>>>>> filedimdef(ncdf,"time",-1,True)Â Â Â Â Â Â Â Â Â Â Â Â Â
>>>>>>>>>>>
>>>>>>>>>>> ncl 33>
>>>>>>>>>>> TotCH4_A!0 =
>>>>>>>>>>> "Latitude"
>>>>>>>>>>> ncl 34>
>>>>>>>>>>> TotCH4_A!1 =
>>>>>>>>>>> "Longitude"
>>>>>>>>>>> *fatal:Variable
>>>>>>>>>>> (TotCH4_A) has
>>>>>>>>>>> (1) dimensions
>>>>>>>>>>> can not write to
>>>>>>>>>>> dimension (1)
>>>>>>>>>>> fatal:["Execute.c":8565]:Execute:
>>>>>>>>>>> Error occurred
>>>>>>>>>>> at or near line 34
>>>>>>>>>>> *
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Kunal Bali
>>>>>>>>>>>
>>>>>>>>>>> Research Scholar
>>>>>>>>>>>
>>>>>>>>>>> Radio &
>>>>>>>>>>> Atmospheric
>>>>>>>>>>> Science Division
>>>>>>>>>>>
>>>>>>>>>>> CSIR - National
>>>>>>>>>>> Physical Laboratory
>>>>>>>>>>>
>>>>>>>>>>> New Delhi - 110012
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>> Â
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Sep 22,
>>>>>>>>>>> 2014 at 5:32 PM,
>>>>>>>>>>> Karin
>>>>>>>>>>> Meier-Fleischer
>>>>>>>>>>> <meier-fleischer at dkrz.de
>>>>>>>>>>> <mailto:meier-fleischer at dkrz.de>>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Kunal,
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> Please, take a
>>>>>>>>>>> look at the
>>>>>>>>>>> 'output netcdf'
>>>>>>>>>>> examples page,
>>>>>>>>>>> method_1
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> http://ncl.ucar.edu/Applications/method_1.shtml
>>>>>>>>>>>
>>>>>>>>>>> Try this:
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> lat = data(:,0)
>>>>>>>>>>>
>>>>>>>>>>> lat = data(:,1)
>>>>>>>>>>>
>>>>>>>>>>> values= data(:,2)
>>>>>>>>>>>
>>>>>>>>>>> system
>>>>>>>>>>> <http://ncl.ucar.edu/Document/Functions/Built-in/system.shtml>("/bin/rm
>>>>>>>>>>> -f simple.nc
>>>>>>>>>>> <http://simple.nc/>")
>>>>>>>>>>> ; remove any
>>>>>>>>>>> pre-existing fileÂ
>>>>>>>>>>>
>>>>>>>>>>> ncdf = addfile("simple.nc <http://simple.nc/>" ,"c") ; output netCDF file
>>>>>>>>>>>
>>>>>>>>>>> filedimdef <http://ncl.ucar.edu/Document/Functions/Built-in/filedimdef.shtml>(ncdf,"time",-1,True) ; recommended
>>>>>>>>>>>
>>>>>>>>>>> values!0 = "lat"
>>>>>>>>>>>
>>>>>>>>>>> values!1 = "lon"
>>>>>>>>>>>
>>>>>>>>>>> values&lat = lat
>>>>>>>>>>>
>>>>>>>>>>> values&lon = lonÂ
>>>>>>>>>>>
>>>>>>>>>>> ncdf->values = values
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> Bye, Karin
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Am 22.09.2014 um
>>>>>>>>>>> 11:40 schrieb
>>>>>>>>>>> Kunal Bali
>>>>>>>>>>> <kunal.bali9 at gmail.com
>>>>>>>>>>> <mailto:kunal.bali9 at gmail.com>>:
>>>>>>>>>>>
>>>>>>>>>>> Dear NCL users
>>>>>>>>>>>
>>>>>>>>>>> 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 ??
>>>>>>>>>>>
>>>>>>>>>>> I have data
>>>>>>>>>>> in 3 column
>>>>>>>>>>> ( Latitude
>>>>>>>>>>> Longitude
>>>>>>>>>>> Values)
>>>>>>>>>>>
>>>>>>>>>>> More Detail
>>>>>>>>>>>
>>>>>>>>>>> *Variable: data
>>>>>>>>>>> Type: float
>>>>>>>>>>> Total Size:
>>>>>>>>>>> 777600 bytes
>>>>>>>>>>> Â Â Â Â Â Â Â Â Â Â Â
>>>>>>>>>>> 194400 values
>>>>>>>>>>> Number of
>>>>>>>>>>> Dimensions: 2
>>>>>>>>>>> Dimensions
>>>>>>>>>>> and
>>>>>>>>>>> sizes:Â Â Â
>>>>>>>>>>> [64800] x [3]
>>>>>>>>>>> Coordinates:
>>>>>>>>>>> Number Of
>>>>>>>>>>> Attributes: 1
>>>>>>>>>>> Â
>>>>>>>>>>> _FillValue
>>>>>>>>>>> :Â Â Â
>>>>>>>>>>> 9.96921e+36
>>>>>>>>>>>
>>>>>>>>>>> *
>>>>>>>>>>>
>>>>>>>>>>> *So is there
>>>>>>>>>>> any ways to
>>>>>>>>>>> convert
>>>>>>>>>>> ASCII to
>>>>>>>>>>> netcdf
>>>>>>>>>>> format ???*
>>>>>>>>>>>
>>>>>>>>>>> *Thank You*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Kunal Bali
>>>>>>>>>>>
>>>>>>>>>>> Research
>>>>>>>>>>> Scholar
>>>>>>>>>>>
>>>>>>>>>>> Radio &
>>>>>>>>>>> Atmospheric
>>>>>>>>>>> Science
>>>>>>>>>>> Division
>>>>>>>>>>>
>>>>>>>>>>> CSIR -
>>>>>>>>>>> National
>>>>>>>>>>> Physical
>>>>>>>>>>> Laboratory
>>>>>>>>>>>
>>>>>>>>>>> New Delhi -
>>>>>>>>>>> 110012
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>> Â
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> Â
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> 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
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> 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
>>>>>>>>>
>>>>>>>>> ____________________________________
>>>>>>>>> Dipl. Geophys. Karin
>>>>>>>>> Meier-Fleischer
>>>>>>>>> Visualisierung
>>>>>>>>> Abteilung Anwendungen
>>>>>>>>>
>>>>>>>>> Deutsches
>>>>>>>>> Klimarechenzentrum GmbH (DKRZ)
>>>>>>>>> Bundesstrasse 45a *
>>>>>>>>> D-20146 Hamburg    Â
>>>>>>>>> Â Â Â Â Â Â Â Â Â
>>>>>>>>> Germany      Â
>>>>>>>>> Â Â Â Â Â Â Â Â Â Â
>>>>>>>>>
>>>>>>>>> Phone:+49 (0)40 460094 126
>>>>>>>>> <tel:%2B49%20%280%2940%20460094%20126>
>>>>>>>>> Fax:+49 (0)40 460094 270
>>>>>>>>> <tel:%2B49%20%280%2940%20460094%20270>
>>>>>>>>> E-Mail:meier-fleischer at dkrz.de
>>>>>>>>> <mailto:meier-fleischer at dkrz.de>
>>>>>>>>> URL:http://www.dkrz.de/
>>>>>>>>>
>>>>>>>>> Geschäftsführer: Prof.
>>>>>>>>> Dr. Thomas Ludwig
>>>>>>>>> Sitz der Gesellschaft: Hamburg
>>>>>>>>> Amtsgericht Hamburg HRB 39784
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> <14-01.txt><ASCII to
>>>>>>>>> netcdf.ncl>_______________________________________________
>>>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <contour_error.png>_______________________________________________
>>>>>>> ncl-talk mailing list
>>>>>>> List instructions, subscriber options,
>>>>>>> unsubscribe:
>>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>
>>>>>> ____________________________________
>>>>>> Dipl. Geophys. Karin Meier-Fleischer
>>>>>> Visualisierung
>>>>>> Abteilung Anwendungen
>>>>>>
>>>>>> Deutsches Klimarechenzentrum GmbH (DKRZ)
>>>>>> Bundesstrasse 45a * D-20146 Hamburg  Â
>>>>>> Â Â Â Â Â Â Â Â Â Â Â
>>>>>> Germany            Â
>>>>>> Â Â Â Â
>>>>>>
>>>>>> Phone:+49 (0)40 460094 126
>>>>>> <tel:%2B49%20%280%2940%20460094%20126>
>>>>>> Fax:+49 (0)40 460094 270
>>>>>> <tel:%2B49%20%280%2940%20460094%20270>
>>>>>> E-Mail:meier-fleischer at dkrz.de
>>>>>> <mailto:meier-fleischer at dkrz.de>
>>>>>> URL:http://www.dkrz.de/
>>>>>>
>>>>>> Geschäftsführer: Prof. Dr. Thomas Ludwig
>>>>>> Sitz der Gesellschaft: Hamburg
>>>>>> Amtsgericht Hamburg HRB 39784
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> ncl-talk mailing list
>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>> --
>>>>> Dipl. Geophys. Karin Meier-Fleischer
>>>>> Visualization
>>>>> Application Support
>>>>>
>>>>> Deutsches Klimarechenzentrum GmbH (DKRZ)
>>>>> Bundesstrasse 45a - D20146 Hamburg - Germany
>>>>>
>>>>> Phone:+49 (0)40 460094 126 <tel:%2B49%20%280%2940%20460094%20126>
>>>>> Fax:+49 (0)40 460094 270 <tel:%2B49%20%280%2940%20460094%20270>
>>>>> E-Mail:meier-fleischer at dkrz.de <mailto:meier-fleischer at dkrz.de>
>>>>> URL:www.dkrz.de <http://www.dkrz.de>
>>>>>
>>>>> Geschäftsführer: Prof. Dr. Thomas Ludwig
>>>>> Sitz der Gesellschaft: Hamburg
>>>>> Amtsgericht Hamburg HRB 39784
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>> --
>>> Dipl. Geophys. Karin Meier-Fleischer
>>> Visualization
>>> Application Support
>>>
>>> Deutsches Klimarechenzentrum GmbH (DKRZ)
>>> Bundesstrasse 45a - D20146 Hamburg - Germany
>>>
>>> Phone:+49 (0)40 460094 126 <tel:%2B49%20%280%2940%20460094%20126>
>>> Fax:+49 (0)40 460094 270 <tel:%2B49%20%280%2940%20460094%20270>
>>> E-Mail:meier-fleischer at dkrz.de <mailto:meier-fleischer at dkrz.de>
>>> URL:www.dkrz.de <http://www.dkrz.de>
>>>
>>> Geschäftsführer: Prof. Dr. Thomas Ludwig
>>> Sitz der Gesellschaft: Hamburg
>>> Amtsgericht Hamburg HRB 39784
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>> --
>> Dipl. Geophys. Karin Meier-Fleischer
>> Visualization
>> Application Support
>>
>> Deutsches Klimarechenzentrum GmbH (DKRZ)
>> Bundesstrasse 45a - D20146 Hamburg - Germany
>>
>> Phone:+49 (0)40 460094 126 <tel:%2B49%20%280%2940%20460094%20126>
>> Fax:+49 (0)40 460094 270 <tel:%2B49%20%280%2940%20460094%20270>
>> E-Mail:meier-fleischer at dkrz.de <mailto:meier-fleischer at dkrz.de>
>> URL:www.dkrz.de <http://www.dkrz.de>
>>
>> Geschäftsführer: Prof. Dr. Thomas Ludwig
>> Sitz der Gesellschaft: Hamburg
>> Amtsgericht Hamburg HRB 39784
>>
>>
>> _______________________________________________
>> 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
>
> --
> Dipl. Geophys. Karin Meier-Fleischer
> Visualization
> Application Support
>
> Deutsches Klimarechenzentrum GmbH (DKRZ)
> Bundesstrasse 45a - D20146 Hamburg - Germany
>
> Phone:+49 (0)40 460094 126 <tel:%2B49%20%280%2940%20460094%20126>
> Fax:+49 (0)40 460094 270 <tel:%2B49%20%280%2940%20460094%20270>
> E-Mail:meier-fleischer at dkrz.de <mailto:meier-fleischer at dkrz.de>
> URL:www.dkrz.de <http://www.dkrz.de>
>
> Geschäftsführer: Prof. Dr. Thomas Ludwig
> Sitz der Gesellschaft: Hamburg
> Amtsgericht Hamburg HRB 39784
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140924/ca899924/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample3.pdf
Type: application/pdf
Size: 328225 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140924/ca899924/attachment-0001.pdf
-------------- next part --------------
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
More information about the ncl-talk
mailing list