NCL Website header
NCL Home> Application examples> Data Analysis || Data files for some examples

Example pages containing: tips | resources | functions/procedures

NCL User Guide examples

These are the NCL scripts referenced in the NCL User Guide, in the order they appear in the document.

You can copy any of these examples and their required data files from this page, or, if you have NCL V6.4.0 installed, you can run the ng4ex command from a UNIX terminal window:

   ng4ex xxxxxx
where xxxxxx is the name of the script without the ".ncl" suffix. For example:

   ng4ex NUG_curvilinear_grid

You can see a full list of NUG examples by typing:

   ng4ex -nug -list

Some of these examples require one or more data files, which you can download from:

http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/Data/

NUG_plot_in_5_steps.ncl: Template NCL graphics script for creating line contours over a map.

NUG_read_ASCII_1.ncl: Reading ASCII data that contains one value per line.

This example does not produce any graphics.

NUG_read_ASCII_2.ncl: Reading ASCII data that contains a header line.

This example does not produce any graphics.

NUG_read_ASCII_3.ncl: Reading ASCII data that contains multiple columns of data.

This example does not produce any graphics.

NUG_read_CSV_1.ncl: Reading a simple CSV (comma separated values) file.

NUG_read_CSV_2.ncl: Reading a more complex CSV file with mixed types.

NUG_read_Binary_1.ncl: Reading a big-endian binary file.

This example does not produce any graphics.

NUG_read_Binary_GrADS.ncl: Reading a GrADS binary data file.

This example does not produce any graphics.

NUG_write_ASCII_1.ncl: Writing a simple ASCII file.

This example does not produce any graphics.

NUG_write_ASCII_2.ncl: Writing an ASCII file with a mix of string, float, and integer data.

This example does not produce any graphics.

NUG_write_ASCII_3.ncl: Writing an ASCII file with formatted columns.

This example does not produce any graphics.

NUG_write_ASCII_4.ncl: Writing 2D subsets of a 3D array to an ASCII file.

This example does not produce any graphics.

NUG_write_ASCII_5.ncl: Writing nicely formatted 2D arrays of numeric data to an ASCII file.

This example does not produce any graphics.

NUG_write_Binary_1.ncl: Writing an unformatted Fortran binary file.

This example does not produce any graphics.

NUG_write_Binary_2.ncl: Writing and reading three dummy variables to a Fortran binary file.

This example does not produce any graphics.

NUG_write_netCDF_1.ncl: Writing data to a NetCDF file using the "inefficient" method.

This example does not produce any graphics.

NUG_write_netCDF_2.ncl: Writing data to a NetCDF file using the "efficient" method.

This example does not produce any graphics.

NUG_statistics_linear_regression.ncl: Calculating a linear regression line.

NUG_statistics_running_mean.ncl: Calculating a running mean.

NUG_date_format.ncl: Using calendar functions to create date strings for axis labels.

NUG_map_default.ncl: Drawing a simple map.

NUG_map_grid_and_tickmark_settings.ncl: Customizing map grid lines and tickmarks.

NUG_map_land_ocean_settings.ncl: Customizing map land and ocean fill colors.

NUG_map_countries.ncl: Adding country outlines to a map.

NUG_map_selected_countries.ncl: Colorizing select countries in a map.

NUG_projections_mollweide.ncl: Drawing filled contours over a Mollweide map projection.

NUG_map_settings.ncl: Drawing filled contours over a subregion of a map.

NUG_polar_NH.ncl: Drawing contours over the northern hemisphere.

NUG_map_resolutions.ncl: Setting various resolutions for map outlines.

NUG_xy_plot.ncl: Drawing a simple XY plot.

NUG_xy_plot_timeseries.ncl: Drawing an XY timeseries plot.

NUG_contour_map.ncl: Drawing a simple plot of contour lines over a map.

NUG_contour_filled_map.ncl: Drawing color-filled contours over a map.

NUG_contour_fillpattern.ncl: Drawing pattern-filled contours over a map.

NUG_vector_default.ncl: Drawing simple line vectors over a map.

NUG_vector_curly.ncl: Drawing curly vectors over a map.

NUG_vector_plot_colorized.ncl: Drawing vectors colored by temperature over a map.

NUG_vector_plot_overlay.ncl: Drawing vectors over filled contours on a map.

NUG_slice_plot.ncl: Drawing a vertical slice of data at latitude=40.

NUG_bar_chart.ncl: Drawing a bar plot instead of XY curves.

NUG_bar_chart_multi.ncl: Drawing multiple bars in a plot.

NUG_bar_chart_col_above_below.ncl: Filling in bars above and below a Y reference line.

NUG_histograms.ncl: Drawing a histogram plot.

NUG_transparent_filled_contour.ncl: Using transparency to highlight an area in a filled contour plot.

NUG_multi_timeseries.ncl: Drawing multiple timeseries of different lengths with a legend.

NUG_grid_resolution_comparison.ncl: Overlaying filled contours of datasets at three different resolutions.

NUG_panel_plot.ncl: Paneling two plots on a page.

NUG_panel_plot_3x2.ncl: Paneling plots in three rows and two columns.

NUG_panel_control.ncl: Paneling plots of different sizes.

NUG_panel_vp.ncl: Using viewport resources to draw multiple plots on a page.

NUG_polyline_polygon_polymarker.ncl: Drawing lines, markers, filled polygons, and text on a existing plot.

NUG_shapefile_plot.ncl: Adding outlines from a shapefile to an existing map plot.

NUG_shapefile_plot_data.ncl: Adding country outlines from a shapefile to an existing contour/map plot.

NUG_colormaps.ncl: Changing the color map for filled contours and drawing color maps.

NUG_curvilinear_basic.ncl: Drawing filled contours of a curvilinear (2D lat/lon) dataset.

NUG_curvilinear_grid.ncl: Drawing filled contours of a subset of a curvilinear grid.

NUG_bipolar_grid_MPI-ESM.ncl: Drawing cell-filled contours of a curvilinear grid with grid outlines on.

NUG_bipolar_grid_MPI-ESM_subregion.ncl: Drawing a subregion of cell-filled contours over a map.

NUG_tripolar_grid_STORM.ncl: Drawing filled contours of a tripolar curvilinear grid.

NUG_unstructured_grid.ncl: Drawing filled contours of an unstructured dataset using old method.

NUG_unstructured_grid_640.ncl: Drawing filled contours of an unstructured dataset using new method.

NUG_triangular_grid_ICON.ncl: Drawing filled contours of an icosahedral unstructured grid using old method.

NUG_triangular_grid_ICON_640.ncl: Drawing filled contours of an icosahedral unstructured grid using new method.

NUG_plot_rotated_grid.ncl: Drawing filled contours on a rotated lat/lon grid.

NUG_globe_orography_grid_resolution.ncl: Drawing two orography datasets of different resolutions on one map.

NUG_title_strings.ncl: Customizing titles on an NCL plot.

NUG_text_settings.ncl: Drawing special text characters like umlaut, superscript, and subscript.

NUG_axis_annotations.ncl: Customizing the X and Y axis titles and tickmarks.

NUG_contour_labels.ncl: Customizing contour labels on a plot.

NUG_color_Land_Ocean.ncl: Setting ocean and land fill colors on a map.

NUG_color_country_user.ncl: Setting country fill colors on a map.

NUG_labelbars.ncl: Customizing a labelbar (mainly used for color contour and vector plots).

NUG_legends.ncl: Customizing a legend (mainly used for XY plots).

NUG_insert_logo.ncl: Inserting a logo on an NCL plot using ImageMagick's "composite" program.

NUG_regrid_curvilinear_to_rectilinear_bilinear_weights_ESMF.ncl: Regridding data from a curvilinear grid to a 1-degree grid; writing results to NetCDF file.

This example does not produce any graphics.

NUG_regrid_curvilinear_to_rectilinear_bilinear_wgts_destgrid_ESMF.ncl: Regridding data from a curvilinear to rectilinear grid; writing results to NetCDF file.

This example does not produce any graphics.

NUG_regrid_unstructured_to_rectilinear_bilinear_wgts_destgrid_ESMF.ncl: Regridding data from an unstructured triangular mesh to a 1-degree grid; writing results to NetCDF file.

NUG_regrid_unstructured_to_rectilinear_bilinear_wgts_ESMF.ncl: Regridding data from an unstructured triangular mesh to a rectilinear grid; writing results to NetCDF file.

NUG_regrid_rectilinear_to_curvilinear_bilinear_wgts_destgrid_ESMF.ncl: Regridding data from a rectilinear to curvilinear grid; writing results to NetCDF file.

NUG_regrid_bilinear_CMIP5_grid_to_1x1deg_grid.ncl: Regridding data from a curvilinear CMIP5 grid to a 1-degree grid.

NUG_projections.ncl: Generating all of the NCL map projections.

NUG_contour_dashpattern.ncl: Drawing contour lines with dash patterns.

NUG_contour_map_add_zonal_average.ncl: Adding a zonal average plot to a filled contour/map plot.

NUG_function_procedure.ncl: Creating and calling your own NCL functions and procedures.

NUG_GrADS_binary_data.ncl: Reading and plotting data from a GrADS binary file.

NUG_histograms-transparent.ncl: Drawing a histogram plot with transparency.

NUG_ICON_triangles_colored.ncl: Plotting ICON data using filled polygons.

NUG_labelbar_title.ncl: Customizing a labelbar and its title.

NUG_masking.ncl: Masking data based on land/sea mask read off a NetCDF file.

NUG_multiple_plots_along_y.ncl: Adding a zonal XY plot next to a filled contour/map plot.

NUG_primitives.ncl: Drawing lines, markers, filled polygons, and text on an existing plot.

NUG_projections_robinson.ncl: Drawing filled contours over a Robinson map projection.

NUG_strings.ncl: Using various string parsing and manipulation functions.

This example does not produce any graphics.

NUG_system_calls.ncl: Using various system and timing calls.

This example does not produce any graphics.

NUG_transparent_land_sea_mask_Africa.ncl: Overlaying two filled contour plots map using transparency.

NUG_use_Fortran_subroutines.ncl: Calling Fortran subroutines from an NCL script.

This example does not produce any graphics.