HOW to convert '2d' to 'GEO2D' type in xarrray?

321 Views Asked by At

When I used the MODIS data,I got a problem about the Type.

I got the coord by xarray(python 3.9),but I couldn't get the same type as 'GEO2D'.

xr_tmp = xr.Dataset(
{
    'Gpp_500m'      :  (('XDim', 'YDim','time'), Gpp_500m),
    'Npp_500m'      :  (('XDim', 'YDim','time'), Npp_500m),
    'Npp_QC_500m'   :  (('XDim', 'YDim','time'), Npp_QC_500m),
},
coords=dict(
    lon = (['XDim', 'YDim'],lon),
    lat = (['XDim', 'YDim'],lat),
    time = _time_
    # 'latitude': lat,
    # 'longitude': lon,
    # 'time': _time_,
)
)

The figures are shown bellow,Could U help me? (use xarray or pyModis if necessary)

enter image description here

enter image description here

You can see the difference from the pictures as follow.

enter image description here enter image description here

0

There are 0 best solutions below