Some unknown problems about EMPROC

run.emproc.v210.d01.csh (2.3 KB)
Dear teachers, I met something unknown when I run emproc after I got txt2 and met2mgn output files successfully. As you can see, there is not any error returned but also not any outputfile I got from emproc program. It just finish suddenly without any sign and I got not log file so no ideas about what happened. Hope some kind teachers may help me. I felt that almost got the result of MEGAN.

[jiabh@login04 work]$ csh run.emproc.v210.d01.csh
RUNING***
/data1/jiabh/YZD/data/mcip/2017070112-2017070312/GRIDDESC
0.003u 0.068s 0:00.12 50.0% 0+0k 0+0io 1pf+0w

(here is all I got after running EMPROC ~ Failed to upload screen shot)

You should go to the logfile directory of emproc then check with the log file, rather than looking at the returned error from the csh.

Yes. And No.

From the very beginning, one of the requirements of the CMAQ system was reliable error detection and management. Among other things, there was a large amount of experience that said log-checking was not adequate.

The solution was put into place, then ignored by the contractors who wrote the original scripts, and was not in the training of those who “learned on the job.”

Linux (and UNIX) processes always return an error-status number as $status, whether they were killed by the system or whether they “terminated normally” – 0 for success, and non-zero for failure. (For system related termination, these codes are defined in /usr/include/errno.h; the shell-command perror reports an explanatory message.) The M3EXIT I/O API call always returns the programmer’s selected error-status number for further use in error detection and management.

Scripts should always check program-status and act accordingly. For example:

my_program
set estat = ${status}
if ( ${estat} ) then
    perror ${estat}
    echo "Error ${estat} in program my_program.  Exiting"
    exit ${estat}
endif
1 Like

sorry, I meant no log files returned also. I found that the error reason may be the from value of VGTYP which is produced by MCIP and occured in mcipout files and met2mgn files. VGTYP is 7 in other guys files while in my output files is -9999 and that why it can’t be read by EMPROC I guess. Now I doubt that it the problem of MEGAN version.

This issue has been thoroughly discussed in the forum. You can easily find the solution using the search bar on the upperright.

I don’t think so. I would suggest you solve the -9999 issue then retry with the emproc process.

BTW, make sure that you have the GRIDDESC file in the right place.

Thank you so much for your advices! I’ll go learn and check log error again!

Thank you, I’ve read that thread and I think they already reached an agreement that its best to update the SMOKE? (what they talked about there)

You are concerned about an issue in MCIP. Thus, you should focus on MCIP rather than SMOKE. Have you tried upgrading the version of MCIP? I used to encounter the same issue but it has been a while thus I don’t recall how to address.

This earlier discussion may be helpful.

In short, the issue seems to be that the MEGAN emproc program does not know how to handle the VGTYP “-9999” token value used by convention in MCIP when the hybrid vertical coordinate system was used in WRF. emproc likely was coded before this convention was introduced in MCIP5.0

I do not know why emproc looks for VGTYP and what if anything it might be used for in the actual MEGAN emissions calculations. You would have to examine the emproc Fortran source code and then update it to handle the case when VGTYP is -9999.

Or starting in CMAQv5.4, you could make use of the MEGAN3 inline capability instead of trying to run MEGAN2.1 offline via emproc. This was noted by @willison.jeff in the earlier thread you started, pointing you to a previous discussion about the much simpler workflow needed to accomplish this.

1 Like

I’m afraid my mcip is a relatively new version. Besides, can I upgrade MCIP but not CMAQ?

Thank you so much! I didnt realize that Mr.jeff was meaning that I should use MEGAN module within CMAQ v5.4 rather than running MEGAN offine individually. It seems that to get biogenic emission data, if I use the latest version of CMAQ, the only program I have to run is TXT2IOAPI. I’ll go update MEGAN (mentioned as downstream program in earlier thread)and try use the newer CMAQ to simplify the work. :heart: