write_matrix strange behavior

From: Mateus da Silva Teixeira <mtex2k3_at_nyahnyahspammersnyahnyah>
Date: Tue, 30 Jan 2007 13:34:20 -0200

Dear NCL users,

I was doing some tests in NCL and when a wrote a matrix 2x31 with
write_matrix, it appears to have a strange behavior showing this matrix like

    0 9.2091999 14.2963552
***** -12.5199766 -9.8713465
***** 9.8444748 9.6318913
***** 16.5222950 18.2180138
***** 19.2784557 4.7573204
***** 10.7973881 -14.8534470
***** 15.1442137 2.7414875
***** -5.1018286 6.8757296
***** -30.6476097 -30.1173897
***** -20.8959923 -17.7146626
***** 9.9495287
    1 3.4100916 0.2287621
***** 6.3837910 1.1891056
***** 0.6539301 -1.5720097
***** 0.0161781 -1.0442650
***** 0.6514532 3.8352597
***** -3.4803121 0.7664145
***** -0.3014595 -3.1601975
***** -0.6141432 -2.2072849
***** 0.0285627 0.8764219
***** -1.3519949 3.7351599
***** -2.9500904

where the leftmost number indicate the row numbers. Can you help to find
the problem?
Please, see below the entire script:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

begin
  ; Tmin
  ithaca =
(/19,25,22,-1,4,14,21,22,23,27,29,25,29,15,29,24,0,2,26,17,19,9,20,-6,-13,-13,-11,-4,-4,11,23/)
  canandaigua =
(/28,28,26,19,16,24,26,24,24,29,29,27,31,26,38,23,13,14,28,19,19,17,22,2,4,5,7,8,14,14,23/)
  X = (/ithaca,canandaigua/)

  ; write_matrix options
  opts = True
   opts_at_row=True

  ; EOF and information
  pca_X = eofunc(X,2,False)
  write_matrix(pca_X,"2F15.7",opts)
  print("% expl var = "+pca_X_at_pcvar(0)+" "+pca_X_at_pcvar(1))
  print("eigenvalues = "+pca_X_at_eval(0)+" "+pca_X_at_eval(1))

  ; PCs
  pc_X = eofunc_ts(X,pca_X,False)
  write_matrix(pc_X(:,:),"2F15.7",opts)
end

Thanks

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jan 30 2007 - 08:34:20 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 06 2007 - 15:01:34 MST