[cig-commits] r16588 - mc/1D/hc/trunk
becker at geodynamics.org
becker at geodynamics.org
Tue Apr 27 19:54:41 PDT 2010
Author: becker
Date: 2010-04-27 19:54:41 -0700 (Tue, 27 Apr 2010)
New Revision: 16588
Modified:
mc/1D/hc/trunk/ggrd_grdtrack_util.c
mc/1D/hc/trunk/ggrd_grdtrack_util.h
mc/1D/hc/trunk/ggrd_readgrds.c
mc/1D/hc/trunk/ggrd_struc.h
mc/1D/hc/trunk/hc_auto_proto.h
mc/1D/hc/trunk/hc_init.c
Log:
Updated minor variable declaration stuff for compatibility
with GMT >= 4.5.1
Modified: mc/1D/hc/trunk/ggrd_grdtrack_util.c
===================================================================
--- mc/1D/hc/trunk/ggrd_grdtrack_util.c 2010-04-28 01:28:20 UTC (rev 16587)
+++ mc/1D/hc/trunk/ggrd_grdtrack_util.c 2010-04-28 02:54:41 UTC (rev 16588)
@@ -82,7 +82,8 @@
/* this is a switch and can be left in */
static ggrd_boolean bilinear = TRUE; /* bilinear by default */
- int pad[4];
+ //int pad[4]; /* GMT < 4.5.1 */
+ GMT_LONG pad[4]; /* GMT >= 4.5.1 */
int i,j;
float zavg,tmp;
/* clear all entries */
@@ -415,7 +416,9 @@
struct GMT_EDGEINFO **edgeinfo, /* pass as empty */
char *edgeinfo_string, /* -fg/ -L type flags from GMT, can be empty */
ggrd_boolean *geographic_in, /* this is normally TRUE */
- int *pad, /* [4] array with padding (output) */
+
+ //int *pad, /* [4] array with padding (output) GMT<4.5.1*/
+ GMT_LONG *pad,
ggrd_boolean three_d, char *dfile, /* depth file name */
float **z, /* layers, pass as NULL */
int *nz, /* number of layers */
@@ -743,7 +746,9 @@
return 0;
}
-void ggrd_print_layer_avg(float *x,float *z,int nx, int ny, int m,FILE *out,int *pad)
+void ggrd_print_layer_avg(float *x,float *z,int nx, int ny, int m,FILE *out,
+ GMT_LONG *pad) /* >= 4.5.1 */
+ //int *pad)
{
int i,j,k,yl,xl,l,nxny,nxnyr;
float *tmp;
Modified: mc/1D/hc/trunk/ggrd_grdtrack_util.h
===================================================================
--- mc/1D/hc/trunk/ggrd_grdtrack_util.h 2010-04-28 01:28:20 UTC (rev 16587)
+++ mc/1D/hc/trunk/ggrd_grdtrack_util.h 2010-04-28 02:54:41 UTC (rev 16588)
@@ -72,10 +72,23 @@
ggrd_boolean ggrd_grdtrack_interpolate(double *, ggrd_boolean , struct GRD_HEADER *, float *,
struct GMT_EDGEINFO *, int, float *, int , double *,ggrd_boolean,
struct GMT_BCR *);
-int ggrd_grdtrack_init(double *, double *, double *, double *, float **, int *, char *, struct GRD_HEADER **, struct GMT_EDGEINFO **, char *, ggrd_boolean *, int *, ggrd_boolean, char *, float **, int *, ggrd_boolean, ggrd_boolean, ggrd_boolean, struct GMT_BCR *);
+// GMT < 4.5.1
+//int ggrd_grdtrack_init(double *, double *, double *, double *, float **, int *, char *, struct GRD_HEADER **, struct GMT_EDGEINFO **, char *, ggrd_boolean *, int *, ggrd_boolean, char *, float **, int *, ggrd_boolean, ggrd_boolean, ggrd_boolean, struct GMT_BCR *);
+// GMT >= 4.5.1
+int ggrd_grdtrack_init(double *, double *, double *, double *, float **, int *, char *,
+ struct GRD_HEADER **, struct GMT_EDGEINFO **, char *,
+ ggrd_boolean *, GMT_LONG *, ggrd_boolean, char *,
+ float **, int *, ggrd_boolean, ggrd_boolean,
+ ggrd_boolean, struct GMT_BCR *);
+/* < 4.5.1 */
+//void ggrd_print_layer_avg(float *,float *,int , int ,int, FILE *,int *);
+/* >= 4.5.1 */
+void ggrd_print_layer_avg(float *,float *,int , int ,int, FILE *,GMT_LONG *);
+
#else
-/* GMT 3.4.5 */
+void ggrd_print_layer_avg(float *,float *,int , int ,int, FILE *,int *);
+
ggrd_boolean ggrd_grdtrack_interpolate(double *, ggrd_boolean , struct GRD_HEADER *, float *,
struct GMT_EDGEINFO *, int,
float *, int ,
@@ -120,7 +133,6 @@
float ggrd_gt_mean(float *,int );
FILE *ggrd_open(char *, char *, char *);
-void ggrd_print_layer_avg(float *,float *,int , int ,int, FILE *,int *);
void ggrd_find_spherical_vel_from_rigid_cart_rot(double *,
double *,
Modified: mc/1D/hc/trunk/ggrd_readgrds.c
===================================================================
--- mc/1D/hc/trunk/ggrd_readgrds.c 2010-04-28 01:28:20 UTC (rev 16587)
+++ mc/1D/hc/trunk/ggrd_readgrds.c 2010-04-28 02:54:41 UTC (rev 16588)
@@ -93,7 +93,11 @@
)
{
FILE *in,*out;
- int i,j,k,l,level,os,os1,dummy[4]={0,0,0,0},ivt,*index;
+ int i,j,k,l,level,os,os1,ivt,*index;
+
+ //int dummy[4]={0,0,0,0}; /* GMT < 4.5.1 */
+ GMT_LONG dummy[4]={0,0,0,0}; /* GMT >= 4.5.1 */
+
hc_boolean
init = FALSE,
wraparound = FALSE,
Modified: mc/1D/hc/trunk/ggrd_struc.h
===================================================================
--- mc/1D/hc/trunk/ggrd_struc.h 2010-04-28 01:28:20 UTC (rev 16587)
+++ mc/1D/hc/trunk/ggrd_struc.h 2010-04-28 02:54:41 UTC (rev 16588)
@@ -65,7 +65,8 @@
data
*/
float *f,*fmaxlim,bandlim;
- int mm;
+
+ int mm;
float *z; /* depth levels */
int nz;
Modified: mc/1D/hc/trunk/hc_auto_proto.h
===================================================================
--- mc/1D/hc/trunk/hc_auto_proto.h 2010-04-28 01:28:20 UTC (rev 16587)
+++ mc/1D/hc/trunk/hc_auto_proto.h 2010-04-28 02:54:41 UTC (rev 16588)
@@ -3,13 +3,13 @@
void ggrd_grdinfo(char *);
int ggrd_grdtrack_init_general(unsigned char, char *, char *, char *, struct ggrd_gt *, unsigned char, unsigned char);
int ggrd_grdtrack_rescale(struct ggrd_gt *, unsigned char, unsigned char, unsigned char, double);
-unsigned char ggrd_grdtrack_interpolate_rtp(double, double, double, struct ggrd_gt *, double *, unsigned char,unsigned char);
+unsigned char ggrd_grdtrack_interpolate_rtp(double, double, double, struct ggrd_gt *, double *, unsigned char, unsigned char);
unsigned char ggrd_grdtrack_interpolate_xyz(double, double, double, struct ggrd_gt *, double *, unsigned char);
-unsigned char ggrd_grdtrack_interpolate_tp(double, double, struct ggrd_gt *, double *, unsigned char,unsigned char);
+unsigned char ggrd_grdtrack_interpolate_tp(double, double, struct ggrd_gt *, double *, unsigned char, unsigned char);
unsigned char ggrd_grdtrack_interpolate_xy(double, double, struct ggrd_gt *, double *, unsigned char);
void ggrd_grdtrack_free_gstruc(struct ggrd_gt *);
void ggrd_find_spherical_vel_from_rigid_cart_rot(double *, double *, double *, double *, double *);
-void ggrd_print_layer_avg(float *, float *, int, int, int, FILE *, int *);
+void ggrd_print_layer_avg(float *, float *, int, int, int, FILE *, GMT_LONG *);
int ggrd_init_thist_from_file(struct ggrd_t *, char *, unsigned char, unsigned char);
void ggrd_gt_interpolate_z(double, float *, int, int *, int *, double *, double *, unsigned char, unsigned char *);
void ggrd_interpol_time(double, struct ggrd_t *, int *, int *, double *, double *, double);
@@ -41,7 +41,7 @@
void hc_init_constants(struct hcs *, double, char *, unsigned short);
void hc_handle_command_line(int, char **, struct hc_parameters *);
void hc_assign_viscosity(struct hcs *, int, double [4], struct hc_parameters *);
-void hc_assign_density(struct hcs *, unsigned short, int, char *, int, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, int, double *, double *, unsigned short);
+void hc_assign_density(struct hcs *, unsigned short, int, char *, int, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, int, double *, double *, unsigned short);
double hc_find_dens_scale(double, double, unsigned short, double *, double *, int);
void hc_init_phase_boundaries(struct hcs *, int, unsigned short);
void hc_assign_plate_velocities(struct hcs *, int, char *, unsigned short, int, unsigned short, unsigned short);
@@ -102,6 +102,7 @@
/* hc_torsol.c */
void hc_torsol(struct hcs *, int, int, int, double *, double **, double **, struct sh_lms *, struct sh_lms *, double *, unsigned short);
/* main.c */
+/* prem2dsm.c */
/* prem_util.c */
int prem_find_layer_x(double, double, double *, int, int, double *);
double prem_compute_pval(double *, double *, int, double);
@@ -181,6 +182,7 @@
void sh_aexp_equals_bexp_coeff(struct sh_lms *, struct sh_lms *);
void sh_scale_expansion_l_factor(struct sh_lms *, double *);
void sh_scale_expansion(struct sh_lms *, double);
+/* sh_extract_layer.c */
/* sh_model.c */
void sh_init_model(struct sh_lms_model *, int, int, int, int, int, int, unsigned short);
void sh_free_model(struct sh_lms_model *);
Modified: mc/1D/hc/trunk/hc_init.c
===================================================================
--- mc/1D/hc/trunk/hc_init.c 2010-04-28 01:28:20 UTC (rev 16587)
+++ mc/1D/hc/trunk/hc_init.c 2010-04-28 02:54:41 UTC (rev 16588)
@@ -743,6 +743,8 @@
get reference density at this level
*/
+
+
prem_get_rho(&rho0,hc->rden[hc->inho],hc->prem);
rho0 /= 1000.0;
if(rho0 < 3)
More information about the CIG-COMMITS
mailing list