[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #OQO-197838]: Help with XArrays



Greetings!

Since you're already working with xarray, I would suggest trying their interp 
method:

  https://docs.xarray.dev/en/stable/generated/xarray.DataArray.interp.html

This method on an existing DataArray will produce a new DataArray with values 
at the coordinates you pass in.

Cheers!

Ryan

> Dear unidata,
> 
> I've been
> struggling with xarrays. I need to rescale the spatial resolution of my
> netcdf files.
> 
> My original data has the size of 432x432x3000 (lat x lon x time), but i
> need a spatial resolution of
> 296x1440x3000. I don't know if there is a function or a library that allow
> me to do that in a more efficient way in python. I've been using
> the geoloc2grid() matlab function but I don't really like the result
> because I lose much information very close to the shoreline like the image
> have moved upward.
> 
> I've been watching a lot of your #MetPY Mondays videos but I could not find
> something to resolve this problem.
> 
> If you could help me I really appreciate it.


Ticket Details
===================
Ticket ID: OQO-197838
Department: Support Python
Priority: Low
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.