Info
Alle Inhalte des Nutzerportal sind nur auf Englisch verfügbar.

source codes

Folder contains source code files for NCL and PyNGL/PyNIO examples.
DKRZ NCL add latitude/longitude annotation to Robinson projection example
The example script creates a contour plot using Robinson projection and adds the latitude and longitude labels to the plot.
DKRZ NCL add text to plot example
The example script shows how to add text to a plot. It also demonstrates the use of subscript and superscript and how to create German 'Umlaute'.
DKRZ NCL attach plot to another plot along the y-axis example
To a slice plot a data averages xy-plot will be attached along the right y-axis.
DKRZ NCL counts per country map plot example
The script reads an ASCII file containing the counts per country of something. It colors only the listed countries with the corresponding counts color.
DKRZ NCL EUMETSAT IASI regrid to gaussian T63 grid example
The example script regrid the unstructured EUMETSAT IASI data to a gaussian T63 grid using ESMF.
DKRZ NCL EUMETSAT IASI swath data example
The example script creates a plot of the EUMETSAT IASI swath data using the NCL markers.
DKRZ NCL FESOM data example
The script generates a sub-region (Marian Trench) plot of the FESOM variable topo (topography).
DKRZ NCL font and function code example
The script gives an overview how to change font settings using gsn_text_ndc.
DKRZ NCL ICON add_polygon triangles example
The script creates a 1024x1024 pixel PNG plot of the ICON model data on a global map. The traingles are drawn using the add_polygon function of NCL.
DKRZ NCL ICON Mollweide projection + add latitude annotation example
The example uses Mollweide projection and a function to add latitude labels to the plot.
DKRZ NCL JPEG images as background map overlayed by clouds example
This example demonstrates how to read in a JPEG file which is used as background map. The ICON cloud data are drawn on top of the map using different color transparencies.
DKRZ NCL legend settings example
The script creates 4 plot with different legend settings. 1. using NCL legend defaults, 2. define box size and move it into the plot, 3. change font settings and 4. reverse legend line order and fill legend box with color.
DKRZ NCL overlay small map on map plot example
This example shows how to draw a small global map on top of a regional map for a better location of the sub-region.
DKRZ NCL plot a sub-region of curvilinear data example
If the input data is on a curvilinear grid it is not as simple as described before to select a sub-region because the coordinate arrays lat and lon are not 1-dimensional arrays. In this example script it is shown how to retrieve the indices of a given sub-region and to define a subset of the data and its subsetted coordinate arrays.
DKRZ NCL REMO plot rotated data example
The REMO model data are computed on a rotated grid. The script shows how to plot these data on the origin grid.
DKRZ NCL scatter plot with legend example
The script demonstrates how to create a scatter plot with different marker types and colors and a legend in the lower right corner of the plot.
DKRZ NCL tickmarks example
The script gives an example how to use the resources for the map tickmarks and axis labels.
DKRZ NCL two different resolutions on a globe example
This example shows how to plot two different local regions on a map with Orthographic projection.
DKRZ NCL unrotate CORDEX EUR-11 rotated data to its origin example
This script shows how to do the calculation to unrotate rotated data (here CORDEX EUR-11) to its origin grid.
DKRZ NCL vectors on a curvilinear grid example
The example script creates a map with the curvilinear grid of the data and draws the vectors on the map.
DKRZ NCL xy-plot example
The script creates a simple xy-plot.
DKRZ NCL xy-plot with multiple lines and y-axis
The script shows how to plot two different variables in one graph.
PyNGL example curvilinear contour plot
The script demonstrates how to create a contour plot of curvilinear gridded data using PyNGL and PyNIO.
PyNGL example ICON model data triangles plot
Here we show you how to plot the triangles of the ICON model data output using PyNGL Ngl.add_polygon function. In comparison with an equivalent matplotlib/Basemap script the run time of the PyNGL script is only 4.1s and the matplotlib/Basemap script runs 28.1s.
PyNGL example ICON triangles with different projections
In this script the projection is changed from Mollweide to Winkel Tripel within a loop.
PyNGL example map settings
The python script demonstrates how to create a simple map from the USA using PyNGL.
PyNGL example panel plot
This script plots 3 different plots on one physical page.
PyNGL example rectilinear grid contour plot
The script uses the PyNGL python package to generate a contour plot of rectilinear gridded data. The data is read from a netCDF file with PyNIO Nio.open_file function.
PyNGL example rectilinear slice plot
The script creates a slice contour plot of rectilinear gridded data.
PyNGL example unstructured contour plot
This script creates a contour plot of unstructured data, in this case data from the ICON model.
PyNGL example vector plots
This script shows the different capabilities of drawing vectors on a map. It creates two plots: one global map and one of Northern America.
PyNGL example xy-plot
The python script creates a simple xy-plot using PyNGL.
DKRZ NCL regional map overlayed on global map Satellite projection example
The example shows the complexity of overlaying different maps and contour plots on a base map. To point the Satellite view up a grey shadow is attached to the regional contour plot.
NCL/ImageMagick example to tilt 3 contour plots into one new image
This example shows how to create 3 contour plots, one seperated title plot and another seperated labelbar plot with an NCL script. With ImageMagicks 'convert' we'll tilt the 3 contour plots and compose them with the title and labelbar plots into one new image. This all will be done with one KSH script.
NCL/ImageMagick example to tilt a contour plot
The next example demonstrate how to tilt a contour plot created with NCL. Therfore ImageMagick's 'convert' is used to crop the white space around the contour plot and furthermore to tilt and last but not least to compose the tilted plot image with the title and labelbar plots into one new image. All steps will be done by a Korn-Shell script.
DKRZ NCL bar chart with some statistics
NCL Example script to draw bar chart, running mean and trend
DKRZ NCL spiral example
The example script shows how to create an animation of multi-year monthly mean temperature change data similar to Ed Hawkins's spiral animation (https://www.climate-lab-book.ac.uk/spirals/).
DKRZ NCL example attached plots among others
A long time series data is splitted into 3 parts and plotted among each other using gsn_attach_plots function.
DKRZ NCL plot ICON global data using CellFill mode
This examples shows how to use the CellFill mode to plot the global ICON data instead of drawing polygons.
DKRZ NCL seasons comparison with CDO seasons
Compare the seasons (DJF, MAM, JJA, SON) computed by NCL and CDO.

Artikelaktionen