Error message: Hardware Issue ?

From: Karsten Peters <karsten.peters_at_nyahnyahspammersnyahnyah>
Date: Fri, 28 Aug 2009 10:16:01 +0200

Dear all,

    when running a program which just reads in netCDF files, extracts
three variables and then writes them to output, the following error
message appears (always at different points in the program):

ncl: posixio.c:248: px_pgin: Assertion `*posp == ((off_t)(-1)) || *posp
== lseek(nciop->fd, 0, 1)' failed.

Is this possibly a hardware or OS issue ?

The system I am running on is a Sun Linux Cluster.

I am posting my code hereafter.

Cheers and thanks in advance,
    Karsten

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"

localdir = "/scratch/local1/users/u231008/atsr_ana/"
extdir = "/net/atrain1/data/am/ERS2/ATSR/nc/"

netCDF = True

byear = 1997
eyear = 2000

do yr=byear,eyear
    cyr=sprinti("%0.4i",yr)

  bmon = 1
  emon = 12

  do mn=bmon,emon
       cmn=sprinti("%0.2i",mn)

    bday = 1
    eday = 31
    do dd=bday,eday
     
      cday=sprinti("%0.2i",dd)

;*****************************************************************
; input File info
;*****************************************************************
        diri = extdir+yr+"/"
      c="grape-atsr2_*_"+cyr+cmn+cday+"*_l2v03.nc"
     
      t = systemfunc("ksh -c '[ ! -s "+diri+c+" ] && echo 1'")
      if (ismissing(t)) then
        delete(t)
        print(""+cyr+cmn+cday+"")
        fili = systemfunc("cd "+diri+" ; ls "+c)
                      
        nfil = dimsizes( fili )
             
        do nf=0,nfil-1
     

;*****************************************************************
;Output file info
;*****************************************************************
           
          if (netCDF) then ;in this case, netCDF = True

            diro = localdir+"data/" ; output directory
            filo = "grape-atsr2_"+cyr+cmn+cday+"_l2v03_no"+(nf+1) ;
output file name
            fout = diro+filo+".nc"
          
           
            system("/bin/rm -f "+fout) ; remove any pre-existing file
            ncdf = addfile(fout ,"c") ; open output netCDF file

        ;================================================================
        ; create global attributes of the file (not required)
        ;================================================================
            fAtt = True ; assign file attributes

            fAtt_at_source_file = fili(nf)
            fAtt_at_title = "GRAPE ATSR-2 Level2 data needed for
ship emission influence over European Coastal Waters"
            fAtt_at_creator = "Karsten Peters (karsten.peters_at_zmaw.de)"
            fAtt_at_creation_date = systemfunc ("date")
         
            fileattdef( ncdf, fAtt ) ; copy file attributes
   
          end if
;**********************************************************************

   
;**********************************************************************
;Reading of input data
;**********************************************************************

              f = addfile(diri+fili(nf), "r")
         
              x = f->LatLon
              y = f->radiances
              z = f->angles
              delete(f)
;************************************************************************
;Putting the data into the output file
;************************************************************************

              ncdf->LatLon = x
              ncdf->radiances = y
              ncdf->angles = z

              delete(x)
              delete(y)
              delete(z)

           
        end do ;files
        delete(fili)
      end if ;loop asking if files exist
     
    end do ;days
     
  end do ;months
   
end do ;years
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 28 2009 - 02:16:01 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 03 2009 - 07:55:08 MDT