MetPy 匹配 GOES16 反射亮度

MetPy Matching GOES16 Reflectance Brightness

在使用 MetPy 创建 GOES16 图像时,我在匹配 CMI01 到 CMI06 上的颜色 table/brightness 时遇到问题。我试过使用库存颜色表并使用随机 vmin/vmax 来尝试匹配。我也尝试过使用定制的颜色表,甚至尝试将 min_reflectance_factor && max_reflectance_factor 之类的东西整合为 vmin/vmax 值。

也许我让这条路比现在更难了?有什么我想念的吗?以下是帮助创建我当前图像输出的代码摘录:

grayscale = {"colors": [(0,0,0),(0,0,0),(255,255,255),(255,255,255)], "position": [0, 0.0909, 0.74242, 1]} CMI_C02 = {"name": "C02", "commonName": "Visible Red Band", "grayscale": True, "baseDir": "visRed", "colorMap": grayscale}

dat = data.metpy.parse_cf('CMI_'+singleChannel['name']) proj = dat.metpy.cartopy_crs

maxConcat = "max_reflectance_factor_"+singleChannel['name'] vmax = data[maxConcat]

sat = ax.pcolormesh(x, y, dat, cmap=make_cmap(singleChannel['colorMap']['colors'], position=singleChannel['colorMap']['position'], bit=True), transform=proj, vmin=0, vmax=vmax)

make_cmap 是我发现的一种方便的花花公子方法,有助于创建自定义颜色表。此代码是多处理过程的一部分,因此 singleChannel 实际上是 CMI_C02

供参考,第一张图片来自杜佩奇学院,第二张是我的输出...

任何 help/guidance 将不胜感激!

在征求了一些气象学家的意见后,我最终在两幅图像之间制作了一种颜色 table,因为普遍认为他们认为我的版本太暗而标准太亮。

我仍然使用 vmaxvmin 作为 pcolormesh() 并将我的 grayscale 对象简化为只有两种颜色,灰色比标准颜色稍深。

感谢所有看过这篇文章的人。

所以我认为您的问题是因为对杜佩奇学院的数据应用了非线性变换,在本例中为平方根 (sqrt)。正如 GOES ABI documentation. 中提到的,这在过去已应用于 GOES 图像,我认为这就是 CoD 正在做的事情。

这是一个用于比较有无 sqrt 的脚本:

import cartopy.feature as cfeature
from datetime import datetime, timedelta
import matplotlib.pyplot as plt
import metpy
import numpy as np
from siphon.catalog import TDSCatalog

# Trying to find the most recent image from around ~18Z
cat = TDSCatalog('http://thredds.ucar.edu/thredds/catalog/satellite/goes16'
                 '/GOES16/CONUS/Channel02/current/catalog.xml')
best_time = datetime.utcnow().replace(hour=18, minute=0, second=0, microsecond=0)
if best_time > datetime.utcnow():
    best_time -= timedelta(days=1)
ds = cat.datasets.filter_time_nearest(best_time)

# Open with xarray and pull apart with some help using MetPy
data = ds.remote_access(use_xarray=True)
img_data = data.metpy.parse_cf('Sectorized_CMI')
x = img_data.metpy.x
y = img_data.metpy.y

# Create a two panel figure: one with no enhancement, one using sqrt()
fig = plt.figure(figsize=(10, 15))
for panel, func in enumerate([None, np.sqrt]):
    if func is not None:
        plot_data = func(img_data)
        title = 'Sqrt Enhancement'
    else:
        plot_data = img_data
        title = 'No Enhancement'

    ax = fig.add_subplot(2, 1, panel + 1, projection=img_data.metpy.cartopy_crs)
    ax.imshow(plot_data, extent=(x[0], x[-1], y[-1], y[0]),
              cmap='Greys_r', origin='upper')
    ax.add_feature(cfeature.COASTLINE, edgecolor='cyan')
    ax.add_feature(cfeature.BORDERS, edgecolor='cyan')
    ax.add_feature(cfeature.STATES, edgecolor='cyan')
    ax.set_title(title)

这导致:

下图应用了 sqrt 变换,似乎与 CoD 图像非常匹配。