MEGAN v3.2 megvea error with NLAI

Hi CMAS users,

I am trying to generate BVOC emissions using MEGANv3.2.
As I understand, the NLAI value can be set to either 46 or 12 in the megvea program and all related tools.

I was able to successfully generate BVOC emissions using 46 LAI values.
However, when I try to use monthly LAI data by setting NLAI to 12, I encounter the following error:
log.run.megvea.d01.2020091.txt (5.3 KB)

Min

Adding the error message found in the log file:

Illegal data type    0  for variable ����������������
     netCDF error number  -36  processing file "MGNERS"
     NetCDF: Invalid argument
     
     *** ERROR ABORT in subroutine MEGVEA
     Could not open file /home2/heo/DATA/EMIS/OUTPUT/MEGAN/MEGVEA/MGNERS.MAR.20200331.ncf
     

Can you verify that this file exists, and that the path is correct?

Dear lizadams,

I understand that the MGNERS file is generated as an output of the MEGVEA program.
However, when I set NLAY = 12 in the MEGCAN, MEGSEA, and MEGVEA programs, an error occurs in MEGVEA, and the MGNERS file is not generated.

Thank you very much for your assistance.

Best regards,
Min

Hi Heomin,

I’ve identified the issue that caused the model to fail when LAI was set to 12. The original code requires specifying the exact number of variables when creating the NetCDF file. In the MEGVEA module, the MGNERS NetCDF file was set to include 20 variables, but only 19 are actually needed.

To resolve this, simply modify the value of NVARS3D to 19 at line 427 in src/MEGVEA/megvea.f, and then recompile the code.

After making this change and running “make clean” first and make" again, the problem should be fixed.

Best regards,
Jimmy

1 Like