Using the function to define the compostional field

I want to define my compositional field composed of crust, mantle lithosphere, peridotite, porosity and bound water. can i use the function subsection to define this without using hard coding? if i have my Moho and LAB data?

Hi @ngu,

can i use the function subsection to define this without using hard coding?

That really depends on the complexity of the Moho/LAB data and whether it can be approximated with relatively simple functions in the Initial composition plugin.

The alternative is to write out .txt files with the initial composition data or use the Geodynamic World Builder. For more information, the initial composition section in the manual is a good place to begin.

Please let us know if you have further questions after reviewing the relevant documentation and examples.

John

To add to John’s comment, if you have the Moho and LAB stored as gridded surfaces, you may be interested in the “ascii data layered” option in the initial composition section, which was initially designed to take Crust 1.0 as input.

At the moment, this option only allows for the “Interpolation scheme" parameter to equal “linear” or “piecewise constant” for all compositional fields at the same time, so you might need to define very thin layers if you want to define abrupt changes in, for example, crust vs harzburgite vs pyrolite, while having smooth changes in porosity and bound water.

Thank you John for the reply. I tried the .txt using radius/lon/colat and sorted my data in colat,lon,radius order but had the error of ASPECT doesnt understand the structure. I dont know what is wrong with the order because i applied the same sorting with tomography model and it was okay.

@ngu - Can you post the error message output by ASPECT when you try to run the model in debug mode, along with the associated .txt file?

John

subsection Compositional fields
set Number of fields = 5
set Names of fields = crust, mantle_lithosphere, porosity, bound_fluid, peridotite
end
subsection Initial composition model
set List of model names = ascii data

subsection Ascii data model
set Data directory = $ASPECT_SOURCE_DIR/model/
set Data file name = composition.txt
end
end

And this is the error: An error occurred in line <408> of file </home/ngu/aspect/aspect/source/structured_data.cc> in function
void aspect::Utilities::StructuredDataLookup::load_ascii(const std::string&, MPI_Comm) [with int dim = 3; std::string = std::__cxx11::basic_string; MPI_Comm = ompi_communicator_t*]
The violated condition was:
name_column_index < 100
Additional information:
The program found more than 100 columns in the first line of the data
file. This is unlikely intentional. Check your data file and make sure
the data can be interpreted as floating point numbers. If you do want
to read a data file with more than 100 columns, please remove this
assertion.
These are the first lines of the sorted data:

POINTS: 367 32 34

Columns: radius, lon, colat, crust, mantle_lithosphere, porosity, bound_fluid, peridotite

5718137.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0
5768137.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0
5818137.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0
5868137.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0
5918137.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0
5968137.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0
6018137.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0
6068137.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0
6118137.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0
6128137.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0
6136637.0,0.04363323129985824,1.3526301702956054,0.0,0.0,0.0,0.0,1.0