Ticket #34066: patch-bugfixes-r9816.diff

File patch-bugfixes-r9816.diff, 8.3 KB (added by florian@…, 12 years ago)

patchfile 1b

  • src/grdtrend.c

     
    212212                if (GMT_give_synopsis_and_exit) exit (EXIT_FAILURE);
    213213
    214214                fprintf (stderr,"\t<input.grd> is name of grid file to fit trend to.\n");
    215                 fprintf (stderr,"\t-N # model parameters to fit; integer in [1,10].  Append r for robust fit.\n");
     215                fprintf(stderr,"\t-N fit a [robust] model with <n_model> terms.  <n_model> in [1,10].  E.g., robust planar = -N3r.\n");
     216                fprintf(stderr,"\t   Model parameters order is given as follows:\n");
     217                fprintf(stderr,"\t   z = m1 + m2*x + m3*y + m4*x*y + m5*x^2 + m6*y^2 + m7*x^3 + m8*x^2*y + m9*x*y^2 + m10*y^3.\n");
    216218                fprintf (stderr,"\n\tOPTIONS:\n");
    217219                fprintf (stderr,"\t-D Supply filename to write grid file of differences (input - trend).\n");
    218220                fprintf (stderr,"\t-T Supply filename to write grid file of trend.\n");
  • src/pslib.c

     
    13971397                fprintf (PSL->internal.fp, " 0 A\nshowpage\n");
    13981398                if (!PSL->internal.eps_format) fprintf (PSL->internal.fp, "\n%%%%Trailer\n");
    13991399                fprintf (PSL->internal.fp, "\nend\n");
    1400                 if (!PSL->internal.eps_format) fprintf (PSL->internal.fp, "%%%%EOF\n");
     1400                fprintf (PSL->internal.fp, "%%%%EOF\n");
    14011401        }
    14021402        else if (PSL->internal.absolute)
    14031403                fprintf (PSL->internal.fp, "%g %g T 0 A\n", -(PSL->init.origin[0] * PSL->internal.scale), -(PSL->init.origin[1] * PSL->internal.scale));
  • src/psxy.c

     
    532532
    533533        resample = ((!Ctrl->A.active || Ctrl->A.mode) && GMT_IS_MAPPING);
    534534        /* Maximum step size (in degrees) used for interpolation of line segments along great circles (if requested) */
    535         step = Ctrl->A.step / project_info.x_scale / project_info.DIST_M_PR_DEG;
     535        step = Ctrl->A.step / project_info.x_scale / project_info.M_PR_DEG;
    536536
    537537        GMT_plotinit (argc, argv);
    538538
  • src/trend2d.c

     
    212212                if (GMT_give_synopsis_and_exit) exit (EXIT_FAILURE);
    213213
    214214                fprintf(stderr,"\t-F Choose at least 1, up to 6, any order, of xyzmrw for ascii output to stdout.\n");
    215                 fprintf(stderr,"\t-N fit a [robust] model with <n_model> terms.  <n_model> in [1,10].  E.g., robust quadratic = -N3r.\n");
     215                fprintf(stderr,"\t-N fit a [robust] model with <n_model> terms.  <n_model> in [1,10].  E.g., robust planar = -N3r.\n");
     216                fprintf(stderr,"\t   Model parameters order is given as follows:\n");
     217                fprintf(stderr,"\t   z = m1 + m2*x + m3*y + m4*x*y + m5*x^2 + m6*y^2 + m7*x^3 + m8*x^2*y + m9*x*y^2 + m10*y^3.\n");
    216218                fprintf (stderr, "\n\tOPTIONS:\n");
    217219                fprintf(stderr,"\t[<xyz[w]file>] name of ascii file, first 3 cols = x y z [4 cols = x y z w]; [Default reads stdin].\n");
    218220                fprintf(stderr,"\t   x=x, y=y, z=z, m=model, r=residual=z-m, w=weight.  w determined iteratively if robust fit used.\n");
  • src/spotter/backtracker.c

     
    169169                                        }
    170170                                        break;
    171171
    172                                 case 'C':       /* Use finite rotation poles */
     172                                case 'C':       /* Use total reconstruction poles */
    173173                                        finite = TRUE;
    174174                                        break;
    175175
     
    279279                fprintf (stderr, "\t-A Output tracks for ages (or stages, see -L) between young and old [Default is entire track]\n");
    280280                fprintf (stderr, "\t   If no limit is given, then each seamount should have their limits in columns 4 and 5 instead.\n");
    281281                fprintf (stderr, "\t   Only applicable in conjunction with the -L option.\n");
    282                 fprintf (stderr, "\t-C The file given with -E contains finite rotation poles [Default is stage poles]\n");
     282                fprintf (stderr, "\t-C The file given with -E contains total reconstruction poles [Default is stage poles]\n");
    283283                fprintf (stderr, "\t-Db Backtrack mode: move forward in time (from older to younger positions) [Default]\n");
    284284                fprintf (stderr, "\t-Df Flowline mode: move backward in time (from younger to older positions)\n");
    285285                fprintf (stderr, "\t-F file with lon, lat, time records describing motion of hotspot responsible for)\n");
     
    494494                                        t_end = (track_limit) ? t_high : age;
    495495                                        GMT_intpol (dt, dlon, n_m, 1, &t, &lon, gmtdefs.interpolant);
    496496                                        GMT_intpol (dt, dlat, n_m, 1, &t, &lat, gmtdefs.interpolant);
    497                                         lon *= D2R;
    498                                         lat *= D2R;
     497                                        lon *= D2R;     lat *= D2R;
    499498                                        n_chunk = (*spot_func) (&lon, &lat, &t, 1, p, n_stages, 0.0, t_zero, TRUE + stage_id, NULL, &c);
    500                                         out[0] = lon * R2D;
    501                                         out[1] = lat * R2D;
    502                                         out[2] = t;
     499                                        lat = GMT_lat_swap (lat * R2D, GMT_LATSWAP_O2G);        /* Convert back to geodetic */
     500                                        out[GMT_X] = lon * R2D;
     501                                        out[GMT_Y] = lat;
     502                                        out[GMT_Z] = t;
    503503                                        GMT_output (fpo, n_out, out);
    504504                                        t += d_km;      /* dt, actually */
    505505                                        while (t < t_end) {
    506506                                                GMT_intpol (dt, dlon, n_m, 1, &t, &lon, gmtdefs.interpolant);
    507507                                                GMT_intpol (dt, dlat, n_m, 1, &t, &lat, gmtdefs.interpolant);
    508                                                 lon *= D2R;
    509                                                 lat *= D2R;
     508                                                lon *= D2R;     lat *= D2R;
    510509                                                n_chunk = (*spot_func) (&lon, &lat, &t, 1, p, n_stages, 0.0, t_zero, TRUE + stage_id, NULL, &c);
    511                                                 lat = GMT_lat_swap (lat, GMT_LATSWAP_O2G);      /* Convert back to geodetic */
    512                                                 out[0] = lon * R2D;
    513                                                 out[1] = lat * R2D;
    514                                                 out[2] = t;
     510                                                lat = GMT_lat_swap (lat * R2D, GMT_LATSWAP_O2G);        /* Convert back to geodetic */
     511                                                out[GMT_X] = lon * R2D;
     512                                                out[GMT_Y] = lat;
     513                                                out[GMT_Z] = t;
    515514                                                GMT_output (fpo, n_out, out);
    516515                                                t += d_km;      /* dt, actually */
    517516                                        }
    518517                                        GMT_intpol (dt, dlon, n_m, 1, &t_end, &lon, gmtdefs.interpolant);
    519518                                        GMT_intpol (dt, dlat, n_m, 1, &t_end, &lat, gmtdefs.interpolant);
    520                                         lon *= D2R;
    521                                         lat *= D2R;
     519                                        lon *= D2R;     lat *= D2R;
    522520                                        n_chunk = (*spot_func) (&lon, &lat, &t_end, 1, p, n_stages, 0.0, t_zero, TRUE + stage_id, NULL, &c);
    523                                         out[0] = lon * R2D;
    524                                         out[1] = lat * R2D;
    525                                         out[2] = t_end;
     521                                        lat = GMT_lat_swap (lat * R2D, GMT_LATSWAP_O2G);        /* Convert back to geodetic */
     522                                        out[GMT_X] = lon * R2D;
     523                                        out[GMT_Y] = lat;
     524                                        out[GMT_Z] = t_end;
    526525                                        GMT_output (fpo, n_out, out);
    527526                                }
    528527                                else {
     
    531530                                        i = 0;
    532531                                        n_track = irint (c[i++]);
    533532                                        for (j = 0; j < n_track; j++, i += 3) {
    534                                                 out[2] = c[i+2];
    535                                                 if (track_limit && (out[2] < t_low || out[2] > t_high)) continue;
    536                                                 out[0] = c[i] * R2D;
    537                                                 out[1] = c[i+1] * R2D;
    538                                                 out[GMT_Y] = GMT_lat_swap (out[GMT_Y], GMT_LATSWAP_O2G);        /* Convert back to geodetic */
     533                                                out[GMT_Z] = c[i+2];
     534                                                if (track_limit && (out[GMT_Z] < t_low || out[GMT_Z] > t_high)) continue;
     535                                                out[GMT_X] = c[i] * R2D;
     536                                                out[GMT_Y] = GMT_lat_swap (c[i+1] * R2D, GMT_LATSWAP_O2G);      /* Convert back to geodetic */
    539537                                                GMT_output (fpo, n_out, out);
    540538                                        }
    541539                                }
     
    545543                        }
    546544                        else {  /* Just return the projected locations */
    547545                                if (confidence) {       /* Asked for confidence ellipses on reconstructed points */
    548                                         if (spotter_conf_ellipse (in[0], in[1], age, p, n_stages, conf_flag, forward, out)) {
     546                                        if (spotter_conf_ellipse (in[GMT_X], in[GMT_Y], age, p, n_stages, conf_flag, forward, out)) {
    549547                                                fprintf (stderr, "%s: Confidence ellipses only for the age of rotations.  Point with age %g skipped\n", GMT_program, age);
    550548                                                continue;
    551549                                        }
    552550                                }
    553551                                else {
    554552                                        n_chunk = (*spot_func) (&lon, &lat, &age, 1, p, n_stages, 0.0, t_zero, TRUE + stage_id, NULL, &c);
    555                                         out[0] = lon * R2D;
    556                                         out[1] = lat * R2D;
     553                                        out[GMT_X] = lon * R2D; out[GMT_Y] = lat * R2D;
    557554                                        for (k = 2; k < n_expected_fields; k++) out[k] = in[k];
    558555                                }
    559556                                out[GMT_Y] = GMT_lat_swap (out[GMT_Y], GMT_LATSWAP_O2G);        /* Convert back to geodetic */
  • configure.ac

     
    2727dnl Also, fix the MANDATE and DOCDATE values.
    2828dnl For final version set SVN_VERSION to 0
    2929dnl
    30 AC_INIT(GMT, 4.5.8, gmt-help@lists-hawaii.edu)
    31 MANDATE="1 Apr 2012"
    32 DOCDATE="April 2012"
     30AC_INIT(GMT, 4.5.9, gmt-help@lists-hawaii.edu)
     31MANDATE="1 Oct 2012"
     32DOCDATE="October 2012"
    3333DOCYEAR="2012"
    3434GSHHS_VERSION=2.2.0
    3535SVN_VERSION=1