facebook / facebook/litho

Dimension error when adding flexure process

Open
#977 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
7.8k
Forks
768
PR merge metrics
No merged PRs in 30d

Description

- [x] I have searched [existing issues](https://github.com/facebook/litho/issues) and this is not a duplicate

## Version
Fastscape litho 0.0.1

## Issues and Steps to Reproduce
I am trying to add lithospheric density to the full Fastscape litho model, but I receive the following error:

"Could not get dimension labels from model for variable 'flex__lithos_density' with value [3100 2500 2100 1900]"

After successfully updating the model with the flexure process, I add an array of density values with the line:

##lithospheric density
lithos_density = np.array([3100,2500, 2100, 1900])

and added the input variable to the model with the line:
" 'flex__lithos_density': lithos_density,"

The model will run if I assign a single value instead of an array of values, but my goal is to specify a different density for each of the layers. I noticed that, in the Fastscape-litho source code, the other variables that are varied based on lithologic layer (ie. Kdr and Kds) are defined as " Kdr_lab = xs.variable(dims = 'n_labels', description = 'Kdr value for each label'
Kds_lab = xs.variable(dims = 'n_labels', description = 'Kds value for each label')")

so, I tried using the line:
'flex__rho_lab': lithos_density,
when running the model, but then I receive the error:

"('flex', 'rho_lab') is/are not valid key(s) for input variables in model \ngrid\n shape....."

## Expected Behavior
Each lithologic layer will be given an individual density value based on the numbers assigned in lithos_density array.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.