title: Fortran Error:Bad continuation line at (1)
body: <p>I am trying to use fortran to write a Unix script into a file. Nonetheless, it keeps reminding me that my format is incorrect. I have been doing this for many times and they are all succeed to be compiled. For this time, I do not know what goes wrong. I have attached my codes and the information on errors and I will be very grateful if someone can point out my mistakes. Thanks!!! </p>
  
  <pre><code>subroutine get_gmt(max1,min1,max2,min2,max3,min3,max4,min4)
  
  
          real*4 max1,min1,max2,min2,max3,min3,max4,min4
          real*4 dt1,dt2,dt3,dt4
          real*4 dtt1,dtt2,dtt3,dtt4
          dt1 = (max1-min1)/2000
          dt2 = (max1-min1)/8
  
          open(23,file='plot.gmt')
          write(23,100) dt1,dt2,min1,max1,min2
       &amp;       ,max2,min3,max3,min4,max4
  100          format('#!/bin/bash', /
       &amp;         'rm tmp?.ps tmp?.cpt',//
  
       &amp;         'set dt1=  ',f11.5,/
       &amp;         'set dt2=  ',f11.5,/
       &amp;         'set T1=  ',f11.5,/
       &amp;         'set T2=  ',f11.5,/
       &amp;         'set T3=  ',f11.5,/
       &amp;         'set T4=  ',f11.5,/
       &amp;         'set T5=  ',f11.5,/
       &amp;         'set T6=  ',f11.5,/
       &amp;         'set T7=  ',f11.5,/
       &amp;         'set T8=  ',f11.5,/
       &amp;         'psbasemap -R0/360/0/90 -JPa3/0
       &amp;          -P -Ba40/a10 -V -X6.5 -Y24 -K &gt; tmp.ps',/
       &amp;         'surface data.dat -Gtmp.grd -I0.05/0.05
       &amp;          -R -C100 -T0.35 -N10 -V',//
  
       &amp;         'makecpt -Crainbow -T$T1/$T2/$dt1  -Z -V &gt; tmp.cpt',/
       &amp;         'makecpt -Crainbow -T$T1/$T2/$dt2 -Z -V &gt; tmp1.cpt',//
  
       &amp;         'psscale -D-1.25/1.5/3/0.4 -Ctmp1.cpt -L -O -K -A &gt;&gt;    tmp.ps',//
       &amp;         'grdimage tmp.grd -R -JP -O -Ctmp.cpt -V -K &gt;&gt; tmp.ps',//
       &amp;        'gawk ''{print $2,$5,0.5*$3}'' result4.dat | psxy
       &amp;         -R -JP -K -O -B -V -Sc -N -W0.5,red &gt;&gt; tmp.ps',//
  
       &amp;        'psxyz -R0/2/0/2/0/2 -JX2/2 -JZ2 -E135/30 -Sc0.1
       &amp;         -W4,red -P -Gred -Bx1 -By1 -Bz1 -BWSneZ
       &amp;         -N -X-6.0 -K -O &lt;&lt;END&gt;&gt; tmp.ps',/
       &amp;        '0 0 1',/
       &amp;        '0 0 0',/
       &amp;        'END',//
  
       &amp;        'pstext -R -JX -O -K -JZ -E -W4,red -P -B -N &lt;&lt;END&gt;&gt; tmp.ps',/
       &amp;        '-0.2 0 0 9 0 15 subevent1',/
       &amp;        '0 0 1.2 9 0 15 subevent2',/
       &amp;        'END',//
  
       &amp;        'gawk ''{print $1,$2}'' time.dat |psxy -R0/360/$T1/$T2 -JX3/3 -P -Ba60/a$dt2
       &amp;         -V -K -O -Sc0.05 -N -X10.5 -P &gt;&gt; tmp.ps',//
  
       &amp;        'gawk ''{print $2,$5}'' result4.dat |psxy -R
       &amp;         -JX -K -O -B -V -Sa0.15 -N -W0.5,red
       &amp;          &gt;&gt; tmp.ps',//
  
       &amp;        'gmtset BASEMAP_AXES = WeSN',/
       &amp;        'gmtset FONT_ANNOT_PRIMARY 7p',//
  
       &amp;        'gawk ''{print $1,$2}'' time1.dat |psxy
       &amp;         -R0/90/$T1/$T2 -JX3/3 -P -Ba15/a$dt2 -V -K -O
       &amp;         -Sc0.05 -N -X4.5 &gt;&gt; tmp.ps',//
  
       &amp;        'psbasemap -R0/360/0/90 -JPa3/0 -P
       &amp;         -Ba40/a10 -V -X-9 -Y-5 -K -O &gt;&gt; tmp.ps',/
       &amp;        'surface data1.dat -Gtmp1.grd -I0.1/0.1 -R -C100 -T0 -N10       -V',//
  
       &amp;        'makecpt -Crainbow -T$T3/$T4/$dt1 -Z -V &gt; tmp3.cpt',//
  
       &amp;        'makecpt -Crainbow -T$T3/$T4/$dt2 -Z -V &gt; tmp4.cpt',//
  
       &amp;        'psscale -D-1.25/1.5/3/0.4
       &amp;         -Ctmp4.cpt -L -O -K -A &gt;&gt; tmp.ps',//
  
       &amp;        'grdimage tmp1.grd -R -JP -O -Ctmp3.cpt -V -K &gt;&gt; tmp.ps',//
  
       &amp;        'gawk ''{print $2,$5,0.5*$3}'' result4.dat |
       &amp;         psxy -R -JP -K -O -B -V
       &amp;         -Sc -N -W0.5,red &gt;&gt; tmp.ps',//
  
       &amp;         'psxyz -R0/2/0/2/0/2 -JX2/2 -JZ2 -E135/30
       &amp;         -Sc0.1 -W4,red -P -Gred -BWSneZ -Bx1 -By1
       &amp;         -Bz1 -N -X-6.0 -K -O &lt;&lt;END&gt;&gt; tmp.ps',/
       &amp;        '1 0 0',/
       &amp;        '0 0 0',/
       &amp;        'END',//
  
       &amp;        'gmtset BASEMAP_AXES = WeSN',/
       &amp;        'gmtset FONT_ANNOT_PRIMARY 7p',//
  
       &amp;        'gawk ''{print $1,$2}'' time4.dat |psxy
       &amp;         -R0/360/$T3/$T4 -JX3/3 -P -Ba60/a$dt2 -V -K -P
       &amp;         -Sc0.05 -N -X10.5 &gt;&gt; tmp.ps',//
  
       &amp;        ‘gmtset BASEMAP_AXES = WeSN',/
       &amp;        'gmtset FONT_ANNOT_PRIMARY 7p',//
  
       &amp;        'gawk ''{print $1,$2}'' time3.dat |psxy
       &amp;         -R0/90/$T3/$T4 -JX3/3 -P -K -Ba15/a$dt2 -V
       &amp;         -X4.5 -O -Sc0.05 -N &gt;&gt; tmp.ps',//
  
       &amp;        'psbasemap -R0/360/0/90 -JPa3/0 -P
       &amp;         -Ba40/a10 -V -X6.5 -Y24 -K &gt; tmp1.ps',/
       &amp;        'surface data2.dat -Gtmp2.grd
       &amp;         -I0.1/0.1 -R -C100 -T0 -N10 -V',//
  
       &amp;        'makecpt -Crainbow -T$T5/$T6/$dt1 -Z -V &gt; tmp5.cpt',/
       &amp;        'makecpt -Crainbow -T$T5/$T6/$dt2 -Z -V &gt; tmp6.cpt',//
  
       &amp;        'psscale -D-1.25/1.5/3/0.4
       &amp;         -Ctmp6.cpt -V -K -O -A -L &gt;&gt; tmp1.ps',//
  
       &amp;        'grdimage tmp2.grd -R -JP -O
       &amp;         -Ctmp5.cpt -V -K &gt;&gt; tmp1.ps',//
  
       &amp;        'gawk ''{print $2,$5,0.5*$3}'' result4.dat |psxy -R
       &amp;         -JP -K -O -B -V -Sc -N -W0.5,red
       &amp;         &gt;&gt; tmp1.ps',/
       &amp;        'psxyz -R0/2/0/2/0/2 -JX2/2 -JZ2 -E135/30
       &amp;         -Sc0.1 -W4,red -P -Gred -Bx1 -By1 -Bz1
       &amp;         -BWSneZ -N -X-6.0 -K -O &lt;&lt;END&gt;&gt;tmp1.ps',/
       &amp;        '0 1 0',/
       &amp;        '0 0 0',/
       &amp;        'END',//
  
       &amp;        'gmtset BASEMAP_AXES = WeSN',/
       &amp;        'gmtset FONT_ANNOT_PRIMARY 7p',//
  
       &amp;        'gawk ''{print $1,$2}'' time6.dat |psxy -R0/360/$T5/$T6
       &amp;         -JX3/3 -P -Ba60/a$dt2 -V
       &amp;         -X10.5 -K -O -Sc0.05 -N &gt;&gt; tmp1.ps',//
  
       &amp;        'gmtset FONT_ANNOT_PRIMARY 7p',//
  
       &amp;        'gawk ''{print $1,$2}'' time5.dat |psxy -R0/90/$T5/$T6
       &amp;         -JX3/3 -P -Ba15/a$dt2 -V
       &amp;         -X4.5 -O -Sc0.05 -N -K &gt;&gt; tmp1.ps',//
  
       &amp;        'psbasemap -R0/360/0/90 -JPa3/0 -P
       &amp;         -Ba40/a10 -V -X-9 -Y-5 -K -O &gt;&gt; tmp1.ps',/
       &amp;        'surface data3.dat -Gtmp3.grd -I0.1/0.1 -R -C100 -T0 -N10 -V',//
  
       &amp;        'makecpt -Crainbow -T$T7/$T8/$dt1 -Z -V &gt; tmp9.cpt',//
  
       &amp;        'makecpt -Crainbow -T$T7/$T8/$dt2 -Z -V &gt; tmp10.cpt',//
  
       &amp;        'psscale -D-1.25/1.5/3/0.4
       &amp;         -Ctmp10.cpt -L -O -K -A &gt;&gt; tmp2.ps',//
  
       &amp;        'gawk ''{print $2,$5,$3}'' result4.dat |psxy
       &amp;          -R -JP -K -O -B -V -Sc0.1 -Ctmp9.cpt -N
       &amp;         -Gblack &gt;&gt; tmp2.ps',//
  
       &amp;        'BASEMAP_AXES = WeSN',/
       &amp;        'FONT_ANNOT_PRIMARY 7p',//
  
       &amp;        'gawk ''{print $2,$3}'' result4.dat |psxy
       &amp;         -R0/360/$T7/$T8 -JX3/3 -P -Ba60/a$dt2 -V
       &amp;         -X4.5 -K -O -Sc0.05 -N &gt;&gt; tmp2.ps',//
  
       &amp;        'gmtset BASEMAP_AXES = WeSN',/
       &amp;        'gmtset FONT_ANNOT_PRIMARY 7p',//
  
       &amp;        'gawk ''{print $5,$3}'' result4.dat |psxy -R0/90/$T7/$T8
       &amp;         -JX3/3 -P -Ba15/a$dt2 -V
       &amp;         -X4.5 -O -Sc0.05 -N &gt;&gt; tmp2.ps')
  
          close(23)
  
           end
  </code></pre>
  
  <p>And it reports numerous errors, but the typical errors are as follows: </p>
  
  <pre><code>  &amp;        'grdimage tmp.grd -R -JP -O -Ctmp.cpt -V -K &gt;&gt; tmp.ps',//
  </code></pre>
  
  <blockquote>
    <p>Error: Positive width required in format specifier G at (1)</p>
  </blockquote>
  
  <pre><code>forward_modeling.f:407:6:
  
    &amp;        'gmtset FONT_ANNOT_PRIMARY 7p',//
    1
  </code></pre>
  
  <blockquote>
    <p>Error: Bad continuation line at (1)
    forward_modeling.f:407:15:</p>
  </blockquote>
  
  <pre><code>  &amp;        'gmtset FONT_ANNOT_PRIMARY 7p',//
             1
  </code></pre>
  
  <blockquote>
    <p>Error: Invalid character in name at (1)
    forward_modeling.f:410:6:</p>
  </blockquote>
  
  <pre><code>  &amp;         -JX3/3 -P -Ba15/a$dt2 -V
    1
  </code></pre>
  
  <blockquote>
    <p>Error: Bad continuation line at (1)
    Error: Unclassifiable statement at (1)</p>
  </blockquote>
  
  <pre><code>forward_modeling.f:285:72:
  
    &amp;       ,max2,min3,max3,min4,max4
                                                                      1
  </code></pre>
  
  <blockquote>
    <p>Error: FORMAT label 100 at (1) not defined</p>
  </blockquote>