[ncl-talk] problem at NCL

Dennis Shea shea at ucar.edu
Wed Jul 20 09:15:01 MDT 2016


[1]
If you are going to work with climate models, I *strongly suggest* that you
become familiar with some tool that handles netCDF: NCL, GrADS, Python,
Matlab, IDL, R,  etc.

Whatever tool you decide to use, it is up to you to read the documentation
of the language and the functions used.

[2]
While text (ASCII) files are human readable, they are the poorest way of
storing and accessing data.

[3]
As mentioned by Karin, your script is rather confusing.

[4]
I have no idea what the source data file looks like. However, I speculate
that the time, lat and lon coordinate variables are already on the file.
There is no need for you to create them.

The golden rule of data processing is to **look at your data**.

[5]
Attached is an untested script. It produces one file per grid point.
I did this because it was simple for me to do so.  You may wish to change
it  to suit your needs.

On Wed, Jul 20, 2016 at 4:11 AM, Karin Meier-Fleischer <
meier-fleischer at dkrz.de> wrote:

> Hi Maryam,
>
> I'm a little bit confused about your script. The AFR-44 data must have
> time, lat and lon dimensions so the complete defining and assigning of
> time, lat and lon to the variable pre is not needed. You can read them
> directly
>
> time = f->time
> lat  = f->lat
> lon  = f->lon
>
> After creating a contour plot of variable pre there is an exit call and
> NCL will stop directly without executing the rest of your script. But
> looking at the rest why are you overwriting your variable pre with random
> data? You will use the random data to define the new variable data!??
>
> By the way, if you are running NCL 6.3.0 you do not need to load the
> gsn_code.ncl, gsn_csm.ncl and contributed.ncl libraries anymore.
>
> Bye,
> Karin
>
> Am 20.07.16 um 05:57 schrieb mkarimian59 at yahoo.com:
>
> Dear All
> I want to write a script at NCL for convert nc file to ascii file.
> I studied ncl-talk and another example at NCL site. I get more information
> but I have a problem.
> I want to write a script that it can able to inform following task:
> 1- open nc file and read it
> 2- extract data below:
> lat    lon   pre
> for example: 30  50   20
> 3- write these information to inform of ascii file.
> I try to write a script but I have a problem at run it. I send this script
> for you.
> Please kindly see this and guide me.
> Thanks in advance
> regard
> maryam
>
>
>
>
>
> *Maryam Karimian Climate change and Climat modeling division
> Climatological Research Institute (CRI) *
>
>
> *Email: mkarimian59 at yahoo.com
> <http://us.mc320.mail.yahoo.com/mc/compose?to=r_modiriyan@yahoo.com> Sento
> Highway, Next to Torogh Road-Police Station   Mashad 91735 - 676 , Islamic
> Republic of Iran*
>
>
>
>
> _______________________________________________
> ncl-talk mailing listncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> --
> Dipl. Geophys. Karin Meier-Fleischer
> Visualization, NCL
> Application Support
>
> Deutsches Klimarechenzentrum GmbH (DKRZ)
> Bundesstrasse 45a - D20146 Hamburg - Germany
>
> Phone:    +49 (0)40 460094 126
> Fax:      +49 (0)40 460094 270
> E-Mail:   meier-fleischer at dkrz.de
> URL:      www.dkrz.de
>
> Geschäftsführer: Prof. Dr. Thomas Ludwig
> Sitz der Gesellschaft: Hamburg
> Amtsgericht Hamburg HRB 39784
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20160720/74f22ce0/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nc_script-CCMopen.ncl
Type: application/octet-stream
Size: 1258 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160720/74f22ce0/attachment.obj 


More information about the ncl-talk mailing list