MOM6 icon indicating copy to clipboard operation
MOM6 copied to clipboard

Sponge restoring: target interface height file should be defined from eta_surface=0

Open abarthel opened this issue 8 years ago • 3 comments

When sponge restoring is applied to interface heights, the apply_sponge subroutine compares e and Ref_eta. Because the current version of the code explicitly sets e(1)=0, it relies on Ref_eta(1)==0. It would be helpful to add a check for Ref_eta(1) == 0, either in apply_sponge or in initialize_sponges_file (where the forcing file is read in). If the forcing file sponge_state_file has a reference surface height that is non-zero, the code runs but the mass fluxes through the interfaces are wrong and the restoring is not done properly (e.g. total mass/sea surface height decreases linearly with time).

abarthel avatar Oct 02 '15 04:10 abarthel

I have to confess I've never delved into the sponge code but having just scanned it I'm wondering if Bob sets e(1)=0 here because he's using the open boundary mass fluxes in the barotropic solver to set e(1)?

I agree that if the forcing file has a non-zero surface height and the code doesn't allow it we should catch it with a warning or error. I'll need to confer with @Hallberg-NOAA (who is away on travel att) to find out what is intended here.

adcroft avatar Oct 06 '15 02:10 adcroft

As a new user, my mistake was that I considered that the ref_eta contained in the forcing file was similar to the output variable e, i.e. interface height relative to mean sea level (ranging from -Topography to free surface elevation e(1), which can be non-zero).

As described above, that was wrong because in the sponge code, ref_eta is directly compared to a local variable e, which is defined with e(1)=0. I expected ref_eta to be readjusted (a simple shift) in the code to fit with the e(1)=0 reference, but I could not find anything. Ideally, the code would read in the forcing file and re-adjust it if necessary, so that locally, e and ref_eta have the same reference (whether it is one or the other that is readjusted does not matter to me).

A simple check is helpful so that the code does not run with the incorrect fluxes. The user can be aware of the issue and correct the forcing file to have the right reference ref_eta(1)=0. In the long run though, I think it is more user-friendly to include that readjustement in the code, if possible. That would mean that the user can directly compare the forcing file and the output file to see if the restoring was effective.

abarthel avatar Oct 06 '15 03:10 abarthel

Just want to note that I recently fell into the same trap as Alice and spent several days wondering why my ocean was losing mass. Very confusing!

pittwolfe avatar Jul 11 '22 15:07 pittwolfe