From 6fc26662f9610aeaf4caee31b4d3074d42569b7b Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Tue, 7 Jul 2026 18:09:06 -0300 Subject: [PATCH 1/2] Swap order to fix remote data server --- src/movie.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/movie.c b/src/movie.c index 76df04dd746..6d3f5d19cc8 100644 --- a/src/movie.c +++ b/src/movie.c @@ -1746,8 +1746,8 @@ EXTERN_MSC int GMT_movie (void *V_API, int mode, void *args) { fprintf (fp, "%s %s\n", load[Ctrl->In.mode], init_file); /* Include the initialization parameters */ while (gmt_fgets (GMT, line, PATH_MAX, Ctrl->S[MOVIE_PREFLIGHT].fp)) { /* Read the background script and copy to preflight script with some exceptions */ if (gmt_is_gmtmodule (line, "begin")) { /* Need to insert gmt figure after this line (or as first line) in case a background plot will be made */ - fprintf (fp, "gmt begin\n"); /* To ensure there are no args here since we are using gmt figure instead */ if (has_conf && !strstr (line, "-C")) fprintf (fp, cpconf[Ctrl->In.mode], conf_file); + fprintf (fp, "gmt begin\n"); /* To ensure there are no args here since we are using gmt figure instead */ gmt_set_comment (fp, Ctrl->In.mode, "\tSet fixed background output ps name"); fprintf (fp, "\tgmt figure movie_background ps\n"); fprintf (fp, "\tgmt set PS_MEDIA %g%cx%g%c\n", Ctrl->C.dim[GMT_X], Ctrl->C.unit, Ctrl->C.dim[GMT_Y], Ctrl->C.unit); @@ -1923,8 +1923,8 @@ EXTERN_MSC int GMT_movie (void *V_API, int mode, void *args) { fprintf (fp, "%s %s\n", load[Ctrl->In.mode], init_file); /* Include the initialization parameters */ while (gmt_fgets (GMT, line, PATH_MAX, Ctrl->S[MOVIE_POSTFLIGHT].fp)) { /* Read the foreground script and copy to postflight script with some exceptions */ if (gmt_is_gmtmodule (line, "begin")) { /* Need to insert gmt figure after this line */ - fprintf (fp, "gmt begin\n"); /* Ensure there are no args here since we are using gmt figure instead */ if (has_conf && !strstr (line, "-C")) fprintf (fp, cpconf[Ctrl->In.mode], conf_file); + fprintf (fp, "gmt begin\n"); /* Ensure there are no args here since we are using gmt figure instead */ gmt_set_comment (fp, Ctrl->In.mode, "\tSet fixed foreground output ps name"); fprintf (fp, "\tgmt figure movie_foreground ps\n"); fprintf (fp, "\tgmt set PS_MEDIA %g%cx%g%c\n", Ctrl->C.dim[GMT_X], Ctrl->C.unit, Ctrl->C.dim[GMT_Y], Ctrl->C.unit); @@ -2084,8 +2084,8 @@ EXTERN_MSC int GMT_movie (void *V_API, int mode, void *args) { else { /* Read the title script */ while (gmt_fgets (GMT, line, PATH_MAX, Ctrl->E.fp)) { /* Read the main script and copy to loop script, with some exceptions */ if (gmt_is_gmtmodule (line, "begin")) { /* Need to insert a gmt figure call after this line */ - fprintf (fp, "gmt begin\n"); /* Ensure there are no args here since we are using gmt figure instead */ if (has_conf && !strstr (line, "-C")) fprintf (fp, cpconf[Ctrl->In.mode], conf_file); + fprintf (fp, "gmt begin\n"); /* Ensure there are no args here since we are using gmt figure instead */ gmt_set_comment (fp, Ctrl->In.mode, "\tSet output PNG name and plot conversion parameters"); fprintf (fp, "\tgmt set PS_MEDIA %g%cx%g%c\n", Ctrl->C.dim[GMT_X], Ctrl->C.unit, Ctrl->C.dim[GMT_Y], Ctrl->C.unit); fprintf (fp, "\tgmt set DIR_DATA \"%s\"\n", datadir); @@ -2414,8 +2414,8 @@ EXTERN_MSC int GMT_movie (void *V_API, int mode, void *args) { } while (gmt_fgets (GMT, line, PATH_MAX, Ctrl->E.fp)) { /* Read the main script and copy to loop script, with some exceptions */ if (gmt_is_gmtmodule (line, "begin")) { /* Need to insert a gmt figure call after this line */ - fprintf (fp, "gmt begin\n"); /* Ensure there are no args here since we are using gmt figure instead */ if (has_conf && !strstr (line, "-C")) fprintf (fp, cpconf[Ctrl->In.mode], conf_file); + fprintf (fp, "gmt begin\n"); /* Ensure there are no args here since we are using gmt figure instead */ gmt_set_comment (fp, Ctrl->In.mode, "\tSet output name and plot conversion parameters"); fprintf (fp, "\tgmt figure %s %s", Ctrl->N.prefix, Ctrl->M.format); fprintf (fp, " %s", extra); @@ -2440,8 +2440,8 @@ EXTERN_MSC int GMT_movie (void *V_API, int mode, void *args) { else { /* Process main script */ while (gmt_fgets (GMT, line, PATH_MAX, Ctrl->In.fp)) { /* Read the mainscript and copy to loop script, with some exceptions */ if (gmt_is_gmtmodule (line, "begin")) { /* Need to insert a gmt figure call after this line */ - fprintf (fp, "gmt begin\n"); /* Ensure there are no args here since we are using gmt figure instead */ if (has_conf && !strstr (line, "-C")) fprintf (fp, cpconf[Ctrl->In.mode], conf_file); + fprintf (fp, "gmt begin\n"); /* Ensure there are no args here since we are using gmt figure instead */ gmt_set_comment (fp, Ctrl->In.mode, "\tSet output name and plot conversion parameters"); fprintf (fp, "\tgmt figure %s %s", Ctrl->N.prefix, Ctrl->M.format); fprintf (fp, " %s", extra); @@ -2604,8 +2604,8 @@ EXTERN_MSC int GMT_movie (void *V_API, int mode, void *args) { fprintf (fp, "cd %s\n", gmt_place_var (Ctrl->In.mode, "MOVIE_NAME")); /* cd to the temp directory */ while (gmt_fgets (GMT, line, PATH_MAX, Ctrl->In.fp)) { /* Read the main script and copy to loop script, with some exceptions */ if (gmt_is_gmtmodule (line, "begin")) { /* Need to insert a gmt figure call after this line */ - fprintf (fp, "gmt begin\n"); /* Ensure there are no args here since we are using gmt figure instead */ if (has_conf && !strstr (line, "-C")) fprintf (fp, cpconf[Ctrl->In.mode], conf_file); + fprintf (fp, "gmt begin\n"); /* Ensure there are no args here since we are using gmt figure instead */ gmt_set_comment (fp, Ctrl->In.mode, "\tSet output PNG name and plot conversion parameters"); fprintf (fp, "\tgmt figure ../%s %s", gmt_place_var (Ctrl->In.mode, "MOVIE_NAME"), frame_products); fprintf (fp, " E%s,%s", gmt_place_var (Ctrl->In.mode, "MOVIE_DPU"), extra); From 61623bb31a697e9972a455c7ee557b8dd75c2305 Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Fri, 11 Sep 2026 13:31:50 -0300 Subject: [PATCH 2/2] movie: Pin -Ar to cm units in trajectory2/3/5 tests Without an explicit unit, -Ar falls back to the session's active PROJ_LENGTH_UNIT, which now depends on the cp gmt.conf/gmt begin order just fixed in movie.c. Pinning to cm keeps these tests matching the existing baseline regardless of that order. --- test/movie/trajectory2.sh | 2 +- test/movie/trajectory3.sh | 2 +- test/movie/trajectory5.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/movie/trajectory2.sh b/test/movie/trajectory2.sh index 5839f6936fd..7f2e613ddaf 100755 --- a/test/movie/trajectory2.sh +++ b/test/movie/trajectory2.sh @@ -21,7 +21,7 @@ cat << 'EOF' > pre.sh gmt math -T0/14/24+n -o0 T = times.txt # Make background static plot with entire dashed line and knots in black gmt begin - gmt events -R0/9.6/-2.7/2.7 -Jx0.5i -Ar${MOVIE_DPU} trajectory.txt --GMT_INTERPOLANT=linear > points.txt + gmt events -R0/9.6/-2.7/2.7 -Jx0.5i -Ar${MOVIE_DPU}c trajectory.txt --GMT_INTERPOLANT=linear > points.txt gmt plot trajectory.txt -W0.25p,- -B0 -X0 -Y0 gmt plot -Sc9p -Gblack trajectory.txt gmt end diff --git a/test/movie/trajectory3.sh b/test/movie/trajectory3.sh index b9e036ce507..196e8e7f3d5 100755 --- a/test/movie/trajectory3.sh +++ b/test/movie/trajectory3.sh @@ -22,7 +22,7 @@ gmt math -T0/14/24+n -o0 T = times.txt # Make background static plot with entire dashed line and knots in black # and also discretize the line to points at required resolution gmt begin - gmt events -R0/9.6/-2.7/2.7 -Jx0.5i -Ar${MOVIE_DPU} trajectory.txt --GMT_INTERPOLANT=linear > points.txt + gmt events -R0/9.6/-2.7/2.7 -Jx0.5i -Ar${MOVIE_DPU}c trajectory.txt --GMT_INTERPOLANT=linear > points.txt gmt makecpt -Chot -T-5/5 -H > heat.cpt gmt plot trajectory.txt -W0.25p,- -B0 -X0 -Y0 gmt plot -Sc9p -Gblack trajectory.txt diff --git a/test/movie/trajectory5.sh b/test/movie/trajectory5.sh index 32eb7a191f1..330c27d0585 100755 --- a/test/movie/trajectory5.sh +++ b/test/movie/trajectory5.sh @@ -23,7 +23,7 @@ gmt math -T0/14/24+n -o0 T = times.txt # Make background static plot with entire dashed line and knots in black # and also discretize the line to points at required resolution gmt begin - gmt events -R0/9.6/-2.7/2.7 -Jx0.5i -Ar${MOVIE_DPU}+z trajectory.txt --GMT_INTERPOLANT=linear > points.txt + gmt events -R0/9.6/-2.7/2.7 -Jx0.5i -Ar${MOVIE_DPU}c+z trajectory.txt --GMT_INTERPOLANT=linear > points.txt gmt makecpt -Chot -T0/1 -H > heat.cpt gmt plot trajectory.txt -W0.25p,- -B0 -X0 -Y0 gmt plot -Sc9p -Gblack trajectory.txt