PyTROLL/SatPy Starter Kit V3.


Ferdinand Valk
 

Ernst,

 

I suppose you included ‘hawaii’ in your sample script goes17.py as a training example. Added a quick area definition to areas.yaml in the pppconfig and got the attached .

In case of interest, I added:

-------

hawaii:

  description: hawaii

  projection:

    proj: stere

    ellps: WGS84

    lat_0: 20.50

    lon_0: -157.4

    lat_ts: 20.5

  shape:

    height: 1600

    width: 2844

  area_extent:

    lower_left_xy: [-800000.0, -450000.0]

    upper_right_xy: [800000.0, 450000.0]

------

Cheers,

Ferdinand


Ernst Lobsiger
 

On Sat, Jan 9, 2021 at 04:01 AM, Ferdinand Valk wrote:
I suppose you included ‘hawaii’ in your sample script goes17.py as a training example.
Ferdinand,

AFAIK I added 'hawaii' to the areas.yaml file distributed with V 3.0. Your area_extent is somewhat larger than mine. And the 'lat_ts' might not be necessary.
There is a similar case with 'japan' for Himawary-8. Does your environment variable not point to the new areas.yaml ?

Have fun,
Ernst


Ferdinand Valk
 

Ernst,

 

Yes you are right. The environment variable does correctly point to where it should, but I had replaced the areas.yaml with my own version, containing many personal additions. I didn’t realize that you had added new areas.

 

:-)

 

Ferdinand

 

From: MSG-1@groups.io On Behalf Of Ernst Lobsiger via groups.io
Sent: Saturday, 09 January, 2021 12:21
To: MSG-1@groups.io
Subject: Re: [MSG-1] PyTROLL/SatPy Starter Kit V3.

 

On Sat, Jan 9, 2021 at 04:01 AM, Ferdinand Valk wrote:

I suppose you included ‘hawaii’ in your sample script goes17.py as a training example.

Ferdinand,

AFAIK I added 'hawaii' to the areas.yaml file distributed with V 3.0. Your area_extent is somewhat larger than mine. And the 'lat_ts' might not be necessary.
There is a similar case with 'japan' for Himawary-8. Does your environment variable not point to the new areas.yaml ?

Have fun,
Ernst


Ferdinand Valk
 

Ernst,

 

I have now completed all your scripts with my own settings, and did not run into any inconvenience. The multiscene addition works very smoothly and the same is true for the night light options for Noaa-20 and Suomi.

There is plenty of room for further tuning to one’s personal interest and automation is easy. In short: an excellent howto for many Eumetcast users who feel reluctant to take the jump. Thanks again for the fresh impulse into the satellite world for both hobbyist and advanced user.

 

All,

 

Don’t hesitate and follow the HowTo that Ernst has made available. It is seriously easy to follow and implement, just as is the case with David’s suite of programs, and it brings direct result to your screen. Apart from widening the possibilities to work with the current data, a great advantage is that it opens up a road into the future. The people behind Pytroll/Satpy are continuously expanding the scope of work and improving on what already exists. It is for most people the only way to smoothly transition to MTG and Sentinel 5 onwards without having to spend big money.

So, take a first dip into this fresh water!

 

Good luck.

Ferdinand


Ernst Lobsiger
 

Ferdinand,

thanks for the nice words. I hope indeed that the Club will grow to a size where Windows members can help each other. Don't forgent that we can be part
of an ongoing development of something huge. We will from time to time run into minor problems or bugs and must accept that these are often not the topmost
priorities of the main developers. As an example of such a SatPy bug the coast and grid lines west of London are sometimes missing in 'omerc_bb' areas.

Another problem may arise if your files are not the compressed way I use them due to my 2 PC setup. But Hartmut has already shown that with a minimum
Python such problems can be resolved quite quickly. The possibilities how the user can configure the outcome of *his* pictures are certainly unprecedented.

Have fun,
Ernst


Ian Deans
 

On 09/01/2021 19:03, Ferdinand Valk wrote:

All,
Don’t hesitate and follow the HowTo that Ernst has made available. It is seriously easy to follow and implement, just as is the case with David’s suite of programs, and it brings direct result to your screen. Apart from widening the possibilities to work with the current data, a great advantage is that it opens up a road into the future. The people behind Pytroll/Satpy are continuously expanding the scope of work and improving on what already exists. It is for most people the only way to smoothly transition to MTG and Sentinel 5 onwards without having to spend big money.
So, take a first dip into this fresh water!
Good luck.
Ferdinand
===========================================================================

On the other hand if like me ( and I don't consider myself a fool ) you have zero knowledge of computer programming and zero knowledge of computer jargon ( and that is very important ) you will have little chance of getting past the first few lines --- that is the reality.

Regards
Ian.


Ernst Lobsiger
 

On Sat, Jan 9, 2021 at 12:16 PM, Ian Deans wrote:
On the other hand if like me ( and I don't consider myself a fool ) you have zero knowledge of computer programming and zero knowledge of computer jargon ( and that is very important ) you will have little chance of getting past the first few lines --- that is the reality.
Ian,

have you tried to read the HOWTO inside the Starter Kit V3.0? If not, *DO IT* and then tell us how far you got!

Ernst


Douglas Deans
 

On 09/01/2021 19:03, Ferdinand Valk wrote:
Ernst,
I have now completed all your scripts with my own settings, and did not run into any inconvenience. The multiscene addition works very smoothly and the same is true for the night light options for Noaa-20 and Suomi.
There is plenty of room for further tuning to one’s personal interest and automation is easy. In short: an excellent howto for many Eumetcast users who feel reluctant to take the jump. Thanks again for the fresh impulse into the satellite world for both hobbyist and advanced user.
All,
Don’t hesitate and follow the HowTo that Ernst has made available. It is seriously easy to follow and implement, just as is the case with David’s suite of programs, and it brings direct result to your screen. Apart from widening the possibilities to work with the current data, a great advantage is that it opens up a road into the future. The people behind Pytroll/Satpy are continuously expanding the scope of work and improving on what already exists. It is for most people the only way to smoothly transition to MTG and Sentinel 5 onwards without having to spend big money.
So, take a first dip into this fresh water!
Good luck.
Ferdinand
============================================================================

I echo your words Ferdinand.
However just one question if I may.
Since succeeding with V1, apart from changing/developing scripts etc., I have not updated anything.
Presumably I now need to start again with a new update of Miniconda and Pytroll. That seems to me to be a complete start from scratch. I question the benefits when the arrangement I have at the moment seems to handle all my needs admirably. I am just not sure what the benefits are and if they outweigh all the additional work.

Best regards,
Douglas.


Ian Deans
 

On 09/01/2021 20:26, Ernst Lobsiger via groups.io wrote:
On Sat, Jan 9, 2021 at 12:16 PM, Ian Deans wrote:
On the other hand if like me ( and I don't consider myself a fool )
you have zero knowledge of computer programming and zero knowledge
of computer jargon ( and that is very important ) you will have
little chance of getting past the first few lines --- that is the
reality.
Ian,
have you tried to read the HOWTO inside the Starter Kit V3.0? If not, *DO IT* and then tell us how far you got!
Ernst
Yes I have Ernst.

Got to the bit about downloads directory ---- what is that I do not use it, my downloads go to a personal folder in Windows 10.

Regards
Ian.


Ernst Lobsiger
 

On Sat, Jan 9, 2021 at 12:55 PM, Ian Deans wrote:
Got to the bit about downloads directory ---- what is that I do not use it, my downloads go to a personal folder in Windows 10.
Ian,

no problem. Two words for the same thing. Before Windows with no graphics everybody used the term directory. The name folder appeared with these icons that unfortunately hide what's behind.

Open your Downloads Folder with the Windows Explorer and look what you have there as files.

Then open this dreadful CMD black "DOS" window, left click in the black to get the "focus", at the prompt > type cd Downloads, press Enter, you are in your folder Dowloads.
Your prompt will look something like C:\Users\ian\Downloads >. It's a nested structure. Type dir and press Enter. You'll see the same files as before one file name per line.

Good luck
Ernst


Ian Deans
 

On 09/01/2021 21:19, Ernst Lobsiger via groups.io wrote:
On Sat, Jan 9, 2021 at 12:55 PM, Ian Deans wrote:
Got to the bit about downloads directory ---- what is that I do not
use it, my downloads go to a personal folder in Windows 10.
Ian,
no problem. Two words for the same thing. Before Windows with no graphics everybody used the term directory. The name folder appeared with these icons that unfortunately hide what's behind.
Open your Downloads Folder with the Windows Explorer and look what you have there as files.
Then open this dreadful CMD black "DOS" window, left click in the black to get the "focus", at the prompt > type cd Downloads, press Enter, you are in your folder Dowloads.
Your prompt will look something like C:\Users\ian\Downloads >. It's a nested structure. Type dir and press Enter. You'll see the same files as before one file name per line.
Good luck
Ernst
Ernst I do not want to bother you any more with this. Without doing any of the above I can tell you I do not have a download folder in C:\Users\ian\. It may have been deleted a few years ago, to allow me better control.

Thanks
Ian.


Ernst Lobsiger
 

Ian,

I assumed that you use "ian" as Windows user name. If you open the black CMD window you should see C:\Users\YouWindowsUserName.
Still assuming your username is "ian" then in the black Window you can try > cd Desktop, Enter, and you are in your Folder Desktop. C:\Users\ian\Desktop> dir then Enter should list the files on your Desktop (unless you have deleted your Desktop as well ...). To install Miniconda3 you can also put the downloaded Installer.exe on the Desktop and do as described from there.

You can forget about the "hash" comparison. This is only extra, super security. You probably have a virus scanner anyway.

Regards,
Ernst





Am 09.01.2021 22:59, schrieb Ian Deans via groups.io:

On 09/01/2021 21:19, Ernst Lobsiger via groups.io wrote:
On Sat, Jan 9, 2021 at 12:55 PM, Ian Deans wrote:
Got to the bit about downloads directory ---- what is that I do not
use it, my downloads go to a personal folder in Windows 10.
Ian,
no problem. Two words for the same thing. Before Windows with no graphics everybody used the term directory. The name folder appeared with these icons that unfortunately hide what's behind.
Open your Downloads Folder with the Windows Explorer and look what you have there as files.
Then open this dreadful CMD black "DOS" window, left click in the black to get the "focus", at the prompt > type cd Downloads, press Enter, you are in your folder Dowloads.
Your prompt will look something like C:\Users\ian\Downloads >. It's a nested structure. Type dir and press Enter. You'll see the same files as before one file name per line.
Good luck
Ernst
Ernst I do not want to bother you any more with this. Without doing
any of the above I can tell you I do not have a download folder in
C:\Users\ian\. It may have been deleted a few years ago, to allow me
better control.
Thanks
Ian.


Ernst Lobsiger
 

On Sat, Jan 9, 2021 at 12:33 PM, Douglas Deans wrote:
I am just not sure what the benefits are and if they outweigh all the additional work.
Douglas,

of course you can just use what you have from V1.0. But V3.0 is a leap step forward. You get fine control of overlays like coast lines, borders, rivers, POIs like cities or your station.
You also get additional Satellites like Sentinel-3A/B and can choose from a plenthora of composites. And last but not least the quality of my Python code has been much improved.
To give V3 a GO you do not have to start from scratch. It should be possible just to upgrade the Miniconda3 and Pytroll/Satpy environment you have. You can do this as follows:

Open a Minicoonda3 CMD Window and at the prompt "(base) C:\Users\yourname>" just enter "conda update conda" to get the latest version of conda
Then change into the Pytroll environment with "conda activate pytroll"
The prompt should look now "(pytroll) C:\Users\yourname>"  and a "conda list satpy" will show you the Satpy version number you are working with (write that down for Murphy)
The latest Satpy version is 0.25 today. You update at the above prompt  "(pytroll) C:\Users\yourname>" with "conda update satpy" (this may take a while) and you are done!

Then you can give V3.0 scripts a try with your updated version of Miniconda3 and Satpy like either a) or b):

a) Either by renaming your current EMCtools and EMCdata to EMCtoolsV1 and EMCdataV1 and just installing V3 as EMCtools and EMCdata and *copy* the whole coastline stuff from V1 to V3
If you do this the scripts in EMCtoolsV1 will not work anymore due to the renaming of the top directory but everything should work in your new EMCtools and EMCdata (which are now both V3).
You just have to adapt segdir in the V3 scripts. You can keep your V1 stuff as archive for what you have done as long as needed.

b) Or you can let everything as is and install V3 in subdirectories like "C:\V30\EMCtools" and "D:\V30\EMCdata" then *copy* the whole coastline stuff from V1 to V3
You can now work with both versions using the same updated Miniconda3. The only minor problem V3 will still use the pppconfig from V1 as the environment variable is pointing there.
This means that a couple of newly defined areas like 'hawaii', 'japan', etc. are missing. If you never changed your V1 .../pppconfig/areas.yaml you can replace it with V3 .../pppconfig/areas.yaml
You will have to adapt segdir and  toodrp = 'C:\V30' and datdrp = 'D:\V30' in the V3 scripts.

If you want to ditch V3 then
a) delete the (V3)  "C:\EMCtools" and (V3) "D:\EMCdata" and rename the V1 versions back.
b) delete the  "C:\V30 and the "D:\V30     (...that contain (V3) EMCtools and (V3) EMCdata).


Hope this helps
Ernst

P.S. Also be aware that we have now experienced users on V3 like Ferdinand and Hartmut (I suppose Graham will follow soon) that can help you in case of Windows problems.


Douglas Deans
 

On 10/01/2021 12:21, Ernst Lobsiger via groups.io wrote:
On Sat, Jan 9, 2021 at 12:33 PM, Douglas Deans wrote:
I am just not sure what the benefits are and if they outweigh all
the additional work.
Douglas,
of course you can just use what you have from V1.0. But V3.0 is a leap step forward. You get fine control of overlays like coast lines, borders, rivers, POIs like cities or your station.
You also get additional Satellites like Sentinel-3A/B and can choose from a plenthora of composites. And last but not least the quality of my Python code has been much improved.
To give V3 a GO you do not have to start from scratch. It should be possible just to upgrade the Miniconda3 and Pytroll/Satpy environment you have. You can do this as follows:
Open a Minicoonda3 CMD Window and at the prompt "(base) C:\Users\yourname>" just enter "conda update conda" to get the latest version of conda
Then change into the Pytroll environment with "conda activate pytroll"
The prompt should look now "(pytroll) C:\Users\yourname>"  and a "conda list satpy" will show you the Satpy version number you are working with (write that down for Murphy)
The latest Satpy version is 0.25 today. You update at the above prompt "(pytroll) C:\Users\yourname>" with "conda update satpy" (this may take a while) and you are done!
Then you can give V3.0 scripts a try with your updated version of Miniconda3 and Satpy like either a) or b):
a) Either by renaming your current EMCtools and EMCdata to EMCtoolsV1 and EMCdataV1 and just installing V3 as EMCtools and EMCdata and *copy* the whole coastline stuff from V1 to V3
If you do this the scripts in EMCtoolsV1 will not work anymore due to the renaming of the top directory but everything should work in your new EMCtools and EMCdata (which are now both V3).
You just have to adapt segdir in the V3 scripts. You can keep your V1 stuff as archive for what you have done as long as needed.
b) Or you can let everything as is and install V3 in subdirectories like "C:\V30\EMCtools" and "D:\V30\EMCdata" then *copy* the whole coastline stuff from V1 to V3
You can now work with both versions using the same updated Miniconda3. The only minor problem V3 will still use the pppconfig from V1 as the environment variable is pointing there.
This means that a couple of newly defined areas like 'hawaii', 'japan', etc. are missing. If you never changed your V1 .../pppconfig/areas.yaml you can replace it with V3 .../pppconfig/areas.yaml
You will have to adapt segdir and  toodrp = 'C:\V30' and datdrp = 'D:\V30' in the V3 scripts.
If you want to ditch V3 then
a) delete the (V3)  "C:\EMCtools" and (V3) "D:\EMCdata" and rename the V1 versions back.
b) delete the  "C:\V30 and the "D:\V30     (...that contain (V3) EMCtools and (V3) EMCdata).
Hope this helps
Ernst
P.S. Also be aware that we have now experienced users on V3 like Ferdinand and Hartmut (I suppose Graham will follow soon) that can help you in case of Windows problems.
===================================================================================

Many thanks Ernst. Ferdinand was also good enough to advise me as to what was updated and the nature of the changes. So yes I will do the update and do it properly.
I did not update Miniconda/Pytroll up to now so I will do that by removing the old versions via Control Panel/Programs for a clean install. One thing we have plenty of at the moment is time in the house. The only thing I hope to go out for soon is my vaccination. !

Thanks again Ernst for both the work you have put into this but also your encouragement to the black tea shirt group <smile>.

Best regards,
Douglas.


Graham Woolf
 

Hi All

Have finally got Windows 10 re-installed along with python perl etc etc

Have got BDADataEx running too with my TBS5927 so am now waiting for my 6909X to arrive tomorrow but I dont anticipate too many problems

I also have all my Version 1.0 python scripts running again so will have a look at V3 later in the week

Regards

Graham


Ferdinand Valk
 

Ernst,

 

While creating a script for stacked night-dnb for Noaa-20 or Suomi (see sample working version attached), I do not manage to include the night passes from before midnight.

I would not know how to modify your formulation:

files = glob(segdir + '/' + 'SVDNBC_j01_d' + Yea + Mon + Day + '*_eum_ops.h5')

to include the DNBC files from the evening before, as ‘Day’ is already defined in the file name and the previous day includes not only the evening DN passes, but also the morning ones.

Do you have a suggestion?

 

Cheers,

Ferdinand

 


Ernst Lobsiger
 

Ferdinand,

I see your problem. As your night pass is around LTDN=01:30 local time and typical revolution time is 100 min the pass before can be from Yesterday.
That means several things. We have to get the files from two days. You have to to know what is Yesterday. If Day is 01 Yesterday can be 28,29,30,31 with
the month or even year changed as well. From Yesterday we just have to take the late evening passes. Then inside the loop we have to reread all that
from the filenames again to get the satellite position. Once you got timmax (which will be from Day in "UNIX seconds") everything should work as before.

This can all be done but it's not just changing the glob() statemen :-) ... I'll think of it.

Regards,
Ernst


Douglas Deans
 

Ernst V3 all downloaded and now have to start adapting scripts.
Again my thanks for all your efforts and hard work.
Just one comment if I may.
In V1 apart from changing 3 lines in the scripts to suit your own file locations it was possible to try out a number of the provided commands which gave immediate images and was a huge help in the learning curves.
The commands you provide in V3 do not relate to any of the LEO or GEO scripts without alteration to script names etc.
Newbies will find this really difficult to understand.

By the way is 'toodrp'and 'datdrp' what used to be tmpdir and imgdir.

Regards,
Douglas.


Ferdinand Valk
 

Douglas,

Basically almost nothing needs to be changed in the scripts. Point by point:

You need to fill in per script where the data can be found (example: segdir = "F:/MSG/Images/Goes-16-netcdf"
The function of toodrp and datdrp => define where your tools and data are to be found.
Whereas you had to define before the full path of the EMCtools directory, now it suffices to indicate the drive only (most likely 'C:'
The same for the EMCdata directory, most likely 'D:' or wherever you have installed it. The remainder of the path is standardized in the script.
Furthermore:
You choose the [composite = '--'] just as you did before
The 'area' just as before

And that is it. Images should be produced without further ado.
If that is working, then you can start playing with different settings, annotation, grids and the like. But with the very few changes you should be up and running.

Hope this helps.

Kind regards,
Ferdinand

-----Original Message-----
From: MSG-1@groups.io On Behalf Of Douglas Deans via groups.io
Sent: Monday, 11 January, 2021 20:58
To: MSG-1@groups.io
Subject: Re: [MSG-1] PyTROLL/SatPy Starter Kit V3.

Ernst V3 all downloaded and now have to start adapting scripts.
Again my thanks for all your efforts and hard work.
Just one comment if I may.
In V1 apart from changing 3 lines in the scripts to suit your own file locations
it was possible to try out a number of the provided commands which gave
immediate images and was a huge help in the learning curves.
The commands you provide in V3 do not relate to any of the LEO or GEO
scripts without alteration to script names etc.
Newbies will find this really difficult to understand.

By the way is 'toodrp'and 'datdrp' what used to be tmpdir and imgdir.

Regards,
Douglas.


Ernst Lobsiger
 

On Mon, Jan 11, 2021 at 12:58 PM, Douglas Deans wrote:
By the way is 'toodrp'and 'datdrp' what used to be tmpdir and imgdir.
Douglas,

segdir is in V3 as before in V1 the location of your files

toodrp is Drive and Path to where you have EMCtools so if you have EMCtoools on top of C:  (in Windows C:\EMCtools) toodrp = 'C:'   as already set
datdrp is Drive and Path to where you have EMCdata  so if you have EMCdata  on top  of D:  (in Windows D:\EMCdata)  datdrp = 'D:'   as already set

So normally you just have to change one single line (segdir) to get your first image that you find in .../EMCdata/images


Regards,
Ernst

P.S.
If you have different needs and want to put EMCtools e.g. in Windows on F:\some_path_wihout_spaces\EMCtools
then you have to set in the scrips  toodrp = 'F :/some_path_wihout_spaces'
EMCdata and datdrp work the same way