netcdf file

From: Benjamin Lamptey (lamptey AT XXXXXX)
Date: Fri Dec 17 2004 - 09:41:16 MST

  • Next message: alexg: "Hybrid to pressure coordinates"

    Hello,
     I am trying to define a variable for output (together with other
     +variables)
    > into an output netcdf file.
    >
    > I keep getting the following error
    >
    > -----
    > warning:FileAddVar: Variable TS2_M is already defined, can not redefine
    > warning:FileAddVar: Variable TS2_M is already defined, can not redefine
    > warning:FileAddVar: Variable TS2_M is already defined, can not redefine
    > warning:FileAddVar: Variable TS2_M is already defined, can not redefine
    > fatal:Variable (TS2_M) is undefined
    > fatal:Execute: Error occurred at or near line 657
    > --
    >
    > I do not see anywhere that I have defined the variable earlier.
    > 2) Why does it say, it is already defined then gets to a point and it says
    > it is not defined.
    > Any idea why this error?
    > Thanks
    > Ben

    PS: Below is a code snippet

     Code snippet
      ;xxxxxxx Needed for TS2_M xxxxxxx
         minmax = (/1,2/)
         minmax@long_name = "indices for min and max"
         minmax@units = "index"
         minmax!0 = "minmax"
         minmax&minmax = minmax
         dimsmn = dimsizes(minmax)

        vars4d = (/"TS2_M"/)
        type4d = (/"float"/)
        filevardef(dataout, vars4d, type4d,(/"time","minmax","lat","lon"/))
    XXX filevarattdef(dataout, "TS2_M",TS2_M) ;This is where it bombs out
     
        vars1d = (/"minmax"/)
        type1d = (/"float"/)
        filevardef(dataout, vars1d, type1d, (/"minmax"/))
        filevarattdef(dataout, "minmax",minmax)

       .
       .
       .
       dataout->TS2_M = (/lsxdatain->TS2_M/)

    -- 
    

    Benjamin L. Lamptey Phone: (814) 865-9911 (office) Pennstate (EMS Environment Institute) (814) 237-8193 (home) 2217 Earth-Engineering Sciences Bldg Fax : (814) 865-3191 University Park, PA 16802 WWW:http://www.essc.psu.edu/~lamptey

    _______________________________________________ ncl-talk mailing list ncl-talk AT ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Sat Dec 18 2004 - 08:24:40 MST