Homework+1

=The buoyancy of lifted parcels in soundings: entropy methods.=

Background:
Entropy-based computational thermodynamics (I learned it from Raymond and Blyth (1991).). My background sheet is in [|moist_thermo_computations.doc]

Core activity: everyone does this part. Note I removed Core question 12 to extra credit 1. I got confused myself about it, and would need some time to sort it out, which means it isn't so basic.

 * 1) Get this [|COARE soundings .nc data file]It is 1726 soundings on a 5mb grid 1000-100 mb. (181 values)
 * 2) Get the IDL or [|Matlab] codes: main ones are esat, mixrat (or saturation mixing ratio), entropy, invert_entropy
 * 3) === David made code for reformatting the data into GrADS format. ===
 * 4) Read the COARE soundings into memory. Notice array sizes.
 * 5) Compute q (mixing ratio) = {[0.622 *esat(T) / (p-esat(T)) ] *RH} /100 = mixingratio(esat(T),p) *RH / 100
 * 6) Compute a mean sounding by averaging T and q, let's work with that. You might want a 1D p array.
 * 7) Compute the entropy, total water, and pressure of a near-surface parcel. Call these s0, qt0, p0.
 * 8) Invert those conserved variables for T and qv at all other pressures using invert_entropy routine.
 * 9) Compute the condensed water profile (qc = qt0 - qv) for this reversible process.
 * 10) Compute the density temperature Tρ profile from T, qv, and qc (or qt).
 * 11) Compute thermal buoyancy force, B = g(Tρ_parcel - Tρ_env)/ Tρ_env (where Tρ_env = Tv for unsaturated env)
 * 12) Integrate B over z to get a CAPE like energy. Why not plot a cumulative sum (indefinite integral), it shows more.
 * 13) you will need z from a hypsometric calculation using the Tv profile

Extras/extensions: each one teach one. Put results on your page.

 * 1) Now suppose the parcel precipitates. Replace qt0 with a qt profile that is equal to qv of the parcel, and invert again. Notice that now you are passing invert_entropy three arrays of 181 values, not 2 scalars and a p[181] array. But the code will handle it sensibly. Actually it might be clearer to loop upward and precipitate out the water at each level. But is entropy (as defined here) conserved during precipitation? This matters when I try the quick code. I need to revisit this in light of Raymond and Blyth or Emanuel to get to the bottom of it.
 * 2) you might want to iterate this a couple times. Does it matter much?
 * 3) Repeat steps 9-11 and see how pseudoadiabatic and reversible ascent differ.
 * 4) What if you add the entropy source (latent heat) of freezing like [|Raymond and Blyth (pdf)] do?
 * 5) or use an [|entropy function that includes ice effects]?
 * 6) Set up code to read in soundings from the[| Wyoming soundings site] - text files
 * 7) repeat basic steps and compare to index values on the Wyoming skew-T gif image
 * 8) (more to come)