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

Introduce length (L) unit #258

Closed
nichannah opened this issue Feb 4, 2019 · 2 comments
Closed

Introduce length (L) unit #258

nichannah opened this issue Feb 4, 2019 · 2 comments

Comments

@nichannah
Copy link
Contributor

Previous work introduced a thickness (H) unit. This made it possible to test for errors in expressions involving thickness by setting the H to different powers-of-two in two runs and then comparing the output of these runs. If the output is the same in both then a class of errors can be ruled out.

This work will do the same for length (L).

This is related to #139

@Hallberg-NOAA
Copy link
Member

Thank you for reminding us of this outstanding work, @nichannah.

In order to facilitate this capability, a unit_scale_type and a related MOM_unit_scaling module were added with https://github.com/NOAA-GFDL/MOM6/pull/875, and this new type is now passed into most MOM6 modules, which should avoid having to add new scaling factor arguments or elements of types.

The capability described in this issue now exists for both thickness units (H) and depth units (Z), and is desired for both length units (L) and time units (T), and perhaps others (mass and temperature spring to mind). In addition, when these new rescaling factors are added, there is now a standardized notation for documenting both the rescaled expressions and their standard mks counterparts, so that a lateral velocity would be documented as [L T-1 ~> m s-1] once the corresponding variable has been properly rescaled (and the code tested for dimensional consistency).

@marshallward
Copy link
Member

Length scaling is now completed in all detectable cases, and has been integrated into the new test suite.

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

3 participants