There are four different rainfall products that are available from NWCSAF-GEO. These can be split into 2 groups, those that consider the cloud top microphysics (PC-Ph and CRR-Ph) and those that don't (PC and CRR). The products that use the cloud top microphysics are a day time only product due to the use of visible channels in their production therefore when we are creating plots below make sure you select appropriate times of day so that you can see what the products look like.
The script that we will use to plot the rainfall metrics (nwcpy.py) is also able to plot a wide range of other products. Therefore by practising with the rainfall metrics it should enable you to plot a very wide range of other products too.
As mentioned previously there are a number of arguments required to run these python scripts, however lets start by attempting to run the script without arguments. This should hopefully provide us with some information about what we need to provide for the script to work.
python nwcpy.py
The result from running the script this way should be as follows.
Usage: python nwcpy.py <path/file.nc> <variable1> <width> <height>
Examples: python nwcpy.py /home/NWCGEO/export/CMA/S_NWC_CMA_MSG3_Spain-VISIR_20151013T144500Z.nc cma_cloudsnow 0 0
python nwcpy.py /home/NWCGEO/export/L1SD/S_NWC_IR120-BT_MSG3_MSG-N-VISIR_20151013T144500Z.nc data 1200 700
This tells us that we need to supply the location of the data file that we wish to use as a data source, the variable that we wish to plot and the width and height of the plot. Now, lets attempt to plot the CRR and CRR-Ph to see what the products look like.
python nwcpy.py $SAFNWC/export_archive/CRR/S_NWC_CRR_MSG4_Ghana-VISIR_20180801T181500Z.nc crr_intensity 0 0
If successful you should see a message like this.
inDir= /home/swift/safnwc/export_archive/CRR
outDir= /home/swift/safnwc/NWCPY
File /home/swift/safnwc/export_archive/CRR/S_NWC_CRR_MSG4_Ghana-VISIR_20180801T181500Z.nc
fileType= CRR
Creating /home/swift/safnwc/NWCPY/S_NWC_CRR_MSG4_Ghana-VISIR_20180801T181500Z.crr_intensity.gif
Variable crr_intensity --------------------------------
data type: float32 | max = 50.0 min = 0.0
prod size (512, 512)
validRange 0 500
step 25
palette {'CRR': u'crr_intensity_pal'}
wxh 1100.0 x 800.0
Writing /home/swift/safnwc/NWCPY/S_NWC_CRR_MSG4_Ghana-VISIR_20180801T181500Z.crr_intensity.gif
Now lets plot the CRR-Ph product.
python nwcpy.py $SAFNWC/export_archive/CRR/S_NWC_CRR-Ph_MSG4_Ghana-VISIR_20180801T181500Z.nc crrph_intensity 0 0
If successful you should see a message like this.
inDir= ../export_archive/CRR
outDir= /home/swift/safnwc/NWCPY
File ../export_archive/CRR/S_NWC_CRR-Ph_MSG4_Ghana-VISIR_20180801T181500Z.nc
fileType= CRR-Ph
Creating /home/swift/safnwc/NWCPY/S_NWC_CRR-Ph_MSG4_Ghana-VISIR_20180801T181500Z.crrph_intensity.gif
Variable crrph_intensity --------------------------------
data type: float32 | max = 27.0 min = 0.0
prod size (512, 512)
validRange 0 500
step 25
palette {'CRR-Ph': u'crrph_pal'}
wxh 1100.0 x 800.0
Writing /home/swift/safnwc/NWCPY/S_NWC_CRR-Ph_MSG4_Ghana-VISIR_20180801T181500Z.crrph_intensity.gif
Which will produce images that look like this.
Similarly to above lets plot the chance of precipitation for both the products that do (PC-Ph) and don't (PC-Ph) take into account the cloud top microphysics.
python nwcpy.py $SAFNWC/export_archive/PC/S_NWC_CRR_MSG4_Ghana-VISIR_20180801T181500Z.nc pc 0 0
This should give a message like this
inDir= ../export_archive/PC
outDir= /home/swift/safnwc/NWCPY
File ../export_archive/PC/S_NWC_PC_MSG4_Ghana-VISIR_20180801T181500Z.nc
fileType= PC
Creating /home/swift/safnwc/NWCPY/S_NWC_PC_MSG4_Ghana-VISIR_20180801T181500Z.pc.gif
Variable pc --------------------------------
data type: uint8 | max = 7 min = 0
prod size (512, 512)
validRange 0 10
flag_meanings [u'0', u'10', u'20', u'30', u'40', u'50', u'60', u'70', u'80', u'90', u'100']
flag_values [ 0 1 2 3 4 5 6 7 8 9 10]
palette {'PC': u'pc_pal'}
wxh 1100.0 x 800.0
Writing /home/swift/safnwc/NWCPY/S_NWC_PC_MSG4_Ghana-VISIR_20180801T181500Z.pc.gif
Now for the PC-Ph product.
python nwcpy.py $SAFNWC/export_archive/PC/S_NWC_PC-Ph_MSG4_Ghana-VISIR_20180801T181500Z.nc pcph 0 0
Which will produce output that looks like this
inDir= ../export_archive/PC
outDir= /home/swift/safnwc/NWCPY
File ../export_archive/PC/S_NWC_PC-Ph_MSG4_Ghana-VISIR_20180801T181500Z.nc
fileType= PC-Ph
Creating /home/swift/safnwc/NWCPY/S_NWC_PC-Ph_MSG4_Ghana-VISIR_20180801T181500Z.pcph.gif
Variable pcph --------------------------------
data type: float32 | max = 74.0 min = 0.0
prod size (512, 512)
validRange 0 101
step 5
palette {'PC-Ph': u'pcph_pal'}
wxh 1100.0 x 800.0
Writing /home/swift/safnwc/NWCPY/S_NWC_PC-Ph_MSG4_Ghana-VISIR_20180801T181500Z.pcph.gif
and create images that look like this.