PIK-LPJmL / LPJmL

Welcome to the central open-source repository of LPJmL at PIK. You are free to download the code under the AGPLv3 license, see LICENSE file. Have fun. Please note that there is absolutely no support outside agreed collaborations. We also don't provide any input data, which is derived from other sources.
GNU Affero General Public License v3.0
72 stars 48 forks source link

How to convert the soil data #21

Closed yjtw closed 2 years ago

yjtw commented 2 years ago

Hello, I still haven't figured out the conversion method of soil input data. I see that according to the executable file cdf2soil, I should first obtain the soil data in NC file format. But the HWSD data uses the BIL and MDB formats. How should the conversion be completed?

cmueller-pik commented 2 years ago

The cdf2soil file is a helper function that you can, but don't have to use. See #20 for a link to the GGCMI githup repository with a script that converts the original HWSD to netCDF. Basically all you need is a vector of soil codes in the order of the grid.bin file that you use. If you are using 1-byte integer values, you don't need a header, which is the standard setup of soil code input.
You can choose any way of producing that vector, no need to use the cdf2soil tool.