Pytroll/SatPy problems with GOES16 script


Daniele Guardigli
 

Hello,

attached there's a txt file with debug lines from GOES16.py.
Can anyone help me? Thanks


Daniele Guardigli


Ernst Lobsiger
 

Daniele,

Have you done point 6) of the HOWTO? It seems 'area' is not defined ...


...
6) Environment variables
------------------------

Pytroll/SatPy is mainly looking for two environment variables:

# Path and name of wavelet decompression tool xRITDecompress.exe
XRIT_DECOMPRESS_PATH=C:/EMCtools/exefiles/xRITDecompress.exe
This is only used if you want Satpy to handle decompression. This was not
available when I started my scripts. I set the path directly in the code.

# In this directory you manage your own configuration files locally. This is
really recommended if you begin to experiment with your own map projections.
These are defined in file areas.yaml where I added e.g. cyprus, isleofman, ..
PPP_CONFIG_DIR=C:/EMCtools/pppconfig

The original default files are found under the lengthy path (don't change those!):
C:\users\username\miniconda3\envs\pytroll\Lib\site-packages\satpy\etc\areas.yaml

Environment variables can be added/set for your user account by "googling" bottom left for "ENV".
Then you permanently add the variable name and variable value to your personal environment only.
(**DO NOT CHANGE OR DELETE OTHER ENVIRONMENT VARIABLES AND DO NOT TOUCH THE SYSTEM VARIABLES**.)

Of course they can also be set at the command prompt after opening a black Miniconda3 window:
set PPP_CONFIG_DIR=C:/EMCtools/pppconfig
As long as the black Miniconda3 window stays open, this environment variable is now known.

Finally they can be set easily in batch files before the Python scripts are invoked:
set PPP_CONFIG_DIR=C:/EMCtools/pppconfig




Ernst


Daniele Guardigli
 

Yes I did, and the area selected is "full_scan". On the batch file I wrote "set PPP_CONFIG_DIR=C:/EMCtools/pppconfig", like cmd files provided as example.


Il giorno lun 1 mar 2021 alle ore 14:33 Ernst Lobsiger via groups.io <ernst.lobsiger=belponline.ch@groups.io> ha scritto:
Daniele,

Have you done point 6) of the HOWTO? It seems 'area' is not defined ...


...
6) Environment variables
------------------------

Pytroll/SatPy is mainly looking for two environment variables:

# Path and name of wavelet decompression tool xRITDecompress.exe
XRIT_DECOMPRESS_PATH=C:/EMCtools/exefiles/xRITDecompress.exe
This is only used if you want Satpy to handle decompression. This was not
available when I started my scripts. I set the path directly in the code.

# In this directory you manage your own configuration files locally. This is
really recommended if you begin to experiment with your own map projections.
These are defined in file areas.yaml where I added e.g. cyprus, isleofman, ..
PPP_CONFIG_DIR=C:/EMCtools/pppconfig

The original default files are found under the lengthy path (don't change those!):
C:\users\username\miniconda3\envs\pytroll\Lib\site-packages\satpy\etc\areas.yaml

Environment variables can be added/set for your user account by "googling" bottom left for "ENV".
Then you permanently add the variable name and variable value to your personal environment only.
(**DO NOT CHANGE OR DELETE OTHER ENVIRONMENT VARIABLES AND DO NOT TOUCH THE SYSTEM VARIABLES**.)

Of course they can also be set at the command prompt after opening a black Miniconda3 window:
set PPP_CONFIG_DIR=C:/EMCtools/pppconfig
As long as the black Miniconda3 window stays open, this environment variable is now known.

Finally they can be set easily in batch files before the Python scripts are invoked:
set PPP_CONFIG_DIR=C:/EMCtools/pppconfig




Ernst



--
Daniele Guardigli


Ernst Lobsiger
 

On Mon, Mar 1, 2021 at 09:37 AM, Daniele Guardigli wrote:
Yes I did, and the area selected is "full_scan". On the batch file I wrote "set PPP_CONFIG_DIR=C:/EMCtools/pppconfig", like cmd files provided as example.
 
Daniele,

a closer look shows that you have all your hvs-1 files in a /default directory as is first setup by EUMETSAT.

!!! THIS IS *VERY* BAD !!!

This way you are mixing GOES16 and GOES17 files. I didn't think someone would do such %@!!££ things.
And of course there is no common full scan area for this. There is a short time work around but you really
have to fix your reception data structures to something useful in the "cast-client-channels_hvs-1.ini" file.

Short time Work Around in GOES16.py:
...
files = []
for b in needed_files[composite]:
    files = files + glob(segdir + '/' + 'OR_ABI-*' + str(b) + '*s' + Slo + '*.nc')
...

CHANGE THAT TO:

files = []
for b in needed_files[composite]:
    files = files + glob(segdir + '/' + 'OR_ABI-*' + str(b) + '_G16_s' + Slo + '*.nc')


And make the same changes with '_G17_s'  in GOES17.py for images of this SAT.

Regards,
Ernst





Daniele Guardigli
 

Hi Ernst, sorry for the bad mistake! I've left the ini file as it was  downloaded, without editing the file.
Could you attach me an example of your channels .ini file? Thank you

Il giorno lun 1 mar 2021 alle ore 19:19 Ernst Lobsiger via groups.io <ernst.lobsiger=belponline.ch@groups.io> ha scritto:
On Mon, Mar 1, 2021 at 09:37 AM, Daniele Guardigli wrote:
Yes I did, and the area selected is "full_scan". On the batch file I wrote "set PPP_CONFIG_DIR=C:/EMCtools/pppconfig", like cmd files provided as example.
 
Daniele,

a closer look shows that you have all your hvs-1 files in a /default directory as is first setup by EUMETSAT.

!!! THIS IS *VERY* BAD !!!

This way you are mixing GOES16 and GOES17 files. I didn't think someone would do such %@!!££ things.
And of course there is no common full scan area for this. There is a short time work around but you really
have to fix your reception data structures to something useful in the "cast-client-channels_hvs-1.ini" file.

Short time Work Around in GOES16.py:
...
files = []
for b in needed_files[composite]:
    files = files + glob(segdir + '/' + 'OR_ABI-*' + str(b) + '*s' + Slo + '*.nc')
...

CHANGE THAT TO:

files = []
for b in needed_files[composite]:
    files = files + glob(segdir + '/' + 'OR_ABI-*' + str(b) + '_G16_s' + Slo + '*.nc')


And make the same changes with '_G17_s'  in GOES17.py for images of this SAT.

Regards,
Ernst






--
Daniele Guardigli


Ernst Lobsiger
 

On Tue, Mar 2, 2021 at 01:29 AM, Daniele Guardigli wrote:
Could you attach me an example of your channels .ini file? Thank you
Daniele,

these *.ini files are highly TC station dependant. I have no idea what data you subscribed to and what
kind of data management and/or data processing you intend to setup. There is no "one size fits all"
solution. My files below are what I use under GNU/Linux. Just use the # comments to give you an idea.

Regards,
Ernst

P.S.
All my Python scripts also show in their headers the EUMETCast channels the data comes in.
This can change from time to time when EUMETSAT reorganizes the dissemination schedule.