Error when running ICON run script

Dear Sir, I have a error when I am running run_icon.csh,the main error are as follow:

 Value for IOAPI_CHECK_HEADERS not defined;returning default:   FALSE
 Error opening file at path-name:
 netCDF error number  -51  processing file "INIT_CONC_1"
 NetCDF: Unknown file format
 NetCDF: Unknown file format
 /home/Downloads
 
 *** ERROR ABORT in subroutine OPN_IC_FILE
 Could not open nor create INIT_CONC_1      file

I wish you could help me to solve the problem!
Thanks a lot!

`

This says that the alleged input-file is NOT a netCDF file. Or at least, not a netCDF file recognized by the version/configuration of netCDF that your ICON program is built with…

Was every netCDF-program you’re using built with the recommended netCDF configuration flags (see the I/O API installation manual section https://cjcoats.github.io/ioapi/AVAIL.html#ncf4?

--disable-netcdf-4 --disable-dap

This routine is creating a new output file. Did you set the environment variable INIT_CONC_1 to point to a valid path? Is there an already-existing output file with that name?

I had set the environment variable INIT_CONC_1 to point to a valid path,there isn’t an already-existing output file with that name.

Have you been able to run any other programs using the Models-3 I/O API? You need to determine whether the problem is specific to ICON or whether you are having a more general problem with your netCDF and IOAPI.

Thanks, I can run CCTM using Benchmark data and run mcip program successfully. I don’t know whether it means I can use Models-3 I/O API. Do you have any suggestions to check the problem of my netCDF and IOAPI?

That suggests your IOAPI is ok.
What is the value of your INIT_CONC_1? Is it /home/Downloads? This environment variable needs to be a fully qualified filename (including the path), not merely a directory.
If you still cannot get it to work, please post your run script.

Also, please confirm that you are using CMAQv5.3.1. You might also try doing a clean build of ICON.

Thanks. I have change it to a fully qualified path but it doesn’t work.
The run scripts and log file are as follows:
run_icon.txt (5.0 KB)
icon_log.txt (14.0 KB)
The version of my CMAQ is 5.3.

OUTDIR is pointing to /home/zhouminghui/Downloads/outputfile, the same as INIT_CONC_1. Right before execution, your script says:

if ( ! -d "$OUTDIR" ) mkdir -p $OUTDIR
and that will make that filename a directory. You can’t then write a netCDF file with the same name.

So,do you mean that I should change the path of OUTDIR to other valid path?

Could you please give me some specific suggestions to me? Thanks a lot!

Change line 65 of your script so that OUTDIR is pointing to the “Downloads” directory rather than to thefile “outputfile”:

set OUTDIR   = /home/zhouminghui/Downloads      #> output file directory

Unfortunately ,I follow your step,but it doesn’t work. :joy:

I just tried your script, and it works for me after updating the paths correctly. What error are you getting?
Check to see that /home/zhouminghui/Downloads/outputfile does not exist before you run the script.

Thanks,I have change my path and run script again,the last lines of the logs are:

    Value for IOAPI_CHECK_HEADERS not defined;returning default:   FALSE
 Value for IOAPI_OFFSET_64:  YES returning TRUE
 Value for IOAPI_CFMETA not defined;returning default:   FALSE
 Value for IOAPI_CMAQMETA not defined; returning defaultval ':  'NONE'
 Value for IOAPI_CMAQMETA not defined; returning defaultval ':  'NONE'
 Value for IOAPI_SMOKEMETA not defined; returning defaultval ':  'NONE'
 Value for IOAPI_SMOKEMETA not defined; returning defaultval ':  'NONE'
 Value for IOAPI_TEXTMETA not defined; returning defaultval ':  'NONE'
 Value for IOAPI_TEXTMETA not defined; returning defaultval ':  'NONE'
  
 "INIT_CONC_1" opened as UNKNOWN(R-W)    
 File name "/home/zhouminghui/Downloads/outputfile/INIT_CONC_1"
 File type GRDDED3 
 Execution ID "ICON_v53.exe"
 Grid name "2020_01SE1"
 Dimensions: 10 rows, 10 cols, 79 lays, 104 vbles
 NetCDF ID:    131072  opened as READWRITE           
 Time-independent data.
 Value for IOAPI_LOG_WRITE:  F returning FALSE


 >>---->  Program  ICON completed successfully  <----<< 

Finnally,INIT_CONC_1 file is being generated in the path of /home/zhouminghui/Downloads/outputfile. Does it means that I run icon_script correctly or I should set something else to change the script?Thanks a lot!

Yes, the message “Program ICON completed successfully” usually indicates that the program ran successfully.

It appears that you named the file “INIT_CONC_1” and put it in a subdirectory called “outputfile” – which is not what I would recommend. But it is a legal name for your initial conditions file.

Thanks, I have some other problems to ask you:
1.Wether I got some other errors from the logs and I should set other things?
2.What should I do in the next step?Is there a complete CMAQ simulation Userguide or Tutorial? The official userguide seems not a detailed one.

Best wishes!

There is a lot of information available in the User’s Guide and there are several Tutorials available, including running the CMAQ benchmark test case. We hope that is enough to get new users started. If it isn’t, please post a new question.

1 Like