[Vis5dplus] [ncl-talk] ccsm to vis5d

Mary Haley haley at ucar.edu
Fri Mar 23 06:56:20 MDT 2012


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



More information about the Vis5dplus mailing list