Hello everyone.
I am a GMT beginner.
I am attempting to convert xyz files to grd files using xyz2grd.
However, I am unable to convert them to grd files no matter how many times
I am running this script on GMT5.4.4 and windows10 command prompt.
Is there a mistake in my xyz2grd script?
Please, could you tell me how to convert it.
file10.xyz is the file to be converted
GJODC.grd is the file that complements the marine area
#! /bin/csh
#set region = 132.500027778/132.749972222/34.500027778/34.666638882
set interval10 = 10e # grid interval in background data (e = meter)
set interval5 = 5e # grid interval in detailed data (e = meter)
set radius = 15e
set tension = 0.65
set inxyz5 = file10.xyz
set outxyz5 = out10.xyz
set blkfile2 = area2.blk
set grdfile = area.grd
set maskfile = area.mask.grd
set maskedfile = area_masked.grd
set backgrd = GJODC.grd
set backgrdsamp = altibathy_resamp.grd
set compgrdfile = file10.grd
awk ‘BEGIN {FS=“,”} {print $3,$2,$4}’ $inxyz5 > $outxyz5
set region = minmax $outxyz5 -I-1
blockmedian $outxyz5 $region -I$interval5 -V > $blkfile2
surface $blkfile2 $region -I$interval5 -T$tension -G$grdfile -V
grdmask $blkfile2 $region -I$interval5 -NNaN/1/1 -S$radius -G$maskfile -V
grdmath $grdfile $maskfile OR = $maskedfile
grdsample $backgrd -I$interval5 $region -G$backgrdsamp -V
grdmath $maskedfile $backgrdsamp AND = $compgrdfile
grdcontour -JM15 $compgrdfile $region -A500 -C100 -Ba10mf1mg10m -V -P -L0/10000 > file10.grd.ps
rm $blkfile1
rm $blkfile2
rm $grdfile
rm $maskfile
rm $maskedfile
rm $backgrd
rm $backgrdsamp
thank you