[ncl-talk] using attributes to define 2D arrays

Francesco Trotta francesco.trotta4 at unibo.it
Sun Aug 19 11:19:58 MDT 2018


Dear ncl-support,

    I'm using attributes to define 2D array but I get this error:


fatal:Attributes only have one dimension, 2 subscripts used
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 416 in file ./procPREPRO_surf.ncl


Usually I define 1d array with attribute and it is all right but with 2d array the program stop.

Here some lines of the code where the program stop:


   DATE at date        = new((/nnest,ndays_max+15/),string,"")
   DATE at year        = new((/nnest,ndays_max+15/),string,"")
   DATE at mounth   = new((/nnest,ndays_max+15/),string,"")
   DATE at day          = new((/nnest,ndays_max+15/),string,"")

   do inest=0,nnest-1

      ;compute date yyyymmdd of the simulation
      iday  = 0
      DATE at date(inest,iday) = runMan_date000(inest)

      .......



   Can I define 2d array via attribute in ncl?

   If not, is there a way to define a data structure with heterogeneous multiple arrays 2d, 1d or scalar?


   Thanks

Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180819/08c538b6/attachment.html>


More information about the ncl-talk mailing list