Re: Gedit Highlighting Scheme no need to reinvent the wheel

From: wxtofly <wxtofly_at_nyahnyahspammersnyahnyah>
Date: Fri Jan 07 2011 - 11:34:18 MST
Been there done that for jed.
You can either use the lists from the ncl.sl for jed, which at the moment is pretty darned complete.
Or you can use the attached list

On 01/07/2011 09:19 AM, Mary Haley wrote:
Hi,

You can get the list of resources for each class via the NhlGetClassResources function:

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

Unfortunately, there isn't a way to get one giant list of them, and there's no way to get a list of class names that I can see.

Perhaps the above function could be modified such that if you give it a special keyword for the first argument, like "" or "All", it would give you the full list.

You can see the full list online:

http://www.ncl.ucar.edu/Document/Graphics/Resources/list_alpha_res.shtml

I've attached a "resources.ncl" script that should get you the full list of resources, but Dave may want to look it over to see if I've included all the class names.



--Mary

On Jan 7, 2011, at 2:38 AM, ahmed lasheen wrote:

Hello
yes the script works fine ,thanks
is there is also way to list the resources?
thanks in advance
 

On Fri, Jan 7, 2011 at 1:04 AM, David Brown <dbrown@ucar.edu> wrote:
Here's a way to get a list of all functions and procedures dynamically from NCL. Create this script:

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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
list_procfuncs()
------
Assuming you call it procfuncs.ncl you can get a sorted list with this one-line bit of Unix scripting:

ncl procfuncs.ncl |egrep 'procedure|function' | sed -e 's/ (//' | sed -E -e 's/function |procedure //' | sort 

 -dave


On Jan 6, 2011, at 3:24 PM, ahmed lasheen wrote:

Hello 
I hope that the NCL developer group make a text file which include all possible functions and procedures for each new version of the NCL. 

There is a file called dictionary.dic in the editor enhancement section 
http://www.ncl.ucar.edu/Applications/editor.shtml#vim contains most of the functions and procedures of NCL .

I also wrote the file again  with "new line separation" (each name in separate line.)
i have attached it .


On Thu, Jan 6, 2011 at 11:43 PM, Dave Allured <dave.allured@noaa.gov> wrote:
Rick,

I think Walter wants syntax highlighting for invocations as well as
declarations.  For example, y = x(5,3).  Is x a function or a
variable?  How can you differentiate this with a regular expression,
without knowing the full context of the name space?  This quirk is
common to many procedural languages that have the same syntax for
functions and subscripting.  Please enlighten me if I'm missing
something.

Walter,

A quick way to get the current function and procedure names is to
extract column one from this HTML table.  This changes between
versions!  HTH:

http://www.ncl.ucar.edu/Document/Functions/list_alpha.shtml

--Dave

On 1/6/2011 12:58 PM, Rick Brownrigg wrote:
> Hi Walter,
>
> Do you not want to simply give a regular expression for any/all functions and procedures?  This would obviously have the effect of highlighting user provided func/procs in addition to the built-ins, but would have the advantage of not requiring maintenance across new NCL releases.
>
> Just a thought...
> Rick
>
> On Jan 6, 2011, at 12:35 PM, Walter Hannah wrote:
>
>> Hi,
>>
>> I have a NCL highlighting scheme for gedit in the works. I'm at the
>> point where I need to start adding in all the function and procedure
>> names. I'm not to excited about typing them all in one by one. Is there
>> a way to just get a text file which lists out all the functions and
>> procedures?
>>
>> Thanks,
>> Walter Hannah
>> _______________________________________________
>> 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



--
===============
Ahmed Lasheen
Egyptian Meteorological Authority(EMA)
Cairo,Egypt 
===============

<ncl.dic>_______________________________________________

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




--
===============
Ahmed Lasheen
Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
Egyptian Meteorological Authority(EMA)
Cairo,Egypt 
===============

_______________________________________________
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


--

TJ's Blanchard Page    My Wx Widget  Ft Ebey (Whidbey) NWS Seattle ASP  
: MAPS/RUC2 | Lo Alt | MM5 Bham Obs Fire Winds Rasp Soundings
Winds Aloft   R♥sp    Visible Satellite  Fcst Discussion   Fraser Valley  Windgrams text
Blanchard Digital | ♥Meteogram ♦UW Satellite   | Loop ♥ Discussion With Images Windcast Blipspots
  Quick Radar NWS Radar 9 Meso-stations   Pressure gradients WA Meso Stations map Time/hght/wind
MesoW GoogleMaps aprs current Personal Wx Stations Wind Map now, sfc winds  |  bl winds


  RASP Regional Atmospheric Soaring Predictions for PNW      || Average BL wind loop Blanchard   
       Surface wind forecast Loops: | Animated Radar   |  | loop Blanchard | loop PNW | loop FtEbey | loop Tiger | loop FraserValley

       Layered by altitude Sea Level to 850mb (approx 5000 ft) looped by time wind forecasts:
Blanchard Pressure Level Loop | Tiger Pressure Level Loop | Fraser Valley Pressure Level Loop
All day hour-by-hour text RUC2/MAPS soundings
These have no graphics and are designed to be printed to take with you to the site.
After sunclipse there will be one run for the next day but it only has MAPS soundings.
  Woodside/Sumas/Bridal     Black Mt     Big Johnson     Stewart same as Blanchard     Ft Ebey     Skagit Valley     Tiger  
Blipsp⊕ts: | Baldy | BJ | Black | BlackLZ | Blanchard | Chelan | Iron | Saddle | Stewart | Tiger | FtEbey | Woodside | Bridal Falls
| Current Rapid Update Soundings for flying sites | Winds aloft Seatac & Vancouver | Visible Satellite zoomed | NWS forecasts |
Abbreviated pages for mobile devices. | Blanchard | Tiger | Ft Ebey | East Side
The Seattle Forecast Discussion "translated" or with maps or original form without maps (available sooner) Learn to read the maps. Soundings Tutorial
Cloud Forecast -- RUC based Meteogram for KBLI Bellingham    |   RUC based Meteogram for CYXX Abbotsford -- Cloud Forecast

TJ Olney Weather: Site Map

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

raspicon16.png llapse1.png fireSky.gif discuss.jpg windgramico.png wbarb3.png
Received on Fri Jan 7 11:35:01 2011

This archive was generated by hypermail 2.1.8 : Thu Jan 13 2011 - 09:24:21 MST