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

Closes issue #34 soil carbon from soilgrids2.0 #79

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

msteckle
Copy link
Collaborator

Thank you for contributing to ILAMB-Data. Use this template when submitting a pull request.

🛠 Issue reference

Include a reference to the issue # here.
Closes Issue #34
Created ISRIC directory and convert.py. The conversion .py downloads the data, converts it from Homolosine to WGS84, coarsens resolution from 250m (homolosine) to 0.5 degree (wgs84) using weighted averaging. Note, this weighted averaging reduced the range of data from about 0-22 to 0-16. In the future, we might consider the conservative coarsening function created by xESMF, but calculating the weights (not in parallel) takes eons and I didn't really want to waste time on it. Anyway, looks like ESM folks use this package to resample data to a coarser resolution while maintaining the original range of the higher resolution data.

🧪 Testing

Add an x between the brackets to indicate basic testing was completed

  • I inspected the outputted NetCDF and checked for obvious errors
  • I visualized the outputted NetCDF at a timestamp to check for obvious visual errors
  • I compared my convert script to recent existing ones
  • I attempted to create/encode the NetCDF according to CF Compliance guidelines

🧪 (Optional) Preview

Attach an image of your dataset here
bda58530-ed06-46a2-8849-49b1b3bbd8d7

🏎 (Optional) Quality Checklist

Add an x between the brackets to indicate script quality adherence

  • There are no unused libraries imported into the code
  • There are no erroneous console logs, debuggers, or leftover testing code
  • There are no hard-coded paths to your local machine in the script
  • Useful headings describe sections of your code
  • Variable names are generalizable and easy to read

📏 (Optional) CF Compliance In-Depth Checklist

Add an x between the brackets to ensure CF compliance

Dimensions

  • Data bounds are set between -90 to 90 and -180 to 180
  • Dimensions include time with attributes/encoding:
    • axis attribute is T
    • units attribute/encoding is days since YYYY-MM-DD HH:MM:SS
    • long_name attribute is time
    • calendar encoding is noleap
    • bounds encoding is time_bounds
  • Dimensions include lon with attributes:
    • axis attribute is X
    • units attribute is degrees_east
    • long_name attribute is longitude
  • Dimensions include lat with attributes:
    • axis attribute is Y
    • units attribute is degrees_north
    • long_name attribute is latitude
  • Dimensions include nv, which is an array of length 2 that contains the start date and end date bounding the dataset

Data Variables and their Attributes

  • The variable(s) for model comparison are present
    • the variables are linked to the time,lat, and lon dimensions
    • long_name attribute is specified
    • units attribute is specified
    • (If necessary) ancillary_variables attribute is specified if an uncertainty value is provided
    • (Optional) Float32 data type
    • (Optional) No-data values masked as NaN
  • If applicable, a data uncertainty variable is present (e.g., standard_deviation or standard_error)
    • the variable is linked to the time, lat, and lon dimensions
    • long_name attribute is specified (e.g., cSoil standard_deviation)
    • units attribute is specified; it is unitless, so it should be 1
  • A time_bounds variable is present
    • the variable is linked to the time and nv dimensions
    • long_name attribute is specified as time_bounds
    • units is encoded as days since YYYY-MM-DD HH:MM:SS

Global Attributes

  • 'title'
  • 'institution'
  • 'source'
  • 'history'
  • 'references'
    • @reference-type{ref-name, author={Last, First and}, title={}, journal={}, year={}, volume={}, pages={num--num}, doi={no-https}}
  • 'comment'
  • 'Conventions'

@msteckle msteckle linked an issue Dec 29, 2024 that may be closed by this pull request
@msteckle msteckle requested a review from nocollier December 29, 2024 21:10
@msteckle msteckle self-assigned this Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready for Review
Development

Successfully merging this pull request may close these issues.

Soil Carbon from SoilGrids
1 participant