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

Fix native_msg reader for ROI input and multi-part order file patterns #282

Merged
merged 5 commits into from
May 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
51 changes: 34 additions & 17 deletions satpy/etc/areas.def
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ REGION: iber {
AREA_EXTENT: (-342379.698, 4432580.06, 723701.52, 5029648.75)
};

REGION: SouthAmerica {
NAME: South America
PCS_ID: geos0
PCS_DEF: proj=geos,lon_0=0.0,a=6378169.00,b=6356583.80,h=35785831.0
XSIZE: 3000
YSIZE: 1200
AREA_EXTENT: (-5570248.4773392612, -4263473.5610361192, -384719.90821206354, 1339786.2707295895)
};
REGION: SouthAmerica {
NAME: South America
PCS_ID: geos0
PCS_DEF: proj=geos,lon_0=0.0,a=6378169.00,b=6356583.80,h=35785831.0
XSIZE: 3000
YSIZE: 1200
AREA_EXTENT: (-5570248.4773392612, -4263473.5610361192, -384719.90821206354, 1339786.2707295895)
};

REGION: brazil2 {
NAME: brazil, platecarree
Expand All @@ -72,12 +72,12 @@ REGION: sudeste {
};

REGION: SouthAmerica_flat{
NAME: South America flat
NAME: South America flat
PCS_ID: eqc0
PCS_DEF: proj='eqc', a=6378137.0, b=6378137.0, units='m'
PCS_DEF: proj='eqc', a=6378137.0, b=6378137.0, units='m'
XSIZE: 1442
YSIZE: 1213
AREA_EXTENT: (-8326322.8279089704,-4609377.085697311,-556597.45396636787, 1535833.8895192828 )
AREA_EXTENT: (-8326322.8279089704,-4609377.085697311,-556597.45396636787, 1535833.8895192828 )
};


Expand Down Expand Up @@ -269,6 +269,24 @@ REGION: met09globeFull {
AREA_EXTENT: (-5570248.4773392612, -5567248.074173444, 5567248.074173444, 5570248.4773392612)
};

REGION: seviri_0deg {
NAME: Full globe MSG image 0 degrees
PCS_ID: geos0
PCS_DEF: proj=geos, lon_0=0, a=6378169.00, b=6356583.80, h=35785831.0
XSIZE: 3712
YSIZE: 3712
AREA_EXTENT: (-5570248.4773392612, -5567248.074173444, 5567248.074173444, 5570248.4773392612)
};

REGION: seviri_iodc {
NAME: Full globe MSG image 41.5 degrees
PCS_ID: geos0
PCS_DEF: proj=geos, lon_0=41.5, a=6378169.00, b=6356583.80, h=35785831.0
XSIZE: 3712
YSIZE: 3712
AREA_EXTENT: (-5570248.4773392612, -5567248.074173444, 5567248.074173444, 5570248.4773392612)
};

REGION: msg_resample_area {
NAME: Full globe MSG image 20.75 degrees
PCS_ID: geos0
Expand Down Expand Up @@ -567,7 +585,7 @@ REGION: eport1 {
};

REGION: eport10 {
NAME: eport reduced resolution
NAME: eport reduced resolution
PCS_ID: ps90n
PCS_DEF: proj=stere,lat_0=90,lon_0=0,ellps=WGS84,units=m
XSIZE: 1057
Expand All @@ -576,7 +594,7 @@ REGION: eport10 {
};

REGION: eport4 {
NAME: eport reduced resolution
NAME: eport reduced resolution
PCS_ID: ps90n
PCS_DEF: proj=stere,lat_0=90,lon_0=0,ellps=WGS84,units=m
XSIZE: 2642
Expand All @@ -585,7 +603,7 @@ REGION: eport4 {
};

REGION: eport2 {
NAME: eport reduced resolution
NAME: eport reduced resolution
PCS_ID: ps90n
PCS_DEF: proj=stere,lat_0=90,lon_0=0,ellps=WGS84,units=m
XSIZE: 5285
Expand Down Expand Up @@ -669,7 +687,7 @@ REGION: ease_nh {

REGION: barents_sea {
NAME: Barents and Greenland seas
PCS_ID: barents_sea
PCS_ID: barents_sea
PCS_DEF: proj=stere,ellps=WGS84,lat_0=90,lon_0=40,lat_ts=75
XSIZE: 3000
YSIZE: 1700
Expand Down Expand Up @@ -809,7 +827,7 @@ REGION: northamerica_10km {

# ------------------------------------------------------------------

proj4_string =
proj4_string =

REGION: romania {
NAME: Romania - 3km
Expand Down Expand Up @@ -894,4 +912,3 @@ REGION: robinson {
YSIZE: 3296
AREA_EXTENT: (-2049911.5256036147, 5326895.725982913, 2049911.5256036168, 8625155.12857459)
};

4 changes: 1 addition & 3 deletions satpy/etc/readers/native_msg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ reader:
file_types:
native_msg:
file_reader: !!python/name:satpy.readers.native_msg.NativeMSGFileHandler ''
file_patterns: ['{satid:4s}-{instr:4s}-MSG{product_level:2d}-0100-NA-{processing_time1:%Y%m%d%H%M%S.%f}000Z-{processing_time2:%Y%m%d%H%M%S}-{order_id:d}.nat',
'{satid:4s}-{instr:4s}-MSG{product_level:2d}-0100-NA-{processing_time1:%Y%m%d%H%M%S.%f}000Z-NA.nat',
'{satid:4s}-{instr:4s}-MSG{product_level:2d}-0100-NA-{processing_time1:%Y%m%d%H%M%S.%f}000Z-{order_id:d}.nat']
file_patterns: ['{satid:4s}-{instr:4s}-MSG{product_level:2d}-0100-NA-{processing_time1:%Y%m%d%H%M%S.%f}000Z-{order_id:s}.nat']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't include the first original pattern which had a processing_time2. If this file pattern doesn't actually exist (check with person who originally added it) then this is fine.

Copy link
Collaborator Author

@sjoro sjoro May 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

processing_time2 is not used anywhere, the rest of the filename is now caught under order_id.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so you expect the processing time to just be "eaten up" by the order id? Ok, I'd rather have two file patterns, but I'm ok with this if @adybbroe and @mraspaud are.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, exactly. those file parts are not needed.

Copy link
Collaborator Author

@sjoro sjoro May 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djhoese what do mean with "Why weren't any of these changes for ROI inputs included before?" The area_extent?


datasets:
HRV:
Expand Down