[cig-commits] r20527 - mc/1D/hc/trunk

becker at geodynamics.org becker at geodynamics.org
Mon Jul 16 05:55:19 PDT 2012


Author: becker
Date: 2012-07-16 05:55:19 -0700 (Mon, 16 Jul 2012)
New Revision: 20527

Modified:
   mc/1D/hc/trunk/ggrd_readgrds.c
   mc/1D/hc/trunk/hc_extract_sh_layer.c
   mc/1D/hc/trunk/hc_extract_spatial.c
   mc/1D/hc/trunk/hc_init.c
   mc/1D/hc/trunk/hc_input.c
   mc/1D/hc/trunk/hc_matrix.c
   mc/1D/hc/trunk/main.c
   mc/1D/hc/trunk/rick_sh_c.c
   mc/1D/hc/trunk/sh_exp.c
   mc/1D/hc/trunk/sh_extract_layer.c
   mc/1D/hc/trunk/sh_power.c
   mc/1D/hc/trunk/sh_syn.c
Log:
Some more format fixes that got away.


Modified: mc/1D/hc/trunk/ggrd_readgrds.c
===================================================================
--- mc/1D/hc/trunk/ggrd_readgrds.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/ggrd_readgrds.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -576,7 +576,7 @@
   ggrd->v.rlevels=(GGRD_CPREC *)realloc(ggrd->v.rlevels,sizeof(GGRD_CPREC));
   if(!ggrd->v.rlevels)
     HC_MEMERROR("ggrd_read_depth_levels");
-  while(fscanf(in,HC_FLT_FORMAT,(ggrd->v.rlevels + ggrd->v.n[HC_R]))==1){
+  while(fscanf(in,"%lf",(ggrd->v.rlevels + ggrd->v.n[HC_R]))==1){
     if(ggrd->v.n[HC_R] > 1)		/* test, if sorted */
       if(fabs(ggrd->v.rlevels[ggrd->v.n[HC_R]] - ggrd->v.rlevels[ggrd->v.n[HC_R]-1]) < 1e-7)
 	GGRD_PE("ggrd_read_depth_levels: error: two radii are at same level");

Modified: mc/1D/hc/trunk/hc_extract_sh_layer.c
===================================================================
--- mc/1D/hc/trunk/hc_extract_sh_layer.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/hc_extract_sh_layer.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -113,7 +113,7 @@
     if(mode != 4){
       /* SH header */
       if(short_format && loop)
-	fprintf(stdout,"%g\n",HC_Z_DEPTH(model->r[ilayer]));
+	fprintf(stdout,"%g\n",(double)HC_Z_DEPTH(model->r[ilayer]));
       sh_print_parameters_to_file((sol+ilayer*shps_read),shps,
 				  ilayer,nset,(HC_PREC)(HC_Z_DEPTH(model->r[ilayer])),
 				  stdout,short_format,FALSE,verbose);
@@ -123,38 +123,38 @@
       /*  */
       if(verbose)
 	fprintf(stderr,"%s: printing x_r SHE at layer %i (depth: %g)\n",
-		argv[0],ilayer,HC_Z_DEPTH(model->r[ilayer]));
+		argv[0],ilayer,(double)HC_Z_DEPTH(model->r[ilayer]));
       sh_print_coefficients_to_file((sol+ilayer*shps_read),shps,stdout,fac,FALSE,verbose);
       break;
     case 2:
       /*  */
       if(verbose)
 	fprintf(stderr,"%s: printing x_pol x_tor SHE at layer %i (depth: %g)\n",
-		argv[0],ilayer,HC_Z_DEPTH(model->r[ilayer]));
+		argv[0],ilayer,(double)HC_Z_DEPTH(model->r[ilayer]));
       sh_print_coefficients_to_file((sol+ilayer*shps_read+1),shps,stdout,fac,FALSE,verbose);
       break;
     case 3:
       /* mode == 3 */
       if(verbose)
 	fprintf(stderr,"%s: printing x_r x_pol x_tor SHE at layer %i (depth: %g)\n",
-		argv[0],ilayer,HC_Z_DEPTH(model->r[ilayer]));
+		argv[0],ilayer,(double)HC_Z_DEPTH(model->r[ilayer]));
       sh_print_coefficients_to_file((sol+ilayer*shps_read),shps,stdout,fac,FALSE,verbose);
       break;
     case 4:
-      fprintf(stdout,"%5i %11g\n",ilayer,HC_Z_DEPTH(model->r[ilayer]));
+      fprintf(stdout,"%5i %11g\n",ilayer,(double)HC_Z_DEPTH(model->r[ilayer]));
       break;
     case 5:
       /*  */
       if(verbose)
 	fprintf(stderr,"%s: printing x_pol SHE at layer %i (depth: %g)\n",
-		argv[0],ilayer,HC_Z_DEPTH(model->r[ilayer]));
+		argv[0],ilayer,(double)HC_Z_DEPTH(model->r[ilayer]));
       sh_print_coefficients_to_file((sol+ilayer*shps_read+1),shps,stdout,fac,FALSE,verbose);
       break;
     case 6:
       /*  */
       if(verbose)
 	fprintf(stderr,"%s: printing x_tor SHE at layer %i (depth: %g)\n",
-		argv[0],ilayer,HC_Z_DEPTH(model->r[ilayer]));
+		argv[0],ilayer,(double)HC_Z_DEPTH(model->r[ilayer]));
       sh_print_coefficients_to_file((sol+ilayer*shps_read+2),shps,stdout,fac,FALSE,verbose);
       break;
  

Modified: mc/1D/hc/trunk/hc_extract_spatial.c
===================================================================
--- mc/1D/hc/trunk/hc_extract_spatial.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/hc_extract_spatial.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -145,7 +145,8 @@
     case 1:
       /*  */
       if(verbose)
-	fprintf(stderr,"%s: printing v_r at layer %i (depth: %g)\n",argv[0],ilayer,zlabel);
+	fprintf(stderr,"%s: printing v_r at layer %i (depth: %g)\n",argv[0],ilayer,
+		(double)zlabel);
 
       ivec=FALSE;sh_compute_spatial((vsol+ilayer*shps_read),ivec,TRUE,&plm,data,verbose);
       sh_print_spatial_data_to_file((vsol+ilayer*shps_read),shps,data,TRUE,zlabel,stdout);
@@ -153,19 +154,19 @@
     case 2:
       /*  */
       if(verbose)
-	fprintf(stderr,"%s: printing v_theta v_phi SHE at layer %i (depth: %g)\n",argv[0],ilayer,zlabel);
+	fprintf(stderr,"%s: printing v_theta v_phi SHE at layer %i (depth: %g)\n",argv[0],ilayer,(double)zlabel);
       ivec=TRUE;sh_compute_spatial((vsol+ilayer*shps_read+1),ivec,TRUE,&plm,data,verbose);
       sh_print_spatial_data_to_file((vsol+ilayer*shps_read+1),shps,data,TRUE,zlabel,stdout);
       break;
     case 3:
       if(verbose)
-	fprintf(stderr,"%s: printing v_r v_theta v_phi SHE at layer %i (depth: %g)\n",argv[0],ilayer,zlabel);
+	fprintf(stderr,"%s: printing v_r v_theta v_phi SHE at layer %i (depth: %g)\n",argv[0],ilayer,(double)zlabel);
       ivec=FALSE;sh_compute_spatial((vsol+ilayer*shps_read),  ivec,TRUE,&plm,data,verbose); /* radial */
       ivec=TRUE; sh_compute_spatial((vsol+ilayer*shps_read+1),ivec,TRUE,&plm,(data+npoints),verbose); /* theta,phi */
       sh_print_spatial_data_to_file((vsol+ilayer*shps_read),shps,data,TRUE,zlabel,stdout);
       break;
     case 4:
-      fprintf(stdout,"%5i %11g\n",ilayer,HC_Z_DEPTH(model->r[ilayer]));
+      fprintf(stdout,"%5i %11g\n",ilayer,(double)HC_Z_DEPTH(model->r[ilayer]));
       break;
     case 5:			/* compute all and store */
     case 6:

Modified: mc/1D/hc/trunk/hc_init.c
===================================================================
--- mc/1D/hc/trunk/hc_init.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/hc_init.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -165,7 +165,7 @@
     switch(p->dd_dens_scale){
     case HC_DD_CONSTANT:
       fprintf(stderr,"hc_init_main: using constant dln\\rho/dln input density scaling of %g\n",
-	      hc->dens_scale);
+	      (double)hc->dens_scale);
       break;
     case HC_DD_READ_FROM_FILE:
       fprintf(stderr,"hc_init_main: reading density scaling from file\n");
@@ -175,7 +175,8 @@
       exit(-1);
       break;
     default:
-      fprintf(stderr,"hc_init_main: error, dd mode %i undefined\n",p->dd_dens_scale);
+      fprintf(stderr,"hc_init_main: error, dd mode %i undefined\n",
+	      p->dd_dens_scale);
       exit(-1);
     }
   
@@ -294,7 +295,7 @@
   */
   hc->re = hc->prem->r0;
   if(fabs(hc->re - (HC_RE_KM * 1e3)) > 1e-7){
-    fprintf(stderr,"%.7e %.7e\n",HC_RE_KM * 1e3,hc->re);
+    fprintf(stderr,"%.7e %.7e\n",(double)(HC_RE_KM * 1e3),(double)hc->re);
     HC_ERROR("hc_init_constants","Earth radius mismatch");
   }
 
@@ -382,7 +383,7 @@
 	      hc_name_boolean(p->read_short_dens_sh));
 
       fprintf(stderr,"-ds\t\tdensity scaling factor (%g)\n",
-	      p->dens_anom_scale);
+	      (double)p->dens_anom_scale);
       fprintf(stderr,"-dnp\t\tdo not scale density anomalies with PREM but rather mean density (%s)\n",
 	      hc_name_boolean(!p->scale_dens_anom_with_prem));
       fprintf(stderr,"-dsf\tfile\tread depth dependent density scaling from file\n");
@@ -407,9 +408,9 @@
       fprintf(stderr,"-vshs\t\tuse the short format (only lmax in header) for the plate velocities (%s)\n",
 	      hc_name_boolean(p->read_short_pvel_sh));
       fprintf(stderr,"-vdir\t\tvelocities are given in files name/vel.1.ab to vel.%i.ab for different times,\n\t\t-%g to -1 Ma before present, where name is from -pvel\n",
-	      HC_PVEL_TSTEPS,(HC_PREC)HC_PVEL_TSTEPS);
+	      HC_PVEL_TSTEPS,(double)HC_PVEL_TSTEPS);
       fprintf(stderr,"-vtime\ttime\tuse this particular time step of the plate velocities (%g)\n\n",
-	      p->pvel_time);
+	      (double)p->pvel_time);
 
       fprintf(stderr,"solution procedure and I/O options:\n");
       fprintf(stderr,"-ng\t\tdo not compute and print the geoid (%i)\n",
@@ -554,7 +555,8 @@
     }
     if(p->verbose)
       fprintf(stderr,"hc_assign_viscosity: assigned four layer viscosity: %.2e %.2e %.2e %.2e\n",
-	      hc->visc[0],hc->visc[1],hc->visc[2],hc->visc[3]);
+	      (double)hc->visc[0],(double)hc->visc[1],
+	      (double)hc->visc[2],(double)hc->visc[3]);
   break;
   case HC_INIT_E_FROM_FILE:		
     /* 
@@ -584,13 +586,13 @@
     while(fscanf(in,HC_TWO_FLT_FORMAT,(hc->rvisc+hc->nvis),(hc->visc+hc->nvis))==2){
       if(hc->visc[hc->nvis] < 1e15)
 	fprintf(stderr,"hc_assign_viscosity: WARNING: expecting viscosities in Pas, read %g at layer %i\n",
-		hc->visc[hc->nvis],hc->nvis);
+		(double)hc->visc[hc->nvis],hc->nvis);
       /* normalize viscosity here */
       hc->visc[hc->nvis] /= hc->visnor;
       if(hc->nvis == 0)
 	if( hc->rvisc[hc->nvis] < hc->r_cmb-0.01){
 	  fprintf(stderr,"hc_assign_viscosity: error: first radius %g is below CMB, %g\n",
-		  hc->rvisc[hc->nvis], hc->r_cmb);
+		  (double)hc->rvisc[hc->nvis], (double)hc->r_cmb);
 	  exit(-1);
 	}
       if(p->verbose){
@@ -604,7 +606,8 @@
       if(hc->nvis){
 	if(hc->rvisc[hc->nvis] < hc->rvisc[hc->nvis-1]){
 	  fprintf(stderr,"hc_assign_viscosity: error: radius has to be ascing, entry %i (%g) smaller than last (%g)\n",
-		  hc->nvis+1,hc->rvisc[hc->nvis],hc->rvisc[hc->nvis-1]);
+		  hc->nvis+1,(double)hc->rvisc[hc->nvis],
+		  (double)hc->rvisc[hc->nvis-1]);
 	  exit(-1);
 	}
       }
@@ -615,7 +618,7 @@
     fclose(in);
     if(hc->rvisc[hc->nvis-1] > 1.0){
       fprintf(stderr,"hc_assign_viscosity: error: first last %g is above surface, 1.0\n",
-	      hc->rvisc[hc->nvis-1]);
+	      (double)hc->rvisc[hc->nvis-1]);
       exit(-1);
     }
     if(p->verbose){
@@ -629,7 +632,7 @@
       fprintf(stderr,"hc_assign_viscosity: read %i layered viscosity[Pas] from %s\n",
 	      hc->nvis,p->visc_filename);
       fprintf(stderr,"hc_assign_viscosity: rough estimate of mean viscosity: %g x %g = %g Pas\n",
-	      mean, hc->visnor, mean*hc->visnor);
+	      (double)mean, (double)hc->visnor, (double)(mean*hc->visnor));
     }
     break;
   default:
@@ -793,7 +796,7 @@
 	  rho0 /= 1000.0;
 	  if(rho0 < 3)
 	    fprintf(stderr,"\nhc_assign_density: WARNING: using small (%g) density from PREM for layer at depth %g\n\n",
-		    rho0*1000,HC_Z_DEPTH(hc->rden[hc->inho]));
+		    (double)rho0*1000,(double)HC_Z_DEPTH(hc->rden[hc->inho]));
 	}else{
 	  /* mean value */
 	  rho0 =  (double)hc->avg_den_mantle;
@@ -817,7 +820,8 @@
 	      HC_ERROR("hc_assign_density","lmax changed in file");
 	  if(hc->rden[hc->inho] <= hc->rden[hc->inho-1]){
 	    fprintf(stderr,"hc_assign_density: %i %g %g\n",hc->inho,
-		    hc->rden[hc->inho], hc->rden[hc->inho-1]);
+		    (double)hc->rden[hc->inho], 
+		    (double)hc->rden[hc->inho-1]);
 	    HC_ERROR("hc_assign_density","depth should decrease, radius increase (give z[km])");
 	  }
 	}
@@ -882,7 +886,7 @@
     if(verbose >= 2){
       fprintf(stderr,"hc_assign_density: r: %11g additional %s d\\rho/dinput: %11g \tlayer %5i out of %i\n",
 	      (double)hc->rden[i],
-	      (dd_dens_scale == HC_DD_READ_FROM_FILE)?("depth-dependent"):((dd_dens_scale==HC_DD_CONSTANT)?("constant"):("polynomial")),local_scale,i,hc->inho);
+	      (dd_dens_scale == HC_DD_READ_FROM_FILE)?("depth-dependent"):((dd_dens_scale==HC_DD_CONSTANT)?("constant"):("polynomial")),(double)local_scale,i,hc->inho);
     }
   }
 
@@ -1120,7 +1124,7 @@
   }
   if((nset > 1)||(fabs(zlabel) > 0.01)){
     fprintf(stderr,"hc_init_single_plate_exp: error: expected one layer at surface, but nset: %i z: %g\n",
-	    nset, zlabel);
+	    nset, (double)zlabel);
     exit(-1);
   }
   /* 
@@ -1149,7 +1153,7 @@
     sh_get_coeff((pvel+1),1,0,2,TRUE,t11);
     if(fabs(t10[0])+fabs(t11[0])+fabs(t11[1]) > 1.0e-7)
       fprintf(stderr,"\nhc_init_single_plate_exp: WARNING: toroidal A(1,0): %g A(1,1): %g B(1,1): %g\n\n",
-	      t10[0],t11[0],t11[1]);
+	      (double)t10[0],(double)t11[0],(double)t11[1]);
   }
 }
 
@@ -1283,7 +1287,7 @@
 	}
 	smean /= (HC_PREC)p->ndf;
 	if(p->verbose)
-	  fprintf(stderr,"hc_assign_dd_density: read scaling on %i layers, rough mean: %g\n",p->ndf,smean);
+	  fprintf(stderr,"hc_assign_dd_density: read scaling on %i layers, rough mean: %g\n",p->ndf,(double)smean);
 	break;
     case HC_INIT_DD_FOUR_LAYERS:
       p->ndf = 4;
@@ -1294,7 +1298,10 @@
 	p->sdf[i] = dlayer[i];
       if(p->verbose)
 	fprintf(stderr,"hc_assign_dd_density: assigned four layer density scaling factors %g %g %g %g\n",
-		p->sdf[0],	p->sdf[1],	p->sdf[2],	p->sdf[3]);
+		(double)p->sdf[0],	
+		(double)p->sdf[1],
+		(double)p->sdf[2],	
+		(double)p->sdf[3]);
       break;
     }
     /* end init */
@@ -1369,8 +1376,9 @@
       }
     }
     if(!hit){
-      fprintf(stderr,"hc_select_pvel: was searching for time %g amongs ",time);
-      for(i=0;i < pvel->n;i++)fprintf(stderr,"%g ",pvel->t[i]);
+      fprintf(stderr,"hc_select_pvel: was searching for time %g amongst ",
+	      (double)time);
+      for(i=0;i < pvel->n;i++)fprintf(stderr,"%g ",(double)pvel->t[i]);
       fprintf(stderr,"\n");
       HC_ERROR("hc_select_pvel","interpolation not implemented yet");
     }

Modified: mc/1D/hc/trunk/hc_input.c
===================================================================
--- mc/1D/hc/trunk/hc_input.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/hc_input.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -55,12 +55,14 @@
     if(verbose){
       if(shps == 3)
 	fprintf(stderr,"hc_read_sh_solution: z: %8.3f |r|: %12.5e |pol|: %12.5e |tor|: %12.5e\n",
-		HC_Z_DEPTH(hc->r[ilayer]),
-		sqrt(sh_total_power((*sol+os))),sqrt(sh_total_power((*sol+os+1))),
-		sqrt(sh_total_power((*sol+os+2))));
+		(double)HC_Z_DEPTH(hc->r[ilayer]),
+		(double)sqrt(sh_total_power((*sol+os))),
+		(double)sqrt(sh_total_power((*sol+os+1))),
+		(double)sqrt(sh_total_power((*sol+os+2))));
       else
 	fprintf(stderr,"hc_read_sh_solution: z: %8.3f |scalar|: %12.5e\n",
-		HC_Z_DEPTH(hc->r[ilayer]),sqrt(sh_total_power((*sol+os))));
+		(double)HC_Z_DEPTH(hc->r[ilayer]),
+		(double)sqrt(sh_total_power((*sol+os))));
     }
     n++;
     os += shps;

Modified: mc/1D/hc/trunk/hc_matrix.c
===================================================================
--- mc/1D/hc/trunk/hc_matrix.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/hc_matrix.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -72,10 +72,10 @@
 	big=temp;
     if (fabs(big) < HC_EPS_PREC) {
       fprintf(stderr,"hc_ludcmp_3x3: singular matrix in routine, big: %g\n",
-	      big);
+	      (double)big);
       for(j=0;j <n;j++){
 	for(k=0;k<n;k++)
-	  fprintf(stderr,"%g ",a[j][k]);
+	  fprintf(stderr,"%g ",(double)a[j][k]);
 	fprintf(stderr,"\n");
       }
       exit(-1);

Modified: mc/1D/hc/trunk/main.c
===================================================================
--- mc/1D/hc/trunk/main.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/main.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -310,7 +310,9 @@
 	    p->elayer[3] = pow(10,v[0]); /* 100..0  */
 	    hc_assign_viscosity(model,HC_INIT_E_FOUR_LAYERS,p->elayer,p);
 	    /* print viscosities of 0...100, 100...410, 410 ... 660 and 660...2871  layer */
-	    fprintf(stdout,"%14.7e %14.7e %14.7e %14.7e\t",p->elayer[3],p->elayer[2],p->elayer[1],p->elayer[0]);
+	    fprintf(stdout,"%14.7e %14.7e %14.7e %14.7e\t",
+		    (double)p->elayer[3],(double)p->elayer[2],
+		    (double)p->elayer[1],(double)p->elayer[0]);
 	    /* compute solution */
 	    hc_solve(model,p->free_slip,p->solution_mode,sol_spectral,
 		     (solved)?(FALSE):(TRUE), /* density changed? */
@@ -321,7 +323,7 @@
 		     p->verbose);
 	    /* only output are the geoid correlations, for now */
 	    hc_compute_correlation(geoid,p->ref_geoid,corr,1,p->verbose);
-	    fprintf(stdout,"%10.7f %10.7f ",corr[0],corr[1]);
+	    fprintf(stdout,"%10.7f %10.7f ",(double)corr[0],(double)corr[1]);
 	    fprintf(stdout,"\n");
 	    solved++;
 	  }

Modified: mc/1D/hc/trunk/rick_sh_c.c
===================================================================
--- mc/1D/hc/trunk/rick_sh_c.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/rick_sh_c.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -1022,7 +1022,7 @@
   }
   if ((lmax < 0) || (fabs(z) > 1.0)) {
     fprintf(stderr,"rick_plmbar1: error: bad arguments: lmax: %i z: %g\n",
-	    lmax,z);
+	    lmax,(double)z);
     exit(-1);
   }
   if(!rick->computed_legendre) {

Modified: mc/1D/hc/trunk/sh_exp.c
===================================================================
--- mc/1D/hc/trunk/sh_exp.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/sh_exp.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -854,7 +854,8 @@
 	fprintf(stderr,"sh_read_model_spatial_data: error: pixel %i coordinate mismatch:\n",
 		(int)j);
 	fprintf(stderr,"sh_read_model_spatial_data: orig: %g, %g file: %g, %g\n",
-		(double)PHI2LON(xp[HC_PHI]),(double)THETA2LAT(xp[HC_THETA]),lon,lat);
+		(double)PHI2LON(xp[HC_PHI]),(double)THETA2LAT(xp[HC_THETA]),
+		(double)lon,(double)lat);
 	exit(-1);
       }
     }

Modified: mc/1D/hc/trunk/sh_extract_layer.c
===================================================================
--- mc/1D/hc/trunk/sh_extract_layer.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/sh_extract_layer.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -60,7 +60,7 @@
 			       &ivec,in,short_format_in,binary,verbose);
   if(verbose)
     fprintf(stderr,"sh_extract_layer: detected %i layers, vec: %i, type %i SH file, shps: %i, layer %i at depth %g\n",
-	    nset,ivec,type,shps,i+1,zdepth[i]);
+	    nset,ivec,type,shps,i+1,(double)zdepth[i]);
   sh_allocate_and_init(&exp,nset*shps,lmax,type,ivec,verbose,FALSE);
   hc_vecrealloc(&zdepth,nset,"sh_extract_layer: zdepth mem error");
   /* which layer to select */
@@ -83,7 +83,7 @@
     if(i == ilayer){		/* output */
       if(verbose)
 	fprintf(stderr,"%s: printing SH from %s at layer %i out of %i to stdout (depth: %g)\n",
-		argv[0],argv[1],i+1,nset,zdepth[i]);
+		argv[0],argv[1],i+1,nset,(double)zdepth[i]);
       /* 
 	 output will remove the layer number information 
       */

Modified: mc/1D/hc/trunk/sh_power.c
===================================================================
--- mc/1D/hc/trunk/sh_power.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/sh_power.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -69,7 +69,7 @@
 				     &zlabel,&ivec,stdin,short_format,
 				     binary,verbose)){
     fprintf(stderr,"%s: computing power per degree and unit area for lmax %i ivec: %i at z: %g\n",
-	    argv[0],lmax,ivec,zlabel);
+	    argv[0],lmax,ivec,(double)zlabel);
     /* 
        input and init 
     */
@@ -83,7 +83,7 @@
     for(l=0;l<=exp->lmax;l++){
       fprintf(stdout,"%5i ",l);
       for(i=0;i<shps;i++)
-	fprintf(stdout,"%15.7e",power[l+i*exp->lmaxp1]);
+	fprintf(stdout,"%15.7e",(double)power[l+i*exp->lmaxp1]);
       fprintf(stdout,"\n");
     }
     free(exp);

Modified: mc/1D/hc/trunk/sh_syn.c
===================================================================
--- mc/1D/hc/trunk/sh_syn.c	2012-07-16 12:18:58 UTC (rev 20526)
+++ mc/1D/hc/trunk/sh_syn.c	2012-07-16 12:55:19 UTC (rev 20527)
@@ -94,7 +94,7 @@
     }
     if(verbose)
       fprintf(stderr,"%s: converting lmax %i ivec: %i at z: %g\n",
-	      argv[0],lmax,ivec,zlabel);
+	      argv[0],lmax,ivec,(double)zlabel);
 
     /* input and init */
     sh_allocate_and_init(&exp,shps,lmax,type,ivec,verbose,((regular_basis != 0)?(1):(0)));



More information about the CIG-COMMITS mailing list