This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Yes, LAY dimension and VGLVLS attribute are required (by the M3IO spec) in all M3IO-format files, even for one-layer files such as shown here: netcdf ACONC { dimensions: TSTEP = UNLIMITED ; // (24 currently) DATE-TIME = 2 ; LAY = 1 ; VAR = 5 ; ROW = 299 ; COL = 459 ; variables: int TFLAG(TSTEP, VAR, DATE-TIME) ; TFLAG:units = "<YYYYDDD,HHMMSS>" ; TFLAG:long_name = "TFLAG " ; TFLAG:var_desc = "Timestep-valid flags: (1) YYYYDDD or (2) HHMMSS " ; float NO2(TSTEP, LAY, ROW, COL) ; NO2:long_name = "NO2 " ; NO2:units = "ppmV " ; NO2:var_desc = "Variable NO2 " ; float NO(TSTEP, LAY, ROW, COL) ; NO:long_name = "NO " ; NO:units = "ppmV " ; NO:var_desc = "Variable NO " ; float O3(TSTEP, LAY, ROW, COL) ; O3:long_name = "O3 " ; O3:units = "ppmV " ; O3:var_desc = "Variable O3 " ; float NO3(TSTEP, LAY, ROW, COL) ; NO3:long_name = "NO3 " ; NO3:units = "ppmV " ; NO3:var_desc = "Variable NO3 " ; float CO(TSTEP, LAY, ROW, COL) ; CO:long_name = "CO " ; CO:units = "ppmV " ; CO:var_desc = "Variable CO " ; // global attributes: :IOAPI_VERSION = "$Id: @(#) ioapi library version 3.0 $ " ; :EXEC_ID = "???????????????? " ; :FTYPE = 1 ; :CDATE = 2010139 ; :CTIME = 143719 ; :WDATE = 2010139 ; :WTIME = 143719 ; :SDATE = 2006184 ; :STIME = 0 ; :TSTEP = 10000 ; :NTHIK = 1 ; :NCOLS = 459 ; :NROWS = 299 ; :NLAYS = 1 ; :NVARS = 5 ; :GDTYP = 2 ; :P_ALP = 33. ; :P_BET = 45. ; :P_GAM = -97. ; :XCENT = -97. ; :YCENT = 40. ; :XORIG = -2556000. ; :YORIG = -1728000. ; :XCELL = 12000. ; :YCELL = 12000. ; :VGTYP = 7 ; :VGTOP = 5000.f ; :VGLVLS = 1.f, 0.f ; :GDNAM = "12US1 " ; :UPNAM = "WR_ACONC " ; :VAR-LIST = "NO2 NO O3 NO3 CO " ; :FILEDESC = "Concentration file output Averaged over the synchronization time steps Timestamp represents beginning computed date/time Layer mapping (CGRID to AGRID): Layer 1 to 1 " ; :HISTORY = "" ; } ________________________________________ From: Schmunk, Robert B. (GISS-611.0)[TRINNOVIM, LLC] <address@hidden> Sent: Friday, June 13, 2014 6:43 PM To: John Caron Cc: address@hidden; Plessel, Todd Subject: M3IOConvention John, In working with a Panoply user who recently had trouble with a dataset, I may have discovered a bug in NJ library’s handling of datasets using the M3IO Convention. It’s a question of what the convention actually requires and how NJ’s M3IOConvention class handles a possible exception. The problem is that when M3IOConvention is constructing coordinate axes, it throws a NullPointerException in the makeZCoordAxis method at line 180 if the LAY dimension is not declared and at line 187 if there is no global attribute named VGLVLS. Absent this dimension or attribute, the file can’t be opened at all. I see there are a couple commented lines at 79-80 indicating there’s some question as to whether to the VGLVLS attribute is required. But with the lack of exception catching at line 187, it effectively is required. In any event, it would seem to me that that the makeZCoordAxis method should verify that LAY and VGLVLS do exist. If their presence is optional, then makeZCoordAxis should return without further effort constructing the axis. If they are required, then perhaps a more helpful exception message could be thrown? BTWL I’m CC-ing Todd Plessel on this as I see his address in the source code for M3IOConvention and also see his name in the NJ support archive as answering related e-mail last year. I would assume he can state whether the LAY dimension is required of a valid M3IO dataset or simply optional. rbs -- Robert B. Schmunk Webmaster / Senior Systems Programmer NASA Goddard Institute for Space Studies 2880 Broadway, New York, NY 10025