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

Reading and processing NWCSAF/PPS products

The NWCSAF delivers two software packages that can output cloud, precipitation, instability and wind parameters useful in Nowcasting. The software can be run locally on data received via EUMETCast or via a direct readout station operating in L- and X-band. The software support Geostationary satellite data is called NWCSAF/geo and the other one for polar orbiting satellites is NWCSAF/PPS.

Both the NWCSAF/Geo and PPS software packages are installed and run at the EUMETSAT headquarters in Darmstadt and provides real-time services delivering some of the NWCSAF parametes in near-real time over EUMETCast.

Here we will show some examples on how you can read, project and display some of the parameters provided by the NWCSAF, using the Satpy library of the open source Pytroll suite of software tools. The focus will be on the cloud parameters.

Get some data

First download some sample data for these examples. We have uploaded some data to Zenodo. For example: One example EUMETSAT PPS Cloud mask granule. Place the data somewhere on your computer where you can reach them.

Loading and concatenating the cloud type granules

We start by loading and working with the Cloud type and CTTH products as disseminated over EUMETCast.

In [2]:
from satpy import Scene
from satpy import find_files_and_readers
from datetime import datetime

DATA_DIR = "/home/a000680/data/ears-nwc/metopb"

myfiles = find_files_and_readers(base_dir=DATA_DIR,
                                 start_time=datetime(2020, 3, 9, 8, 0),
                                 end_time=datetime(2020, 3, 9, 8, 19),
                                 reader='nwcsaf-pps_nc')
scene = Scene(filenames=myfiles)
scene.load(['ct'])

Now we have loaded and concatenated the ct field of the Cloudtype product granules in the time window given by the start and end times above

In [3]:
print(scene['ct'].data.shape)
print(scene['ct'].data.compute())
(6955, 2048)
[[ 2  2  2 ...  1  1  1]
 [ 2  2  2 ...  1  1  1]
 [ 2  2  2 ...  1  1  1]
 ...
 [ 6  6 10 ...  8  8  9]
 [ 6  6  6 ...  8  8  9]
 [ 6  6  6 ...  8  8  9]]

Also the geolocation has been unpacked. That is the the full resolution geolocation information has been recreated from the tie point grid by interpolating and extrapolating the longitudes and latitudes on the tie point grid. This is accomplished using the python-geotiepoints tool, but this is transparent to the user:

In [4]:
print(scene['ct'].area.lats.compute())
<xarray.DataArray (y: 6955, x: 2048)>
array([[80.32300387, 80.34000412, 80.35687112, ..., 66.74203892,
        66.70700016, 66.67100507],
       [80.31450507, 80.3315053 , 80.34837225, ..., 66.73854329,
        66.70350562, 66.66750372],
       [80.30600426, 80.32300454, 80.33987148, ..., 66.73504357,
        66.70000701, 66.6639983 ],
       ...,
       [14.8310014 , 14.82400089, 14.81760039, ...,  9.24779996,
         9.2380004 ,  9.22800079],
       [14.82100074, 14.81449998, 14.80799965, ...,  9.23829999,
         9.22850048,  9.21900052],
       [14.81100055, 14.80499949, 14.79839933, ...,  9.22880029,
         9.21900081,  9.21000049]])
Dimensions without coordinates: y, x
Attributes:
    valid_range:          [-90.  90.]
    platform_name:        MetopB
    long_name:            Latitude at the centre of each pixel
    units:                degrees_north
    sensor:               seviri
    ancillary_variables:  []
    _CoordinateAxisType:  Lat
    standard_name:        latitude
    start_time:           2020-03-09 08:00:00.100000
    end_time:             2020-03-09 08:19:19.100000
    name:                 lat
    resolution:           None
    calibration:          None
    polarization:         None
    level:                None
    modifiers:            ()

Now let’s visualise the cloudtype data using the Nowcasting SAF palette read from the file. We are using a pre-defined Satpy "composite" called cloudtype. It takes the ct data and apply the ct-palette in the netCDF file.

For a little inside in Satpy the cloudtype composite is defined the same way for all sensors in the yaml configuration file satpy/etc/composites/visir.yaml like this:

cloudtype: compositor: !!python/name:satpy.composites.PaletteCompositor prerequisites: - ct - ct_pal standard_name: cloudtype

Satpy comes with a wealth of pre-defined "composites", but can be enhanced easily for local purposes.

In [5]:
scene.load(['cloudtype'])
scene.show('cloudtype')
Out[5]: