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

Mimic TPW Reader #858

Merged
merged 39 commits into from
Dec 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b5903f7
First attempt to create a reader and yaml for MIMIC TPW files. These…
joleenf Jun 12, 2019
ec5043b
Merge branch 'master' of https://github.com/pytroll/satpy into mimic
joleenf Jun 14, 2019
4b06cbc
Merge branch 'master' of https://github.com/pytroll/satpy into mimic
joleenf Jun 17, 2019
41a3378
BUG FIX: add get_dataset and get_area_def missing from original comm…
joleenf Jun 19, 2019
9a7d52b
Remove redundant code. rename the dims to x and y (based on docs)
joleenf Jun 22, 2019
12a23ea
Fix names to match code
joleenf Jun 27, 2019
71589f0
Merge branch 'master' of https://github.com/pytroll/satpy into mimic
joleenf Jul 1, 2019
91f1131
Add a function to colorize the mimic data with the colors described i…
joleenf Jul 2, 2019
6044a93
BUG FIX: adjust coordinates to read all navigated variables in both …
joleenf Jul 2, 2019
96e8834
Oversight correction: add mimic.yaml that matches enhancement reader…
joleenf Jul 2, 2019
f13337e
Merge branch 'master' of https://github.com/pytroll/satpy into mimic
joleenf Jul 2, 2019
cd6d2ee
Reduce the number of colors in the mimic yaml to new colors only
joleenf Jul 2, 2019
4270bc7
Reduce colors even more to about increments of 0.5 mm at most rapid c…
joleenf Jul 2, 2019
d7c3359
Try to get ideal combination of color definition and speed for colort…
joleenf Jul 2, 2019
a9f7bfe
Remove comment around add resolution for lat/lon arrays
joleenf Jul 5, 2019
f3b0ddd
Merge branch 'master' of https://github.com/pytroll/satpy into mimic
joleenf Jul 5, 2019
237c407
Use an enhancement provided by Tony Wimmers for Mimic TPW
joleenf Jul 10, 2019
2a5d41b
Fix type of name key to string
joleenf Jul 16, 2019
291c0de
readers/mimic_TPW2_nc.py
joleenf Jul 16, 2019
e659a51
Test reader code for the MIMIC TPW reader
joleenf Jul 16, 2019
4ba6b22
Merge branch 'master' of https://github.com/pytroll/satpy into mimic
joleenf Jul 16, 2019
17473ab
Add enhancement for tpwGridPrior so that tpwGrid and Prior are same c…
joleenf Jul 16, 2019
b1a7d27
remove newline at end of file
joleenf Jul 16, 2019
8002bed
fix description of projection
joleenf Jul 18, 2019
d2d4620
Add information to the area definition.
joleenf Jul 31, 2019
bfd0dbc
BUG FIX: remove resolution from AreaDefinition, it is not a valid ke…
joleenf Jul 31, 2019
695191d
Fixed lint error of missing space after comma
joleenf Oct 3, 2019
999a347
missed another space after comma...
joleenf Oct 3, 2019
b74bcf4
added mimic tests to test suite
joleenf Oct 25, 2019
5968fb5
BUG FIX: forgot to add import for mimic tests
joleenf Oct 25, 2019
5e6ca31
Revert "missed another space after comma..."
joleenf Oct 25, 2019
7380a73
Go back before adding import and merge upstream...Revert "added mimic…
joleenf Oct 25, 2019
dc17b7e
Merge branch 'master' of https://github.com/pytroll/satpy into mimic
joleenf Oct 25, 2019
dbbdbc9
fix missing whitespace error
joleenf Oct 25, 2019
4bd04a3
BUG FIX: remove units=degrees from proj definition; unit=degrees is …
joleenf Oct 28, 2019
d396dca
Resolved conflicts by keeping test_viirs_compact after test_mimic_TPW…
joleenf Oct 28, 2019
49cc14d
removed trailing whitespace
joleenf Oct 28, 2019
874fde3
Resolved conflicts in __init__.py with new modules added then, mimic …
joleenf Nov 12, 2019
4fd2c32
Merge branch 'master' into mimic
mraspaud Dec 23, 2019
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
31 changes: 31 additions & 0 deletions satpy/enhancements/mimic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env python
# Copyright (c) 2018-2019 Satpy developers
#
# This file is part of satpy.
#
# satpy is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# satpy is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# satpy. If not, see <http://www.gnu.org/licenses/>.

from trollimage.colormap import Colormap


def total_precipitable_water(img, **kwargs):
"""Palettizes images from VIIRS flood data.

This modifies the image's data so the correct colors
can be applied to it, and then palettizes the image.
"""
palette = kwargs['palettes']
palette['colors'] = tuple(map(tuple, palette['colors']))

cm = Colormap(*palette['colors'])
img.palettize(cm)