Vis5d writing problems

From: jtwrcc <jtwrcc_at_nyahnyahspammersnyahnyah>
Date: Thu, 15 Nov 2007 11:51:45 -0800

Hello,

I am having difficulty piping in a grib file and converting to v5d
format. I am reading in multiple variables and wish to output these in
v5d format. I can get a single variable to output, but get the error
(below) when trying to output multiple variables.

fatal:v5d_write - data size mismatch
fatal:Execute: Error occurred at or near line 146 in file outgribv5d.ncl

As I understand it I need to output a 3-d file despite the fact that I
have a 5-d grid (lat,lon,lev,time,var). I am probably outputting this
incorrectly. I am not sure how to structure the multivariate aspect
(ie., do I put variables in the level column..?) Any help would be
appreciated.

-John Abatzoglou

code follows

myData = new((//numvars*nl,nc, nr//), "float") ;
varname=(/"TMP_LEV","HGT_LEV"/)
TMP_LEV!1="lon"
TMP_LEV!2="lat"
TMP_LEV!0="lev"
 myData(0:nl-1,:,:)=TMP_LEV(lev|::-1,lat|:,lon|::-1)
HGT_LEV!1="lon"
HGT_LEV!2="lat"
HGT_LEV!0="lev"
 myData(nl:nl*2-1,:,:)=HGT_LEV(lev|::-1,lat|:,lon|::-1)
compress = 4 ;

 proj = 2 ; l
 proj_args = (/60.0,21.404,-240.0,65.0,114.0,20.0/)
vert = 3 ;
vert_args=new((/nl(0)/),"float")
do i=0,nl(0)-1
 vert_args(i)=lev(32-i)
end do
nll=(//nl,nl//)

 v5d_create("out.v5d", numtimes, numvars,nr,nc, nll, varname,
timestamp,datestamp,compress, proj, proj_args, vert, vert_args)
 v5d_write(numtimes, numvars, myData)
 v5d_close()

-- 
John T. Abatzoglou	          John.Abatzoglou_at_dri.edu 
Postdoctoral Fellow               Tel: 775.674.7064
Western Regional Climate Center   Fax: 775.674.7016
Desert Research Institute
Reno, NV		
         http://www.dri.edu/People/John.Abatzoglou/

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 15 2007 - 12:51:45 MST

This archive was generated by hypermail 2.2.0 : Sun Nov 25 2007 - 07:21:25 MST