Re: PV

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 18 2010 - 20:10:19 MST

In shea_util.ncl
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

There is the following function.

Good luck

;-----------------------------------------------------------------------
;----------------------- Unsupported: DJS ------------------------------
;-----------------------------------------------------------------------
undef("PotVortIsobaric")
function PotVortIsobaric\
             (p[*]:numeric, u:numeric, v:numeric, t:numeric
             ,lat[*]:numeric, gridType[1]:integer, opt:integer)
;
; Compute Potential Vorticity on constant pressure levels
; Bluestein: Synoptic-Dynamic Meteorology in Midlatitudes
; pg 264 Eq 4.5.93
;
; Nomenclature
; p - pressure levels (Pa) [1D]
; u - zonal wind (m/s) [3D or 4D]
; v - meridional wind (m/s) [3D or 4D]
; t - temperature (K) [3D or 4D]
; lat - latitudes
; gridType- grid type
; =0 means gaussian grid
; =1 means regular or fixed grid
; opt - options: not used
;
; Note: u,v,t MUST be SOUTH-TO-NORTH
; and must be GLOBAL because spherical harmonics are used
;
; Usage:
; f = addfile ("foo.nc", "r")
; U = f->U ; (time,lev,lat,lon) or (lev,lat,lon)
; V = f->V
; T = f->T ; K
; lat = f->lat
; lev = f->lev
; lev = lev*100 ; must be PA
; lev@units = "Pa"
; ; Potential Vorticity
; PV = PotVortIsobaric(lev,u,v,t,lat, 0, 0)
;
; Note: A nice basic discussion of PV may be found at:
; Mid-Latitude Atmospheric Dynamics: A First Course
; Jonathan E. Martin, Wiley 2006, QC880.M36 , pp276-onward

David Small wrote:
> Hello,
>
> Does anyone have a code to calculate potential vorticity (Ertel) on
> pressure levels they would be willing to share?
>
> Thanks,
> Dave Small
> --
> David Small
> Graduate Research Assistant
> Department of Atmospheric and Oceanic Sciences
> McGill University
> Montreal, Quebec, Canada
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 18 20:10:24 2010

This archive was generated by hypermail 2.1.8 : Tue Feb 23 2010 - 08:26:41 MST