[cig-commits] r14735 - in mc/3D/CitcomS/trunk: CitcomS/Components examples/Cookbook6 lib module module/Exchanger
tan2 at geodynamics.org
tan2 at geodynamics.org
Thu Apr 16 11:24:29 PDT 2009
Author: tan2
Date: 2009-04-16 11:24:28 -0700 (Thu, 16 Apr 2009)
New Revision: 14735
Modified:
mc/3D/CitcomS/trunk/CitcomS/Components/IC.py
mc/3D/CitcomS/trunk/CitcomS/Components/Param.py
mc/3D/CitcomS/trunk/examples/Cookbook6/cookbook6.cfg
mc/3D/CitcomS/trunk/lib/Initial_temperature.c
mc/3D/CitcomS/trunk/lib/Lith_age.c
mc/3D/CitcomS/trunk/lib/Output_h5.c
mc/3D/CitcomS/trunk/lib/global_defs.h
mc/3D/CitcomS/trunk/module/Exchanger/initTemperature.cc
mc/3D/CitcomS/trunk/module/setProperties.c
Log:
Move parameter "mantle_temp" from CitcomS.solver.param to CitcomS.solver.ic. Renamed E->control.lith_age_mantle_temp to E->control.mantle_temp.
Modified: mc/3D/CitcomS/trunk/CitcomS/Components/IC.py
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/Components/IC.py 2009-04-16 18:23:06 UTC (rev 14734)
+++ mc/3D/CitcomS/trunk/CitcomS/Components/IC.py 2009-04-16 18:24:28 UTC (rev 14735)
@@ -128,6 +128,7 @@
# for tic_method=1 or 2
half_space_age = pyre.inventory.float("half_space_age", default=40,
validator=pyre.inventory.greater(1e-3))
+ mantle_temp = pyre.inventory.float("mantle_temp", default=1.0)
# for tic_method=2
blob_center = pyre.inventory.list("blob_center", default=[-999., -999., -999.])
Modified: mc/3D/CitcomS/trunk/CitcomS/Components/Param.py
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/Components/Param.py 2009-04-16 18:23:06 UTC (rev 14734)
+++ mc/3D/CitcomS/trunk/CitcomS/Components/Param.py 2009-04-16 18:24:28 UTC (rev 14735)
@@ -68,7 +68,6 @@
lith_age_file = pyre.inventory.str("lith_age_file", default="age.dat")
lith_age_time = pyre.inventory.bool("lith_age_time", default=False)
lith_age_depth = pyre.inventory.float("lith_age_depth", default=0.0314)
- mantle_temp = pyre.inventory.float("mantle_temp", default=1.0)
#DESCRIBE = pyre.inventory.bool("DESCRIBE", default=False)
#BEGINNER = pyre.inventory.bool("BEGINNER", default=False)
Modified: mc/3D/CitcomS/trunk/examples/Cookbook6/cookbook6.cfg
===================================================================
--- mc/3D/CitcomS/trunk/examples/Cookbook6/cookbook6.cfg 2009-04-16 18:23:06 UTC (rev 14734)
+++ mc/3D/CitcomS/trunk/examples/Cookbook6/cookbook6.cfg 2009-04-16 18:24:28 UTC (rev 14735)
@@ -30,7 +30,7 @@
[CitcomS.solver.vsolver]
precond = on
-accuracy = 1e-6
+accuracy = 1e-5
vlowstep = 100000
piterations = 100000
@@ -49,6 +49,7 @@
blob_radius = 6.278334e-02
blob_dT = 0.18
half_space_age = 2500.0
+mantle_temp = 0.82
[CitcomS.solver.bc]
@@ -65,7 +66,6 @@
[CitcomS.solver.param]
start_age = 60
-mantle_temp = 0.82
[CitcomS.solver.visc]
Modified: mc/3D/CitcomS/trunk/lib/Initial_temperature.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Initial_temperature.c 2009-04-16 18:23:06 UTC (rev 14734)
+++ mc/3D/CitcomS/trunk/lib/Initial_temperature.c 2009-04-16 18:24:28 UTC (rev 14735)
@@ -82,7 +82,7 @@
When tic_method is 2, (tic_method==1) + a hot blob. A user can specify
the location and radius of the blob, and also the amplitude of temperature
change in the blob relative to the ambient mantle temperautre
- (E->control.lith_age_mantle_temp).
+ (E->control.mantle_temp).
- blob_center: A comma-separated list of three float numbers.
- blob_radius: A dmensionless length, typically a fraction
of the Earth's radius.
@@ -131,7 +131,9 @@
}
input_float("half_space_age", &(E->convection.half_space_age), "40.0,1e-3,nomax", m);
+ input_float("mantle_temp",&(E->control.mantle_temp),"1.0",m);
+
switch(E->convection.tic_method){
case 2: /* blob */
if( ! input_float_vector("blob_centqer", 3, E->convection.blob_center, m)) {
@@ -600,7 +602,7 @@
case 2:
/* T='mantle_temp' for whole mantle + cold lithosphere TBL
+ a spherical anomaly at lower center */
- mantle_temperature = E->control.lith_age_mantle_temp;
+ mantle_temperature = E->control.mantle_temp;
constant_temperature_profile(E, mantle_temperature);
add_top_tbl(E, E->convection.half_space_age, mantle_temperature);
add_spherical_anomaly(E);
@@ -629,7 +631,7 @@
/* T='mantle_temp' for whole mantle + cold lithosphere TBL
+ perturbations at some layers */
- mantle_temperature = E->control.lith_age_mantle_temp;
+ mantle_temperature = E->control.mantle_temp;
constant_temperature_profile(E, mantle_temperature);
add_top_tbl(E, E->convection.half_space_age, mantle_temperature);
add_perturbations_at_all_layers(E);
@@ -639,7 +641,7 @@
/* T='mantle_temp' for whole mantle + hot CMB TBL
+ perturbations at some layers */
- mantle_temperature = E->control.lith_age_mantle_temp;
+ mantle_temperature = E->control.mantle_temp;
constant_temperature_profile(E, mantle_temperature);
add_bottom_tbl(E, E->convection.half_space_age, mantle_temperature);
add_perturbations_at_all_layers(E);
@@ -649,7 +651,7 @@
/* T='mantle_temp' for whole mantle + cold lithosphere TBL
+ hot CMB TBL + perturbations at some layers */
- mantle_temperature = E->control.lith_age_mantle_temp;
+ mantle_temperature = E->control.mantle_temp;
constant_temperature_profile(E, mantle_temperature);
add_top_tbl(E, E->convection.half_space_age, mantle_temperature);
add_bottom_tbl(E, E->convection.half_space_age, mantle_temperature);
Modified: mc/3D/CitcomS/trunk/lib/Lith_age.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Lith_age.c 2009-04-16 18:23:06 UTC (rev 14734)
+++ mc/3D/CitcomS/trunk/lib/Lith_age.c 2009-04-16 18:24:28 UTC (rev 14735)
@@ -55,8 +55,6 @@
}
#endif
- input_float("mantle_temp",&(E->control.lith_age_mantle_temp),"1.0",m);
-
if (E->control.lith_age) {
input_int("lith_age_time",&(E->control.lith_age_time),"0",m);
input_string("lith_age_file",E->control.lith_age_file,"",m);
@@ -137,11 +135,11 @@
nodeg=E->lmesh.nxs-1+j+(E->lmesh.nys+i-2)*gnox;
node=k+(j-1)*noz+(i-1)*nox*noz;
r1=E->sx[m][3][node];
- E->T[m][node] = E->control.lith_age_mantle_temp;
+ E->T[m][node] = E->control.mantle_temp;
if( r1 >= E->sphere.ro-E->control.lith_age_depth )
{ /* if closer than (lith_age_depth) from top */
temp = (E->sphere.ro-r1) *0.5 /sqrt(E->age_t[nodeg]);
- E->T[m][node] = E->control.lith_age_mantle_temp * erf(temp);
+ E->T[m][node] = E->control.mantle_temp * erf(temp);
}
}
@@ -317,7 +315,7 @@
if( ((E->sx[m][1][node]<=ttt2) && (E->sx[m][3][node]>=E->sphere.ro-E->control.depth_bound_adj)) || ((E->sx[m][1][node]>=ttt3) && (E->sx[m][3][node]>=E->sphere.ro-E->control.depth_bound_adj)) ) {
/* if < (width) from x bounds AND (depth) from top */
temp = (E->sphere.ro-r1) *0.5 /sqrt(E->age_t[nodeg]);
- t0 = E->control.lith_age_mantle_temp * erf(temp);
+ t0 = E->control.mantle_temp * erf(temp);
/* keep the age the same! */
E->sphere.cap[m].TB[1][node]=t0;
@@ -331,7 +329,7 @@
/* keep the age the same! */
temp = (E->sphere.ro-r1) *0.5 /sqrt(E->age_t[nodeg]);
- t0 = E->control.lith_age_mantle_temp * erf(temp);
+ t0 = E->control.mantle_temp * erf(temp);
E->sphere.cap[m].TB[1][node]=t0;
E->sphere.cap[m].TB[2][node]=t0;
@@ -366,7 +364,7 @@
/* set a new age from the file */
temp = (E->sphere.ro-r1) *0.5 /sqrt(E->age_t[nodeg]);
- t0 = E->control.lith_age_mantle_temp * erf(temp);
+ t0 = E->control.mantle_temp * erf(temp);
E->sphere.cap[m].TB[1][node]=t0;
E->sphere.cap[m].TB[2][node]=t0;
Modified: mc/3D/CitcomS/trunk/lib/Output_h5.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Output_h5.c 2009-04-16 18:23:06 UTC (rev 14734)
+++ mc/3D/CitcomS/trunk/lib/Output_h5.c 2009-04-16 18:24:28 UTC (rev 14735)
@@ -1411,22 +1411,18 @@
status = set_attribute_int(input, "tic_method", E->convection.tic_method);
- if (E->convection.tic_method == 0)
+ n = E->convection.number_of_perturbations;
+ status = set_attribute_int(input, "num_perturbations", n);
+ status = set_attribute_int_vector(input, "perturbl", n, E->convection.perturb_ll);
+ status = set_attribute_int_vector(input, "perturbm", n, E->convection.perturb_mm);
+ status = set_attribute_int_vector(input, "perturblayer", n, E->convection.load_depth);
+ status = set_attribute_float_vector(input, "perturbmag", n, E->convection.perturb_mag);
+
+ status = set_attribute_float(input, "half_space_age", E->convection.half_space_age);
+ status = set_attribute_float(input, "mantle_temp", E->control.mantle_temp);
+
+ if (E->convection.tic_method == 2)
{
- n = E->convection.number_of_perturbations;
- status = set_attribute_int(input, "num_perturbations", n);
- status = set_attribute_int_vector(input, "perturbl", n, E->convection.perturb_ll);
- status = set_attribute_int_vector(input, "perturbm", n, E->convection.perturb_mm);
- status = set_attribute_int_vector(input, "perturblayer", n, E->convection.load_depth);
- status = set_attribute_float_vector(input, "perturbmag", n, E->convection.perturb_mag);
- }
- else if (E->convection.tic_method == 1)
- {
- status = set_attribute_float(input, "half_space_age", E->convection.half_space_age);
- }
- else if (E->convection.tic_method == 2)
- {
- status = set_attribute_float(input, "half_space_age", E->convection.half_space_age);
status = set_attribute_float_vector(input, "blob_center", 3, E->convection.blob_center);
status = set_attribute_float(input, "blob_radius", E->convection.blob_radius);
status = set_attribute_float(input, "blob_dT", E->convection.blob_dT);
@@ -1449,7 +1445,6 @@
status = set_attribute_string(input, "lith_age_file", E->control.lith_age_file);
status = set_attribute_int(input, "lith_age_time", E->control.lith_age_time);
status = set_attribute_float(input, "lith_age_depth", E->control.lith_age_depth);
- status = set_attribute_float(input, "mantle_temp", E->control.lith_age_mantle_temp);
status = set_attribute_float(input, "start_age", E->control.start_age);
status = set_attribute_int(input, "reset_startage", E->control.reset_startage);
Modified: mc/3D/CitcomS/trunk/lib/global_defs.h
===================================================================
--- mc/3D/CitcomS/trunk/lib/global_defs.h 2009-04-16 18:23:06 UTC (rev 14734)
+++ mc/3D/CitcomS/trunk/lib/global_defs.h 2009-04-16 18:24:28 UTC (rev 14735)
@@ -479,11 +479,12 @@
//int remove_hor_buoy_avg;
+ float mantle_temp;
+
int lith_age;
int lith_age_time;
int lith_age_old_cycles;
float lith_age_depth;
- float lith_age_mantle_temp;
int temperature_bound_adj;
float depth_bound_adj;
Modified: mc/3D/CitcomS/trunk/module/Exchanger/initTemperature.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/initTemperature.cc 2009-04-16 18:23:06 UTC (rev 14734)
+++ mc/3D/CitcomS/trunk/module/Exchanger/initTemperature.cc 2009-04-16 18:24:28 UTC (rev 14735)
@@ -304,7 +304,7 @@
double z_center = r_center * cos(fi_center);
// compute temperature field according to nodal coordinate
- add_hot_blob_lith(E, x_center, y_center, z_center, d, E->control.lith_age_mantle_temp, 1.0-E->control.lith_age_mantle_temp);
+ add_hot_blob_lith(E, x_center, y_center, z_center, d, E->control.mantle_temp, 1.0-E->control.mantle_temp);
}
Modified: mc/3D/CitcomS/trunk/module/setProperties.c
===================================================================
--- mc/3D/CitcomS/trunk/module/setProperties.c 2009-04-16 18:23:06 UTC (rev 14734)
+++ mc/3D/CitcomS/trunk/module/setProperties.c 2009-04-16 18:24:28 UTC (rev 14735)
@@ -268,6 +268,8 @@
num_perturb, fp);
getFloatProperty(properties, "half_space_age", E->convection.half_space_age, fp);
+ getFloatProperty(properties, "mantle_temp", E->control.mantle_temp, fp);
+
getFloatVectorProperty(properties, "blob_center", E->convection.blob_center, 3, fp);
if( E->convection.blob_center[0] == -999.0 && E->convection.blob_center[1] == -999.0 && E->convection.blob_center[2] == -999.0 ) {
E->convection.blob_center[0] = 0.5*(E->control.theta_min+E->control.theta_max);
@@ -378,7 +380,6 @@
getStringProperty(properties, "lith_age_file", E->control.lith_age_file, fp);
getIntProperty(properties, "lith_age_time", E->control.lith_age_time, fp);
getFloatProperty(properties, "lith_age_depth", E->control.lith_age_depth, fp);
- getFloatProperty(properties, "mantle_temp", E->control.lith_age_mantle_temp, fp);
getFloatProperty(properties, "start_age", E->control.start_age, fp);
getIntProperty(properties, "reset_startage", E->control.reset_startage, fp);
More information about the CIG-COMMITS
mailing list