Skip to content

b4b-dev: Remove references to cpl7 and mct (the latter is done) #2294

Open

Description

@jedwards4b

And must be removed prior to CESM3.
https://github.com/ESCOMP/CTSM/blob/master/lilac/src/lilac_mod.F90#L11

Definition of done:

  • Remove need for MCT in Lilac
  • Remove MCT in README documentation
  • Remove MCT from our standard testing
  • Remove MCT and CPL7 from Externals.cfg
  • Remove MCT specific directories from .config_files.xml
  • Remove MCT option from CLMBuildNamelist.pm and build-namelist and unit tester
  • Remove from bld/config_files/config_definition_ctsm.xml and bld/config_files/config_definition_ctsm.xm
  • Remove from python/ctsm/modify_input_files/fsurdat_modifier.py
  • Remove components/clm/src/unit_test_stubs/csm_share/CMakeLists.txt
  • Remove components/clm/src/unit_test_stubs/csm_share/mct_mod_stub.F90
  • Remove from User's guide
  • Remove from test/tools/test_driver.sh
  • Remove the src/cpl/mct directory
  • The mct subroutines in src/main/glc2lndMod.F90

Final steps to do after PIO is updated and CESM is ready for the final removal

  • Update PIO and any other CESM externals needed to fully remove MCT

  • Remove mct from .gitmodules

  • Remove MCTID from src/cpl/nuopc/lnd_comp_nuopc.F90 (this is just the component ID, so the name doesn't matter)

  • Remove mct comp_interface option from build-namelist, abort on error if set

  • Final removal of remaining references to cpl7

Activity

  1. jedwards4b commented on Dec 15, 2023

    @jedwards4b
    ContributorAuthor

    Also components/clm/src/unit_test_stubs/csm_share/CMakeLists.txt
    components/clm/src/unit_test_stubs/csm_share/mct_mod_stub.F90

  2. added
    nextthis should get some attention in the next week or two. Normally each Thursday SE meeting.
    on Dec 15, 2023
  3. added this to the CESM3 milestone on Dec 15, 2023
  4. added
    code healthimproving internal code structure to make easier to maintain (sustainability)
    on Feb 15, 2024
  5. removed
    nextthis should get some attention in the next week or two. Normally each Thursday SE meeting.
    on Feb 15, 2024
  6. ekluzek commented on Feb 15, 2024

    @ekluzek
    Contributor

    Discussed in meeting, this is important to do. Really want this done before CESM3, and it's in our planning now for that. Right now we don't have someone to work on this.

  7. jedwards4b commented on Feb 15, 2024

    @jedwards4b
    ContributorAuthor

    @ekluzek As I understand it it is no longer needed in ctsm, or mosart and we have removed it from csm_share. If you do not remove it from slim prior to cesm3 then I propose that slim is not released with cesm3. What other requirement is there for mct?

  8. wwieder commented on Feb 15, 2024

    @wwieder
    Contributor

    I think this issue is about LILAC, not SLIM, but maybe I'm wrong.
    Maybe it's worth hearing from @dlawrenncar what the plan for LILAC should be moving forward?

  9. jedwards4b commented on Feb 15, 2024

    @jedwards4b
    ContributorAuthor

    @wwieder Thanks for the clarification - it looks like lilac is a single processor application - am I reading that correctly?

  10. ekluzek commented on Feb 15, 2024

    @ekluzek
    Contributor

    @jedwards4b LILAC is not just a single processor app. LILAC is about coupling CTSM to other atmospheric models rather than through CESM. So coupling to WRF for example. So it'll use multiple processors just as you would with CTSM or WRF on their own.

    It looks like MCT is being used for CPL7-data-models for LILAC to fill the roll of a DATM for the testing. ESMF is widely used in LILAC, and the CTSM cap for LILAC is an ESMF component, so it shouldn't be too hard to do this, but it's not trivial either. I think when LILAC was developed CDEPS wasn't mature enough to use it yet. Now we just need to switch the use of CPL7/DATM to CDEPS/DATM.

    We don't currently have experts in LILAC right now. @billsacks is on ESMF, but maybe we could get some consulting time from him? And Negin is in CISL now. So we could only ask her as a favor for us. Right now we don't have someone to work on this, but hopefully can before CESM3 release. And @wwieder is right we need to assess the importance of supporting LILAC for going forward.

  11. billsacks commented on Feb 15, 2024

    @billsacks
    Member

    It looks like MCT is being used for CPL7-data-models for LILAC to fill the roll of a DATM for the testing. ESMF is widely used in LILAC, and the CTSM cap for LILAC is an ESMF component, so it shouldn't be too hard to do this, but it's not trivial either. I think when LILAC was developed CDEPS wasn't mature enough to use it yet. Now we just need to switch the use of CPL7/DATM to CDEPS/DATM.

    Thanks a lot for your investigation of this @ekluzek . I think this is mostly right, but a minor correction is that I think the use of MCT / data model functionality is to fill in fields that might be missing from the actual atmosphere. Currently this is used for prescribing aerosols. I agree that the right path forward is to change lilac_atmaero.F90 to use CDEPS streams.

    (LILAC also has a fake atmosphere driver, lilac/atm_driver/atm_driver.F90, which serves a similar purpose as DATM for testing, though much simpler. But I don't think that relies on MCT: it just uses hard-coded data.)

  12. dlawrenncar commented on Feb 16, 2024

    @dlawrenncar
    Contributor
  13. jedwards4b commented on Feb 16, 2024

    @jedwards4b
    ContributorAuthor

    @dlawrenncar I agree that regional modeling should be part of the longer term plan, but do we need it for cesm3? LILAC has a dependency on mct - a library that cseg has long slated for removal in cesm3. As far as I can tell it's the last place that is dependent on mct - if we leave mct in cesm3 we are on the hook to support it for many years to come - I think LILAC could be updated to have that dependency removed with fairly small effort, but the ctsm group is saying that LILAC may not be part of the longer term plan and maybe it should just be removed altogether. So I am looking for a response to a very specific question - update LILAC to remove the dependence on mct or remove LILAC from the cesm3 release. Doing nothing and releasing cesm3 with an mct dependence is not an option I want to consider.

  14. ekluzek commented on Feb 16, 2024

    @ekluzek
    Contributor

    @dlawrenncar can we make a commitment that removing MCT is a requirement of the CESM3 release? I think @jedwards4b is right about this in terms of future support. If we make that commitment that we will hold up the release for anything requires MCT. So for LILAC that means either updating it, or removing it. The other linchpin is SLIM, and I'd like to say that we hold up the release until it's updated to not require MCT as well.

    I'm pretty sure we could get agreement in both CSEG and SEWG that the CESM3 release should require the removal of MCT. If we can have that commitment we don't have to stress about this. @dlawrenncar should @jedwards4b make the case to the CESM project meeting in this regard? Or it could be @briandobbins as well.

  15. 28 remaining items

  16. removed their assignment
    on Nov 5, 2024
  17. wwieder commented on Feb 5, 2025

    @wwieder
    Contributor

    @ekluzek should this issue be closed?
    If not, how close are we to having the code cleanup's from alpha04a merged to master?

  18. added
    priority: lowBackground task that doesn't need to be done right away.
    on Feb 5, 2025
  19. ekluzek commented on Feb 5, 2025

    @ekluzek
    Contributor

    Technically it looks like there are a few references to cpl7 that we should remove and make sure the LILAC tests still work:

    git grep -i cpl7 # shows the following...

    bld/CLMBuildNamelist.pm:       # do nothing - use value provided by config_grid.xml and clm.cpl7.template
    lilac/CMakeLists.txt:add_subdirectory(${CIME_ROOT}/../components/cpl7/driver drv_share)
    lilac/src/lilac_driver_pio_mod.F90:  ! components/cpl7/driver/main/driver_pio_mod.F90, except (1) the module name has been
    

    But, ALL of the important things are done here, and that's just a really minor cleanup, that isn't critical to do. It just removes some things that could cause confusion. So I made it low priority.

  20. added
    b4bbit-for-bit
    and removed
    doneIssues whose closing PR is done but not yet merged (pending test re-run ok)
    on Jan 14, 2026
  21. slevis-lmwg commented on Jan 14, 2026

    @slevis-lmwg
    Contributor

    Based on the most recent post, I removed "done"

  22. changed the title [-]use of mct_mod is deprecated [/-] [+]b4b-dev: Remove references to cpl7 and mct (the latter is done)[/+] on Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

b4bbit-for-bitcode healthimproving internal code structure to make easier to maintain (sustainability)priority: lowBackground task that doesn't need to be done right away.size: small

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions