Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing HRV-channel StackedAreaDefinition for native_msg-reader #299

Closed
sjoro opened this issue May 16, 2018 · 14 comments
Closed

Missing HRV-channel StackedAreaDefinition for native_msg-reader #299

sjoro opened this issue May 16, 2018 · 14 comments

Comments

@sjoro
Copy link
Collaborator

sjoro commented May 16, 2018

Code Sample, a minimal, complete, and verifiable piece of code

f = MSG4-SEVI-MSG15-0100-NA-20180502124243.556000000Z-NA.nat
nat = Scene(f, reader='native_msg')
nat.load(['HRV'])
tmp = nat.resample("seviri_0deg")
tmp.show(param)

Problem description

Resampling native format SEVIRI HRV-channel onto seviri_0deg-area produces a strange looking result. HRV channel requires a special StackedAreaDefinition as it is scanned in two parts.

Expected Output

Correctly resampled HRV channel ;)

@sjoro sjoro added the bug label May 16, 2018
@mraspaud mraspaud added this to the v0.9 milestone May 22, 2018
@marfel
Copy link

marfel commented Jun 12, 2018

I had a similar issue, except my target area is Central Europe only. To be able to properly remap the HRV channel, I transformed the HRV array into <xarray.DataArray (y: 11136, x: 11136)>, using the header information to properly fill in the scanlines. Then, it can be mapped exactly like the other channels.
Sorry this is a bit of a hack, and I haven't got the time to work through your contributer's guide right now, but here is a little patch that does this for me. It also fixes an issue I had with the SZA correction. Maybe it can be of use to someone.
satpy_patch.txt

@mraspaud
Copy link
Member

@sjoro will you have time to work on this before then end of next week ?

@sjoro
Copy link
Collaborator Author

sjoro commented Jun 13, 2018

@mraspaud yes, i'll have a look later this week or early next week. can't promise that I can get it working before the end of next week.

@mraspaud mraspaud modified the milestones: v0.9, v0.9.1 Jul 5, 2018
@djhoese djhoese modified the milestones: v0.9.1, v0.10 Aug 20, 2018
@Nitrofest
Copy link

Hi all,
I am not sure if my issue is the same. Could someone help, please? I am using Satpy to read the native format ".msg" files. I prefer to make the plots by myself, so I retrieve both reflectances and lat/lon data, and plot the RGB composite passing to Matplotlib's pcolormesh. Up to now, I've been working with full disk data and there was no problem. I read the lat/lon data with:

latlon=scn['VIS008'].area.get_lonlats()
lat=np.asarray(latlon[0])
lon=np.asarray(latlon[1])

Now, I need to read the HRV channel, and it seems that it has no lat/lon coordinates within the file:

latlon=scn['HRV'].area.get_lonlats()
AttributeError: 'DataArray' object has no attribute 'area'

scn['HRV']
<xarray.DataArray (y: 11136, x: 5568)>
Dimensions without coordinates: y, x
Attributes:
units: %
wavelength: (0.5, 0.7, 0.9)
sensor: seviri
platform_name: Meteosat-10
standard_name: toa_bidirectional_reflectance
start_time: [datetime.datetime(2017, 7, 24, 14, 45, 9, 772925)]
end_time: [datetime.datetime(2017, 7, 24, 15, 0, 9, 451257)]
name: HRV
resolution: 1000.134348869
calibration: reflectance
polarization: None
level: None
modifiers: ()
ancillary_variables: []

Could someone advise please how can I get the lat/lon coordinates for HRV channel?

@marfel
Copy link

marfel commented Oct 1, 2018

You could probably use the little patch I supplied a few comments back (I think it has not found its way into the code yet). Then for HRV you get an xarray of 11136 x 11136, for which you can calculate the coordinates by interpolating the VIS coordinates to the 11136 grid. No idea how accurate this, but for colorful pictures it should be ok, I guess ;)

@mraspaud
Copy link
Member

mraspaud commented Oct 2, 2018

It's still of our todo list, so it will be implemented eventually. I think I will have a look at this rather sooner than later (within a couple of weeks), but @marfel 's patch can be used in the meanwhile of course.

@mraspaud mraspaud self-assigned this Oct 2, 2018
@Nitrofest
Copy link

Thanks everyone, I was able to get the coordinates after using this patch
#376

@djhoese djhoese modified the milestones: v0.10, v0.11 Oct 9, 2018
@djhoese djhoese modified the milestones: v0.11, v0.12 Dec 19, 2018
@djhoese
Copy link
Member

djhoese commented Feb 6, 2019

@martin @sjoro any updates on this?

@djhoese djhoese modified the milestones: v0.12, v0.13 Feb 6, 2019
@sjoro
Copy link
Collaborator Author

sjoro commented Feb 6, 2019

@djhoese sorry, not from my side.

@djhoese djhoese modified the milestones: v0.13, v0.14 Mar 15, 2019
@mraspaud
Copy link
Member

mraspaud commented Apr 4, 2019

Will we have something to release on monday ? ;)

@sjoro
Copy link
Collaborator Author

sjoro commented Apr 4, 2019

ehrm... no. i've earmarked this enhancement for my todo list for Madison.

@mraspaud
Copy link
Member

mraspaud commented Apr 4, 2019

ok, good to know :) thanks

@mraspaud mraspaud removed this from the v0.14 milestone Apr 4, 2019
@ameraner
Copy link
Member

Hi all, I think this issue was closed by #985, and further improved by #1196.

@mraspaud
Copy link
Member

Perfect, closing this then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants