[cig-commits] r14230 - in mc/3D/CitcomS/trunk: bin lib
becker at geodynamics.org
becker at geodynamics.org
Wed Mar 4 15:00:56 PST 2009
Author: becker
Date: 2009-03-04 15:00:56 -0800 (Wed, 04 Mar 2009)
New Revision: 14230
Modified:
mc/3D/CitcomS/trunk/bin/Citcom.c
mc/3D/CitcomS/trunk/lib/Checkpoints.c
mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c
mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c
mc/3D/CitcomS/trunk/lib/Tracer_setup.c
Log:
Changed ggrd flavor init for tracers with checkpoint override from 2
to 100 as per Eh's request.
Modified: mc/3D/CitcomS/trunk/bin/Citcom.c
===================================================================
--- mc/3D/CitcomS/trunk/bin/Citcom.c 2009-03-04 20:59:07 UTC (rev 14229)
+++ mc/3D/CitcomS/trunk/bin/Citcom.c 2009-03-04 23:00:56 UTC (rev 14230)
@@ -123,7 +123,7 @@
if (E->control.restart) {
/* the initial condition is from previous checkpoint */
read_checkpoint(E);
- if(E->control.tracer && (E->trace.ic_method_for_flavors == 2)){
+ if(E->control.tracer && (E->trace.ic_method_for_flavors == 100)){
/*
if ggrd tracer input is selected, this will override
existing tracers, or allow addition of tracers after
Modified: mc/3D/CitcomS/trunk/lib/Checkpoints.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Checkpoints.c 2009-03-04 20:59:07 UTC (rev 14229)
+++ mc/3D/CitcomS/trunk/lib/Checkpoints.c 2009-03-04 23:00:56 UTC (rev 14230)
@@ -119,9 +119,9 @@
/* read tracer/composition information in the checkpoint file */
if(E->control.tracer) {
- if(E->trace.ic_method_for_flavors == 2){
+ if(E->trace.ic_method_for_flavors == 100){
if(E->parallel.me == 0)
- fprintf(stderr,"ic_method_for_flavors = 2 will override checkpoint restart\n");
+ fprintf(stderr,"ic_method_for_flavors = 100 will override checkpoint restart\n");
}else{
read_tracer_checkpoint(E, fp);
if(E->composition.on)
Modified: mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c 2009-03-04 20:59:07 UTC (rev 14229)
+++ mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c 2009-03-04 23:00:56 UTC (rev 14230)
@@ -1930,8 +1930,8 @@
fprintf(E->trace.fpt,"Interface Height: %d %f\n",i,E->trace.z_interface[i]);
}
#ifdef USE_GGRD
- else if((E->trace.ic_method_for_flavors == 1)||(E->trace.ic_method_for_flavors == 2)) {
- /* ggrd modes 1 and 2 (2 is override for restart) */
+ else if((E->trace.ic_method_for_flavors == 1)||(E->trace.ic_method_for_flavors == 100)) {
+ /* ggrd modes 1 and 100 (100 is override for restart) */
fprintf(E->trace.fpt,"netcdf grd assigned tracer flavors\n");
fprintf(E->trace.fpt,"file: %s top %i layeres\n",E->trace.ggrd_file,
E->trace.ggrd_layers);
Modified: mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c 2009-03-04 20:59:07 UTC (rev 14229)
+++ mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c 2009-03-04 23:00:56 UTC (rev 14230)
@@ -179,6 +179,16 @@
for (i=0; i<E->trace.nflavors-1; i++)
fprintf(E->trace.fpt,"Interface Height: %d %f\n",i,E->trace.z_interface[i]);
}
+#ifdef USE_GGRD
+ else if((E->trace.ic_method_for_flavors == 1)||(E->trace.ic_method_for_flavors == 100)) {
+ /* ggrd modes 1 and 100 (100 is override for restart) */
+ fprintf(stderr,"ggrd regional flavors not implemented\n");
+ fprintf(E->trace.fpt,"ggrd not implemented et for regional, flavor method= %d\n",
+ E->trace.ic_method_for_flavors);
+ fflush(E->trace.fpt);
+ parallel_process_termination();
+ }
+#endif
else {
fprintf(E->trace.fpt,"Sorry-This IC methods for Flavors are Unavailable %d\n",E->trace.ic_method_for_flavors);
fflush(E->trace.fpt);
Modified: mc/3D/CitcomS/trunk/lib/Tracer_setup.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Tracer_setup.c 2009-03-04 20:59:07 UTC (rev 14229)
+++ mc/3D/CitcomS/trunk/lib/Tracer_setup.c 2009-03-04 23:00:56 UTC (rev 14230)
@@ -153,6 +153,13 @@
* either using absolute method or ratio method. */
input_int("tracer_flavors",&(E->trace.nflavors),"0,0,nomax",m);
+ /* 0: default from layers
+ 1: from netcdf grds
+
+
+ 100: from grds, overriding checkpoints during restart
+ (1 and 100 require ggrd)
+ */
input_int("ic_method_for_flavors",
&(E->trace.ic_method_for_flavors),"0,0,nomax",m);
@@ -176,7 +183,7 @@
*/
#ifdef USE_GGRD
case 1:
- case 2: /* will override restart */
+ case 100: /* will override restart */
/* from grid in top n materials, this will override
the checkpoint input */
input_string("ictracer_grd_file",E->trace.ggrd_file,"",m); /* file from which to read */
@@ -185,7 +192,7 @@
#endif
default:
- fprintf(stderr,"ic_method_for_flavors %i undefined (1 and 2 only for ggrd mode)\n",E->trace.ic_method_for_flavors);
+ fprintf(stderr,"ic_method_for_flavors %i undefined (1 and 100 only for ggrd mode)\n",E->trace.ic_method_for_flavors);
parallel_process_termination();
break;
}
@@ -1272,7 +1279,7 @@
break;
case 1: /* from grd in top n layers */
- case 2: /* (will override restart) */
+ case 100: /* (will override restart) */
#ifndef USE_GGRD
fprintf(stderr,"ic_method_for_flavors %i requires the ggrd routines from hc, -DUSE_GGRD\n",
E->trace.ic_method_for_flavors);
More information about the CIG-COMMITS
mailing list