Add an area limiter to prevent cells being over populated by icebergs
Context
Icebergs are treated as 'virtual particules'. So there is no limit in the amount of icebergs in a cell. In a realistic eORCA025 simulation, I end up by having some point with a very large number of icebergs. In the most extreme case I found in my simulation, there is more than 1500 icebergs in a cells that cover more than 10 x the physical cell area. This is not an issue for NEMO as icebergs are virtual area but it is not really realistic. This also lead to increase the load balancing issue because the domains that contain such cells need to deal with much more icebergs than the others.
Proposal
To limit the number of icebergs stuck in such coastal cell. I suggest to add a limiter in the area cover by the icebergs. The benefit expected is that the icebergs that does not enter in such cell stay in the coastal current and are advected away along the Antarctica instead of being all stuck in a single cell.
The core of the changes is in icb_ground
:
207 ! first check if enough room to go in the new cell (use before virtual area to avoid reproducibility issue)
208 ! case icb stay in the same cell => icb free to move (prevent issue with icb with icb area > cell area).
209 licb_free=.TRUE.
210 IF ( ln_icb_area_mask ) THEN !
211 IF ( ii0 /= ii .OR. ij0 /= ij ) THEN ! icb enter in a new cell
212 IF ( virtual_area_e(ii,ij) > e1e2t(ii,ij) ) licb_free=.FALSE. ! the new cell is full, icb cannot go in
213 END IF
214 END IF
215
216 ! assume icb is grounded if tmask(ii,ij,1) or tmask(ii,ij,ikb), depending of the option is not 0
217 IF ( ln_M2016 .AND. ln_icb_grd ) THEN
218 !
...
227 !
228 ! berg reach a new t-cell, but an ocean one
229 ! .AND. needed in case berg hit an isf (tmask(ii,ij,1) == 0 and tmask(ii,ij,ikb) /= 0)
230 IF( tmask(ii,ij,ikb) /= 0._wp .AND. tmask(ii,ij,1) /= 0._wp .AND. licb_free ) RETURN
231 !
232 ELSE
233 IF( tmask(ii,ij,1) /= 0._wp .AND. licb_free ) RETURN ! berg reach a new t-cell, but an ocean one
234 END IF
It has been tested with success in an idealised test cases (inspired from the ICB test) but not yet in a realistic simulation as it takes a long time to start building these over populated cell.
In this test, I prescribed an iceberg velocity toward the North-East, I seed iceberg in the South-West part of the domain and run the icebergs code (top: initial condition, bottom left: with the area limiter after 480 steps and bottom right: with the original code after 480 steps)
I put in attachment a tarball of my code as a temporary backup as my code is an old NEMO 4.0 based from svn.