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

Dimension error when adding flexure process #977

Open
1 task done
madisonpreece opened this issue Mar 7, 2024 · 0 comments
Open
1 task done

Dimension error when adding flexure process #977

madisonpreece opened this issue Mar 7, 2024 · 0 comments

Comments

@madisonpreece
Copy link

madisonpreece commented Mar 7, 2024

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 <xsimlab.Model (22 processes, 28 inputs)>\ngrid\n shape....."

Expected Behavior

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant