.nc file writing problem

From: Ioana Colfescu <colfescu_at_nyahnyahspammersnyahnyah>
Date: Fri Jul 09 2010 - 14:50:27 MDT

Hi,

Could someone please help me with the following problem : I try to write a .nc file containing 5 variables extracted from 5 separate other .nc files.
I try to do it with the following code but it doeson't work :

---------------------------------------------------
variables to write in the nc file (needed for the coupler)
---------------------------------------------------
taux=f1->TAUX(0:355,:,:)
tauy=f2->TAUY(0:355,:,:)
fsns=f3->FSNS(0:355,:,:)
lhflx=f4->LHFLX(0:355,:,:)
flns=f5->FLNS(0:355,:,:)
;-------------------------------------------------
;create a new nc file with the 5 variables
;-------------------------------------------------
;system ("rm "+"new.nc")
ncdf =addfile("new.nc","c")
time =356
lon = 256
lat = 128
att_names =(/"taux","tauy","fsns","lhflx","flns"/)
att_dims =(/"time","lat","lon"/)
;var_types=(/"float","float","float","float","float"/)
dimUnlim = (/False,False,False/)
filedimdef(ncdf,att_names,att_dims,dimUnlim)

(I think there are things I'm missing anyways since I don't write anywhere the grid step for example)

The error I get is :

fatal:Argument type mismatch on argument (2) of (filedimdef) can not coerce
fatal:Execute: Error occurred at or near line 32 in file extract.ncl

Thank you,

Ioana
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jul 9 14:50:34 2010

This archive was generated by hypermail 2.1.8 : Mon Jul 19 2010 - 09:39:02 MDT