Alternative Satpy scripts

Some alternative scripts are described here. The differences with the original (v4.1) scripts are:

Content:


Alternative scripts

GEO scripts

The scripts available in SPStools/GEOscripts are for one area/composite(set) only. You need to copy scripts to another filename for each different area/composite-set you want.

Instead (or also) you can use the scripts described below. These GEO-scripts are very similar to the original ones, but they contain options for composite, area etc.
So there is no need to copy/maintain multiple scripts for each satellite/composite/area combination.

The GEOstuff.py available here is very similar to the original one, but it contains support for:

If you don't need that you can use the original GEOstuff.py.

Notes:


New in 01-05-2024:

  • Option -ovl, to define which overlay(s) to use. Default is what's defined in the scripts (as was). E.g.:
    -ovl cbg
    
    will add coast, borders and grid.
    Usage
     ./<script>.py [-h] [-t T] [-sat SAT] [-src SRC] [-dst DST] [-o O] [-area AREA] [-composite COMPOSITE] [-m ] [-ovl OL] [-v [V]]
    
    
    options:
      -h, --help            show this help message and exit
      -t T                  time: YYYYmmDDHHMM
      -sat SAT              satnr: 4, 18, ...
      -src SRC              source dir., MUST be absolute path!
      -b B                  bulk: y|n.
      -dst DST              destination dir.
      -o O                  output file
      -area AREA            area 
      -composite COMPOSITE  composite 
      -m [M]                reduced size, for movie
      -ovl OVL              overlays: c=coast,  b=borders, g=grid, 
                                      r=rivers, l=lakes,   C=cities,
                                      p=points, s=station, L=Legend
                                      A=all, N=none, D or no -ovl: defaults
      -v [V]                Start viewer
    
    zip filecontainscomment
    satpy_geo_01052024.zipMSG.py, MTI.py, HIMA.py, GOES.py,
    GEO_extrastuff.py
    added overlay option
    GEOstuff.zipGEOstuff.pyMTI format adapted to 'real' MTI
    see differences orig. file


    LEO scripts

    The scripts available in SPStools/LEOscripts are for one area/composite(set) only. You need to copy scripts to another filename for each different area/composite-set you want.

    Instead (or also) you can use the scripts described below. These LEO-scripts are very similar to the original ones, but they contain options for composite, area etc.
    So no need to copy/maintain multiple scripts for each satellite.

    The LEOstuff.py available here is very similar to the original one, but it contains support for:

    If you don't need that you can use the original LEOstuff.py.

    Usage

     ./<script>.py [-h] [-t T] [-dn DN] [-sat SAT] [-mp MP] [-histtle] [-src SRC] [-dst DST] [-o O] [-area AREA] [-composite COMPOSITE] [-ovl OVL]  [-v [V]]
    
      -h, --help            show this help message and exit
      -t T                  time: YYYYmmDD
      -dn DN                D|N, D=Day, N=Night
      -sat SAT              A|B|C|X
      -mp [MP]              do multipass
      -histtle [HISTTLE]    get historical tle from spacetrack
      -src SRC              source dir., MUST be absolute path!
      -b B                  bulk: y|n.
      -dst DST              destination dir.
      -o O                  output file
      -area AREA            area 
      -composite COMPOSITE  composite 
      -ovl OVL              overlays: c=coast,  b=borders, g=grid, 
                                      r=rivers, l=lakes,   C=cities,
                                      p=points, s=station, L=Legend
                                      A=all, N=none, D or no -ovl: defaults
      -v [V]                Start viewer
    

    zip filecontainscomment
    satpy_leo_01052024.zipMSG.py, MTI.py, HIMA.py, GOES.py,
    LEO_extrastuff.py
    added overlay option
    LEOstuff.zipOriginal LEOstuff but...Adapted for using spacetrack


    Selector for satpy

    Updated 01-05-2024
    There are 2 main programs:

    satpy_selector

    This selector is a simple gui using above scripts (both GEO and LEO) You need also: You must add locations of your raw files into satpy_settings.py. This will create a menu in the selector with all locations. The gui: (geo and leo)

    If a polar satellite is choosen and earthmap.gif exists then the track and selected area will be shown:

    Now:

    Best is to start this in a command shell so you can see (error-)messages generated by the activated scripts, and also the path+name of the generated image file.

    satpy_settings.py contains 2 lists of satellites including the command to execute them:

    Don't change these lists, or know what you are doing! Note variable exe_cmd. You can choose here 2 methods to execute the scripts:

    satpy_selector.py uses lists defined in satpy_settings.py:

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



    Location of files

    Location satpy_selector.py: same location as for Metop.py etc.

    Area visualizer for satpy

    (version 2024.01.05, enhanced separation of areas, added scrollbars)

    This is a simple gui which shows all satpy-defined area's on an earth map. User-area's are also shown; all areas.yaml files known by satpy are used.
    Note: The location of the users-areas.yaml is defined by variable $SATPY_CONFIG_PATH.
    Zip-file contains both Python-script and an example earthmap file, but you can use any plate carree map with any size (width=2x height). No SPStool files are needed, just the satpy installation.

    (Note: this is also implemented in the satpy_selector, which shows then both track of selected satellite and selected area.)

    Usage:

      -h, --help  show this help message and exit
      -s S        size (multiplier fact.) image (1=org. size)
      -f F        plate carree image file
      -ac AC      colour area
      -m [M]      use menu instead of buttons
    
    
    Version 20240105:


    Problems with tkinter

    If your OS is Ubuntu then try this:
  • sudo apt-get install python3-tk
    See also https://realpython.com/python-gui-tkinter