PyNGL

PyNGL and Python examples
DKRZ PyNGL example shapefile use
This example shows how to read a shapefile and draw its contents on a map using PyNGL/PyNIO.
DKRZ PyNGL example regridding with xesmf
This example demonstrate how to use xesmf and xarray to regrid to a higher resolution grid.
DKRZ PyNGL example regridding xesmf w200
DKRZ PyNGL example regridding xesmf w200
DKRZ PyNGL example regridding xesmf
DKRZ PyNGL example regridding xesmf
DKRZ PyNGL masking example
This script shows how to mask your data using area specifier.
DKRZ PyNGL masking example w200
DKRZ PyNGL masking example w200
DKRZ PyNGL masking example
DKRZ PyNGL masking example
plot_TRANS_xy_0_py_w200.png
DKRZ PyNGL example simple xy-plot w200
DKRZ PyNGL example simple xy-plot
This PyNGL example shows how to create a simple xy-plot.
plot_TRANS_xy_0_py.png
DKRZ PyNGL example bar chart plot
DKRZ PyNGL example bar chart plot
DKRZ PyNGL example bar chart plot w400
DKRZ PyNGL example bar chart plot w400
DKRZ PyNGL example bar chart
This example demonstrates how to create a bar chart plot.
DKRZ PyNGL example bar chart plot w200
DKRZ PyNGL example bar chart plot w200
plot_map_orthographic_w400.png
DKRZ PyNGL example orthographic projection
DKRZ PyNGL example map with orthographic projection
This example shows how to create a map using Orthographic projection.
DKRZ PyNGL example orthographic projection w200
DKRZ PyNGL example orthographic projection w200
DKRZ PyNGL example orthographic projection
DKRZ PyNGL example orthographic projection
DKRZ PyNGL example vector plot
This example demonstrates how to draw a uv-vector plot on a map.
DKRZ PyNGL example vector on map w200
DKRZ PyNGL example vectors on map w200
DKRZ PyNGL example vector on map
DKRZ PyNGL example vector on map w400
DKRZ PyNGL example scatter plot w400
DKRZ PyNGL example scatter plot
This example shows how to create a scatter plot using random dummy data.
DKRZ PyNGL example scatter plot w200
DKRZ PyNGL example scatter plot
DKRZ PyNGL example scatter plot regline w400
DKRZ PyNGL example scatter plot with regression line
This example shows how to create a scatter plot and add the regression line to it.
DKRZ PyNGL example scatter plot w200
DKRZ PyNGL example scatter plot
DKRZ PyNGL example overlay plot
DKRZ PyNGL example overlay
This example demonstrate how to overlay a contour line plot on a contour fill plot.
plot_TRANS_overlay_py_w200.png
DKRZ PyNGL example overlay plot w200
DKRZ PyNGL example overlay plot
DKRZ PyNGL example overlay plot
plot_TRANS_streamline_py_w400.png
DKRZ PyNGL example streamline plot
This example script shows how to plot streamlines.
plot_TRANS_streamline_py_w200.png
plot_TRANS_streamline_py.png
DKRZ NCL example default Hovmueller plot w200
DKRZ NCL example default Hovmueller plot
DKRZ NCL example colored Hovmueller plot w400
DKRZ PyNGL example colored Hovmueller plot
The following example shows how to create a color filled Hovmueller plot.
DKRZ NCL example colored Hovmueller plot w200
DKRZ NCL example colored Hovmueller plot
DKRZ PyNGL example overlay different grids
DKRZ PyNGL example overlay two different grid resolutions
This example shows how to overlay regional data (high resolution grid) on a global grid (lower resolution grid).
plot_attach_map_to_map_Satellite_w200.png
plot_attach_map_to_map_Satellite.png
plot_quality_per_cell.000001_w400.png
plot_quality_per_cell.000002_w400.png
plot_quality_per_cell.000003_w400.png
DKRZ PyNGL example filled circles instead of grid cells
This example shows how to draw three plots, first plot is a raster contour plot, the second shows the data with value annotations for each grid cell, and the third plot shows filled circles which are sized by a quality variable instead of grid cells.
plot_quality_per_cell.000001_w200.png
plot_quality_per_cell.000001.png
plot_quality_per_cell.000002_w200.png
plot_quality_per_cell.000002.png
plot_quality_per_cell.000003_w200.png
plot_quality_per_cell.000003.png
plot_counts_per_country_map_blue_w400.png
DKRZ PyNGL example counts per country
This example demonstrates how to use the map area specifiers to fill country areas with colors defined by a value.
plot_counts_per_country_map_blue_w200.png
plot_counts_per_country_map_blue.png
plot_boxplot_mod_w400.png
DKRZ PyNGL example Box-Whisker plot
This example provides the function boxplot_mod which creates a Box-Whisker plot. Optional the boxes can be colored and a label can be added to the boxes. The temperature variables of two different model runs are used to compute the statistics and create the plot of the detrended data. The Box-Whisker plot is added to the right of the detrended plot showing two colored boxes.
plot_boxplot_mod_w200.png
plot_boxplot_mod.png
plot_scatter_attach_two_histograms_w400.png
DKRZ PyNGL example scatterplot with two additional histograms attached
This example creates a scatter plot of data a(t), b(t), colored by c(t). Additionally the counts of items referring to the axis are attached as histograms to the scatter plot.
plot_scatter_attach_two_histograms_w200.png
plot_scatter_attach_two_histograms.png
plot_interp_regress_stat_w400.png
DKRZ PyNGL example linear regression and movin average
This example shows how to compute the linear regression and moving average with numpy. In addition the x-axis labels are changed to the YYYY-MM-DD format using the advantage of xarray's time handling. The legend is created and placed using the function create_legend.
plot_interp_regress_stat_w200.png
plot_interp_regress_stat.png
plot_polar_w400.png
DKRZ PyNGL example polar plot
This example shows how to overlay a filled contour plot on a polar stereographic map. The longitude labels are drawn by a function adding them to the map. The labelbar is customize to fit the size of the polar map.
plot_polar_w200.png
plot_polar.png

Document Actions