Dependencies Version
SatPy 0.20.1
Pyresample 1.12.3
Trollimage 1.11.0
Pykdtree 1.3.1
Pydecorate 0.2.1

NWCSAF/Geo

Download data for this tutorial

Below we will use two datasets, the first one being the testdata set available at the NWCSAF Help desk (www.nwcsaf.org).

So, go download and unpack the data:

  1.  wget http://www.nwcsaf.org/Downloads/GEO/2018/Software/NWC-CDOP3-GEO-AEMET-SW-DATA-MSGPS_DATASET_v2018.tgz -O /tmp/nwcsaf-geo-dataset.tgz
  2.  cd /tmp
  3.  tar xvzf nwcsaf-geo-dataset.tgz 

The second dataset is available at https://zenodo.org. Here is how to download and unpack it:

  1.  wget https://zenodo.org/record/3706415/files/hrit_msg4_0deg_202003090800.tgz -O /tmp/hrit_msg4_0deg_202003090800.tgz
  2.  cd /tmp
  3.  tar xvzf hrit_msg4_0deg_202003090800.tgz
  4.  wget https://zenodo.org/record/3706415/files/S_NWC_CT_MSG4_MSG-N-VISIR_20200309T080000Z.nc -O /tmp/S_NWC_CT_MSG4_MSG-N-VISIR_20200309T080000Z.nc

Read and display some product from the test dataset

Here we show how to read and visualize the TPW product.

In [3]:
from satpy import Scene
from glob import glob
from datetime import datetime
In [4]:
myfiles = (glob("/home/a000680/data/nwcsafgeo/export_archive/iSHAI/*20170112T090000Z.nc") +
           glob("/home/a000680/data/nwcsafgeo/export_archive/ASII/S_NWC_ASII-TF*20170112T090000Z.nc") +
           glob("/home/a000680/data/nwcsafgeo/export_archive/CMIC/S_NWC_CMIC*20170112T090000Z.nc"))

scene = Scene(filenames=myfiles, reader='nwcsaf-geo')
print(scene.available_composite_names())
['asii_prob', 'cloud_drop_effective_radius', 'cloud_ice_water_path', 'cloud_liquid_water_path', 'cloud_optical_thickness', 'cloud_top_phase', 'lifted_index', 'showalter_index', 'static_day', 'total_precipitable_water']
In [5]:
scene.load(['total_precipitable_water', 'showalter_index', 'lifted_index',
            'asii_prob', 'cloud_liquid_water_path', 'cloud_top_phase'])
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
Can't load ancillary dataset ishai_status_flag
Can't load ancillary dataset ishai_status_flag
Can't load ancillary dataset ishai_status_flag
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/usr/src/forks/pyresample/pyresample/utils/__init__.py:33: UserWarning: 'get_area_def' has moved, import it with 'from pyresample import get_area_def'
  warnings.warn("'get_area_def' has moved, import it with 'from pyresample import get_area_def'")
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/pyproj/crs/crs.py:539: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/dask/core.py:119: RuntimeWarning: invalid value encountered in less_equal
  return func(*args2)
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/dask/core.py:119: RuntimeWarning: invalid value encountered in greater_equal
  return func(*args2)
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/dask/core.py:119: RuntimeWarning: invalid value encountered in less_equal
  return func(*args2)
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/dask/core.py:119: RuntimeWarning: invalid value encountered in greater_equal
  return func(*args2)
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/dask/core.py:119: RuntimeWarning: invalid value encountered in less_equal
  return func(*args2)
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/dask/core.py:119: RuntimeWarning: invalid value encountered in greater_equal
  return func(*args2)
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/dask/core.py:119: RuntimeWarning: invalid value encountered in less_equal
  return func(*args2)
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/dask/core.py:119: RuntimeWarning: invalid value encountered in greater_equal
  return func(*args2)

Show the TPW on the MSG-N grid:

In [6]:
scene.show('total_precipitable_water',
           overlay={'coast_dir': '/home/a000680/data/shapes/', 'color': 'white'})
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/trollimage/xrimage.py:907: FutureWarning: This DataArray contains multi-dimensional coordinates. In the future, these coordinates will be transposed as well unless you specify transpose_coords=False.
  res = channels.transpose('y', 'x', 'bands')
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/dask/core.py:119: RuntimeWarning: invalid value encountered in less_equal
  return func(*args2)
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/dask/core.py:119: RuntimeWarning: invalid value encountered in greater_equal
  return func(*args2)
Out[6]:

Ref image

And showing the probability for tropopause folding (ASII-TF):

In [7]:
scene.show('asii_prob',
            overlay={'coast_dir': '/home/a000680/data/shapes/', 'color': 'white'})
/home/a000680/miniconda3/envs/python3/lib/python3.7/site-packages/trollimage/xrimage.py:907: FutureWarning: This DataArray contains multi-dimensional coordinates. In the future, these coordinates will be transposed as well unless you specify transpose_coords=False.
  res = channels.transpose('y', 'x', 'bands')
Out[7]: