NCL Home> Application examples> Data sets || Data files for some examples

Example pages containing: tips | resources | functions/procedures

Visualizing COSMO model data

This page describes various ways to visualize COSMO (Consortium for Small-scale Modeling) data. The COSMO is a non-hydrostatic limited-area atmospheric prediction model operated and developed by a international consortium of weather services. Oliver Führer from MeteoSwiss provided all the materials for this page.

The scripts below work with either NetCDF or GRIB files. For them to work correctly with GRIB, however, you need to set the NCL_GRIB_PTABLE_PATH environment variable to point to the location of the "gt" directory, which contains the appropriate grib tables:

  setenv NCL_GRIB_PTABLE_PATH `pwd`/gt
or
  export NCL_GRIB_PTABLE_PATH=`pwd`/gt

The "gt" files are available as a tar file.

All scripts below are provided in two versions. The plain version "cosmo_n.ncl" will work with your plain NCL installation. The "cosmolib_n.ncl" scripts mentioned below are based on a library of additional NCL scripts called "COSMOlib", which hide some of the complexity of handling both GRIB and NetCDF.

For more information about COSMOlib and to download it, visit:
https://wiki.c2sm.ethz.ch/Wiki/VisNCLCosmoLibrary

MeteoSwiss uses a suite of color tables that they've developed and contributed to the NCL project.

cosmo_1.ncl (cosmolib_1.ncl) This script creates a simple 2D contour plot with the correct geo-referencing of the field in rotated-latlon-coordinates. In principle, this script can then be used to overlay the data onto any other map projection.
cosmo_2.ncl (cosmolib_2.ncl) This script shows how to plot a vertical cross-section, considering the correct terrain-following grid positions of COSMO.