Re: streamfunction problem

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 21 2010 - 15:32:24 MDT

  data = addfile("ccsm3_ATM6_IE_IPCC.1x1d.1917-12.nc", "r")

  UVEL = data->UVEL
  VVEL = data->VVEL

  dimUV= dimsizes( UVEL )

  klev = 17

  sf = UVEL(:,klev,:,:)
  vp = UVEL(:,klev,:,:)
  sf@long_name = "stream function"
  vp@long_name = "velocity potential"
  sf@units = "m^2/s"
  vp@units = "m^2/s"

  uv2sfvpg(UVEL, VVEL,sf,vp)

  printVarSummary(sf)
  printVarSummary(vp)

On 4/21/10 2:53 PM, Ioana Colfescu wrote:
> Hi ,
>
> Can anybody help me with the following problem :
> I want to calculate the stream-function using the wind components v and u. I searched and found the function uv2sfvpg usefull but the problem is that when I try do use it I get an error about the dimensions of the variables I use :
> fatal:uv2sfvpg: The input/output arrays must have the same number of dimensions
>
> The code is the following :
>
> out = addfile("interpolated.nc","c")
>
> data = addfile("ccsm3_ATM6_IE_IPCC.1x1d.1917-12.nc", "r")
>
> nlat = 360
> mlon = 180
> ltime = 5
>
> uvmsg = 1e+36UVEL = data->UVEL
> VVEL = data->VVEL
>
> sf = new ( (/ltime,nlat,mlon /), float, uvmsg ) ; stream function
> vp = new ( (/ltime,nlat,mlon /), float, uvmsg ) ; velocity potential
>
> do i = 0,4
>
> uv2sfvpg(data->UVEL(i,17,:,:),data->VVEL(i,17,:,:),sf(i,:,:),vp(i,:,:)) ; u,v ==> stream function + velocity pot
> end do
>
> they seem to have same dimesion but still doesn't work.
>
> Thank you,
>
> Ioana
> _______________________________________________
> 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 Wed Apr 21 15:32:38 2010

This archive was generated by hypermail 2.1.8 : Wed May 26 2010 - 10:39:13 MDT