Date   
Re: Pytroll/SatPy for EUMETCast

Graham Woolf
 

Hi Ernst

No I dont - I run them from a windows batch file

That starts a cmd window from C:\WINDOWS\system32>

I dont know another way of running them unless you do something different

Kind Regards

Graham

Re: Pytroll/SatPy for EUMETCast

Ernst Lobsiger
 

On Sun, May 24, 2020 at 02:16 AM, Douglas Deans wrote:
Still thanks to your help I have reached levels I did not expect in a relatively short time and hope to make more progress.
Douglas,

I'm pleased to see you are making good progress. I'm not a real Python programmer and
I never did Object Oriented Programming (OOP) as in C++ and also heavily used in Python.

But it certainly helps to have a *minimum* Python background that can
easily be trained with the most basic chapters here (in your browser):

https://www.w3schools.com/python/default.asp

It also helps to have a better Editor with proper syntax highlighting than
what the common bread and butter (Notepad) Editor of Windows 7/10 offers.

On my GNU/Linux systems I use the rather archaic Midnight Commander (mc).
Under Windows 7/10 I'd probably use something very light like Notepad++.

https://notepad-plus-plus.org/

If you try this just tell it that the language is Python (and maybe
coding utf-8) and all my scripts will look much more comprehensible.

Best regards,
Ernst

Re: Pytroll/SatPy for EUMETCast

Douglas Deans
 

On 24/05/2020 10:02, Ernst Lobsiger via groups.io wrote:
On Sun, May 24, 2020 at 01:44 AM, Douglas Deans wrote:
Not the best time, as we approach the summer solstice to perfect
this for DNB and less likely to get images such as this one from
winter (using Hugo's program), at this time of the year.
Hello Douglas,
I noticed you have a very nice FY-3D image of Greenland and Iceland on TWITTER.
Yes, not the best time for DNB like my Pytroll/Satpy auroras from the Hudson Bay ...
Regards,
Ernst
======================================================================

Very nice indeed Ernst. Auroras are incredible on the DNB.
Thanks for your kind words about my image.
Starting to get the hang of the Pyroll/Satpy system but changing scripts still has a lot of trial and error involved. No programming background whatsoever does make things more difficult.

Still thanks to your help I have reached levels I did not expect in a relatively short time and hope to make more progress.

Best regards,
Douglas

Re: Pytroll/SatPy for EUMETCast

Ernst Lobsiger
 

On Sun, May 24, 2020 at 01:44 AM, Douglas Deans wrote:
Not the best time, as we approach the summer solstice to perfect this for DNB and less likely to get images such as this one from winter (using Hugo's program), at this time of the year.
Hello Douglas,

I noticed you have a very nice FY-3D image of Greenland and Iceland on TWITTER.
Yes, not the best time for DNB like my Pytroll/Satpy auroras from the Hudson Bay ...

Regards,
Ernst

Re: Pytroll/SatPy for EUMETCast

Douglas Deans
 

On 23/05/2020 18:20, Ernst Lobsiger via groups.io wrote:
On Sat, May 23, 2020 at 08:46 AM, Graham Woolf wrote:
(pytroll) C:\WINDOWS\system32>python
T:\PythonScripts\WindowsScripts\Noaa_20_NIG.py 20200522
Graham,
do you start the scripts from the Windows system directory? This is rather unusual to say the least.
I fixed the grid labels (thanks Christian), all working well now. Grasp it and explain it to Douglas :-).
Cheers,
Ernst
====================================================================

Many thanks for the script Ernst. I have your script working but still some fine tuning to do for my set up. I certainly could not have made that up from scratch !
Not the best time, as we approach the summer solstice to perfect this for DNB and less likely to get images such as this one from winter (using Hugo's program), at this time of the year.

Appreciate your help.

Best regards,
Douglas.

Re: Pytroll/SatPy for EUMETCast

Ernst Lobsiger
 

On Sat, May 23, 2020 at 08:46 AM, Graham Woolf wrote:
(pytroll) C:\WINDOWS\system32>python T:\PythonScripts\WindowsScripts\Noaa_20_NIG.py 20200522
Graham,

do you start the scripts from the Windows system directory? This is rather unusual to say the least.

I fixed the grid labels (thanks Christian), all working well now. Grasp it and explain it to Douglas :-).

Cheers,
Ernst

Re: Pytroll/SatPy for EUMETCast

Ernst Lobsiger
 

Graham,

First thing enable debugging here:

# Why to hell is it not working?
from satpy.utils import debug_on
debug_on()

Second is good old print() debugging. e.g what does your filelist look like?

# Sorting seems not necessary?!
bestfiles = sorted(bestfiles)
print(bestfiles)


Have you really made all necessary changes to adapt it to your system?
....

Regards,
Ernst

Re: Pytroll/SatPy for EUMETCast

Graham Woolf
 

Hi Ernst

Thanks very much for the script

Unfortunately it doesnt run on my system
I get this

(pytroll) C:\WINDOWS\system32>python T:\PythonScripts\WindowsScripts\Noaa_20_NIG.py 20200522
The following datasets were not created and may require resampling to be generated: DatasetID(name='night_overview', wavelength=None, resolution=None, polarization=None, calibration=None, level=None, modifiers=None)
c:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\pyproj\crs\crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj_string = self.to_proj4()
c:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in less_equal
  return func(*(_execute_task(a, cache) for a in args))
c:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in less_equal
  return func(*(_execute_task(a, cache) for a in args))

(pytroll) C:\WINDOWS\system32>call C:\Users\graha\miniconda3\condabin\conda.bat deactivate

I do find these python  error messages somewhat difficult to decipher

Kind Regards

Graham

Re: Pytroll/SatPy for EUMETCast

Ernst Lobsiger
 

On Sat, May 23, 2020 at 06:54 AM, Graham Woolf wrote:
That would be great thanks - it looks a nice composite to use
Graham,

here is a first version that works. Unfortunately I have a problem with grid labels.
This used to work just fine 2 years ago. I will have to sort it with Christian Peters.

Anyway it should give you a preliminary idea how to apply lat/lon grids in satpy.

Regards,
Ernst

Re: Pytroll/SatPy for EUMETCast

Graham Woolf
 

Hi Ernst

That would be great thanks - it looks a nice composite to use

The bit about the DNB and M Bands went past me sorry -I thought they were all loaded

Kind Regards

Graham

Re: Pytroll/SatPy for EUMETCast

Ernst Lobsiger
 

On Sat, May 23, 2020 at 04:25 AM, Graham Woolf wrote:
Required file type 'compact_m' not found or loaded for 'M15'
Graham,

as I said before: Needs DNB + M-Bands (M15). This is a little bit tricky as filenames are different.
I'll publish the script once I have a Windows 10 working version. It's a combination of DNB + VIS.

Regards,
Ernst

Re: Pytroll/SatPy for EUMETCast

Graham Woolf
 

Hi Ernst

I have tried both composites - the dynamic_dnb worked well

With the night overview I get the following errors

(pytroll) C:\WINDOWS\system32>python T:\PythonScripts\WindowsScripts\Suomi_NPP_DNB.py 20200523
Required file type 'compact_m' not found or loaded for 'longitude_m'
Required file type 'compact_m' not found or loaded for 'latitude_m'
Required file type 'compact_m' not found or loaded for 'M15'
The following datasets were not created and may require resampling to be generated: DatasetID(name='night_overview', wavelength=None, resolution=None, polarization=None, calibration=None, level=None, modifiers=None)
Traceback (most recent call last):
  File "c:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\satpy\readers\__init__.py", line 301, in __getitem__
    return super(DatasetDict, self).__getitem__(item)
KeyError: 'night_overview'

Is that a sign of missing data

Regards

Graham

Re: Pytroll/SatPy for EUMETCast

Graham Woolf
 

Hi Ernst

Great - they look a lot better - Ill try both of them

Still got to get my head around grids

Thanks

Graham

Re: Pytroll/SatPy for EUMETCast

Ernst Lobsiger
 

On Sat, May 23, 2020 at 03:02 AM, Graham Woolf wrote:
cmdstr = "C:/Tools/ImageMagick-7.0.10-Q16/magick convert MSG4.png -equalize -flip  ............
Graham,

yes that's how MSG1 worked under GNU/Linux too. In the next version of the kit I'll probably recommend a full IM install.
Had a quick look at NOAA-20 DNB. Used 'dynamic_dnb' and 'night_overview' (the latter uses both M and DNB bands!).

Regards,
Ernst

Re: Pytroll/SatPy for EUMETCast

Graham Woolf
 

Hi Ernst

I do have a full install of ImageMagik and this is the line of code . It just worked with no errors and the image looks as though its been equalised

cmdstr = "C:/Tools/ImageMagick-7.0.10-Q16/magick convert MSG4.png -equalize -flip  ............



Ill try that composite too

Many Thanks

Graham

Re: Pytroll/SatPy for EUMETCast

Ernst Lobsiger
 

On Sat, May 23, 2020 at 01:53 AM, Graham Woolf wrote:
By the way I did manage to process the MTG1 data - it took a few minutes though
Graham,

Do you have a full Image Magick install? Your binaries are in the Windows PATH and
you have to use "magick convert" instead of convert? If so, did it -equalize to light up
the *.png image you got from MSG1? My solution in the starter kit is just a copy of
convert.exe from a minimal portable version that you must use giving the full path.
But this version does not do -equalize at all (even if it says to do so in the usage)!

Will have a look at the DNB scripts. Have you tried composite='histogram_dnb' ?

Regards,
Ernst

Re: Pytroll/SatPy for EUMETCast

Graham Woolf
 

Hi Ernst

I'm not sure that my NPP Day/Night files are processing correctly

I have attached my file of the UK from last night and I am pretty sure the sky was clear down here yet I dont see any city lights.

Is your image the same and are there any settings or different composites I can use

All my recent images have been like this

Kind Regards

Graham

By the way I did manage to process the MTG1 data - it took a few minutes though

Re: Land mask for HRPT Reader

Hamdan
 

Finally i can generate good looking sst maps.

Thanks David

Regards
Mr. Hamdan

Re: Some thoughts towards the future....

Graham Woolf
 

Hi Ernst

Thanks

I will download the data and give it a go

Kind Regards

Graham

Re: Some thoughts towards the future....

Ernst Lobsiger
 

On Fri, May 22, 2020 at 07:21 AM, Graham Woolf wrote:
Where can I find the link for the python scripts you used for MTG-1
Graham,

Here is a quick and dirty script that makes an MTG-1 image. IM cannot -equalize it under Windows
and the picture is rather dark. Don't know how to give IM portable convert.exe enough memory ...

Regards
Ernst