[ncl-talk] ncl-talk Digest, Vol 130, Issue 1

Geeta Geeta geetag54 at yahoo.com
Tue Sep 2 04:21:05 MDT 2014


Hi . 
I am trying to plot the data in HDF format using NCL. 

I happen to see the ready script available https://www.ncl.ucar.edu/Applications/Scripts/hdf4sds_6.ncl which reads HDF data. 

On my system I downloaded this script and tried to run this but when I run this, following message comes. 
bash-3.2$ ncl hdf4sds_6.ncl
 Copyright (C) 1995-2007 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.0.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
fatal:_NclCreateFile: Requested file does not exist as (./2A12.20100702.71931.6.HDF) or as (./2A12.20100702.71931.6), can't add
 file
fatal:Either file (f) isn't defined or variable (geolocation) is not a variable in the file
fatal:Execute: Error occurred at or near line 31 in file hdf4sds_6.ncl
 
bash-3.2$ ls -l *HDF*
-rw-r--r--    1 model    staff      55092053 Sep 01 15:54 2A12.20100702.71931.7.HDF
-rw-r--r--    1 model    staff      55092079 Aug 12 11:13 2A12.20130523.88390.7.HDF
-rw-r--r--    1 model    staff      55092085 Aug 12 15:27 2A12.20140602.94247.7.HDF
bash-3.2$ ls -l *hdf*ncl*
-rw-r--r--    1 model    staff          6725 Sep 01 17:01 hdf4sds_6.ncl
bash-3.2$


The files exist in my directory. 
Can somebody tell me what's mistake???
Geeta. 




On Monday, 1 September 2014 11:30 PM, "ncl-talk-request at ucar.edu" <ncl-talk-request at ucar.edu> wrote:
  


Send ncl-talk mailing list submissions to
    ncl-talk at ucar.edu

To subscribe or unsubscribe via the World Wide Web, visit
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk
or, via email, send a message with subject or body 'help' to
    ncl-talk-request at ucar.edu

You can reach the person managing the list at
    ncl-talk-owner at ucar.edu

When replying, please edit your
 Subject line so it is more specific
than "Re: Contents of ncl-talk digest..."


Today's Topics:

   1. Re: mean value of all displayed grid points / pixel in a map
      (Kreienkamp Frank)
   2. Re: mean value of all displayed grid points / pixel in a    map
      (Dennis Shea)
   3. Re: how to mask out tibetan plateau when plotting fnl    data?
      (Dennis Shea)
   4. Re: mean value of all displayed grid points / pixel in    a    map
      (Kreienkamp Frank)
   5. Re: mean value of all displayed grid points / pixel in a    map
      (Dennis
 Shea)
   6. NCL Environment (azizul haque)


----------------------------------------------------------------------

Message: 1
Date: Mon, 1 Sep 2014 08:31:17
 +0000
From: Kreienkamp Frank <Frank.Kreienkamp at dwd.de>
Subject: Re: [ncl-talk] mean value of all displayed grid points /
    pixel in a map
To: ncl-talk <ncl-talk at ucar.edu>
Message-ID:
    <24EC7203DE46D64B95497AB11E28209D0180A136 at OFWEXC22.win2003.dwd.de>
Content-Type: text/plain; charset="iso-8859-1"

Hello ,

since having no one answering the original question. 

Is there a chance that i can get the matrix-values which are send to the (png-)workstation?

Thanks in advance
Frank Kreienkamp

-----Urspr?ngliche
 Nachricht-----
Von: ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] Im Auftrag von Frank Kreienkamp
Gesendet: Mittwoch, 27. August 2014 06:37
An: ncl-talk
Betreff: [ncl-talk] mean value of all displayed grid points / pixel in a map

Hello,

i have searched the function list but i have not found a solution for the following problem.

I want to calculate the mean value of all displayed grid points in a map.

This means:
- i have gridded data for the entire world
 (gcm-results)
- i plot a map (stereographic projection) for Europe

NCL draws a rectangle map based on the given resource parameters. I am looking for a function which counts all displayed values (pixel?) and calculates an average value.

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


------------------------------

Message: 2
Date: Mon, 1 Sep 2014 07:10:32 -0600
From: Dennis Shea <shea at ucar.edu>
Subject: Re: [ncl-talk] mean value of all displayed grid points /
    pixel in a    map
To: Kreienkamp Frank <Frank.Kreienkamp at dwd.de>
Cc: ncl-talk <ncl-talk at ucar.edu>
Message-ID:
    <CAOF1d_5fLasrvd+_2y_Y_FQ9qusm=hXnwrzdZ+d--eLMXtsnjA at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

The question is vague

"I want to calculate the mean value of all displayed grid points in a map.

This means:
- i have gridded data for the entire world (gcm-results)
- i plot a map (stereographic projection) for Europe

NCL draws a rectangle map based on the given resource parameters. I am
looking for a function which counts all displayed values (pixel?) and
calculates an average value."

NCL handles "gridded data for the entire world (gcm-results)" all the time.

[1]  dim_avg_n_Wrap will calculate the means at each grid point over all
times.
[2] wgt_areaave_Wrap calculates an area average
[3] NCL can display much more than a "rectangular map"
[4] wks = gsn_open_wks("png" ,"frank")
     will send graphics to
 a png file

What do you mean by:

"Is there a chance that i can get the matrix-values which are send to the
(png-)workstation?"

=======
https://www.ncl.ucar.edu/Document/Functions/Contributed/dim_avg_n_Wrap.shtml
https://www.ncl.ucar.edu/Applications/climo.shtml
https://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_areaave_Wrap.shtml
https://www.ncl.ucar.edu/Applications/maponly.shtml

https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour_map.shtml

Good luck


On Mon, Sep 1, 2014 at 2:31 AM, Kreienkamp Frank <Frank.Kreienkamp at dwd.de>
wrote:

> Hello ,
>
> since having no one answering the original question.
>
> Is there a chance that i can get the matrix-values which are send to the
>
 (png-)workstation?
>
> Thanks in advance
> Frank Kreienkamp
>
> -----Urspr?ngliche Nachricht-----
> Von: ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] Im
> Auftrag von Frank Kreienkamp
> Gesendet: Mittwoch, 27. August 2014
 06:37
> An: ncl-talk
> Betreff: [ncl-talk] mean value of all displayed grid points / pixel in a
> map
>
> Hello,
>
> i have searched the function list but i have not found a solution for the
> following problem.
>
> I want to calculate the mean value of all displayed grid points in a map.
>
> This means:
> - i have gridded data for the entire world (gcm-results)
> - i plot a map (stereographic projection) for Europe
>
> NCL draws a rectangle map based on the given resource parameters. I am
> looking for a function which counts all displayed values (pixel?) and
> calculates an average value.
>
> Thanks in advance
> Frank
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140901/ddc2818e/attachment-0001.html

------------------------------

Message: 3
Date: Mon, 1 Sep 2014 07:40:20 -0600
From: Dennis Shea <shea at ucar.edu>
Subject: Re: [ncl-talk] how to mask out tibetan plateau when
 plotting
    fnl    data?
To: Li Qi <liqi123sh at qq.com>
Cc: ncl-talk <ncl-talk at ucar.edu>
Message-ID:
    <CAOF1d_7VYWYycLfeROpVJ9FtvLa4-z=hqqbE153LKXBi9nBHKQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

You must provide more information!

ncl-talk does not know what 'FNL' is. A GRIB file?
What data do you have available?
What type of grid do you have .... curvilinear or rectilinear?

If you have (say) surface geopotential (m) and you are on a curvilinear
grid ... one approach

   f = addfile(...)
   x      = f->X         ;
 (level,nlat,mlon) ?????
   phis = f->PHIS   ; (nlat,mlon)

  lat2d   = f->
  lon2d  = f->

   lvmask = (/700, 850 /)

  do kl=1,dimsizes(lvmask)-1
       x({lvmask},:,:) = where(lat2d.gt. 25 .and. lat2d.lt. 42   .and. \
                                           lon2d.gt. 70 .and. lon2d.lt.110
.and. \
                                           phis.gt.1500, x at _FillValue,
x({lvmask},:,:))
  end do


On Sun, Aug 31, 2014 at 6:48 AM, Li Qi <liqi123sh at qq.com> wrote:

> Dear
 all,
>
> I'd like to ask how to mask out tibetan plateau when plotting FNL data on
> 700hPa and 850hPa.
>
> Any advice will be greatly appreciated!
>
> _______________________________________________
> 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/20140901/e3770b59/attachment-0001.html

------------------------------

Message: 4
Date: Mon, 1 Sep 2014 13:57:06 +0000
From: Kreienkamp Frank <Frank.Kreienkamp at dwd.de>
Subject: Re: [ncl-talk] mean value of all displayed grid points /
    pixel in    a    map
Cc: ncl-talk <ncl-talk at ucar.edu>
Message-ID:
    <24EC7203DE46D64B95497AB11E28209D0180A1A5 at OFWEXC22.win2003.dwd.de>
Content-Type: text/plain; charset="utf-8"

Hello Dennis,

sorry that my question wasn?t clear enough.

Let my try again.
The attached map is a displayed result of RCM-dataset. The original grid covers Europe. The displayed area covers Germany and a bit more.

What I am looking for is a routine that calculates the mean value of
 the displayed area.

Thanks in advance
Frank

Von: ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] Im Auftrag von Dennis Shea
Gesendet: Montag, 1. September 2014 15:11
An: Kreienkamp Frank
Cc: ncl-talk
Betreff: Re: [ncl-talk] mean value of all displayed grid points / pixel in a map

The question is vague

"I want to calculate the mean value of all displayed grid points in a map.

This means:
- i have gridded data for the
 entire world (gcm-results)
- i plot a map (stereographic projection) for Europe

NCL draws a rectangle map based on the given resource parameters. I am
looking for a function which counts all displayed values (pixel?) and
calculates an average value."
NCL handles "gridded data for
 the entire world (gcm-results)" all the time.

[1]  dim_avg_n_Wrap will calculate the means at each grid point over all times.
[2] wgt_areaave_Wrap calculates an area average
[3] NCL can display much more than a "rectangular map"
[4] wks = gsn_open_wks("png" ,"frank")
     will send graphics to a png file
What do you mean by:

"Is there a chance that i can get the matrix-values which are send to the (png-)workstation?"

=======
https://www.ncl.ucar.edu/Document/Functions/Contributed/dim_avg_n_Wrap.shtml
https://www.ncl.ucar.edu/Applications/climo.shtml
https://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_areaave_Wrap.shtml
https://www.ncl.ucar.edu/Applications/maponly.shtml
https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour_map.shtml
Good luck

On Mon, Sep 1, 2014 at 2:31 AM, Kreienkamp Frank <Frank.Kreienkamp at dwd.de<mailto:Frank.Kreienkamp at dwd.de>> wrote:
Hello ,

since having no one answering the original question.

Is there a chance that i can get the matrix-values which are send to the (png-)workstation?

Thanks in advance
Frank
 Kreienkamp

-----Urspr?ngliche Nachricht-----
Von: 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>] Im Auftrag von Frank Kreienkamp
Gesendet: Mittwoch, 27. August 2014 06:37
An: ncl-talk
Betreff: [ncl-talk] mean value of all displayed grid
 points / pixel in a map

Hello,

i have searched the function list but i have not found a solution for the following problem.

I want to calculate the mean value of all displayed grid points in a map.

This means:
- i have gridded
 data for the entire world (gcm-results)
- i plot a map (stereographic projection) for Europe

NCL draws a rectangle map based on the given resource parameters. I am looking for a function which counts all displayed values (pixel?) and calculates an average value.

Thanks in advance
Frank
_______________________________________________
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140901/8e44eb25/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex1.png
Type: image/png
Size: 167048 bytes
Desc: ex1.png
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140901/8e44eb25/attachment-0001.png

------------------------------

Message: 5
Date: Mon, 1 Sep 2014 08:13:16 -0600
From: Dennis Shea <shea at ucar.edu>
Subject: Re: [ncl-talk] mean value of all displayed grid points /
    pixel in a    map
To: Kreienkamp Frank <Frank.Kreienkamp at dwd.de>
Cc: ncl-talk <ncl-talk at ucar.edu>
Message-ID:
    <CAOF1d_4db6r2obT+j1zbayyd4u20WfNp+sf5PnWjJ0OcuDSqtw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

As previously noted:

For a rectilinear grid: wgt_areaave_Wrap calculates an area average
https://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_areaave_Wrap.shtml

For a curvilinear grid:
http://www.ncl.ucar.edu/Document/Functions/Built-in/wgt_areaave2.shtml

or a simple arithmetic average: avg

http://www.ncl.ucar.edu/Document/Functions/Built-in/avg.shtml





On Mon, Sep 1, 2014 at 7:57 AM, Kreienkamp Frank <Frank.Kreienkamp at dwd.de>
wrote:

>  Hello Dennis,
>
>
>
> sorry that my question wasn?t clear enough.
>
>
>
> Let my try again.
>
> The attached map is a displayed result of RCM-dataset. The original grid
> covers Europe. The displayed area covers Germany and a bit more.
>
>
>
> What I am looking for is a routine that calculates the mean value of the
> displayed
 area.
>
>
>
> Thanks in advance
>
> Frank
>
>
>
> *Von:* ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] *Im
> Auftrag von *Dennis Shea
> *Gesendet:* Montag, 1. September 2014 15:11
> *An:* Kreienkamp Frank
> *Cc:* ncl-talk
> *Betreff:* Re: [ncl-talk] mean value of all displayed grid points / pixel
> in a map
>
>
>
> The question is vague
>
> "I want to calculate the mean value of all displayed grid points in a map.
>
> This means:
> - i have gridded data for the entire world (gcm-results)
> - i plot a map (stereographic projection) for Europe
>
> NCL draws a rectangle map based on the given
 resource parameters. I am
> looking for a function which counts all displayed values (pixel?) and
> calculates an average value."
>
> NCL handles "gridded data for the entire world (gcm-results)" all the time.
>
>
>
> [1]  dim_avg_n_Wrap will calculate the means at each grid point over all
> times.
>
> [2] wgt_areaave_Wrap calculates an area average
>
> [3] NCL can display much more than a "rectangular map"
>
> [4] wks = gsn_open_wks("png" ,"frank")
>
>      will send graphics to a png file
>
> What do you mean by:
>
> "Is there a chance that
 i can get the matrix-values which are send to the
> (png-)workstation?"
>
>
> =======
>
> https://www.ncl.ucar.edu/Document/Functions/Contributed/dim_avg_n_Wrap.shtml
> https://www.ncl.ucar.edu/Applications/climo.shtml
>
> https://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_areaave_Wrap.shtml
> https://www.ncl.ucar.edu/Applications/maponly.shtml
>
> https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour_map.shtml
>
> Good luck
>
>
>
> On Mon, Sep 1, 2014 at 2:31 AM, Kreienkamp Frank <Frank.Kreienkamp at dwd.de>
> wrote:
>
> Hello ,
>
> since having no one answering the original question.
>
> Is there a chance that i can get the matrix-values which are send to the
> (png-)workstation?
>
> Thanks in advance
> Frank Kreienkamp
>
> -----Urspr?ngliche Nachricht-----
> Von: ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] Im
> Auftrag von Frank Kreienkamp
> Gesendet: Mittwoch, 27. August 2014 06:37
> An: ncl-talk
> Betreff: [ncl-talk] mean value of all displayed grid points / pixel in a
> map
>
>
> Hello,
>
> i have searched the
 function list but i have not found a
 solution for the
> following problem.
>
> I want to calculate the mean value of all displayed grid points in a map.
>
> This means:
> - i have gridded data for the entire world (gcm-results)
> - i plot a map (stereographic projection) for Europe
>
> NCL draws a rectangle map based on the given resource parameters. I am
> looking for a function which counts all displayed values (pixel?) and
> calculates an average value.
>
> Thanks in advance
> Frank
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140901/36ac4b17/attachment-0001.html

------------------------------

Message: 6
Date: Mon, 1 Sep 2014 09:33:22 -0700
From: azizul haque <haque.azizul320 at yahoo.com>
Subject: [ncl-talk] NCL Environment
To: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Message-ID:
    <1409589202.86755.YahooMailNeo at web121901.mail.ne1.yahoo.com>
Content-Type: text/plain; charset="utf-8"

Hi All,
Recently I am having nil environment problem. I have two sources of CMIP5 data(user/local and /Volumes/BOULDER). I tried to do plotting and having following error message.
*********warning:Unable to Get System Resource File Name?
warning:Unable to load System Resource File (null)
fatal:GetSysAppDir:Unable to get a
 default value for the system App Resource directory
warning:["Resources.c":734]:Unable to set appSysDir to default value - Using NULL
fatal:GetSysAppDir:Unable to get a default value for the system App Resource directory
warning:["Resources.c":734]:Unable to set appSysDir to default value - Using NULL
warning:Unable to Get System Resource File Name?
warning:WorkstationClassInitialize:Unable to access rgb color database - named colors unsupported:[errno=2]
NDV_COLORMAP_PATH environment variable not set:
defaulting to .:$NCARG_ROOT/lib/ncarg/colormaps
warning:["Palette.c":1844]:NhlLoadColormapFiles: Invalid directory encountered in colormap path specification
/usr/local/bin/ncl: line 5:   987 Segmentation fault: 11  /usr/local/ncl/bin/ncl "$@"*********
In the both data sources location I
 see above problem.

Your shortly response and help are highly appreciated

Regards
Azizul
-------------- next
 part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140901/915ded6d/attachment-0001.html

------------------------------

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


End of ncl-talk Digest, Vol 130, Issue 1
****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140902/0e2d0cce/attachment.html 


More information about the ncl-talk mailing list