Skip to content

Update ACHEM to new MAPL ACG #5

@mathomp4

Description

@mathomp4

This issue is prompted by @pcolarco who is looking at ACHEM. He said:

This is a different, maybe ExtData question. You can point me at Ben if he is back around: I am looking at the @achem component in a recent model. There is some functionality that depends on an import CO_BIOMASS_VOC being filled. The import is not defined in the ACHEM_Registry.rc (or anywhere else I can see) but it is given an entry in the ACHEM_ExtData.yaml. Seemingly the code works in that it produces sensible looking output. Could this make any sort of sense?

I looked and this repo seems to be "partially" ACG-ified and it's the old Perl ACG. And there is a ACHEM_Registry.rc file but looking at the GC, it's only really used for exports? I think it was "abandoned" because ACHEM has a lot of Imports, etc. that are only active if a condition is met. Like, say CO_BIOMASS_VOC:

    OPTIONAL_VOC_IMPORTS: if (self%voc_chem) then

     if (.not. self%mam_chem) then
        call MAPL_AddImportSpec(GC, &
                                SHORT_NAME = 'OH',  &
                                LONG_NAME  = 'Hydroxyl radical (OH)',  &
                                UNITS      = 'mol mol-1', &
                                DIMS       = MAPL_DimsHorzVert,    &
                                VLOCATION  = MAPL_VLocationCenter,    &
                                RESTART    = MAPL_RestartSkip, &
                                __RC__)
     end if

        call MAPL_AddImportSpec(GC, &
                                SHORT_NAME = 'CO_BIOMASS_VOC',  &
                                LONG_NAME  = 'CO Biomass Burning Emissions',  &
                                UNITS      = 'kg m-2 s-1', &
                                DIMS       = MAPL_DimsHorzOnly,    &
                                VLOCATION  = MAPL_VLocationNone,   &
                                RESTART    = MAPL_RestartSkip, &
                                __RC__)

So in a StateSpecs file that OH would need some self%voc_chem .AND. (.NOT. self%mam_chem) column?

Luckily, @darianboggs has made the new ACG much more useful and it has the ability to have specs with if-logic. MAPL3 will be ACG-heavy, so it might be worth converting ACHEM to new ACG with MAPL2 now and making sure we get that right and then converting to MAPL3.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions