Closed kshedstrom closed 6 years ago
That is what the code says and I think it is correct. The derivatives only need to changed where ...%specified is true because the solver can calculate those derivatives from the non-specified OBC fluxes.
I think. @Hallberg-NOAA ?
Actually, what I really (also) need is the correct setting of the BT_cont components along an open boundary segment. Right now some depend on external values of "h".
☹️
The BT_cont components describe the vertically summed transport (in H m2/s) as a function of the barotropic velocity, with the "Fa" components describing the open Face-area (in m2) when the flow is weakly from the east or west (..._E0 and ..._W0), or very strongly from the east or west (..._EE and ..._WW), with the other components being the transports and the velocities at which these are realized. This whole structure is basically a continuous 4-part thickness profile, that is partly a linearization of the transports about the initial ocean state, but reverting to upwinding limits for sufficiently strong velocities. (Calculating the effective face areas is actually a little more complicated than just summing the thicknesses because we reduce the transports due to vertical viscosity, and the input barotropic velocities are actually barotropic accelerations multiplied by a timestep, but in the inviscid limit they are the same; see Hallberg and Adcroft, 2009, Ocean Modelling for a full discussion of this point.) The OBC code you quote, Kate, sets these face areas based on the ratio of transports to specified velocities in the specified OBC case. Obviously this is not the right approach for the more general OBCs. For more general OBCs, I think that we will want to exploit the no-normal-derivative constraint, and set all of the effective face areas to be the same sum of the (viscosity-corrected) thicknesses on the interior side of the OBCs. If the face-areas are the same, the velocities at which we transition between the 4 pieces of the fit become immaterial, although the transports inside of the BT_cont type do need to be set consistently (0 should work for the velocities and transports). Does this help?
Fixed in commits leading to c73e0e3a4d.
In MOM_continuity_PPM, there's this chunk:
The last part setting BT_cont%Fa_u_E0 and friends is only inside the if (any_simple_OBC) test. Is this correct?