ng4ex(1Nhl)
β¨ NAME β¨
okay so bestie, welcome to ng4ex (full glow-up name: ng4ex(1Nhl)) β it's literally the NCAR Graphics High Level Utilities Example Programs. π that's the whole vibe. example programs. for the HLUs. iconic behavior.
πΈ SYNOPSIS πΈ
ng4ex [-A] [-C] [-Fortran] [-NCL] [-cdf] [-csagrid] [-cssgrid] [-gui]
[-anno] [-gsun] [-W workstation_type] [-app] [-basic] [-contourplot]
[-fitgrid] [-labelbar] [-legend] [-primitives] [-mapplot] [-natgrid]
[-ngmath] [-streamplot] [-shgrid] [-textitem] [-tickmark] [-title]
[-vectorplot] [-xyplot] [-list] [-clean] [-n] name ...
π DESCRIPTION π
so like. ng4ex hands you the keys to a whole closet full of C, Fortran, and NCL examples that show off how the NCAR Graphics HLUs (that's High Level Utilities, iykyk) and NCL actually get used. π
π¨ lowkey important: NCL is not available for Cray systems. just so you know, bestie.
here's the whole plot: ng4ex copies the source code for the example(s) you asked for into the current directory, and then β depending on what it is β either compiles, links, and executes it (if it's a Fortran or C program) or runs NCL on it (if it's an NCL script file). slay. π«Ά
depending on which example you pick, the output might get sent to an NCGM (NCAR Graphics Metafile) file and/or displayed to an X window right there on your screen. you must be running X and have your DISPLAY environment set correctly for the X window examples to actually execute properly. no DISPLAY, no vibes. π
if the example you requested creates an NCGM file, it's gonna have the same name as the example, just with .ncgm stuck on the end. cute, consistent, we love her. β¨
there's an option that lets you ask for only the source code to be copied to your directory, no compiling, no running, just the code, periodt. and there's another option that lets you ask for only the NCGM file to be left behind, with every other file ng4ex created getting deleted. the argument name can be picked from the lists further down. π
π OPTIONS π
-Aβ Generate all available examples. every single one. the whole menu. π-Cβ Generate all C examples.-Fortranβ Generate all Fortran examples.-NCLβ Generate all NCL examples.-cdfβ Generate all the examples that use netCDF files. heads up bestie: for the C and Fortran examples, this one requires that you have the netCDF library installed on your system. no library, no examples, that's just the rules. π-guiβ Generate all GUI examples. this one requires that you have the Motif libraries on your system. π-annoβ Generate all annotation examples.-Wβ Specify the workstation type. this argument can only be specified as a string. some examples are meant to display to the X workstation, to an NCGM file, or to a PostScript file only β in which case this option may be ignored (she's just gonna do her own thing π). you cannot specify more than one workstation type. and if you don't specify one, a default one gets used. here are the validworkstation_typestrings:ncgmβ NCGM filex11β X11 windowpsβ PostScript filepdfβ PDF file
-appβ Generate all the app Fortran, C, and NCL examples that show how to do specific things with resources.-basicβ Generate all the basic Fortran, C, and NCL examples that relate to the basic examples discussed in the Quick Start Guide.-contourplotβ Generate all Fortran, C, and NCL ContourPlot examples.-csagridβ Generate all NCL Csagrid examples.-cssgridβ Generate all NCL Cssgrid examples.-dsgridβ Generate all Fortran, C, and NCL Dsgrid examples.-fitgridβ Generate all NCL Natgrid examples.-labelbarβ Generate all Fortran, C, and NCL Labelbar examples.-legendβ Generate all Fortran, C, and NCL Legend examples.-natgridβ Generate all Fortran, C, and NCL Natgrid examples.-primitivesβ Generate all Fortran, C, and NCL GraphicStyle examples.-mapplotβ Generate all Fortran, C, and NCL MapPlot examples.-ngmathβ Generate all Fortran, C, and NCL Ngmath examples.-shgridβ Generate all NCL Shgrid examples.-streamlineplotβ Generate all Fortran, C, and NCL StreamlinePlot examples.-textitemβ Generate all Fortran, C, and NCL TextItem examples.-tickmarkβ Generate all Fortran, C, and NCL TickMark examples.-titleβ Generate all Fortran, C, and NCL Title examples.-vectorplotβ Generate all Fortran, C, and NCL VectorPlot examples.-xyplotβ Generate all Fortran, C, and NCL xyPlot examples.-gsunβ Generate all the GSUN examples (NCL scripts only).-listβ Specifies that the names of the selected examples should be echoed to the screen instead of being copied or generated. this option must be used with one of the other options that selects a particular subset of examples. like, for example, if you want to see a list of all the available examples, then use-listin conjunction with the-Aoption. if you want to see a list of all the ContourPlot examples, then use-listwith the-contourplotoption (and so on). π¦-cleanβ Remove everything but the.ncgmfile.-nβ Specifies that the example should just be copied, and not linked or executed.name(s)β Name(s) of example programs to generate.
π EXAMPLES AVAILABLE π
quick heads-up before we dive in: the C examples end with the letter c, the Fortran examples end with the letter f, and NCL examples end with the letter n. see the pattern? she's consistent. π§
ap01c, ap01f, ap01n
Demonstrates various ways to use resource files.
basic01c, basic01f, basic01n
Demonstrates how to draw a contour plot using mostly defaults. No data is used in this example.
basic02c, basic02f, basic02n
Demonstrates how to set the view port and how to produce multiple plots on a single frame.
basic03c, basic03f, basic03n
Demonstrates how to create a scalar data object, set resources using a resource file, set resources during object creation, and set resources after object creation.
basic04c, basic04f, basic04n
Demonstrates how to select and change the workstation device for drawing your output to an NCGM file or an X workstation window.
basic05c, basic05f, basic05n
Demonstrates how to read and manipulate colormaps.
basic06c, basic06f, basic06n
Demonstrates how to position objects on an output device and how to change their sizes.
basic07c, basic07f, basic07n
Demonstrates creating three simultaneous workstations.
basic08c, basic08f, basic08n
Demonstrates use of a procedure that limits a plot, including annotations that extend outside the plot viewport, to a pre-defined bounding box within NDC space.
basic09c, basic09f, basic09n
Lists all the fonts with their number, name, and what the font looks like.
cn01c, cn01f, cn01n
Shows all the default settings for the ContourPlot resources using a simple data set.
cn02c, cn02f, cn02n
Demonstrates basic features of the ContourPlot object.
cn03c, cn03f, cn03n
Demonstrates basic features of the ContourPlot object. The first frame emulates the contour plot drawn in cn01.
cn04c, cn04f, cn04n
Emulates the output of the ncargex example "cpex02".
cn05c, cn05f, cn05n
Demonstrates how to create a map plot animation with a contour overlay and labelbar annotation.
cn06c, cn06f, cn06n
Shows how to read a netCDF file and produce a series of temperature contour plots.
cn07c, cn07f, cn07n
Shows how to read a netCDF file and produce a series of contour plots.
cn08c, cn08f, cn08n
Shows how to read a netCDF file and draw a vertical profiles of temperature for longitude separated by 5 degrees.
cn09c, cn09f, cn09n
Shows how to read a netCDF file and produce a series of surface pressure contour plots.
cn10f, cn10c, cn10n
Demonstrates how to read a netCDF file and produce three contour plots, an xyplot, and a map plot.
cn11c, cn11f
Demonstrates how to combine LLU and HLU calls.
cn12c, cn12f, cn12n
Emulates example "cpex08" and draws a filled contour plot over a map of Africa with a labelbar.
cn13c, cn13f, cn13n
Emulates example "mpex10" and draws a raster contour plot over a map using inverse map transformations.
cn14c, cn14f, cn14n
Shows how to do a contour/map overlay with tick marks showing the lat/lon locations.
cn15c, cn15f, cn15n
Shows how to combine contour plot and xy plot on a single frame. Also shows how to do multiple workstation outputs, and how to position your PostScript output on the page.
cn16c, cn16f, cn16n
Shows how to combine a vector fill contour plot, a raster contour plot, and a map plot on a single frame.
cn17c, cn17f, cn17n
Shows how to restrict a contour plot to a certain area over a satellite projection, how to label the US states with AnnoManager, how to use NhlDataPoly{line,marker} to draw lines/markers on a map projection, and how to mix LLUs/HLUs to draw text in the map projection. The NCL version doesn't have the LLU/HLU part.
lb01c, lb01f, lb01n
Shows all the default settings for the LabelBar resources.
lb02c, lb02f, lb02n
Shows how to modify some of the default resources to create a solid filled set of boxes.
lg01c, lg01f, lg01n
Shows all the default settings for the Legend resources.
lg02c, lg02f, lg02n
Shows how to modify some of the default resources to create a legend of five markers.
lg03c, lg03f, lg03n
Shows how to create a legend of five lines.
pr01c, pr01f, pr01n
Demonstrates basic GraphicStyle capabilities.
pr02c, pr02f, pr02n
Demonstrates GraphicStyle capabilities and how to some GS resources.
pr03c, pr03f, pr03n
Demonstrates graphics primitives drawn in NDC space and how clipping works.
pr04c, pr04f, pr04n
Demonstrates graphics primitives drawn into an IrregularPlot object.
pr05c, pr05f, pr05n
Demonstrates overlaying graphics primitives on a MapPlot.
mp01c, mp01f, mp01n
Demonstrates basic MapPlot capabilities.
mp02c, mp02f, mp02n
Demonstrates individual control of MapPlot areas.
mp03c, mp03f, mp03n
Demonstrates MapPlot masking; loosely emulates the ncargex example "colcon".
okay bestie, the example roster keeps going β no heading repeat, just straight into the good stuff:
mp04c,mp04f,mp04nβ shows howAnnoManagerobjects vibe withMapPlotobjects.mp05c,mp05f,mp05nβ shows you how to create all ten different map projections.mp06c,mp06f,mp06nβ shows how to draw county lines in the United States.mp07c,mp07f,mp07nβ shows how to use the high resolutionRANGS/GSHHSmap database.nm01c,nm01f,nm01nβ simple example of natural neighbor linear interpolation.nm02c,nm02f,nm02nβ simple example of natural neighbor linear regridding.nm03c,nm03f,nm03nβ shows how to retrieve aspects and slopes of an interpolation.nm04c,nm04f,nm04nβ shows a simple 3D interpolation.nm05c,nm05f,nm05nβ shows how to vary the exponent of the distances in a simple 2D interpolation.nm06c,nm06f,nm06nβ smoothing in a simple 2D interpolation.nm07nβ illustrates use offtcurv,ftcurv, andftcurvi.nm08nβ illustrates use offtcurvpandftcurvpi.nm09nβ illustrates use offtcurvsandftcurvps.nm10nβ illustrates use offtkurvandftkurvd.nm11nβ illustrates use offtkurvpandftkurvpd.nm12nβ illustrates use offtsurf.nm13nβ illustrates the use ofcsa1s.nm14nβ illustrates the effect of weighting the input points usingcsa1xs.nm15nβ illustrates extrapolation into data sparse regions usingcsa1xs.nm16nβ illustrates two-dimensional approximation and second-order mixed partial usingcsa2sandcsa2xs.nm17n,nm18nβ illustrates the use ofcsa3s.nm19nβ illustrates the use ofcsa2ls.nm20nβ illustrates the use of triangulation and Voronoi diagram capabilities of thecssgridpackage.nm21nβ illustrates the use of the interpolation capabilities of thecssgridpackage.nm22nβ illustrates the use ofshgrid.cssgridpackage.st01c,st01f,st01nβ demonstrates basicStreamlinePlotexample.st02c,st02f,st02nβ demonstrates line-drawn streamline arrows and some basic resources.st03c,st03f,st03nβ shows how to overlay aStreamlinePloton a map projection.st04c,st04f,st04nβ shows aStreamlinePlotof wind vector data over aMapPlot.ti01c,ti01f,ti01nβ shows all the default settings for theTitleresources which results in a blank plot.ti02c,ti01f,ti01nβ turns on the main, x-axis, and y-axis strings to produce a plot with three titles.ti03c,ti03f,ti03nβ shows how to change resources to get high quality filled and colored titles.tm01c,tm01f,tm01nβ shows all the default settings for theTickMarkresources.tm02c,tm02f,tm02nβ shows how to modify the resources to create tick marks on the axes.tm03c,tm03f,tm03nβ shows how to modify the resources to change the scaling and the tick mark labels.tx01c,tx01f,tx01nβ shows all the default settings for theTextItemresources.tx02c,tx02f,tx02nβ shows how to modify default resources to produce a text string.tx03c,tx03f,tx03nβ uses the same resources as exampletx02c, except 114 frames are produced with varying background colors.tx04c,tx04f,tx04nβ shows how to use theTextItemobject of theHLUlibrary.tx05c,tx05f,tx05nβ demonstrates theTextItemobject with text having various heights and various angles.tx06c,tx06f,tx06nβ demonstratesTextItemtext justifications.tx07c,tx07f,tx07nβ demonstratesTextItemtext spacings and aspect ratios.tx08c,tx08f,tx08nβ simpleAnnotationexample.vc01c,vc01f,vc01nβ basicVectorPlotexample.vc02c,vc02f,vc02nβ demonstrates line-drawn vector arrows and the use of some basicVectorPlotresources.vc03c,vc03f,vc03nβ manipulates theFillArrowresources to demonstrate some of the possible stylistic variations on the appearance of filled vector arrows.vc04c,vc04f,vc04nβ demonstrates how to rotate aVectorPlot90 degrees while preserving the original relationship of the data elements.vc05c,vc05f,vc05nβ demonstrates how to overlay aVectorPloton aMapPlot.vc06c,vc06f,vc06nβ demonstrates how to use ascalarfieldto determine the color of the vector arrow fill.vc07c,vc07f,vc07nβ emulates theLLUexamplefcover; shows how to overlay contours and vectors on aMapPlot.vc08c,vc08f,vc08nβ plots wind vectors at a grid stride of 3. Vectors are colored by wind speed.vc09c,vc09f,vc09nβ plots an animation of the January 1996 snow storm using wind vectors colored by temperature over a pressure field contour plot.xy01c,xy01f,xy01nβ shows all the default resources for anxyPlotobject.xy02c,xy02f,xy02nβ the same as examplexy01c, only with some of the X and Y axis resources tweaked.xy03c,xy03f,xy03nβ the same as examplexy01c, but with the data modified a little, and the line resources tweaked.xy04c,xy04f,xy04nβ demonstrates how to create anxyPlotwith multiple lines. Some of the line resources are tweaked.xy05c,xy05f,xy05nβ demonstrates how to create anXyPlotwith multiple lines, using multiple data items (except forxy05c, which uses theCoordArrTableobject).xy06c,xy06f,xy06nβ demonstrates how to read innetCDFfiles to generate various xy plots.xy07c,xy07f,xy07nβ demonstrates how to draw a "scattergram".xy08c,xy08f,xy08nβ shows how to use irregular points to change the transformation of your plot.xy09c,xy09f,xy09nβ shows how to create different kinds of axes.xy10c,xy10f,xy10nβ shows how to overlay anXyPloton aMapPlot.xy11c,xy11f,xy11nβ demonstrates how to display anxyPlotto an X Window, and then copy it to a meta file.xy12cβ demonstrates how to incorporate theHLUlibrary with a GUI. It uses an X/Motif interface, and also allows the user to copy frames from the X Window to a meta file.xy13cβ shows how to interactively retrieve data values from a plot by pointing and clicking on the plot.xy14c,xy14f,xy14nβ demonstrates the data manipulation capabilities ofNCL.xy15c,xy15f,xy15nβ demonstrates the creation of a set of four stackedXyPlots.xy16c,xy16f,xy16nβ demonstrates how to draw three different xy lines on the same plot, but with different axis scales.xy17c,xy17f,xy17nβ demonstrates how to stack three xy plots.
π SEE ALSO π
bestie if you want more, go peek at ncargex(1NCARG) β that's the whole mood. slay.
π COPYRIGHT π
so legal tea, no cap: Copyright (C) 1987-2000 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.
and that's the entire NCARG Nhl EXAMPLES page for ng4ex(1Nhl). the footer says source/version is NCARG Nhl EXAMPLES and the page is ng4ex(1Nhl) β no date in sight, so we're keeping it timeless. bye bestie, go run an example π
β¨
π¦ where this page comes from
- debian bookworm: libncarg-bin 6.6.2.dfsg.1-1
- debian trixie: libncarg-bin 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-bin 6.6.2-10build2
- ubuntu questing: libncarg-bin 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-bin 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-bin 6.6.2.dfsg.1-12build2
- Copyright (C) 1993 #
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms