Skip to content
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

Dimensions of FrictWork and GMWork #1614

Closed
iangrooms opened this issue Nov 3, 2023 · 3 comments
Closed

Dimensions of FrictWork and GMWork #1614

iangrooms opened this issue Nov 3, 2023 · 3 comments

Comments

@iangrooms
Copy link
Contributor

I'm working on a stochastic backscatter with a rate that is proportional to the horizontal viscous dissipation rate and/or the GM work. My goal is to get a value A with the same units as velocity-squared over dt such that A equals the frictional KE dissipation rate within a layer (where KE has units of (length / time)**2). For GM I need A to equal the depth-average GM work rate.

In MOM_thickness_diffuse.F90 the variable GMWork is declared as having units of watts per meter squared. It is then computed here. I think that I need to take Work_h (aka GMWork) and divide by GV%Rho0 * (h_tot + h_neglect), but I am not 100% sure. My uncertainty about GMWork is entirely due to the seemingly different nature of FrictWork as described below.

In MOM_hor_visc.F90 the variable FrictWork is declared as having units of watts per meter squared. It is then computed here. (Evidently this computation is not completely correct on a curvilinear grid - see #1366 - but the units are not the problem.) By analogy to GMWork (they both have the same units) I might divide FrictWork by GV%Rho0 * (h(i,j,k) + h_neglect). But when I look at the way that FrictWork is computed, this seems incorrect. The layer thickness is never used in the computation of FrictWork; rather, it is a product of viscous coefficients and derivatives of velocity. This also seems suspicious since the depth integral FrictWorkIntz is computed on this line by just summing up FrictWork without making any reference to layer depths. So just by looking at how FrictWork is computed, and ignoring the declaration that says watts per meter squared, I am guessing that the correct approach is to just divide FrictWork by GV%H_to_RZ, which should produce a quantity with the same units as velocity squared over dt. But the values I produce in this way seem overly large, so I am not sure this is correct.

I would appreciate guidance on how to correctly convert the energy dissipation rates FrictWork and GMWork into quantities with units of velocity squared over dt.

@iangrooms
Copy link
Contributor Author

Not trying to rush this, but I should have tagged @Hallberg-NOAA and @adcroft in the original post. I'd be grateful for input.

@Hallberg-NOAA
Copy link
Collaborator

I have reexamined the versions of MOM_hor_visc.F90 and MOM_thickness_diffuse.F90 on the dev/gfdl branch of MOM6 (which is also in an outstanding PR to main), and I believe that all of the units related to the calculations of FrictWork and GMWork are correctly documented. The MOM_hor_visc.F90 code is very confusing on this point because str_xx and str_xy start out with units of [L2 T-2 ~> m2 s-2], but then at about line 1618 the units are changed to [H L2 T-2 ~> m3 s-2 or kg s-2] by multiplication by the layer thicknesses. It is only after this point that str_xx and str_xy are used to calculate FrictWork. This change of units is documented in the comments describing these variables, and again in comments where the units are actually changed, but I agree that this change of units makes the code much harder to interpret than it would be if there were separate variables used for the strain rates and their layer-integrals. We do have sensible examples where a variables units are changed after a few lines, but in this case the change in units is hundreds of lines away from where they are first set or where they are used, so this seems like very bad practice.

FrictWork and GMWork are in units of [R Z L2 T-3 ~> W m-2], so to convert them to units of [L2 T-3 ~> m2 s-3] you would want to divide them by something like GV%H_to_RZ * (h(i,j,k) + GV%H_neglect) for the layerwise value derived from FrictWork. GMWork is already vertically integrated, so we would probably have to use the vertical sum of the layer thicknesses in the denominator, or if you want a vertically averaged quantity based on FrictWork you might take its vertical sum and then divide by the vertical sum of the layer thicknesses.

I hope that this clears up most of the uncertainty described in the comment above, but if there are still outstanding questions I would be very happy to arrange a call to discuss this in more detail, or to go over options for how to address the underlying issues exposed here.

@iangrooms
Copy link
Contributor Author

Thanks for your response. I had considered normalizing by various combinations of GV%Rho0, GV%H_to_RZ and layer thicknesses, but had not tried the correct version from your answer. I'm now testing it. (For GMWork I divide by GV%H_to_RZ * (htot + GV%H_neglect) and then use the EBT profile to spread the vertical integral back across depths.)

In my original comment I said that FrictWork is computed without layer thickness, but I see now that that was incorrect. I very much appreciate the comments that have been added on the dev/gfdl branch about line 1618 etc. I'd like to leave this issue open for the moment, but if my testing proceeds favorably it can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants