> For the complete documentation index, see [llms.txt](https://pecan.gitbook.io/betydbdoc-dataentry/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pecan.gitbook.io/betydbdoc-dataentry/appendices/common-unit-conversions.md).

# Common Unit Conversions

For many transformations, particularly when automated, please use the udunits2 software where possible. For example, in R, you can use

```
library(udunits2)
## transform meters to mm
ud.convert(10, "m", "mm")
## equivalently, via the udunits synonym database
ud.convert(10, "meters", "millimeters")
## it can also handle more complex units
ud.convert(10, "m/s", "mm/d")
```

NB: Many of these conversions have been automated within [PEcAn](https://github.com/PecanProject/pecan).

**Useful conversions for entering site, management, yield, and trait data \label{tab:conversions}**

| From ((X))                   | to ((Y))                                 | Conversion                                                       | Notes                                                                               |
| ---------------------------- | ---------------------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| (X\_2=)root production       | (X\_1=)root biomass & root turnover rate | (Y = X\_2/X\_1)                                                  | Gill \[2000]                                                                        |
| DD(^{\circ}) MM'SS           | XX.ZZZZ                                  | (\textrm{XX.ZZZZ} = \textrm{XX} + \textrm{MM}/60+\textrm{SS}/60) | to convert latitude or longitude from degrees, minutes, seconds to  decimal degrees |
| lb                           | kg                                       | (Y=X\times 2.2)                                                  |                                                                                     |
| mm/s                         | (\mu) mol CO(\_2) m(^{2}) s(^{-1})       | (Y=X\times 0.04)                                                 |                                                                                     |
| m(^2)                        | ha                                       | (Y = X/10^6)                                                     |                                                                                     |
| g/m(^2)                      | kg/ha                                    | (Y=X\times 10)                                                   |                                                                                     |
| US ton/acre                  | Mg/ha                                    | (Y = X\times 2.24)                                               |                                                                                     |
| m(^3)/ha                     | cm                                       | (Y=X/100)                                                        | units used for irrigation and rainfall                                              |
| % roots                      | root:shoot (q)                           | (Y=\frac{X}{1-X})                                                | (\\% \text{roots} = \frac{\text{root biomass}}{\text{total biomass}})               |
| (\mu) mol cm(^{-2}) s(^{-1}) | mmol m(^{-2}) s(^{-1})                   | (Y = X/10)                                                       |                                                                                     |
| mol m(^{-2}) s(^{-1})        | mmol m(^{-2}) s(^{-1})                   | (Y = X/10^6)                                                     |                                                                                     |
| mol  m(^{-2}) s(^{-1})       | (\mu) mol cm(^{-2}) s(^{-1})             | (Y = X/ 10^5)                                                    |                                                                                     |
| mm s(^{-2})                  | mmol m(^{-3}) s(^{-1})                   | (Y=X/41)                                                         | Korner et al. \[1988]                                                               |
| mg CO(\_2) g(^{-1}) h(^{-1}) | (\mu) mol kg(^{-1}) s(^{-1})             | (Y = X\times 6.31)                                               | used for root\_respiration\_rate                                                    |
| (\mu) mol                    | mol                                      | (Y= X\times 10^6)                                                |                                                                                     |
| julian day (1--365)          | date                                     |                                                                  | see ref: <http://disc.gsfc.nasa.gov/julian_calendar.shtml> (NASA Julian Calendar)   |
| spacing (m)                  | density (plants m(^{2}))                 | (Y=\frac{1}{\textrm{row spacing}\times\textrm{plant spacing}})   |                                                                                     |
| kg ha(^{-1}) y(^{-1})        | Mg ha(^{-1}) y(^{-1})                    | (Y= X/1000)                                                      |                                                                                     |
| g m(^{-2}) y(^{-1})          | Mg ha(^{-1}) y(^{-1})                    | (Y= X/100)                                                       |                                                                                     |
| kg                           | mg                                       | (Y=X\times 10^6)                                                 |                                                                                     |
| cm(^2)                       | m(^2)                                    | (Y=X\times 10^4)                                                 |                                                                                     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://pecan.gitbook.io/betydbdoc-dataentry/appendices/common-unit-conversions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
