[Thread Prev][Thread Next][Index]

Re: Fw: Isentropic Surface



Hello Steve,
	I think the @weq transformation.  As stated in the manual (look
under the W's in the index), @WEQ is a generalization of the @LOC idea.
	Here is a demo of how it might apply in a situation like yours:

!**** value of a variable at a location where another variable has *****
!****       a desired value using the @WEQ transformation          *****

use levitus_climatology   ! which has TEMP and SALT data
region/x=160:200/y=-20:20 ! limit the region to mid-Pacific

! compute potential temperature at reference level 0 (for the demo
!         treat z[g=temp] as if it were pressure)
let theta=THETA_FO( salt, temp, Z[g=temp], 0 )

shade theta[z=2000] ! looks like theta = 2 degC is around 2000m
                    ! so let us look for the value of SALT at
                    ! the depth where THETA = 2

let salt_weight = SALT*THETA[Z=@WEQ:2]
let SaltAtTheta2 = salt_weight[z=@sum]

shade SaltAtTheta2

!****** set mode interp to ensure interpolation happens *******
set mode interp
!****** important for the comparisons below to be good ********

! lets list one value to show that it makes sense
list/form=(f9.5) SaltAtTheta2[i=161,j=90]
! which gives the value 34.64136

list/form=(f12.5) theta[i=161,j=90,z=@loc:2]
! this says that THETA=2 occurs at z=2108.96460
! so lets see what value SALT has at that depth
list/form=(f9.5) salt[i=161,j=90,z=2108.96460]
! which gives the same value (34.64136).

! for temperature at the THETA=2 level
let temp_weight = TEMP*THETA[Z=@WEQ:2]
let TempAtTheta2 = temp_weight[z=@sum]

list/form=(f9.5) TempAtTheta2[i=161,j=90]
! which gives the value 2.14840
list/form=(f9.5) temp[i=161,j=90,z=2108.96460]
! again giving the same value (2.14840)

!********************end of demo*******************************

If the variable you wanted to extract was on a different grid than
THETA I'd guess you would want to regrid it to the THETA grid
before making the product - perhaps something like
	let myVar_weight = myVar[g=THETA]*THETA[Z=@WEQ:2]
	let myVarAtTheta2 = myVar_weight[z=@sum]
but I haven't tested this.

Good luck,
	Mick

|!!! Mick.Spillane@noaa.gov !!!|
|__Room 2070 Bldg#3 NOAA/PMEL__|
|____Phone_:_(206)526-6780_____|




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement