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

[python #OFO-708651]: convert a dimensioned quantity to undimensioned quantity -- FYI ONLY



Greetings!

I also had forgotten that we have a version of this implemented in MetPy as 
"thickness_hydrostatic":

https://unidata.github.io/MetPy/latest/api/generated/metpy.calc.thickness_hydrostatic.html

Hope this helps!

Ryan

> Greetings!
> 
> Apologies on the late response.
> 
> Trying to turn pressure into height, if you have an observed sounding, you 
> may have some luck integrating hydrostatic balance vertically, kind of like 
> the hypsometric equation:
> 
> https://wikimedia.org/api/rest_v1/media/math/render/svg/746ccaffef7122cf0daa2c3d0a846081db7ab19a
> 
> I'm not sure of the errors, but probably much less than assuming a standard 
> atmosphere deep into the stratosphere.
> 
> Ryan
> 
> >
> > Ryan,
> >
> > I had one other issue, along with my note on units.
> >
> > I don't know if that question got lost, I think I sent too much at once.
> >
> > I would like to plot the wind vectors in the stratosphere, do a 
> > cross-sectional plot
> >
> > Like at 50,000ft, 55,000ft, 60,000ft, etc
> >
> > My data netcdf is the following:
> >
> > dim: time, levels (mb), lat, lon
> > variables:  u-wind componet, v-wind component, geopotential  (I convert to 
> > geopotential height by /g=9.82...)
> > I call z.
> >
> > using a mapplotlib program, my coordinates would be
> >
> > levels and time, and my variables will be vector made up of u and v
> >
> > but my vertical coordinate system can't be mb it needs to be feet.
> >
> > I don't know how to convert accurately, say 100mb to feet using the 
> > standard atmosphere.
> > If I use metpy.calc.pressure_to_height_std, probably off quite a bit in
> > stratosphere
> >
> > I would like to use my z data as a coordinate, not really sure how to do at 
> > either.
> >
> > So below is my plot, and I mocked up what I really want.
> >
> > Any suggestions, other than using metpy routine to convert pressure to feet?
> >
> > One idea, is for each time index, I go through my 32 levels and find the 
> > level that is nearest
> > to say 5000 ft increment and then store the u, v components in that 
> > coordinate.
> >
> > That is, create a new coordinate system call feet
> >
> > index = 10 -> 50,000, u[10], v[10]
> > index = 11 -> 55,000, u[11], v[11]
> > index = 12 -> 60,000, u[12], v[12]
> >
> >
> > Really you can ignore this further question, I'm asking you do to the 
> > science for me.
> >
> > I will continue to figure it out.
> >
> > thanks Craig[cid:406a1e3b-2661-44b4-9bc8-46187ede3619]
> 


Ticket Details
===================
Ticket ID: OFO-708651
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.