geoschem / HEMCO

The Harmonized Emissions Component (HEMCO), developed by the GEOS-Chem Support Team.
https://hemco.readthedocs.io
Other
17 stars 33 forks source link

Comment out manual InvMEGAN diagnostic creation code #281

Closed eamarais closed 4 months ago

eamarais commented 4 months ago

Your name

Eloise Marais

Your affiliation

UCL, UK

What happened? What did you expect to happen?

This is only sort of a bug. It's a request to comment out unnecessary code that outputs lots of emissions estimates by default when these aren't wanted. Specifically, to comment out calls to DiagnCreate code for all "InvMEGAN*" variables in the subroutine HCOX_Megan_Init in ./HEMCO/src/Extensions/hcox_megan_mod.F90. These aren't needed, as the user can request these be output from the HEMCO diagnostics file HEMCO_Diagn.rc. I tested and confirmed that commenting out all these lines, recompiling and rerunning GCClassic with the diagnostics requested via HEMCO_Diagn.rc works.

What are the steps to reproduce the bug?

Intentionally left blank, as this is just a quick fix detailed above.

Please attach any relevant configuration and log files.

Attached a screenshot to show 1 of the 16 diagnostics currently set manually in the code. Screenshot 2024-07-08 at 12 48 53

What HEMCO version were you using?

3.0.0 and 3.6.0 (issue is in both)

What environment were you running HEMCO on?

Local cluster

What compiler and version were you using?

gcc 9.2.0

Will you be addressing this bug yourself?

Yes

In what configuration were you running HEMCO?

GCClassic

As what resolution were you running HEMCO?

multiple (4x5, 0.25x0.3125)

What meterology fields did you use?

GEOS-FP

Additional information

No response

msulprizio commented 4 months ago

Thanks for reporting this @eamarais. I've added it to our to-do list for an upcoming release (GEOS-Chem 14.4.x or 14.5.0).

yantosca commented 4 months ago

Hi @msulprizio and @eamarais, thanks for bringing this up. I wonder if we could figure out a way to leave the InvMEGAN diagnostics on for the fullchem_benchmark simulations (since we use them to generate inventory tables) but disable them otherwise. I can look into this.

Also note, in PR #2372 we are implementing a fix to turn off the MEGAN extension for all fullchem simulations except fullchem_benchmark. This has the added benefit of disabling the InvMEGAN diagnostic output. See this comment.

eamarais commented 4 months ago

Hi @yantosca, these should be output as long as these are specified in the HEMCO_Diagn.rc file.

yantosca commented 4 months ago

@eamarais: Maybe an easy fix is to delete those lines from the HEMCO_Diagn.rc at rundir creation for all fullchem simulations except benchmark. I can look into this.

eamarais commented 4 months ago

@yantosca, I don't quite follow your suggestion, as my recommendation is that it makes sense to no longer have these Diagn_Create lines in the code. These are no longer needed, as the request to output the InvMEGAN* variables can be specified by users in HEMCO_Diagn.rc and users can output these when they want, rather than having these output by default.

yantosca commented 4 months ago

@eamarais: Oh yes, now I see. Brain freeze.

yantosca commented 4 months ago

Thanks @eamarais. We can now close this issue out as PR #282 has been merged into the HEMCO "no-diff-to-benchmark" development stream. This will ship with GEOS-Chem 14.4.2 / HEMCO 3.9.2.