Skip to content

Commit

Permalink
Clean up after rebase
Browse files Browse the repository at this point in the history
Fix a few minor issues that were not caught during the rebase.
  • Loading branch information
trhille committed Apr 17, 2024
1 parent 1bdc08b commit 0e6025e
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions components/mpas-albany-landice/src/mode_forward/mpas_li_calving.F
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ subroutine li_calve_ice(domain, err, solveVeloAfterCalving)
call mpas_pool_get_subpool(domain % blocklist % structs, 'mesh', meshPool)
call mpas_pool_get_subpool(domain % blocklist % structs, 'velocity', velocityPool)

call li_calculate_mask(meshPool, velocityPool, geometryPool, err_tmp)
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err_tmp)

! Consider mask calving as a possible additional step
! Mask calving can occur by itself or in conjunction with a physical calving law
Expand All @@ -340,16 +340,16 @@ subroutine li_calve_ice(domain, err, solveVeloAfterCalving)
err = ior(err, err_tmp)
endif

call li_calculate_mask(meshPool, velocityPool, geometryPool, err_tmp)
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err_tmp)

call remove_small_islands(domain, err_tmp)

call li_calculate_mask(meshPool, velocityPool, geometryPool, err_tmp)
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err_tmp)

! now also remove any icebergs
call remove_icebergs(domain)

call li_calculate_mask(meshPool, velocityPool, geometryPool, err_tmp)
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err_tmp)

! Parse grounded vs floating calving for budgets
block => domain % blocklist
Expand Down Expand Up @@ -409,7 +409,7 @@ subroutine li_calve_ice(domain, err, solveVeloAfterCalving)
endif ! config_print_calving_info
! Update mask and geometry
call li_calculate_mask(meshPool, velocityPool, geometryPool, err_tmp)
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err_tmp)
err = ior(err, err_tmp)
call li_update_geometry(geometryPool)
Expand Down Expand Up @@ -1000,7 +1000,6 @@ subroutine thickness_calving(domain, calvingFraction, err)
thickness(:) = thickness(:) - dCalvingThickness(:)
call update_calving_budget(geometryPool, dCalvingThickness)
call remove_small_islands(meshPool, geometryPool)
block => block % next
enddo
Expand Down Expand Up @@ -1084,7 +1083,6 @@ subroutine floating_calving(domain, calvingFraction, err)
thickness(:) = thickness(:) - dCalvingThickness(:)
call update_calving_budget(geometryPool, dCalvingThickness)
call remove_small_islands(meshPool, geometryPool)
deallocate(dCalvingThickness)
block => block % next
Expand Down Expand Up @@ -1296,7 +1294,7 @@ subroutine remove_small_islands(domain, err)
call mpas_dmpar_field_halo_exch(domain, 'thickness')
call mpas_dmpar_field_halo_exch(domain, 'calvingThickness')
call mpas_timer_stop("halo updates")
call li_calculate_mask(meshPool, velocityPool, geometryPool, err)
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err)
call mpas_dmpar_sum_int(domain % dminfo, nIslandCellsLocal, nIslandCellsGlobal)
Expand Down Expand Up @@ -1411,7 +1409,6 @@ subroutine topographic_calving(domain, calvingFraction, err)
thickness(:) = thickness(:) - dCalvingThickness(:)
call update_calving_budget(geometryPool, dCalvingThickness)
call remove_small_islands(meshPool, geometryPool)
deallocate(dCalvingThickness)
Expand Down Expand Up @@ -1629,7 +1626,6 @@ subroutine eigencalving(domain, err)
err = ior(err, err_tmp)

call remove_icebergs(domain)
call remove_small_islands(meshPool, geometryPool)

deallocate(dCalvingThickness)
block => block % next
Expand Down Expand Up @@ -1796,9 +1792,6 @@ subroutine specified_calving_velocity(domain, err)
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err_tmp)
err = ior(err, err_tmp)

! TODO: global reduce & reporting on amount of calving generated in this step
call remove_small_islands(meshPool, geometryPool)

block => block % next

deallocate(dCalvingThickness)
Expand Down Expand Up @@ -2188,7 +2181,6 @@ subroutine von_Mises_calving(domain, err)
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err_tmp)
err = ior(err, err_tmp)

call remove_small_islands(meshPool, geometryPool)
call remove_icebergs(domain)

deallocate(dCalvingThickness)
Expand Down Expand Up @@ -2465,7 +2457,6 @@ subroutine ismip6_retreat(domain, err)
! update mask
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err_tmp)
err = ior(err, err_tmp)
call remove_small_islands(meshPool, geometryPool)

deallocate(submergedArea)
deallocate(dCalvingThickness)
Expand Down Expand Up @@ -3517,9 +3508,8 @@ subroutine damage_calving(domain, err)
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err_tmp)
err = ior(err, err_tmp)
call update_calving_budget(domain)
call update_calving_budget(geometryPool, dCalvingThickness)
call remove_icebergs(domain)
call remove_small_islands(meshPool, geometryPool)
deallocate(dCalvingThickness)
Expand Down Expand Up @@ -4188,8 +4178,6 @@ subroutine mask_calving(domain, err)
call li_calculate_mask(meshPool, velocityPool, geometryPool, domain, err_tmp)
err = ior(err, err_tmp)
call remove_small_islands(meshPool, geometryPool)
deallocate(dCalvingThickness)
block => block % next
enddo
Expand Down

0 comments on commit 0e6025e

Please sign in to comment.