[ncl-talk] write new text filename after every do loop

Ashish Sharma asharma7 at nd.edu
Wed Feb 24 09:40:20 MST 2016


hello,

I want to create new output file, say *foo_DATA1, foo_DATA2 and **foo_DATA3*
  after each do loop. (see sample code below).
How can I modify the code near write_matrix to create a new file every time
it goes in do loop.

do site=0,2

  locij = wrf_user_ll_to_ij(a, lon(site), lat(site), llres)

  locij = locij - 1         ; array pointers in NCL space

  locX = locij(0)

  locY = locij(1)


t2 = new((/9,72/),float)

t2(0,:) = obs(site,:)

t2(1,:) = f1->T2(:,locY,locX)-273.15

t2(2,:) = f2->T2(:,locY,locX)-273.15


 opt = True

 opt at fout = "*foo_DATA*"

  write_matrix (t2, "72f7.2", opt)

;;;*****************************************************;;;;;;;;;;;


end do



thanks

Ashish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160224/91861fc6/attachment.html 


More information about the ncl-talk mailing list