-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Unit display according to SI specs * Fix bug in argument -t * Printing XFe in rock composition tabel * Update binary location * Added T2Rho * Update README.md * Update travis badge URL * Update CHANGELOG
- Loading branch information
Showing
11 changed files
with
604 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# T2Rho | ||
|
||
This tool helps to directly compute densities from the output of [`V2T`](./V2T.md), using the equations given in [Goes et al. (2000)](https://doi.org/10.1029/1999JB900300). | ||
|
||
## Compilation | ||
|
||
Before compilation make sure to have Qt and qmake installed. Then go to this folder and run | ||
|
||
``` | ||
qmake | ||
make | ||
``` | ||
|
||
This generates the `T2Rho` executable. | ||
|
||
## Using T2Rho | ||
|
||
Executing `T2Rho -h` displays the available console commands together with two examples. | ||
|
||
``` | ||
usage: T2Rho File_In File_Out [options] | ||
T2Rho is designed to directly process output files from V2T in | ||
order to obtain densities from temperatures assuming a specific | ||
mantle composition. | ||
Required input parameters: | ||
-------------------------- | ||
File_In Path and name of grid file containing x y z Vs | ||
File_Out Output file name and path | ||
Option Value Default Description | ||
------ ----- ------- ----------- | ||
-h This information | ||
-ERM string AK135 P calculation method AK135 or PREM | ||
-compc vals Custom rock composition | ||
-compc Ol Opx Cpx Sp Gnt | ||
-compp val 0 Use predefined rock compositions: | ||
0 - Garnet Lherzolite after (Jordan, | ||
1979; Goes et al, 2000) | ||
1 - On-cratonic (Shapiro and Ritzwoller, 2004) | ||
2 - Off-cratonic (Shapiro and Ritzwoller, 2004) | ||
3 - Oceanic (Shapiro and Ritzwoller, 2004) | ||
-xfe val 0.1 Define iron content of the rock in mole fraction | ||
``` | ||
|
||
### Mandatory arguments | ||
|
||
`T2Rho` requires the input file `File_In`, containing x y z and vs, and the name of the output file `File_Out`. Input units for z is masl, for vs km/s. | ||
|
||
### Pressure calculation | ||
|
||
Standard calculation of **pressure** uses the earth reference model AK135. | ||
- options are `AK135`, `PREM` or `simple` | ||
- `-ERM PREM` activates pressure calculation with PREM | ||
- `-ERM simple` uses the average density defined with `-ra` | ||
- an experimental feature is the pressure calculation using topography and crustal thickness. This is activated by using `-t_crust FILENAME` and `-z_topo FILENAME`, which both require EarthVision formatted grids containing crustal thickness and topographic elevation. The pressure is then calculated assuming constant density for the crust (`-rc 2890`) and mantle (`-rm 3300`) | ||
- `-ra` defines an average density which is then used to calculate the pressure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
TEMPLATE = subdirs | ||
CONFIG -= app_bundle | ||
CONFIG += ordered | ||
SUBDIRS += src/common src/V2RhoT src/V2T | ||
SUBDIRS += src/common src/V2RhoT src/V2T src/T2Rho | ||
V2RhoT.depends = common | ||
V2T.depends = common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/******************************************************************************* | ||
* Copyright (C) 2018 by Christian Meeßen * | ||
* * | ||
* This file is part of VeloDT. * | ||
* * | ||
* VeloDT is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation version 3 of the License. * | ||
* * | ||
* VeloDT is distributed in the hope that it will be useful, but * | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | ||
* General Public License for more details. * | ||
* * | ||
* You should have received a copy of the GNU General Public License * | ||
* along with VeloDT. If not, see <http://www.gnu.org/licenses/>. * | ||
*******************************************************************************/ | ||
#ifndef T2RHO_H_ | ||
#define T2RHO_H_ | ||
|
||
#include <QList> | ||
#include <QString> | ||
#include <QStringList> | ||
#include <QDateTime> | ||
#include <QRegExp> | ||
#include <math.h> | ||
#include <iostream> | ||
#include <stdlib.h> | ||
#include "PhysicalConstants.h" | ||
#include "PointClasses.h" | ||
#include "ERMs.h" | ||
|
||
class T2Rho { | ||
QString PMethod; | ||
QString file_in; | ||
QString file_out; | ||
EarthReferenceModel * ERM; | ||
// Mineral properties | ||
QList<double> m_rho; | ||
QList<double> m_drhodX; | ||
QList<double> m_K; | ||
QList<double> m_dKdT; | ||
QList<double> m_dKdP; | ||
QList<double> m_dKdPdX; | ||
QList<double> m_dKdX; | ||
QList<double> m_alpha0; | ||
QList<Point5D> data_out; | ||
// Rock properties | ||
double r_XFe; | ||
QList<double> r_comp; | ||
// Functions | ||
bool SetPMethod(QString method); | ||
void argsError(QString val, bool ok); | ||
void setComp(QList<double> composition); | ||
void setComp(int c); | ||
|
||
public: | ||
T2Rho(); | ||
void usage(); | ||
void info(); | ||
void readArgs(int &argc, char *argv[]); | ||
void readFile(); | ||
void writeFile(); | ||
}; | ||
|
||
#endif // T2RHO_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.