There are a couple of ways that YATM performance could be improved:
The runoff remapping checks conservation after applying weights to move from one grid to another and then again after moving all runoff that has landed to the ocean. Although it helps to do this twice if something goes wrong in one step but not the other the first check is redundant and it would make sense to remove this.
Russ Fiedler [12:53 PM]
@nic I think the remapping is very slow because you are checking all the ocean cells in the world. This makes the tree much larger than it needs to be too. Given that the runoff is coming from a 1.25 degree grid (?) you can mask the ocean points to be near the coast via if (any(land_sea_mask(i-halo:i+halo,j-halo:j+halo) < 0.5 and. land_sea_mask(i,j) > 0.5) then... where halo= 6 or so and is adjusted for boundaries.
Russ Fiedler [1:59 PM]
@nic How about hoisting the runoff remapping out of the loop starting at 113 and do it before entering? If you calculate the runoff ahead of time you don't need to synchronise with the fields that are passed earlier.
read all the forcing fields before doing any OASIS puts. Keeping in mind that the puts are asynchronous so it should not be slowing things down as long as the ice is not waiting.
There are a couple of ways that YATM performance could be improved:
The runoff remapping checks conservation after applying weights to move from one grid to another and then again after moving all runoff that has landed to the ocean. Although it helps to do this twice if something goes wrong in one step but not the other the first check is redundant and it would make sense to remove this.
Russ Fiedler [12:53 PM] @nic I think the remapping is very slow because you are checking all the ocean cells in the world. This makes the tree much larger than it needs to be too. Given that the runoff is coming from a 1.25 degree grid (?) you can mask the ocean points to be near the coast via if
(any(land_sea_mask(i-halo:i+halo,j-halo:j+halo) < 0.5 and. land_sea_mask(i,j) > 0.5) then...
where halo= 6 or so and is adjusted for boundaries.Russ Fiedler [1:59 PM] @nic How about hoisting the runoff remapping out of the loop starting at 113 and do it before entering? If you calculate the runoff ahead of time you don't need to synchronise with the fields that are passed earlier.
read all the forcing fields before doing any OASIS puts. Keeping in mind that the puts are asynchronous so it should not be slowing things down as long as the ice is not waiting.