Problem Closing a META/NCGM File

From: Lunde, Bruce N CIV NAVOCEANO, NP1 <bruce.lunde_at_nyahnyahspammersnyahnyah>
Date: Fri, 17 Aug 2007 10:05:55 -0500

Hello,

I am making an NCGM plot file. The plots in the file seem to be fine.
I am putting two plots on one page, before advancing the frame.

However, when I display the multiplot file with "idt", it complains
when I get to the end of the file. Thus I cannot loop, or go backwards,
etc.

"idt" says "FATAL - Premature end of metafile".

I was hoping for a general idea of what to look for, with regards
to closing the meta file properly.

Thanks, Bruce

........................................

The output messages in the IDT window are:
  Messages upon loading file:
    Display(0): Can't find any spooled devices for printing
    Display(0): 10

  Message when getting to the last frame in file (or trying to
  go beyond it, back to the beginning):
    Display(0): Error - ictrans: FATAL - Premature end of metafile

........................................

My basic code is outlined below. I can rework it later to be
functional without my data, but I was hoping maybe there is
something obvious you can point me to:

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" ;..
flt2string()

plot_type = "ncgm"
plot_prefix = "PLOT_OBS"

begin
 ...
 ...

do d = 1,1
  ...
  ...

  if( tmp .gt. 0 )then
    ...
    ...
;-----------------------------------------------------------------------
--------
;-- START OF PLOTTING
----------------------------------------------------------
;-----------------------------------------------------------------------
--------

;-- Open figure.

    wks = gsn_open_wks(plot_type,plot_prefix)

;-- Loop over profiles.

    do l = 1,numiprf
      ...
      ...
res = True
res_at_gsnFrame = False

;-- Create main plot at bottom of view area.

res_at_vpHeightF = 0.5 ; Default = 0.6
res_at_vpYF = 0.6 ; Default = 0.8

res_at_xyLineThicknesses = (/2.0,2.0,2.0,2.0,2.0,2.0/)
res_at_xyLineColors = (/"red","blue","cyan","black","gray","gray"/)
res_at_xyDashPattern = 0 ; Make curves all solid
res_at_xyMarkLineMode = "Lines" ; Markers *and* lines
res_at_trYReverse = True

data = new( (/6,dimsizes(z)/), float )
data(0,:) = a ; anl
data(1,:) = b ; bkg
data(2,:) = c ; clm *********************************
data(3,:) = o ; val == observation *** ADD MARKERS LATER TO THIS ***
data(4,:) = b-e ; *********************************
data(5,:) = b+e

plot = gsn_csm_xy (wks,data,z,res) ; create plot

...
...

;-- Create second plot at top of view area.

res_at_tiMainString = title
res_at_trXMinF = 20.0
res_at_trXMaxF = 35.0
res_at_trYMinF = 0.0
res_at_trYMaxF = 150.0
res_at_vpHeightF = 0.2 ; Default = 0.6
res_at_vpYF = 0.9 ; Default = 0.8

plot = gsn_csm_xy (wks,data,z,res) ; create plot

frame(wks)

;-- Prepare variables for next data plot (dimensions may be different).

delete(res)

      delete(z)
      delete(o)
      delete(b)
      delete(c)
      delete(a)
      delete(e)
      delete(data)
      delete(data2plot)

    end do ; END do l = 1,numiprf
  end if ; END if( tmp .gt. 0 )then
end do ; END do d = 1,8

end
...
...
exit

=====
Bruce Lunde
Bruce.Lunde_at_navy.mil
228-688-5843
Code NP1
Naval Oceanographic Office
Stennis Space Center, MS
=====
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 17 2007 - 09:05:55 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 20 2007 - 09:30:37 MDT