# Gmt movie \[grdview fail / no-matching postscript\]

**URL:** <https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400>\
**Category:** Q&A\
**Created:** [February 27, 2021, 9:25pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400 "2021-02-27T21:25:52Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [February 27, 2021, 9:25pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/1 "2021-02-27T21:25:52Z")

</div>

> macOS BigSur / gmt 6.2.0\_bcabc17\_2021.02.26

I’m trying to convert the [showcase](https://flint.soest.hawaii.edu/t/animation-weather-system-gif/812) to GMT6 modern mode but it fails and I don’t know what I’m doing wrong …

## The script :

```auto
gmt movie main.sh -Sbpre.sh -Nevent_${i} -C15cx15cx100 -Tperiod.txt -Iinclude.sh -Pa -D33 -Agif -M0

```

## pre.sh

```auto
gmt begin

    gmt math -o0 -T${index_start}/${index_stop}/1 T = index_period.txt
    gmt math -o0 -fit -foT -T${time_start}/${time_stop}/3 T --TIME_UNIT=h --TIME_EPOCH=$(gmt get TIME_EPOCH) = date_period.txt

    paste -d "," index_period.txt date_period.txt > period.txt

    gmt makecpt -Cgray -T0/5000 -I -H > relief.cpt
    gmt makecpt -Ccork -T${lim1}/${lim2}/${linc} -G0/1 -A50 -N -H > cold.cpt

    gmt grdimage $region $projection @earth_relief_03m -Crelief.cpt -I+d # Topography
    gmt pscoast -Di -Wthinnest -Sdeepskyblue $map_annot -t25 # Oceans

gmt end

```

## main.sh

```auto
gmt begin
    gmt grdcontour -C+1 -Ncold.cpt -A- $NCfile"?var[${t1}]" -B+t$(echo ${MOVIE_COL1} | awk -F[T] '{printf "%s %s",$1,$2}')
gmt end

```

## Debug prompt

```auto
grdimage [WARNING]: Changing to PostScript landscape orientation based on your plot and paper dimensions, but we cannot be 100% sure.
grdimage [WARNING]: Use PS_MEDIA and/or PS_PAGE_ORIENTATION to specify correct paper dimensions and/or orientation if our guesses are inadequate.
gmt [ERROR]: The call to grdview failed
end [WARNING]: Figure # 1 (event_1) was registered but no matching PostScript-|+ file found - skipping
mv: rename event_1.pdf to ./movie_session/event_1.pdf: No such file or directory
gmt [ERROR]: The call to grdview failed
end [WARNING]: Figure # 1 (../event_1_00) was registered but no matching PostScript-|+ file found - skipping

# ... and it freezes here

```

Any idea ?

(I also have the errors from [issue995](https://github.com/GenericMappingTools/gmt/issues/995))

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [February 27, 2021, 9:41pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/2 "2021-02-27T21:41:47Z")

</div>

Your main script seems to be missing a projection so you are getting a default -JX15c I think which with margins will exceed your canvas. Also worry about what -X -Y you wish to use if not the 72p/72p.

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [February 27, 2021, 10:49pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/3 "2021-02-27T22:49:44Z")

</div>

I’ve added `$region $projection` (similar to pre.sh) in main.sh  
I haven’t touch to `-X` nor `-Y` yet …

But I got the same prompt. ☹

Also the files `movie_params_xx.sh` start at xx=03 (nothing for the 00, 01 and 02 which I guess are supposed to be `Figure # 1 (../event_1_00)` etc.

movie\_background.ps seems fine… same for movie\_preflight, \_init and \_frame

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [February 27, 2021, 11:02pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/4 "2021-02-27T23:02:02Z")

</div>

and where are things like region, projection defined?

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [February 27, 2021, 11:09pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/5 "2021-02-27T23:09:34Z")

</div>

In the include file.  
I checked and it’s correctly read in both pre and main

```auto
echo $region $projection

```

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [February 27, 2021, 11:20pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/6 "2021-02-27T23:20:55Z")

</div>

Perhaps you can try this. When I am stuck like you on an issue with movie, I run it with -Qs, then I manually go into the directory with all those scripts and parameters and try to run one frame manually, something like bash -xv movie\_master.sh 05 (for frame 05) and examine the output for any errors (that hopefully are helpful) to try to see what is going on. Because movie makes system calls to run stuff it is hard to debug via a typical debugger like Xcode…

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [February 28, 2021, 3:13pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/7 "2021-02-28T15:13:41Z")

</div>

I think pscoast is the name in classic mode. Coast is modern.

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [March 1, 2021, 7:22pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/8 "2021-03-01T19:22:30Z")

</div>

@Esteban82 : I switch to coast but it doesn’t seem to matter much. The background frame was compiling fine.

@pwessel : I executed `bash -xv movie_frame.sh 00` and obtained the following :

```auto
region="-R${lonW}/${lonE}/${latS}/${latN}"
++ region=-R-170/-70/8/52

projection="-JL${ll0}/${ll1}/${lt0}/${lt1}/${map_cm}c"
++ projection=-JL-120/35/30/40/15c

t1=${MOVIE_COL0}
+ t1=8
t2=$(echo ${MOVIE_COL1} | awk -F[T] '{print $1}')
++ echo 1980-01-02T00:00:00
++ awk '-F[T]' '{print $1}'
+ t2=1980-01-02
---

gmt begin
+ gmt begin
# Set output PNG name and plot conversion parameters
        gmt figure ../${MOVIE_NAME} png,ps E${MOVIE_DPU},A+n+r${MOVIE_BACKGROUND} -I../movie_params_$1.sh
+ gmt figure ../event_1_00 png,ps E254,A+n+r,Mb../movie_background.ps -I../movie_params_00.sh
        gmt set PS_MEDIA 15cx15c DIR_DATA "<path>/GMT/movie_session,<path>/GMT/movie_session/event_1" GMT_MAX_CORES 1
+ gmt set PS_MEDIA 15cx15c DIR_DATA <path>/movie_session,<path>/GMT/movie_session/event_1 GMT_MAX_CORES 1
    gmt grdcontour ${region} ${projection} -C+1 -Ncold.cpt -A- $NCfile"?ar_binary_tag[${t1}]" -B+t$(echo ${MOVIE_COL1} | awk -F[T] '{printf "%s %s",$1,$2}')
++ echo 1980-01-02T00:00:00
++ awk '-F[T]' '{printf "%s %s",$1,$2}'
+ gmt grdcontour -R-170/-70/8/52 -JL-120/35/30/40/15c -C+1 -Ncold.cpt -A- '<path2file>.nc4?ar_binary_tag[8]' -B+t1980-01-02 00:00:00
gmt [ERROR]: The call to grdview failed
gmt end
+ gmt end
end [WARNING]: Figure # 1 (../event_1_00) was registered but no matching PostScript-|+ file found - skipping
end [WARNING]: Figure # 1 (../event_1_00) was registered but no matching PostScript-|+ file found - skipping

```

The structure is

- root\_dir (where the data are)
- work\_dir (where the scripts are)
  - **dir** : “movie\_session” (master script changes directory to be executed here)
    - **subdir** : “event\_1”
      - **subsubdir** : “event\_1\_00”
      - **execution files** : cpt, gmt.conf, period.txt movie\_params\_xx.sh, movie\_frame.sh, movie\_init.sh

    - **files** : include.sh, main.sh, pre.sh

  - **dir** : “gmt\_backend” (master script copies include, pre and main from here)
  - **file** : master script

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [March 1, 2021, 7:39pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/9 "2021-03-01T19:39:09Z")

</div>

> [@PlanetGus](#):
>
> ```auto
> + gmt grdcontour -R-170/-70/8/52 -JL-120/35/30/40/15c -C+1 -Ncold.cpt -A- '<path2file>.nc4?ar_binary_tag[8]' -B+t1980-01-02 00:00:00
> 
> ```

OK, so this command is failing. I do not understand what etc means, did you just replace a long actual path with that tag just for the purpose of posting here? WIth quotes and missing quotes it is hard to see as your -B seems to have a hanging 00:00:00 that is not part of the string and would be seen as a possible grid input file. But again, tough to understand that command line. Maybe you need a double-quote around that entire -B arg.

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [March 1, 2021, 7:56pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/10 "2021-03-01T19:56:35Z")

</div>

Alright : Here’s the result with double quote : `-B+t"text"`  
I still got the warning

```auto
grdview [WARNING]: Changing to PostScript landscape orientation based on your plot and paper dimensions, but we cannot be 100% sure.
grdview [WARNING]: Use PS_MEDIA and/or PS_PAGE_ORIENTATION to specify correct paper dimensions and/or orientation if our guesses are inadequate.

```

Also the transparency doesn’t seem to work

```auto
cat gmt.conf 
#
# GMT 6.2.0 Defaults file
#
# COLOR Parameters
#
COLOR_BACKGROUND = black@95
COLOR_FOREGROUND = white@95
#
# FONT Parameters
#
FONT_ANNOT_PRIMARY = 12p,Helvetica,black
FONT_LABEL = 16p,Helvetica,black
FONT_TAG = 16p,Helvetica,black
FONT_TITLE = 24p,Helvetica,black
#
# FORMAT Parameters
#
FORMAT_DATE_MAP = o
FORMAT_GEO_OUT = DF
FORMAT_GEO_MAP = DF
FORMAT_TIME_PRIMARY_MAP = abbreviated
#
# MAP Parameters
#
MAP_FRAME_TYPE = plain
MAP_GRID_PEN_PRIMARY = thinner,gray69
MAP_GRID_PEN_SECONDARY = thin,black
MAP_LABEL_OFFSET = 0.3c
#
# Calendar/Time Parameters
#
TIME_EPOCH = 1980-01-01
TIME_UNIT = d

```

 ![event_1_00](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/2/2df742adca88ef054fb10680950f73d0871fbc05.png)

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [March 1, 2021, 7:59pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/11 "2021-03-01T19:59:53Z")

</div>

> [@pwessel](#):
>
> I do not understand what etc means

Sorry, it’s “et cetera” abbreviated. (“and so forth” or `...`)  
And yes, `<path2file>` and `<path>` are just absolute path on my laptop (`/User/guillaume/Documents....`)

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [March 1, 2021, 8:26pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/12 "2021-03-01T20:26:36Z")

</div>

Sorry bad formatting. I put your path in the angular bracket with formatting it and it disappeared, making it sound like I don’t understood what etc meant…

Selecting png and ps: png will crop to fit, ps requires a page size. Do you really want PS? WHo needs PS anymore? Do you mean eps?

Transparency: So I understand, you want to use cold.cpt which append @50 to all colors to set transparent colors in the filled view run by grdview, yes? I am pretty sure it is not using those settings. Perhaps -t50 is better here.

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [March 1, 2021, 8:36pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/13 "2021-03-01T20:36:57Z")

</div>

Transparency: Double checed this and in fact grdview does honor transparency in CPT provided -Qi is not used. So I am getting transparent plots.

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [March 1, 2021, 8:45pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/14 "2021-03-01T20:45:33Z")

</div>

I don’t want PS particularly, it’s just what I got without specifying anything

The file using `cold.cpt` is a logical dataset (1 = in , 0 = out).  
I want the 1s to be green with 50% transparency :

```auto
# in pre.sh
gmt makecpt -Ccork -T${lim1}/${lim2}/${linc} -G0/1 -A50 -N -H > cold.cpt

```

And the 0s to be invisible :

```auto
gmtset COLOR_BACKGROUND = black@95
gmtset COLOR_FOREGROUND = white@95

```

Is it incorrect (it worked in classic mode)? It took me a while though

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [March 1, 2021, 9:02pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/15 "2021-03-01T21:02:29Z")

</div>

Sorry, you are right the ps,png is automatic and done by movie since it needs to sandwich in the background PS…  
I believe the PS complaints has to do with you setting a 15cm wide canvas but your projection will make a 15 cm wide plot (not included space needed by frame annotations) that is then shifted by 72 points for margins. So you are far exceeding your paper size and PS complaints. SOlution is to make the canwas wider until your plot fits inside the canvas.

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [March 1, 2021, 9:19pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/16 "2021-03-01T21:19:08Z")

</div>

Ok solved I think, and about the 1s semi-transparent and 0s fully-transparent?

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [March 1, 2021, 10:08pm UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/17 "2021-03-01T22:08:50Z")

</div>

Would it not be simpler to make a 2-line CPT this way:

gmt makecpt -T-0.5,0.5,1.5 -N -Cwhite@100,green@50

for the right kind of green value? When I tested grdview (well grdcontour -N) I got transparency.

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [March 2, 2021, 5:02am UTC](https://forum.generic-mapping-tools.org/t/gmt-movie-grdview-fail-no-matching-postscript/1400/18 "2021-03-02T05:02:53Z")

</div>

Thanks @pwessel it appears to work 🙂  
So … [done I guess 🙂](https://flint.soest.hawaii.edu/t/animation-weather-system-gif/812/3)
