Open qingli411 opened 3 years ago
These results seem promising. I have a few comments about each section.
@hetland Thanks for these comments! I think most of these may be related to the vertical mixing closure. All these runs use KPP for the vertical mixing. I think the results will look better and case 2 will looks like a log layer when GOTM turned on. I will try that next.
@qingli411 very nice job! My concern on scenario 3 is the ocean boundary reflection. Are you sure the test case reached an equilibrium? If you let the case keep running, would we finally get a fresh "estuary"?
@caozd999, I think the reflection is damped eventually by the Rayleigh damping. I didn't run the case long enough to reach equilibrium but the salinity front seems to move to the right slowly in scenario 3. I would guess if we run it long enough we would get fresh water filled in the whole domain.
@hetland Looks like that using GOTM does give better results, especially the log layer in the unstratified case.
Here are the time evolution of salinity and along channel velocity in case 2 and 3 with GOTM (a typical k-epsilon setup).
These simulations look a lot better. I think the internal solution is fine for now, and the next steps are to focus on the oceanic boundary condition.
What is the current boundary condition?
I would suggest, to start, using a no-gradient condition for all 3D variables, and nudging the ocean side to some (constant) oceanic salinity with a relaxation time of a few days. If this fails, we can try to be more clever.
The current boundary conditions are set by the following:
I think next I'm going to try to add the tidal forcing at the ocean boundary in a similar way. When the tidal flow goes into the domain (positive layer thickness tendency), we can use a prescribed inflow temperature and salinity. When the tidal flow goes out of the domain, we can use whatever the values of temperature and salinity at the oceanic boundary are. I guess in this way we might not need to use nudging but I will try it.
Here are some preliminary results of two runs with tidal forcing. The tidal period is 12 hours. I'm still working on a better way to control the magnitude of the tidal flow but these results seem to be reasonable.
In the second case nudging the salinity at the ocean boundary gives a much smoother transition, although it also seems to be running fine without nudging. In this case I'm nudging the salinity to 30 PSU with a relaxation time of 3 hours following Warner et al., 2005. Also, the nudging decreases away from the ocean boundary exponentially to zero in the interior with a length scale of 5 km.
With a stronger tidal forcing (a tidal velocity of 0.4 m/s) following Warner et al., 2005, the solution now looks closer to their figure 7.
I think these simulations are starting to look quite good. I think the primary outstanding issue is with the oceanic boundary condition. The best way to fix a boundary condition is to have no boundary condition. If possible, I would recommend creating a grid with a small coastal ocean segment. The boundary conditions could be applied to this part of the domain, and they would be much less impactful to the estuary case even if they fail in the same way. I expect though it will be easier to get a good boundary condition there as the flow will be somewhat difused through the near-field plume outside the estuary mouth. It might look something like the domain describe in this paper.
In leu of that, try this: "A zero-gradient condition is used for the baroclinic variables (three-dimensional velocity and tracers) at the oceanic end of the estuary. This boundary condition performs better than traditional radiation conditions for this particular case and allows the freshwater to leave the domain without adversely affecting the interior solution. However, as the freshwater mixes down, fresher water is introduced into the domain through the bottom-layer inflow. To prevent this drift, the bottom third of the water column, well below the halocline, is clamped to oceanic salinity values. With this configuration, the numerical simulations are extremely stable throughout the integration." from this paper
Thanks a lot for these suggestions, @hetland!
Yes, I think the "river channel + coastal ocean" domain used in your paper is a good idea and could be the next test case to try in MAPS-O. It looks like a significantly more complicated test case than the current one though... I need to read your paper more carefully but I was wondering how you set the flows in the "coastal ocean" domain? By "a weak flow (0.05 m/s) directed in the sense of Kelvin wave propagation" do you mean a flow circulating along the boundary of the domain? I think in addition to setting a more proper boundary condition for the river channel, we might also be able to look at the dynamics at the river mouth in this case?
I'm not sure how easy it is to set a zero-gradient boundary condition in MPAS-O... Any suggestions, @dengwirda and @mark-petersen? I think the primary issue with the current test case is the reflection at the ocean boundary. But it gets damped quickly by turning on the Rayleigh damping. If we only look at the results after some spin-up time, that should be fine, right?
I agree that the weak flow might be hard to implement, but I wouldn't worry about that as much for the first cut. The boundary condition you have now at the ocean end might be good enough if it were put on the edge of the small coastal domain.
This idealized estuary test case follows Case 3 in Warner et al., 2005. The model domain is 100 km long with depth increasing from 5 m at the river side to 10 m at the ocean side. There is no rotation.
In MPAS-Ocean, the model domain consists of 4x230 cells, with the distance between cell centers being 500 m. The domain is periodic in x (across channel).
Here is the MPAS-Ocean source code and here is the compass source code.
I'm testing this case in a few steps:
https://user-images.githubusercontent.com/12438579/115595018-a78f2300-a293-11eb-90b6-a35fb7434695.mp4
https://user-images.githubusercontent.com/12438579/115599787-37839b80-a299-11eb-99f7-14791445f2a3.mp4
The source and sink of the layer thickness balance each other so the total volume of the domain is not changed. To compensate the change of temperature and salinity due to changes in the layer thickness at the boundaries, we also need to add tracer tendencies at these locations. The inflow temperature and salinity are set to a constant defined in the namelist and the outflow temperature and salinity are whatever the values are at the boundaries.
Since the lateral boundaries are walls, there will be reflections. So the Rayleigh damping is turned on to damp the fast oscillations due to reflections, with
config_Rayleigh_friction = .true.
andconfig_Rayleigh_damping_coeff = 1.0e-4
. Otherwise we will need a radiation boundary condition at the boundaries.To make sure this works as expected, I did a test with constant temperature and salinity in the domain. So the equilibrium solution will be a positive along channel flow decreasing as the channel gets deeper. And the salinity should not change. Here are the time evolution of salinity and along channel velocity, which seem reasonable.
https://user-images.githubusercontent.com/12438579/115608361-64d54700-a2a3-11eb-96eb-51165f8f76d7.mp4
https://user-images.githubusercontent.com/12438579/115608383-6bfc5500-a2a3-11eb-902b-a30badcaef0b.mp4
https://user-images.githubusercontent.com/12438579/115615812-aa4a4200-a2ac-11eb-91a2-9dd3aec34779.mp4
https://user-images.githubusercontent.com/12438579/115615839-b3d3aa00-a2ac-11eb-9284-d77966ef6cad.mp4
Things to do next: