How to convert the DEM in the extension (*.dem) into (*.xyz) file?

Hello GMT group! I’m new to language, yet I’ve been deduring some time to learn. I have used this conversion: gmt grd2xyz ./alos30ceftconcat.grd > alos30ceft1.xyz for a cutout that worked. Now, I have a ERTM_2160 with extension *.dem to convert it to *.xyz How can I?

Hmm, have you tried just using the same command? I think gmt should be able to read dem-files through gdal.

I tried gdal, but unfortunately I couldn’t :pensive:

The advise was not to use GDAL but instead to use the exact same GMT command. There is no reason for it to work with a netCDF file and not with a .dem. If that happens we need to know the error message or details of what did not work.

Good morning. Thanks for the msg.

% gmt grd2xyz ./S05E005.dem > ERTM_S05E005.xyz
gmt: Unable to create GMT User directory : /home/cursogmt/.gmt
gmt: Auto-downloading of earth_relief_##m|s.grd files has been disabled.
ERROR 4: `./S05E005.dem’ not recognized as a supported file format.
grd2xyz (api_import_grid): Not a supported grid format [./S05E005.dem]
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
%

it doesn’t seem to support the format

Try

gmt grd2xyz ./S05E005.dem=gd > SRTM_S05E005.xyz

And, BTW, what is that .dem file?

It didn’t work. It’s an EAD. I need to do the Terrain Correction around IHRF.

EAD??, IHRF??

From the name it looks an SRTM tile and GMT can read SRTM tiles perfectly. In fact we even provide all SRTM topography. See the datasets page

I’m sorry for this. It is an MDE. Downloads from this site: Index of /models/ERTM2160/data (curtin.edu.au). United States Geological Survey (USGS) DEM format is an open standard for raster-based DEMs. I think the gdal package supports the extension, but I can’t open them.

Can’t open anything in that link. Seems an old site, dates are 2014.

Please, again, a plain didn’t work helps nothing.

I found a description of the data format in:
https://ddfe.curtin.edu.au/gravitymodels/ERTM2160/ERTM2160_readme.dat

I got something close to what I expected with the command:
gmt xyz2grd S60W075.dem -D+xm+ym+zm -GS60W075.nc -R-75/-70/-60/-55 -I0.002 -di-9999 -ZBLhw -rp

but it seems to be swapping longitude/latitude

I can’t access to data in that site but found an old USGS .dem file in my computer and can read it perfectly with GMT

julia> imshow("\"C:/j/cd_grids/Volcanoes/Mount St. Helens/MtStHelens_Before_USGS-DEM.dem\"", shade=true)

here didn’t work with the dem file from https://ddfe.curtin.edu.au/models/ERTM2160/data/dem.zip

julia> imshow("S60W075.dem", shade=true)
ERROR 4: `S60W075.dem' not recognized as a supported file format.
grdinfo (gmtapi_import_grid): Not a supported grid format [S60W075.dem]
[Session GMT (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
[Session GMT (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
[Session GMT (0)]: Error returned from GMT API: GMT_OBJECT_NOT_FOUND (60)
ERROR: BoundsError: attempt to access 0×0 Matrix{Float64} at index [2]
Stacktrace:
 [1] getindex(A::Matrix{Float64}, i1::Int64)
   @ Base ./array.jl:861
 [2] snif_GI_set_CTRLlimits(G_I::String)
   @ GMT ~/.julia/packages/GMT/kbsTR/src/imshow.jl:133
 [3] imshow(arg1::String, x::Vector{Float64}, y::Vector{Float64}; kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:shade,), Tuple{Bool}}})
   @ GMT ~/.julia/packages/GMT/kbsTR/src/imshow.jl:45
 [4] top-level scope
   @ REPL[3]:1

Maybe your GDAL is not build with the needed driver. This is what I get

$ gdalinfo MtStHelens_Before_USGS-DEM.dem
Driver: USGSDEM/USGS Optional ASCII DEM (and CDED)
Files: MtStHelens_Before_USGS-DEM.dem

What does gdalinfo says about the S60W075.dem?

(Well, I actually know the answer because ERROR 4: `S60W075.dem' not recognized as a supported file format. is a GDAL error message.)

I found a OldMtStHelens.dem and get the same figure.
S60W075.dem isn’t a USGS DEM format. It just has the same extension.
I could get a valid grid with:

gmt xyz2grd S60W075.dem -D+xm+ym+zm -GS60W075.nc -R-75/-70/-60/-55 -I0.002 -ZBLhw -rp

resulting in:


but the expected result is:

OK, I ended up downloading that 3.5 GB file and yes those .dem files can’t automatically be recognized by any software. They are just a binary file with the matrix. No header no nothing that that allows defining a format. Honestly this doesn’t worth spending time at it. Same data (in a more recent version) is provided in the GMT site.

Guys, good afternoon! Had to go offline for a few days. Sorry for not interacting with you. This site is really down. Although at the time I downloaded it here (dem/ 10-09-2014 19:17 -). “The same data (in a newer version) is provided on the GMT website”. Where can I find the @joaquim link?

See remote data instructions on the main site.


My research is terrain correction at these stations with 6 comparisons between different MDTs, including average rock densities. This mdt ERTM2160 is part, but it is difficult to extract it for study.

My Script:


#!/bin/bash

gmt set FONT_ANNOT_PRIMARY 14 FONT_LABEL 14 MAP_LABEL_OFFSET 0.05c MAP_ANNOT_OFFSET_PRIMARY 0.15c

#AREA ENQUADRADA NO MAPA (LongW/LongL/LatN/LatS)
region=“-60/-34.2/-31/0”

#BORDAS DO MAPA (a10=Angulo entre paralelos, f5=Marcacoes entre Angulo, WSne=Fonte onde aparece os numeros Maiusculo aparece Minusculo nao aparece)
ticks=“a10f5WSne”

#PROJECAO DO MAPA (M=Mercator, 16=Tamanho em cm da base, c=tamanho em centimetros)
projection=“M16c”

file=plot_MABA

#CONCATENA ARQUIVOS
#cat ALPSMLC30_S003W040_XYZ.xyz ALPSMLC30_S003W041_XYZ.xyz ALPSMLC30_S003W042_XYZ.xyz ALPSMLC30_S004W039_XYZ.xyz ALPSMLC30_S004W040_XYZ.xyz ALPSMLC30_S004W041_XYZ.xyz ALPSMLC30_S004W042_XYZ.xyz ALPSMLC30_S005W037_XYZ.xyz ALPSMLC30_S005W038_XYZ.xyz ALPSMLC30_S005W039_XYZ.xyz ALPSMLC30_S005W040_XYZ.xyz ALPSMLC30_S005W041_XYZ.xyz ALPSMLC30_S005W042_XYZ.xyz ALPSMLC30_S006W036_XYZ.xyz ALPSMLC30_S006W037_XYZ.xyz ALPSMLC30_S006W038_XYZ.xyz ALPSMLC30_S006W039_XYZ.xyz ALPSMLC30_S006W040_XYZ.xyz ALPSMLC30_S006W041_XYZ.xyz ALPSMLC30_S006W042_XYZ.xyz ALPSMLC30_S007W036_XYZ.xyz ALPSMLC30_S007W037_XYZ.xyz ALPSMLC30_S007W038_XYZ.xyz ALPSMLC30_S007W039_XYZ.xyz ALPSMLC30_S007W040_XYZ.xyz ALPSMLC30_S007W041_XYZ.xyz ALPSMLC30_S007W042_XYZ.xyz > alos4ceftconcat.xyz
#cat ALPSMLC30_S003W047_XYZ.xyz ALPSMLC30_S003W048_XYZ.xyz ALPSMLC30_S003W049_XYZ.xyz ALPSMLC30_S003W050_XYZ.xyz ALPSMLC30_S003W051_XYZ.xyz ALPSMLC30_S003W052_XYZ.xyz ALPSMLC30_S003W053_XYZ.xyz ALPSMLC30_S004W047_XYZ.xyz ALPSMLC30_S004W048_XYZ.xyz ALPSMLC30_S004W049_XYZ.xyz ALPSMLC30_S004W050_XYZ.xyz ALPSMLC30_S004W051_XYZ.xyz ALPSMLC30_S004W052_XYZ.xyz ALPSMLC30_S004W053_XYZ.xyz ALPSMLC30_S005W047_XYZ.xyz ALPSMLC30_S005W048_XYZ.xyz ALPSMLC30_S005W049_XYZ.xyz ALPSMLC30_S005W050_XYZ.xyz ALPSMLC30_S005W051_XYZ.xyz ALPSMLC30_S005W052_XYZ.xyz ALPSMLC30_S005W053_XYZ.xyz ALPSMLC30_S006W047_XYZ.xyz ALPSMLC30_S006W048_XYZ.xyz ALPSMLC30_S006W049_XYZ.xyz ALPSMLC30_S006W050_XYZ.xyz ALPSMLC30_S006W051_XYZ.xyz ALPSMLC30_S006W052_XYZ.xyz ALPSMLC30_S006W053_XYZ.xyz ALPSMLC30_S007W047_XYZ.xyz ALPSMLC30_S007W048_XYZ.xyz ALPSMLC30_S007W049_XYZ.xyz ALPSMLC30_S007W050_XYZ.xyz ALPSMLC30_S007W051_XYZ.xyz ALPSMLC30_S007W052_XYZ.xyz ALPSMLC30_S007W053_XYZ.xyz ALPSMLC30_S008W047_XYZ.xyz ALPSMLC30_S008W048_XYZ.xyz ALPSMLC30_S008W049_XYZ.xyz ALPSMLC30_S008W050_XYZ.xyz ALPSMLC30_S008W051_XYZ.xyz ALPSMLC30_S008W052_XYZ.xyz ALPSMLC30_S008W053_XYZ.xyz ALPSMLC30_S009W047_XYZ.xyz ALPSMLC30_S009W048_XYZ.xyz ALPSMLC30_S009W049_XYZ.xyz ALPSMLC30_S009W050_XYZ.xyz ALPSMLC30_S009W051_XYZ.xyz ALPSMLC30_S009W052_XYZ.xyz ALPSMLC30_S009W053_XYZ.xyz > alos4mabaconcat.xyz
#cat ALPSMLC30_S013W054_XYZ.xyz ALPSMLC30_S013W055_XYZ.xyz ALPSMLC30_S013W056_XYZ.xyz ALPSMLC30_S013W057_XYZ.xyz ALPSMLC30_S013W058_XYZ.xyz ALPSMLC30_S013W059_XYZ.xyz ALPSMLC30_S013W060_XYZ.xyz ALPSMLC30_S014W054_XYZ.xyz ALPSMLC30_S014W055_XYZ.xyz ALPSMLC30_S014W056_XYZ.xyz ALPSMLC30_S014W057_XYZ.xyz ALPSMLC30_S014W058_XYZ.xyz ALPSMLC30_S014W059_XYZ.xyz ALPSMLC30_S014W060_XYZ.xyz ALPSMLC30_S015W054_XYZ.xyz ALPSMLC30_S015W055_XYZ.xyz ALPSMLC30_S015W056_XYZ.xyz ALPSMLC30_S015W057_XYZ.xyz ALPSMLC30_S015W058_XYZ.xyz ALPSMLC30_S015W059_XYZ.xyz ALPSMLC30_S015W060_XYZ.xyz ALPSMLC30_S016W054_XYZ.xyz ALPSMLC30_S016W055_XYZ.xyz ALPSMLC30_S016W056_XYZ.xyz ALPSMLC30_S016W057_XYZ.xyz ALPSMLC30_S016W058_XYZ.xyz ALPSMLC30_S016W059_XYZ.xyz ALPSMLC30_S016W060_XYZ.xyz ALPSMLC30_S017W054_XYZ.xyz ALPSMLC30_S017W055_XYZ.xyz ALPSMLC30_S017W056_XYZ.xyz ALPSMLC30_S017W057_XYZ.xyz ALPSMLC30_S017W058_XYZ.xyz ALPSMLC30_S017W059_XYZ.xyz ALPSMLC30_S017W060_XYZ.xyz ALPSMLC30_S018W054_XYZ.xyz ALPSMLC30_S018W055_XYZ.xyz ALPSMLC30_S018W056_XYZ.xyz ALPSMLC30_S018W057_XYZ.xyz ALPSMLC30_S018W058_XYZ.xyz ALPSMLC30_S018W059_XYZ.xyz ALPSMLC30_S018W060_XYZ.xyz ALPSMLC30_S019W054_XYZ.xyz ALPSMLC30_S019W055_XYZ.xyz ALPSMLC30_S019W056_XYZ.xyz ALPSMLC30_S019W057_XYZ.xyz ALPSMLC30_S019W058_XYZ.xyz ALPSMLC30_S019W059_XYZ.xyz ALPSMLC30_S019W060_XYZ.xyz > alos4cuibconcat.xyz
#cat ALPSMLC30_S013W045_XYZ.xyz ALPSMLC30_S013W046_XYZ.xyz ALPSMLC30_S013W047_XYZ.xyz ALPSMLC30_S013W048_XYZ.xyz ALPSMLC30_S013W049_XYZ.xyz ALPSMLC30_S013W050_XYZ.xyz ALPSMLC30_S013W051_XYZ.xyz ALPSMLC30_S014W045_XYZ.xyz ALPSMLC30_S014W046_XYZ.xyz ALPSMLC30_S014W047_XYZ.xyz ALPSMLC30_S014W048_XYZ.xyz ALPSMLC30_S014W049_XYZ.xyz ALPSMLC30_S014W050_XYZ.xyz ALPSMLC30_S014W051_XYZ.xyz ALPSMLC30_S015W045_XYZ.xyz ALPSMLC30_S015W046_XYZ.xyz ALPSMLC30_S015W047_XYZ.xyz ALPSMLC30_S015W048_XYZ.xyz ALPSMLC30_S015W049_XYZ.xyz ALPSMLC30_S015W050_XYZ.xyz ALPSMLC30_S015W051_XYZ.xyz ALPSMLC30_S016W045_XYZ.xyz ALPSMLC30_S016W046_XYZ.xyz ALPSMLC30_S016W047_XYZ.xyz ALPSMLC30_S016W048_XYZ.xyz ALPSMLC30_S016W049_XYZ.xyz ALPSMLC30_S016W050_XYZ.xyz ALPSMLC30_S016W051_XYZ.xyz ALPSMLC30_S017W045_XYZ.xyz ALPSMLC30_S017W046_XYZ.xyz ALPSMLC30_S017W047_XYZ.xyz ALPSMLC30_S017W048_XYZ.xyz ALPSMLC30_S017W049_XYZ.xyz ALPSMLC30_S017W050_XYZ.xyz ALPSMLC30_S017W051_XYZ.xyz ALPSMLC30_S018W045_XYZ.xyz ALPSMLC30_S018W046_XYZ.xyz ALPSMLC30_S018W047_XYZ.xyz ALPSMLC30_S018W048_XYZ.xyz ALPSMLC30_S018W049_XYZ.xyz ALPSMLC30_S018W050_XYZ.xyz ALPSMLC30_S018W051_XYZ.xyz ALPSMLC30_S019W045_XYZ.xyz ALPSMLC30_S019W046_XYZ.xyz ALPSMLC30_S019W047_XYZ.xyz ALPSMLC30_S019W048_XYZ.xyz ALPSMLC30_S019W049_XYZ.xyz ALPSMLC30_S019W050_XYZ.xyz ALPSMLC30_S019W051_XYZ.xyz > alos4brazconcat.xyz
#cat ALPSMLC30_S020W049_XYZ.xyz ALPSMLC30_S020W050_XYZ.xyz ALPSMLC30_S020W051_XYZ.xyz ALPSMLC30_S020W052_XYZ.xyz ALPSMLC30_S020W053_XYZ.xyz ALPSMLC30_S020W054_XYZ.xyz ALPSMLC30_S020W055_XYZ.xyz ALPSMLC30_S021W049_XYZ.xyz ALPSMLC30_S021W050_XYZ.xyz ALPSMLC30_S021W051_XYZ.xyz ALPSMLC30_S021W052_XYZ.xyz ALPSMLC30_S021W053_XYZ.xyz ALPSMLC30_S021W054_XYZ.xyz ALPSMLC30_S021W055_XYZ.xyz ALPSMLC30_S022W049_XYZ.xyz ALPSMLC30_S022W050_XYZ.xyz ALPSMLC30_S022W051_XYZ.xyz ALPSMLC30_S022W052_XYZ.xyz ALPSMLC30_S022W053_XYZ.xyz ALPSMLC30_S022W054_XYZ.xyz ALPSMLC30_S022W055_XYZ.xyz ALPSMLC30_S023W049_XYZ.xyz ALPSMLC30_S023W050_XYZ.xyz ALPSMLC30_S023W051_XYZ.xyz ALPSMLC30_S023W052_XYZ.xyz ALPSMLC30_S023W053_XYZ.xyz ALPSMLC30_S023W054_XYZ.xyz ALPSMLC30_S023W055_XYZ.xyz ALPSMLC30_S024W049_XYZ.xyz ALPSMLC30_S024W050_XYZ.xyz ALPSMLC30_S024W051_XYZ.xyz ALPSMLC30_S024W052_XYZ.xyz ALPSMLC30_S024W053_XYZ.xyz ALPSMLC30_S024W054_XYZ.xyz ALPSMLC30_S024W055_XYZ.xyz ALPSMLC30_S025W049_XYZ.xyz ALPSMLC30_S025W050_XYZ.xyz ALPSMLC30_S025W051_XYZ.xyz ALPSMLC30_S025W052_XYZ.xyz ALPSMLC30_S025W053_XYZ.xyz ALPSMLC30_S025W054_XYZ.xyz ALPSMLC30_S025W055_XYZ.xyz ALPSMLC30_S026W049_XYZ.xyz ALPSMLC30_S026W050_XYZ.xyz ALPSMLC30_S026W051_XYZ.xyz ALPSMLC30_S026W052_XYZ.xyz ALPSMLC30_S026W053_XYZ.xyz ALPSMLC30_S026W054_XYZ.xyz ALPSMLC30_S026W055_XYZ.xyz > alos4ppteconcat.xyz
#cat ALPSMLC30_S026W048_XYZ.xyz ALPSMLC30_S026W049_XYZ.xyz ALPSMLC30_S026W050_XYZ.xyz ALPSMLC30_S026W051_XYZ.xyz ALPSMLC30_S026W052_XYZ.xyz ALPSMLC30_S027W049_XYZ.xyz ALPSMLC30_S027W050_XYZ.xyz ALPSMLC30_S027W051_XYZ.xyz ALPSMLC30_S027W052_XYZ.xyz ALPSMLC30_S028W049_XYZ.xyz ALPSMLC30_S028W050_XYZ.xyz ALPSMLC30_S028W051_XYZ.xyz ALPSMLC30_S028W052_XYZ.xyz ALPSMLC30_S029W049_XYZ.xyz ALPSMLC30_S029W050_XYZ.xyz ALPSMLC30_S029W051_XYZ.xyz ALPSMLC30_S029W052_XYZ.xyz ALPSMLC30_S030W050_XYZ.xyz ALPSMLC30_S030W051_XYZ.xyz ALPSMLC30_S030W052_XYZ.xyz ALPSMLC30_S031W051_XYZ.xyz ALPSMLC30_S031W052_XYZ.xyz ALPSMLC30_S032W051_XYZ.xyz ALPSMLC30_S032W052_XYZ.xyz > alos4imbtconcat.xyz

#CONVERTE AQUIVOS MDTs *.grd em *.xyz e/ou *.txt
gmt grd2xyz ./alos30ceftconcat.grd > alos30ceft1.xyz

#ORGANIZA O ARQUIVO EM 3 COLUNAS LONG/LAT/ALT
#gawk ‘{printf(“%15.8f%15.8f%11.3f\n”,$1,$2,$3)}’ alos4ceftconcat.xyz > alos4ceftformat.xyz
#gawk ‘{printf(“%15.8f%15.8f%11.3f\n”,$1,$2,$3)}’ alos4mabaconcat.xyz > alos4mabaformat.xyz
#gawk ‘{printf(“%15.8f%15.8f%11.3f\n”,$1,$2,$3)}’ alos4cuibconcat.xyz > alos4cuibformat.xyz
#gawk ‘{printf(“%15.8f%15.8f%11.3f\n”,$1,$2,$3)}’ alos4brazconcat.xyz > alos4brazformat.xyz
#gawk ‘{printf(“%15.8f%15.8f%11.3f\n”,$1,$2,$3)}’ alos4ppteconcat.xyz > alos4ppteformat.xyz
#gawk ‘{printf(“%15.8f%15.8f%11.3f\n”,$1,$2,$3)}’ alos4imbtconcat.xyz > alos4imbtformat.xyz

#RECORTA A AREA DO BRASIL
gmt select -R-61.0/-34.0/-31.0/+1.00 earth2014format.txt > earth2014_br.txt

#RECORTA A AREA DE INTERESSE em QUADRADROS
gmt select -R-41.473/-35.473/-6.711/-0.711 alos4ceftformat.xyz > alos4_CEFT.xyz
gmt select -R-52.122/-46.122/-8.362/-2.362 alos4mabaformat.xyz > alos4_MABA.xyz
gmt select -R-59.070/-53.070/-18.555/-12.555 alos4cuibformat.xyz > alos4_CUIB.xyz
gmt select -R-50.878/-44.878/-18.947/-12.878 alos4brazformat.xyz > alos4_BRAZ.xyz
gmt select -R-54.409/-48.409/-25.120/-19.120 alos4ppteformat.xyz > alos4_PPTE.xyz
gmt select -R-51.656/-45.656/-31.235/-25.235 alos4imbtformat.xyz > alos4_IMBT.xyz

#RECORTA A AREA EM CIRCULO COM RAIO DE 210 KM
gmt select earth2014_CEFT.txt -fg -Ccoord_ceft.txt+d210k -Il > earth2014_CEFT1.txt
gmt select earth2014_MABA.txt -fg -Ccoord_maba.txt+d210k -Il > earth2014_MABA1.txt
gmt select earth2014_CUIB.txt -fg -Ccoord_cuib.txt+d210k -Il > earth2014_CUIB1.txt
gmt select earth2014_BRAZ.txt -fg -Ccoord_braz.txt+d210k -Il > earth2014_BRAZ1.txt
gmt select earth2014_PPTE.txt -fg -Ccoord_ppte.txt+d210k -Il > earth2014_PPTE1.txt
gmt select earth2014_IMBI.txt -fg -Ccoord_imbi.txt+d210k -Il > earth2014_IMBI1.txt

#FORMATA ORIENTACAO E ESCALA GRAFICA
gmt pscoast -J${projection} -R${region} -B${ticks} -Gwheat1 -Sazure2 -Wwheat4 -N1/0.5 -Tf-36/-1.6/0.4i/3 -Lf-41.2/-29.2/-24.2/500+u --FONT_TITLE=8p --MAP_TITLE_OFFSET=0.05i -Df -P -K > $file.ps

#PLOTA AS INFORMAÇÕES CONTIDAS NOS ARQUIVOS "alos4_XXXX.txt
gmt psxy -R${region} -J${projection} -B${ticks} ./alos4_CEFT.xyz -Sc0.01 -Gblue -O -K >> $file.ps
gmt psxy -R${region} -J${projection} -B${ticks} ./alos4_MABA.xyz -Sc0.01 -Gblue -O -K >> $file.ps
gmt psxy -R${region} -J${projection} -B${ticks} ./alos4_CUIB.xyz -Sc0.01 -Gblue -O -K >> $file.ps
gmt psxy -R${region} -J${projection} -B${ticks} ./alos4_BRAZ.xyz -Sc0.01 -Gblue -O -K >> $file.ps
gmt psxy -R${region} -J${projection} -B${ticks} ./alos4_PPTE.xyz -Sc0.01 -Gblue -O -K >> $file.ps
gmt psxy -R${region} -J${projection} -B${ticks} ./alos4_IMBT.xyz -Sc0.01 -Gblue -O -K >> $file.ps

#LIMITES ESTADUAIS DO BRASIL
gmt psxy -R${region} -J${projection} -B${ticks} ./brazil.dat -W0.1p -O -K >> $file.ps

#NOME DO AUTOR
echo “-59.6 -29.8 5 0.0 1 ML Autor:\04Weldon\04Martins\04dos\04Santos” | gmt pstext -J${projection} -R${region} -B${ticks} -O -K >> $file.ps
echo “-59.6 -30.1 5 0.0 1 ML Engenheiro\04Agrimensor\04e\04Cart\363grafo” | gmt pstext -J${projection} -R${region} -B${ticks} -O -K >> $file.ps

#CODIGO DAS ESTACOES IHRF
gawk ‘{print $1, $2-1, 10, 0, 1, “CM”, $3}’ ./coord_estacoes.txt | gmt pstext -J${projection} -R${region} -B${ticks} -O -K >> $file.ps

#LOGO DO GMT
gmt logo -J${projection} -R${region} -Dg-37.2/-30.3+o0.05c+w1.5c -O -K >> $file.ps

#ESTACOES IHRF
gmt psxy -J${projection} -R${region} -B${ticks} ./coord_estacoes.txt -St0.5 -Ggreen -O -K >> $file.ps

#CIRCULO DE 210 Km
gmt psxy -J${projection} -R${region} -B${ticks} ./raio210.txt -SE- -W1p -Wgray -O >> $file.ps

gmt psconvert -Tj -A *.ps

How do you want us to know what is that ERTM2160?
Please, have a read at this post