How To Custom-convert Kg M-2 S-1 To Mm/day #129 - GitHub

Skip to content Dismiss alert {{ message }} / units Public
  • Notifications You must be signed in to change notification settings
  • Fork 34
  • Star 196
  • Code
  • Issues 8
  • Pull requests
  • Actions
  • Projects
  • Security

    Uh oh!

    There was an error while loading. Please reload this page.

  • Insights
Additional navigation options How to custom-convert kg m-2 s-1 to mm/day #129New issueNew issueClosedClosedHow to custom-convert kg m-2 s-1 to mm/day#129@adrfantini

Description

@adrfantiniadrfantiniopened on Mar 20, 2018

I'm probably missing something really obvious, sorry in advance if this is the case. I'm trying to convert kg m-2 s-1 to mm/day, as is often the case for rain units. I can convert e.g. kg/s to mm/day, but not kg m-2 s-1:

install_conversion_constant("kg s-1", "mm/day", 86400) install_conversion_constant("mm/day", "kg s-1", 1/86400) set_units(1, "kg s-1") + set_units(1, "mm/day") ## Works install_conversion_constant("kg m-2 s-1", "mm/day", 86400) install_conversion_constant("mm/day", "kg m-2 s-1", 1/86400) set_units(1, "kg m-2 s-1") + set_units(1, "mm/day") ## Does not work: Error: cannot convert mm/d into 1/m/s

Actually I cannot even set:

set_units(1, "kg/m**2") Error: In ‘kg/m^2’ the numeric multiplier ‘2’ is invalid. Use `install_conversion_constant()` to define a new unit that is a multiple of another unit.

While set_units(1, "kg m-2") returns the wrong thing: 1/m.

What is the correct syntax here?

Metadata

Metadata

Assignees

No one assigned

Labels

No labelsNo labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You can’t perform that action at this time.

Từ khóa » Kg M2 S-1