Pytroll/SatPy

Summary

This page contains some scripts for satpy, based on the work of Ernst Lobsiger.

See for a few messages in the MSG-1 mailing list and links to starter kits: here

A short overview on installing satpy: Installation Satpy


GEO scripts

The adapted geo-scripts are very similar to the original ones, but they contain options for composite, area etc.

  • Note 1: These scripts are valid for both Linux and WIndows. (Un)comment the right opsys in the scripts.
  • Note 2: In these files, adapt toodrp and datdrp to your installation!

    Usage

     ./<script>.py [-h] [-t T] [-sat SAT] [-src SRC] [-dst DST] [-o O] [-area AREA] [-composite COMPOSITE] [-e E] [-v]
    
    
    options:
      -h, --help            show this help message and exit
      -t T                  time: YYYYmmDDHHMM
      -sat SAT              RSS|IODC|FULL|1|2|3|4]
      -src SRC              source dir., MUST be absolute path!
      -dst DST              destination dir., MUST be absolute path!
      -o O                  output file
      -area AREA            area
      -composite COMPOSITE  composite
      -e E                  area|composite, possible options for area or composite
      -v [V]                view
    
    adapted scriptreplaces original scriptscomment
    MSGx.py MSG1.py, MSG2.py, MSG3.py, MSG4.pyaccepts all composite types
    HIMAx.py HIMA8.py
    GOESx.py GOES16.py, GOES17.py

    LEO scripts

    There are 2 sets. One set is very similar to the original scripts. The other uses a file containing commonly used functions and scripts for each satellite. This is done because the scripts contain a lot of equal code. The satellite specific scripts are now much smaller and extension to other satellites is much easier to do.

    The mentioned mistakes in the original scripts are fixed in these scripts.

    Usage

     ./<script>.py [-h] [-t T] [-sat SAT] [-src SRC] [-dst DST] [-o O] [-area AREA] [-composite COMPOSITE] [-e E] [-v]
    
    
    options:
      -h, --help            show this help message and exit
      -t T                  time: YYYYmmDD
      -src SRC              source dir., MUST be absolute path!
      -dst DST              destination dir., MUST be absolute path!
      -o O                  output file
      -area AREA            area
      -composite COMPOSITE  composite
      -e E                  area|composite, possible options for area or composite
      -v [V]                view
      -tle TLE              tle file, must contain tle elements of used satellite
      -sp                   stacked passes (default: use single pass)
      -dry                  dry run
    
    for Metop:
      -sat SAT              A[D|N]] | B[D|N] | C[D|N]] | X[D|N] : X=B+C, D=Day, N=Night
    for NOAA:
      -sat SAT              N20[D|N]] | SUO[D|N] : D=Day, N=Night; SUO=Suomi, N20=NOAA20
    for Aqua/Terra:
      -sat SAT              A[D|N]] | T[D|N]: A=Aqua, T=Terra, D=Day, N=Night
    for Sentinel:
      -sat SAT              A[D|N]] | B[D|N] | X[D|N] : X=A+B, D=Day, N=Night
    

    Set nr. 1

  • Note 1: These scripts are valid for both Linux and WIndows. (Un)comment the right opsys in the scripts.
  • Note 2: In these files, adapt toodrp and datdrp to your installation!

    Note that the adapted scripts all support day/night and stacked, in all combinations.
    adapted scriptreplaces original scripts
    Metopx.py Metop-A/B/C_DAY/NIG.py
    NOAAx.py NOAA-20_DAY/NIG.py, SUOMI-NPP_DAY/NIG.py, and _stacked.py


    Set nr. 2 (recommended) (20220409)

    These scripts are valid for both Linux and Windows.

    The scripts use functions in:

  • satpy_ecast_rts.py

    Note that the adapted scripts all support day/night and stacked, in all combinations.
    New in 20220409: fix passes overnight, added input filelist; some more fixes
    adapted scriptreplaces original scripts
    Metop.py Metop-A/B/C_DAY/NIG.py
    NOAA.py NOAA-20_DAY/NIG.py, SUOMI-NPP_DAY/NIG.py, and _stacke.py
    FY3D.py FY-3D_DAY/NIG.py and _stacke.py
    AquaTerra.py EOS-Aqua_DAY.py, EOS-Terra_DAY.py
    Sentinel3.py Sentinel-3A_DAY.py, Sentinel-3B_DAY.py

    Preparations

    In satpy_ecast_rts.py: In other scripts Note: Paired satellites: Choose for satellite X instead of B or C resp. A or B

    Examples

    python Metop.py -t 20220324 -dry                           dry run, show settings (in this case: the defaults)
    python Metop.py -t 20220324 -dry f                         dry run, show also files selected
    python Metop.py -t 20220324 -sat BD                        use Metop-B, day pass
    python Metop.py -t 20220324 -sat BD -area westminster      same, choose area
    python Metop.py -t 20220324 -sat BD -composite overview    same, choose composite
     
    python Metop.py -t 20220324 -sat XN                        use combined Metop-B and C, night pass
    python Metop.py -t 20220324 -sat BD -sp                    use Metop-B multiple passes
    
    python Metop.py -t 20220324 -sat BD -src C:\aaa\bbb        use source files in this location
    python Metop.py -t 20220324 -sat BD -dst C:                location of output file
    python Metop.py -t 20220324 -sat BD -o anc.jpg             name output file
    python Metop.py -t 20220324 -sat BD -tle C:\weathet.txt    TLE location and file
    
    python Metop.py -sat BD -fl filelist.txt                   Use files in filelist instead of collected items by date (no -t option)
    

    Selector for satpy

  • satpy_selector.py

    This selector is a simple gui using above scripts. You must add locations of your raw files into this script. Selecting one of those file locations will be done using an argument at start, e.g.:

    python3 satpy_selector.py msg
    
    This gives the gui: (geo and leo)

    Now:

    Best is to start this in a command shell so you can see (error-)messages generated by the activated scripts.

    Note that the argument only selects the location of files, not what is in!
    It is possible to have data of different satellites present in the selected directory; they will all show up.

    Note: For directories, for windows, use '/', not '\'.