Skip to content

Ocean RK4 fails bfb restart test #777

Closed

Description

@mark-petersen

Testing e4dbf57 on branch ocean/develop, and compass test ocean/global_ocean/QU240/restart_test but with flags changed to:

 24 &time_integration
 25     config_dt = '00:10:00'
 26     config_time_integrator = 'RK4'

the bfb comparison fails. I also turned off surface fluxes, surface restoring, and set to fixed vertical layers, and problem persists, i.e.:

config_vert_coord_movement = 'fixed'
config_use_bulk_wind_stress = .false.
config_use_activeTracers_surface_bulk_forcing = .false.
config_use_activeTracers_surface_restoring = .false.

This changes the mismatch from 1e-4 to 1e-15. So main problem appears to be in the tracer time stepping:

    config_disable_thick_all_tend = .false.
    config_disable_vel_all_tend = .false.
    config_disable_tr_all_tend = .true.

Note that the split explicit passes bfb restarts. Tendency routines are identical for split explicit and RK4. RK4 passes partition test, so this is not a halo update problem.

Activity

  1. mark-petersen commented on Jan 4, 2021

    @mark-petersen
    ContributorAuthor

    @xylar thanks for pointing this out. I tried the easy things that came to mind, as noted in the first comment. I was hoping to find some option that required an update within the split-explicit module, that was not added to RK4. Surface fluxes and forcing are obvious candidates, but do not appear to be related.

  2. xylar commented on Jan 4, 2021

    @xylar
    Collaborator

    Thanks @mark-petersen! As I mentioned at Coffee today, I'm seeing this problem as well in COMPASS 1.0. Given that some of the wetting-and-drying work will begin with RK4, it would be really helpful if we can track this down and fix it.

    cc @dengwirda and @cbegeman

  3. mark-petersen commented on Jan 4, 2021

    @mark-petersen
    ContributorAuthor

    OK, I found the module (at least). If I turn off GM:

     70 &GM_eddy_parameterization
     71     config_use_GM = .false.
     72     config_GM_closure = 'EdenGreatbatch'
    

    Then I get an exact bfb match on restart. I flipped every other flag possible - cvmix, redi, tracer vmix, bottom drag, etc, and GM is definitely the problem. We just added this EdenGreatbatch method last fall. Maybe that is it.

  4. cbegeman commented on Jan 4, 2021

    @cbegeman

    I was looking at GM as well because ocn_gm_compute_Bolus_velocity is commented out in the split routine whereas it is called in RK4. This change is associated with 66a13d9, which is supposed to fix a restart problem. Maybe RK4 is redundantly computing MLD rather than using its value for restart. @vanroekel might understand this better than I do.

  5. vanroekel commented on Jan 4, 2021

    @vanroekel
    Contributor

    @mark-petersen does the test pass with

    config_use_GM = .true.
    config_GM_closure = 'constant'
    

    ?

    If the problem is E&G it suggests RK4 is not calling the routine that computes BruntVaisalaFreqTop or RiTopOfCell on restart

    @cbegeman just saw your comment and checked the rk4 code, you are right! The calls here

    https://github.com/MPAS-Dev/MPAS-Model/blob/master/src/core_ocean/mode_forward/mpas_ocn_time_integration_rk4.F#L648-L650

    and

    https://github.com/MPAS-Dev/MPAS-Model/blob/ocean/develop/src/core_ocean/mode_forward/mpas_ocn_time_integration_rk4.F#L1248-L1251

    should not be there. This routine is called here now instead

    https://github.com/MPAS-Dev/MPAS-Model/blob/ocean/develop/src/core_ocean/mode_forward/mpas_ocn_forward_mode.F#L575-L578

    It's not clear to me why this causes a restart BFB. The MLD is not used in the GM code, just Redi. I'll think about it some more.

  6. cbegeman commented on Jan 4, 2021

    @cbegeman

    @vanroekel Thanks! Your first and last links appear to be the same. Should the last link be

    if (config_use_Redi.or.config_use_GM) then
    call ocn_gm_compute_Bolus_velocity(statePool, diagnosticsPool, meshPool, scratchPool, timeLevelIn=1)
    end if

  7. vanroekel commented on Jan 4, 2021

    @vanroekel
    Contributor

    oops, yes, thanks for catching that! I've edited my previous comment

  8. mark-petersen commented on Jan 4, 2021

    @mark-petersen
    ContributorAuthor

    With config_use_GM true the restart test always fails, with both config_GM_closure = 'constant' and 'EdenGreatbatch'. I only get the test to pass with config_use_GM = .false..

  9. vanroekel commented on Jan 4, 2021

    @vanroekel
    Contributor

    Okay I think I understand what is happening. To confirm, @mark-petersen is redi enabled for these runs with standard options config_Redi_use_surface_taper = .true. and config_use_redi=.true.? If so the code blocks mentioned above, in particular the if(config_use_GM) lines imply that the surface taper is recomputed during the timestep and not using the indMLD from the restart file. I would suspect a test with config_use_redi=.false. and config_use_GM=.true., but your last comment suggests you have tried this? If so I'm wrong. But I would also try with deleting the two blocks of code I mention above.

  10. xylar commented on Jun 30, 2021

    @xylar
    Collaborator

    @mark-petersen and @vanroekel I realize this is a low priority but I want to make sure it gets some attention because I see this error several times a day when I work with compass, and it increases the likelihood that a "real" error happens that I don't notice. Also, the lack of restart capability means that the RK4 time integrator isn't really a feasible alternative to split-explicit except for tests short enough not to need restart.

  11. self-assigned this
    on Jul 2, 2021
  12. mark-petersen commented on Jul 2, 2021

    @mark-petersen
    ContributorAuthor

    Transplanted this issue to E3SM-Project/E3SM#4376. Fixed by E3SM-Project/E3SM#4369.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions