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

bug: texture in output is sometimes NaN #110

Open
shrouxm opened this issue Jun 13, 2024 · 0 comments
Open

bug: texture in output is sometimes NaN #110

shrouxm opened this issue Jun 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@shrouxm
Copy link
Member

shrouxm commented Jun 13, 2024

Description

Sometimes the values for texture in the algorithm output are NaN. Ideally we would return empty string in this case instead of having multiple values for "missing" to handle downstream, although I'm also not sure if NaN indicates "missing" or is indicative of an actual bug somewhere.

Steps To Reproduce

Run the algorithm on the following coordinates:

{"latitude": 47.690602, "longitude": -122.116982}

Expected behavior

Texture values in the soil_list_json should be strings (empty or with a texture value).

Actual behavior

Some texture values are NaN. Here's an example output:

    {
      "id": {
        "name": "Mckenna",
        "component": "Mckenna",
        "score_loc": 0.015,
        "rank_loc": "8"
      },
      "site": {
        "siteData": {
          "mapunitID": "1389406",
          "componentID": "23930452",
          "componentKind": "Series",
          "dataSource": "SSURGO",
          "textureInfill": "No",
          "rfvInfill": "No",
          "componentPct": 5,
          "distance": 977.0,
          "minCompDistance": 977.0,
          "slope": 1.0,
          "nirrcapcl": "nan",
          "nirrcapscl": "None",
          "nirrcapunit": "None",
          "irrcapcl": "nan",
          "irrcapscl": "None",
          "irrcapunit": "None",
          "taxsubgrp": "Aquandic Epiaquepts",
          "sdeURL": "https://casoilresource.lawr.ucdavis.edu/sde/?series=norma",
          "seeURL": "https://casoilresource.lawr.ucdavis.edu/see/#norma"
        },
        "siteDescription": "Landscape--glacial drift plains\r\nLandform--depressions and drainageways\r\nSlope--0 to 5 percent\r\nParent material--alluvium over glacial drift\r\nMean annual precipitation--about 1100 mm\r\nMean annual temperature--about 10 degrees C\r\nDepth class--moderately deep to densic contact\r\nDrainage class--poorly drained\r\nSoil moisture regime--aquic\r\nSoil temperature regime--mesic\r\nSoil moisture subclass--typic"
      },
      "esd": {
        "ESD": {
          "ecoclassid": ["F002XA004WA"],
          "ecoclassname": ["Puget Lowlands Forest"],
          "esd_url": [""]
        }
      },
      "bottom_depth": { "0": 0 },
      "sand": { "0": NaN },
      "clay": { "0": NaN },
      "texture": { "0": NaN },
      "rock_fragments": { "0": 0 },
      "cec": { "0": "CEC" },
      "ph": { "0": "" },
      "ec": { "0": "" },
      "lab": { "0": ["", "", ""] },
      "munsell": { "0": "" }
    },
@shrouxm shrouxm added the bug Something isn't working label Jun 13, 2024
@shrouxm shrouxm added this to the LandPKS Backlog milestone Jun 13, 2024
@shrouxm shrouxm added this to LandPKS Jun 13, 2024
@github-project-automation github-project-automation bot moved this to Todo in LandPKS Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants