Skip to content

Conversation

@kieranricardo
Copy link

@kieranricardo kieranricardo commented Mar 12, 2025

For access coupling mode, this PR scales atm->ice fluxes by 1 / ice_fraction in med_phases_post_atm, prior to re-mapping atm quantities to the ice grid (time travelling ice approach).

For access-cm3 using parallel coupling, this reduces conservation errors by a factor of ~50, to approx ~0.01% (measured over one coupling period).

See also https://github.com/ACCESS-NRI/cm3-suite/pull/26 and https://github.com/ACCESS-NRI/cm3-um/pull/9.

Copy link
Collaborator

@blimlim blimlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kieranricardo for putting this together, it looks really good to me! Just had a couple tiny suggestions, but otherwise happy to approve

use med_internalstate_mod , only : mapconsf
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
use med_methods_mod , only : FB_GetFldPtr => med_methods_FB_GetFldPtr

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% on this, but are the following needed for this subroutine:

   use med_map_mod           , only : med_map_field
   use med_internalstate_mod , only : mapconsf
   use med_constants_mod     , only : dbug_flag => med_constants_dbug_flag
   use med_methods_mod       , only : FB_GetFldPtr  => med_methods_FB_GetFldPtr

If they aren't needed, wondering if it's best to remove them just for clarity?

character(len=*), parameter :: subname='(med_phases_post_atm_custom_access)'
character(len=CS) :: fld_names(4)
!---------------------------------------

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly unnecessary, but wondering if we should add the logging messages at the start and end just in case debugging is needed:

    if (dbug_flag > 20) then
       call ESMF_LogWrite(subname//' called', ESMF_LOGMSG_INFO)
    end if

...

  if (dbug_flag > 20) then
       call ESMF_LogWrite(subname//' done', ESMF_LOGMSG_INFO)
    end if

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants