Skip to content

Conversation

iulian787
Copy link
Contributor

@iulian787 iulian787 commented Jun 2, 2025

Some changes to driver-moab.

Add changes to map migration to support reading in all maps. Use iMOAB_MigrateMapMesh instead of iMOAB_ComputeCoverageMesh, modernizing and simplifying the mesh mapping workflow.

Add more mesh output under MOABDEBUG.

Aream values are used for correction factors. Aream (area used by mapping codes) are either computed by tempestremap in compute maps workflow, or read from mapping files in read map workflows. Aream are set for both source and target meshes, and the last aream computation or reading wins. For atm and rof components, aream on coupler side are also copied during component coupler init, from area fields, before any map initialization. This is to avoid cases in which atm or rof do not participate in any maps, so aream might end up uninitialized.
Also, report min/max for correction factors computed for moab driver, in the same way mct driver reports them

Several corrections were made for fractions computations; When set from mct fractions, global grid ids from mct are needed too, and they were missing in some data models from regular place. (domain structure in component type)

Also add new coupling features that were only in the mct driver.

  • Changes related to sediflag for mosart were missing in moab import
  • Changes related to gustiness were missing in moab driver for land, ice and flux calculations
    . Several changes were triggered by glc coupling with ocean in the new paradigm; default driver input is still needed, and build configuration changes are necessary for the code to be setup, compiled and run

Older changes from PR iulian787/restore_migrate_map_mesh (PR #7286) were rebased on top of those glc changes

new changes were made to restart logic for moab driver, for tri-grid case; Land mesh is usually culled from river mesh in tri-grid case, and the global size / maximum dof id of land mesh is retrieved in that case from river model. In regular bigrid case, the land mesh maximum dof id is retrieved from atm mesh. samegrid_al and samefgrid_lr are used for these cases

iulian787 and others added 28 commits May 31, 2025 16:52
domain attribute may be missing
rfrac on rof and compare with mct fields routine
on coupler side
why did we use the ocean domain before ?
similarly to global ids;
also, one forgotten deallocate(tagValues)
lfrac on atm
maybe all need to use gsmap?
introduce also context exchange as an optional parameter
aream is not initialized properly
maybe data models ?
on the coupler side; it may never be init properly otherwise

still not clear what mct does
it is computing the coverage after reading the map

as it was before
remove pid3 that was confusing in map mesh migrate
compute coverage as part of mesh migrate, and
the par comm graph needed
see commit 5813d41
it was missing from land, ice, and flux calculations
also, allow for multiple maps for one coverage set
may need to change that
also, remove (1,1) reference; array pointer is enough, it
is converted to pointer in C++

so instead of
ierr = iMOAB_GetDoubleTagStorage ( mrofid, tagname,&
    totalmbls_r , ent_type, x2r_rm(1,1) )

it is enough to do

ierr = iMOAB_GetDoubleTagStorage ( mrofid, tagname,&
    totalmbls_r , ent_type, x2r_rm )
@rljacob rljacob requested a review from vijaysm June 2, 2025 15:20
@rljacob rljacob self-assigned this Jun 2, 2025
@rljacob rljacob added Coupler Related to code in driver-mct or driver-moab or component connections to the coupler. MOAB Involves the MOAB library labels Jun 2, 2025
iulian787 added 2 commits June 6, 2025 16:48
land mesh is culled, usually; and it is created either from atm or
from river mesh, meshes that are full
use their global size to write/read the restart data associated to land
rljacob added a commit that referenced this pull request Jun 9, 2025
Some changes to driver-moab.

Add changes to map migration to support reading in all maps. Use iMOAB_MigrateMapMesh
instead of iMOAB_ComputeCoverageMesh, modernizing and simplifying the mesh mapping workflow.

Add more mesh output under MOABDEBUG.

Aream values are used for correction factors. Aream (area used by mapping codes) are either
computed by tempestremap in compute maps workflow, or read from mapping files in read map workflows.
Aream are set for both source and target meshes, and the last aream computation or reading wins.
For atm and rof components, aream on coupler side are also copied during component coupler init,
from area fields, before any map initialization. This is to avoid cases in which atm or rof do not
participate in any maps, so aream might end up uninitialized.
Also, report min/max for correction factors computed for moab driver, in the same way mct driver reports them

Several corrections were made for fractions computations; When set from mct fractions, global grid
ids from mct are needed too, and they were missing in some data models from regular place. (domain structure in component type)

Also add new coupling features that were only in the mct driver.

Changes related to sediflag for mosart were missing in moab import
Changes related to gustiness were missing in moab driver for land, ice and flux calculations.
Several changes were triggered by glc coupling with ocean in the new paradigm; default driver
input is still needed, and build configuration changes are necessary for the code to be setup, compiled and run

[BFB] for mct coupler
@rljacob rljacob merged commit 14a3eff into master Jun 10, 2025
7 checks passed
@rljacob rljacob deleted the iulian787/rebase_migrate_on_glcfixes branch June 10, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Coupler Related to code in driver-mct or driver-moab or component connections to the coupler. MOAB Involves the MOAB library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants