Re: How the stream function and gradient function work

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 24 Aug 2009 16:52:16 -0600

Hello,

Both the uv2sfvpf and gradsf require that the
data be ordered from *south-to-north*. If they are
*north-to-south*, then

  wave_jet_uwind_file = addfile("uwnd.mon.mean.pml.wave-jet-year.nc","r")
  wave_jet_vwind_file = addfile("vwnd.mon.mean.pml.wave-jet-year.nc","r")

                      ; read and reverse the latitude order
  uwind = wave_jet_uwind_file->uwnd(7,9,::-1,:)
  vwind = wave_jet_vwind_file->vwnd(7,9,::-1,:)

If the latitudes are ordered correctly and you
still have a problem, then you can send the files to:

ftp ftp.cgd.ucar.edu
anonymous
Use your email address for the password
cd incoming
put ...
put ...
    :
quit

After ftp-ing the files, send us an email with the
following information:

     * The version of NCL you are running (ncl -V).
     * The type of system you are on (uname -a).

We will take a look.
-------------------------------

Finally, please place the attached .hluresfile at

    http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml

your home directory. This is recommended for all.

Guangshan Chen wrote:
> Dear all,
>
> I did a test to the stream function (uv2sfvpf) and the gradient function
> (gradsf). But there seems something is wrong in my script.
>
> I used the uv2sfvpf function to calculate stream function from u and v
> wind. Then I used the gradsf to calculate
> u and v wind from the stream function that I calculated in the first
> step. Last, I compared the original wind field
> and the wind field calculate from the steam function.
>
> These two wind field should be the same, supposedly. But the figure show
> that they are quite different.
>
> I attached my script and the figure. Could anyone give me a hand?
> The following is the core of the code.
>
> ;;;;;;;;;;;;;;;;;;;;
> ; calculate stream function
> ;;;;;;;;;;;;;;;;;;;;
> uvmsg = 1e+36
> sf = new ( (/nlat,mlon /), float, uvmsg ) ; stream function
> vp = new ( (/nlat,mlon /), float, uvmsg ) ; velocity potential
>
> uv2sfvpf (uwind,vwind, sf,vp) ; u,v ==> stream function + velocity pot
> ;;;;;;;;;;;;;;;;;;;;;
> ; calcualte the stream function's
> ; lat and longitudinal derivatives
> ;;;;;;;;;;;;;;;;;;;;;
> sf_x = sf
> sf_y = sf
> gradsf(sf, sf_x, sf_y)
>
> v_est = -sf_x
> u_est = sf_y
>
> copy_VarCoords(uwind,u_est)
> copy_VarCoords(vwind,v_est)
>
>
> Thanks in advance.
>
> Guangshan
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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 Mon Aug 24 2009 - 16:52:16 MDT

This archive was generated by hypermail 2.2.0 : Wed Sep 02 2009 - 12:24:39 MDT