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

[python #ANC-815027]: Metpy Initial Guess Barnes Interpolation



Greetings!

I forwarded your original message over to our support system since that's 
better for our tracking, but happy to help!

MetPy's current Barnes implementation is definitely not flexible enough for 
what you're looking for, and can be a bit problematic in its own right (e.g. 
https://github.com/Unidata/MetPy/issues/2873, 
https://github.com/Unidata/MetPy/issues/2235)

Given that you have a definite idea on what you want the initial field to be, 
I'd really only use MetPy's `interpolate_to_grid` as an example of how you can 
implement your own scheme using the pieces that numpy arrays and functions from 
SciPy can give us.

Hope this helps,

Ryan

> Hi Ryan,
> 
> I hope this finds you well, and that it is okay to contact you here!
> 
> I am a PhD student looking to interpolate some station data (irregularly
> spaced) to an evenly spaced grid, using a first-guess interpolation method.
> My supervisor and I are looking to perform the methods involved in this
> computation using MetPy, as opposed to GEMPAK which my supervisor would
> normally use.
> 
> Are there current methods that exist in MetPy to take the
> irregularly-spaced grid of station data (in the image below, also attached):
> 
> 
> And to then use a 0.1 X 0.1 gridded dataset (such as a reanalysis dataset)
> for the same domain as an "initial guess", and then perform a Barnes
> interpolation of these datasets into a new 0.1 X 0.1 gridded dataset?
> 
> My supervisor mentioned that in GEMPAK the methods would look something
> like:
> 
> 1. Use gdcfil (https://unidata.github.io/gempak/man/prog/gdcfil.html,
> see options below) and set cpyfil to an existing gridded dataset file,
> where gdoutf is your new gridded file.
> 2. Next use OABSFC, where gdfile is the file you created in 1. and
> sffile is the irregularly spaced original data file. We would probably use
> 0.3 for gamma, and 2 or 3 passes (NPASS). GEMPAK also has a function SEARCH
> (search radius) which I would like to be something between 10 and 20,
> especially for higher-resolution input data
> 
> 
> In MetPy, I see the "barnes" option available under "interp_type" in the
> interpolate_to_grid function in MetPy, but I don't think this uses an
> initial guess approach where I could also insert a reanalysis dataset.
> 
> If you have any advice on how to best use MetPy to perform this type of
> interpolation, I would really appreciate your help and time.
> 
> Thank you!


Ticket Details
===================
Ticket ID: ANC-815027
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.