-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarification on setting up MOM5 velocity data for 3D advection #860
Comments
Thanks @hrsdawson, for this elaborate and very detailed comment/question! You clearly really dug into this quite a bit already. I'm not really sure how much I can help you further, our grid interpolation guru, @delandmeterp, has taken up another position so is not officially part of the Parcels team anymore. I assume you've also looked at section 2.1.3 of his GMD paper, which specifically deals with 3D B-grids? That said, here are some thoughts:
Perhaps it would be good to engage some of the MOM developers too, to further discuss them with this? @StephenGriffies, would you happen to know who we could ask for advice in figuring out using Parcels with MOM5 fields? |
Hi @erikvansebille, thanks for the quick reply and the suggestions. Looks like I might need to do some more digging. Yep I have seen that section of the paper. I should have also mentioned above that some of my confusion is arising from this contributed OFAM example, which has the same dimensions as above, but uses the vertical tracer cell coordinate ( |
Ah, that may be a bug in https://github.com/OceanParcels/parcels_contributions/blob/master/Examples/example_OFAM3.py. @CKehl, do you remember why you used |
Hi, Here are some comments. 1/ wt is not zero at the top model grid cell in MOM5. The model uses an explicit free surface that is fully nonlinear. And when using z* vertical coordinates, all grid cells have a time dependent thickness. 2/ The wt field in MOM5 is registered with the following axes id_wt = register_diag_field ('ocean_model', 'wt', Grd%vel_axes_wt(1:3), Time%model_time, & where vel_axes_wt places the wt velocity at the center of the tracer cell top/bottom. I am unsure of the st_ocean and sw_ocean grid definitions you refer to. These are static. The correct static analog to the wt grid is indeed the sw_ocean grid. 3/ Veronica Tamsitt v.tamsitt@unsw.edu.au is actively using Parcels with MOM5 output. I suggest connecting with her for further details. |
Thanks Erik and Steve. @hrsdawson is doing her PhD with Matt England, myself and @vtamsitt. Veronica is still using CMS with MOM5, not Parcels yet. We're trying to switch everyone over to Parcels, starting with @hrsdawson. A couple of points in reply to the above: 1/ To start with we are trying to get Parcels working with the approximation of stationary z layers, rather than z*. This is what we did for CM2.6 with CMS @StephenGriffies. Do we know how large the errors are for this approximation? I guess we will also have problems with particles trying to leave through the surface due to this approximation. We could in time work on setting up Parcels to represent the time-varying z* layers using the Curvilinear S Grid implementation, if we think it is worth it. 2/ Regarding what w values to insert at the surface, perhaps the best option would be to make a copy of w from the bottom of the top z layer (i.e. the uppermost w that we have saved), rather than zeros? |
Thanks @adele157 for clarification: My mistake forgetting that CMS was still in use. I also wish to clarify my comment 2/ above. The wt velocity is indeed defined at sw_ocean. This setting is specified in https://github.com/mom-ocean/MOM5/blob/master/src/mom5/ocean_core/ocean_grids.F90 which is the latest MOM5 Github repo. I see no substantial changes in that file since 2014, though not sure if there was a change made before that effects this discussion. |
In regards to @adele157 comment about stationary z-levels rather than z*. I am not sure what is meant. Is it related to the following? Namely, the wt diagnosed in a z* configuration of MOM5 measures the transport through the z* coordinate surface. This transport is distinct (but only by a bit) from the transport through a z-coordinate surface. Let's write wt* for the vertical velocity diagnosed in z*-coordinate configuration and write wt for the transport diagnosed in a z-coordinate configuration. Are you concerned about the difference between wt* and wt for use in particles? That difference is very small in general, and it is a difference I never bothered with. But do you think it is a difference that has qualitative impact on particle trajectories? Or perhaps there is an issue at the boundaries? |
Hi @adele157
There's two types of errors here. The one that @StephenGriffies described above (the difference between wt* and wt), and another that the interpolation of U and V depends on the particle's position in the grid, so that if the depth layers move up and down, the particle's relative position in the grid moves too, even if the particle's depth doesn't change. But again, I expect that this difference is very small? In any case, it might be a good idea at some point to compare particle trajectories assuming a fixed depth grid to particle trajectories using the time-varying cS-grid implementation. I'd be keen to see how big the difference is! |
That was based (a) of the use case we chose at that point and (b) of the variable declarations in the NetCDF file. It can be chunked either way, it just depends on how the dimensions are linked as variable parameters in NetCDF. |
Hi everyone! |
Hi parcels team. I’m trying to compute 3D advection with B-grid MOM5 velocities. I've seen some discussion of B-grid interpolation here and in this documentation example, however I’m still a bit confused about the vertical dimension setup and am looking for some clarification.
In the MOM5 data, u, v, and w have the following dimensions:
The vertical velocity
w
and the vertical coordinate for the velocity cells (sw_ocean
) are defined on the bottom interface of the tracer cell such that the uppermostw
value is located at the bottom of the surface layer and there is now
data for the surface at 0 m. Thesw_ocean
coordinate starts at 1.08 m and extends down to ~5800 m (increasing down). From the documentation example and this section of the code, I understand that parcels wants theu
,v
andw
velocities defined at the same point in the top corner of the grid cells. Because of this I modifiedsw_ocean
by shifting it up one cell with a zero at the surface so thatsw_ocean_mod
now extends from 0 to ~5600 m. I’ve then been setting up parcels as follows:Is this the correct way to assign the vertical coordinate for these MOM5 b-grid velocities? I’m currently having an issue with particles getting stuck at the bottom of the ocean prompting me to think there may be something wrong with my set up. This also happens if I use the original
sw_ocean
coordinate. Should the vertical coordinate have a value at both the ocean surface and the ocean floor? In which case the dimensions ofsw_ocean
would not be equal to the vertical dimension ofw
, and I would perhaps need to add a layer of zeros tow
inside the parcels code at the surface – something like this for pop interpolation.Ideally I want to give parcels a 3D array of depth to account for bottom shaved cells used in the model, but I first want to understand the correct set up using a Rectilinear Z grid. Any help is greatly appreciated! I’m happy to share some code and/or data if that assists at all.
The text was updated successfully, but these errors were encountered: