Re: [Vis5dplus] [ncl-talk] ccsm to vis5d

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 23 2012 - 06:56:20 MDT

Hi Michael,

I'm afraid we don't have any vis5d experience in our group. I've CCed the vis5dplus group on this question and your other one.

If you want to join that group:

http://mailman.ucar.edu/mailman/admin/vis5dplus

--Mary

On Mar 21, 2012, at 5:20 PM, Michael Notaro wrote:

> I am trying to convert sea-level pressure, precipitation, and cloud
> cover at all 26 levels on 1.9x2.5 degree grid from CCSM3.5 to
> a vi5d file for a single time step. Could you someone take a look
> at the code below and offer some suggestions? I am particularly
> not sure how to handle the vertical coordinates or multiple variables.
> Sorry, I have no experience with vis5d up to now so this is my first
> try to convert the data into that format.
>
> Michael
>
>
>
> a=addfile("test1.nc","r")
> b=addfile("test2.nc","r")
> psl=a->PSL(0,:,:)
> cloud=b->CLOUD(0,:,:,:)
> pcp=(b->PRECL(0,:,:))+(b->PRECC(0,:,:))
> pcp=pcp*60.*60.*24.*1000. ; mm/d
> copy_VarCoords(psl,pcp)
> lat=doubletofloat(a->lat)
> lon=doubletofloat(a->lon)
> copy_VarCoords(a->lat,lat)
> copy_VarCoords(a->lon,lon)
>
> numtimes = 1
> numvars = 3
> nr = 96
> nc = 144
> nl = 26
>
> timestamp = (/1/)
> datestamp = (/1/)
> compress = 1
> northlat = 90.0
> latinc = 1.9
> westlon = 0.0
> loninc = 2.5
> projection = 1
> proj_args = (/northlat, westlon, latinc, loninc/)
> bottomhgt = 0.0
> hgtinc = 1.0
> vert = 3
> vert_args = (/bottomhgt, hgtinc/)
> v5d_create("UVdata.v5d", numtimes, numvars, nr, nc, nl, (/"psl","pcp","cloud"/), timestamp, datestamp, compress, proj, proj_args, vert, vert_args)
> v5d_write(numtimes, numvars, (/"psl","pcp","cloud"/))
> v5d_close()
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
Vis5dplus mailing list
Vis5dplus@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/vis5dplus
Received on Fri Mar 23 06:56:42 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 27 2012 - 08:50:24 MDT