[cig-commits] r18810 - mc/3D/CitcomS/trunk/lib
becker at geodynamics.org
becker at geodynamics.org
Sun Jul 31 13:38:35 PDT 2011
Author: becker
Date: 2011-07-31 13:38:35 -0700 (Sun, 31 Jul 2011)
New Revision: 18810
Modified:
mc/3D/CitcomS/trunk/lib/Ggrd_handling.c
mc/3D/CitcomS/trunk/lib/Initial_temperature.c
mc/3D/CitcomS/trunk/lib/Instructions.c
mc/3D/CitcomS/trunk/lib/Stokes_flow_Incomp.c
mc/3D/CitcomS/trunk/lib/global_defs.h
Log:
Updating to newest version, don't think that there should be any significant
changes on my side.
Modified: mc/3D/CitcomS/trunk/lib/Ggrd_handling.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Ggrd_handling.c 2011-07-29 19:34:21 UTC (rev 18809)
+++ mc/3D/CitcomS/trunk/lib/Ggrd_handling.c 2011-07-31 20:38:35 UTC (rev 18810)
@@ -95,8 +95,9 @@
int mpi_inmsg, mpi_success_message = 1;
static ggrd_boolean shift_to_pos_lon = FALSE; /* this should not be needed anymore */
ggrd_boolean use_nearneighbor;
+
+ int only_one_layer,this_layer;
report(E,"ggrd_init_tracer_flavors: ggrd mat init");
- int only_one_layer,this_layer;
/*
are we global?
*/
@@ -177,7 +178,10 @@
ggrd_grdtrack_free_gstruc(ggrd_ict);
report(E,"ggrd tracer init done");
if(E->parallel.me == 0)
- fprintf(stderr,"ggrd tracer init OK\n");
+ if(only_one_layer)
+ fprintf(stderr,"ggrd tracer init OK for layer %i\n",-E->trace.ggrd_layers);
+ else
+ fprintf(stderr,"ggrd tracer init OK for all layers <= %i\n",E->trace.ggrd_layers);
}
void ggrd_full_temp_init(struct All_variables *E)
@@ -297,10 +301,19 @@
fprintf(stderr,"%g %g %g\n",E->sx[m][2][node]*57.29577951308232087,
90-E->sx[m][1][node]*57.29577951308232087,depth);
- myerror(E,"ggrd__temp_init_general: interpolation error");
-
+ myerror(E,"ggrd_temp_init_general: interpolation error");
}
-
+ if(E->control.ggrd_tinit_nl_scale){ /* nonlinear scaling,
+ downeighing negative
+ anomalies. this is
+ meant for seismic
+ tomography with
+ velocity anomalies in
+ the +/- 10% range,
+ given as percent
+ */
+ tadd = (0.625*tadd+0.03125*tadd*tadd);
+ }
if(depth < E->control.ggrd_lower_depth_km){
/*
mean temp is (top+bot)/2 + offset
Modified: mc/3D/CitcomS/trunk/lib/Initial_temperature.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Initial_temperature.c 2011-07-29 19:34:21 UTC (rev 18809)
+++ mc/3D/CitcomS/trunk/lib/Initial_temperature.c 2011-07-31 20:38:35 UTC (rev 18810)
@@ -195,6 +195,10 @@
input_string("ggrd_tinit_prem_file",
E->control.ggrd.temp.prem.model_filename,"hc/prem/prem.dat",
E->parallel.me); /* PREM model filename */
+
+ /* non-linear scaling, downweighing negative anomalies? */
+ input_boolean("ggrd_tinit_nl_scale",&(E->control.ggrd_tinit_nl_scale),"off",E->parallel.me);
+
#else
fprintf(stderr,"tic_method 4 only works for USE_GGRD compiled code\n");
parallel_process_termination();
Modified: mc/3D/CitcomS/trunk/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Instructions.c 2011-07-29 19:34:21 UTC (rev 18809)
+++ mc/3D/CitcomS/trunk/lib/Instructions.c 2011-07-31 20:38:35 UTC (rev 18810)
@@ -285,6 +285,7 @@
/* first the problem type (defines subsequent behaviour) */
input_string("Problem",E->control.PROBLEM_TYPE,"convection",m);
+
if ( strcmp(E->control.PROBLEM_TYPE,"convection") == 0)
set_convection_defaults(E);
else if ( strcmp(E->control.PROBLEM_TYPE,"convection-chemical") == 0)
Modified: mc/3D/CitcomS/trunk/lib/Stokes_flow_Incomp.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Stokes_flow_Incomp.c 2011-07-29 19:34:21 UTC (rev 18809)
+++ mc/3D/CitcomS/trunk/lib/Stokes_flow_Incomp.c 2011-07-31 20:38:35 UTC (rev 18810)
@@ -143,7 +143,7 @@
"div/v=%.2e dv/v=%.2e dp/p=%.2e step %d\n",
count, t, v_norm, p_norm, div, dv, dp,
E->monitor.solution_cycles);
-
+ fflush(stderr);
return;
}
Modified: mc/3D/CitcomS/trunk/lib/global_defs.h
===================================================================
--- mc/3D/CitcomS/trunk/lib/global_defs.h 2011-07-29 19:34:21 UTC (rev 18809)
+++ mc/3D/CitcomS/trunk/lib/global_defs.h 2011-07-31 20:38:35 UTC (rev 18810)
@@ -530,7 +530,7 @@
#ifdef USE_GGRD
struct ggrd_master ggrd;
float *surface_rayleigh;
- int ggrd_allow_mixed_vbcs,ggrd_comp_smooth;
+ int ggrd_allow_mixed_vbcs,ggrd_comp_smooth,ggrd_tinit_nl_scale;
float ggrd_vtop_omega[4];
char ggrd_mat_depth_file[1000];
ggrd_boolean ggrd_mat_is_3d;
More information about the CIG-COMMITS
mailing list