[ncl-talk] writing each vraible in a new file

Geeta Geeta geetag54 at yahoo.com
Thu Nov 19 09:43:16 MST 2015


Hi all. 
I have some 11 variables in my NETCDF file (attached). 
My question is how can I store each variable in a new file ..... Or secondly, If I have to append the file (with all 11 variables data) how I can do that. 
Pls see my asciiwrite statement. 

begin
  a           = addfile("COMP_3level.nc","r")     ; RDR data
;  print(getfilevarnames(a))
  var_names   = getfilevarnames(a)
  no_of_vars  = dimsizes(var_names)
  print(var_names)
  print(no_of_vars)

  do  n = 0,no_of_vars-1
    var = a->$var_names(n)$    
;    printVarSummary(var)
;    print(var)
    asciiwrite("var.txt",var)   ; See this statement
    delete(var)
  end do

 Geeta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151119/d8460bfb/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: COMP_3level.nc
Type: application/x-netcdf
Size: 446947 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151119/d8460bfb/attachment-0001.nc 


More information about the ncl-talk mailing list