CMAQ netCDF error number -33

Hi guys

I tried to add an additional emission file (.nc) which I generated through ncl command.
This additional emission file is calculated from the original emission file which is applicable for CMAQ.

In ncl command, I assigned the global attribute same as the original one:

    fAtt@IOAPI_VERSION = "ioapi-3.2: $Id: init3.F90 185 2020-08-28 16:49:45Z coats $                      "
    fAtt@EXEC_ID     = "????????????????                                                                "
    fAtt@FTYPE = 1
    fAtt@CDATE = 2022101
    fAtt@CTIME = 93115
    fAtt@WDATE = 2022101
    fAtt@WTIME = 93115
    fAtt@SDATE = 2019001
    fAtt@STIME = 0
    fAtt@TSTEP = 10000
    fAtt@NTHIK = 1
    fAtt@NCOLS = 90
    fAtt@NROWS = 135
    fAtt@NLAYS = 15
    fAtt@NVARS = 63
    fAtt@GDTYP = 2
    fAtt@P_ALP = 10.
    fAtt@P_BET = 40.
    fAtt@P_GAM = 120.
    fAtt@XCENT = 120.
    fAtt@YCENT = 25.
    fAtt@XORIG = -57000.
    fAtt@YORIG = -351000.
    fAtt@XCELL = 3000.
    fAtt@YCELL = 3000.
    fAtt@VGTYP = 7

but error message will occur when running CMAQ, which emission file is coded as GR_EMIS_010

 "GR_EMIS_010" opened as OLD:READ-ONLY
 File name "/global/cscratch1/sd/cpkuo/TW2022/CMAQ_REPO/PREP/emis/201901/ADJ_20181229.nc"
 File type GRDDED3
 Grid name "^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@"
 Dimensions: 135 rows, 90 cols, 15 lays, 63 vbles
 NetCDF ID:   1048576  opened as READONLY
 Starting date and time  2019001:000000 (0:00:00   Jan. 1, 2019)
 Timestep                          010000 (1:00:00 hh:mm:ss)
 Maximum current record number         0
 netCDF error number      -33
 File header attribute EXEC_ID not available for file "GR_EMIS_010                     "
 netCDF error number      -33
 File header attribute CDATE not available for file "GR_EMIS_010                     "
 netCDF error number      -33
 File header attribute CTIME not available for file "GR_EMIS_010                     "
 netCDF error number      -33
 File header attribute WDATE not available for file "GR_EMIS_010                     "
 netCDF error number      -33
 File header attribute WTIME not available for file "GR_EMIS_010                     "
 netCDF error number      -33
 File header attribute UPNAM not available for file "GR_EMIS_010                     "
 netCDF error number      -33
 File header attribute FDESC not available for file "GR_EMIS_010                     "
 netCDF error number      -33
 File header attribute UPDSC not available for file "GR_EMIS_010                     "
 netCDF error number      -33
 Error reading VDESC for file "GR_EMIS_010                     ", vble "????????????????"
 netCDF error number      -33
 EnetCDF error numberrror reading VDESC for file "GR_EMIS_010                     ", vble "????????????????"
 netCDF error number      -33
 Error reading VDESC for file "GR_EMIS_010                     ", vble "????????????????"
 netCDF error number      -33
 Error reading VDESC for file "GR_EMIS_010                     ", vble "????????????????"
 netCDF error number      -33
 Error reading VDESC for file "GR_EMIS_010                     ", vble "????????????????"
 netCDF error number      -33
 Error reading VDESC for file "GR_EMIS_010                     ", vble "????????????????"
 netCDF error number      -33
 Error reading VDESC for file "GR_EMIS_010                     ", vble "????????????????"
 netCDF error number      -33
 Error reading VDESC for file "GR_EMIS_010                     ", vble "????????????????"

I am not sure this is because the file format issue or not (.nc vs .ncf).
Any suggestion?

See the I/O API Home Page https://cjcoats.github.io/ioapi/index.html or https://www.cmascenter.org/ioapi/documentation/all_versions/html/index.html:

The Models-3 I/O API is A Programming Interface, not a data format !!
*I/O API files are not synonymous with “netCDF files” !!

The use of nco or ncl to create I/O API files is not supported for exactly the reason you post: there are a number of subtleties involved. To the best of my knowledge (as the I/O API author), so far no one treating the I/O API as a format has got it completely right – and that includes PAVE and VERDI, both of which do make mistakes in their interpretations of it.

Microsoft .docx is similarly handled as an API instead of as a data format: would you try to write files for it with a hex editor ?? Instead, you either use MS-Word itself or one of the libraries like wvlib

BTW, the netCDF errors list can be found here: https://cjcoats.github.io/ioapi/ERRORS.html#ncf331 and it looks as though you are probably not even using ncl correctly:

ncebadid = nf_ebadid = -33: not a netcdf ID

Hi, @cjcoats

Thanks for the quick reply. I realized my problem now.
Will you suggest me use m3fake to generate the emission file and fill in the emission values?

Yes – using m3fake with CSV input is probably the easiest way. See https://www.cmascenter.org/ioapi/documentation/all_versions/html/M3FAKE.html for its manual.