NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 63 forks source link

Fix unit converter problem with units = 1 #459

Closed gold2718 closed 1 year ago

gold2718 commented 1 year ago

Fix unit converter problem with units = 1

In order for the unit converter to be able to attempt a unit conversion where one variable has units = 1, a special case has been added where the digit, 1, is converted to the string one (a valid Python identifier).

User interface changes?: No

Fixes: #458, Unit converter does not handle a variable with units = 1

Testing: unit tests: run with a new test added to test this functionality. system tests: NA manual testing: NA

gold2718 commented 1 year ago

Note that I did no add any conversion between 1 and any other unit (including None) but at least now you get the intended error from the unit converter.

gold2718 commented 1 year ago

Since I am no longer a member of the NCAR domain, I lost all my access to this repo so I cannot perform any maintenance such as assign myself to an issue or PR.

climbfuji commented 1 year ago

Since I am no longer a member of the NCAR domain, I lost all my access to this repo so I cannot perform any maintenance such as assign myself to an issue or PR.

I was already wondering what happened ... now you are admin again.

climbfuji commented 1 year ago

Is this PR supposed to go into feature/capgen? I see 49 changed files, but was expecting only one file changing to fix the unit converter.

climbfuji commented 1 year ago

Thanks by the way for fixing the problem!

gold2718 commented 1 year ago

I think I should close this and open it from a cleaner branch. The other changes are related to constitutents work. Sound good?

gold2718 commented 1 year ago

Closing to reopen from cleaner branch.