Having problem in writing ascii files

From: Soumik Basu <sbasu_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 29 2012 - 16:40:16 MDT

Hi,

I am trying to write 12 variables each having 30 values in an ascii
file. But I am constantly getting errors. Can anybody please suggest me
where I am making mistake. I was trying to follow example 6 in
write_matrix examples.

Here is one of the 12 variable that I am trying to write:

Variable: ckmki_mean_t
Type: float
Total Size: 120 bytes
             30 values
Number of Dimensions: 1
Dimensions and sizes: [30]
Coordinates:
(0)

Here is the part of the code:

;************************************************
; Write out the means in ascii file
;************************************************

   fmtx = "12f20.7"

   opt = True
   opt@fout = "Area_mean_NA_winter_ens1"

   mean = new((/30,12/), typeof(cor_am))

   mean(:,0) = am_mean_t(:)
   mean(:,1) = at_mean_t(:)
   mean(:,2) = km_mean_t(:)
   mean(:,3) = kt_mean_t(:)
   mean(:,4) = gam_mean_t(:)
   mean(:,5) = gat_mean_t(:)
   mean(:,6) = cm_mean_t(:)
   mean(:,7) = ct_mean_t(:)
   mean(:,8) = camai_mean_t(:)
   mean(:,9) = catai_mean_t(:)
   mean(:,10) = ckmki_mean_t(:)
   mean(:,11) = cktki_mean_t(:)

   printVarSummary(mean)
   write_matrix("mean",fmtx,opt)

This is the error I am getting:

fatal:Number of dimensions in parameter (0) of (write_matrix) is (1),
(2) dimensions were expected
fatal:Argument type mismatch on argument (0) of (write_matrix) can not
coerce
fatal:Execute: Error occurred at or near line 720 in file ts_cor_x4.ncl

Thanks,
Soumik

-- 
"Numbing the pain for a while will make it worse when you finally feel 
it.
  ~J.K. Rowling"
*****************************************
Soumik Basu
Graduate Student, Research Assistant
International Arctic Research Center
University of Alaska Fairbanks
Fairbanks,Alaska,USA
*****************************************
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 29 16:40:26 2012

This archive was generated by hypermail 2.1.8 : Wed Oct 31 2012 - 09:14:12 MDT