aaronzou / mirone

Automatically exported from code.google.com/p/mirone
0 stars 0 forks source link

ARCinfo ASCII format to GMT .grd format #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi

I have downloaded the 5*5 degrees SRTM DEMs (attached .asc file) and I read
it in Mirone (1.2.3) and convert it to GMT .grd file(attached file .grd
file). when I want to read the file in GMT, it says "variable not found"
but the file is in the directory. I tried for several files, but it is the
same problem. none of the GMT commands(like grdinfo, ...) work with these
.grd files generated by Mirone!, please help me.  

Many thnaks 
Faramarz Nilforoushan

Original issue reported on code.google.com by Far...@gmail.com on 6 Mar 2008 at 11:24

GoogleCodeExporter commented 8 years ago
I can not attach my files!!(using Mozilla fire fox, linux)

Original comment by Far...@gmail.com on 6 Mar 2008 at 11:26

GoogleCodeExporter commented 8 years ago
Farnil,
You should provide the exact error message. First you refered to a "the 
variable(file name) is not found!!". Now you say "variable not found". None of 
them 
exists either on the GMT or netCDF source code, so I strongly suspect that the 
problem is on your GMT side installation. Probably you are using an old version 
that 
does not recognize the new netCDF grid format.

Original comment by jl...@ualg.pt on 6 Mar 2008 at 4:02

GoogleCodeExporter commented 8 years ago
I'm using GMT ver 4!
this is the exact error message:
grdinfo: Variable not found [z_45_7.grd]

is it due to GMT version?
regards
faramarz 

Original comment by Far...@gmail.com on 6 Mar 2008 at 4:27

GoogleCodeExporter commented 8 years ago
Which GMT 4?
There are 8 GMT4 versions (4.0, 4.1, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1).
You need to have at least 4.1. Please consult the GMT home page to keep updated 
with 
the changes.

Original comment by jl...@ualg.pt on 6 Mar 2008 at 5:21

GoogleCodeExporter commented 8 years ago
Thanks, I updated my GMT version 4.0 to the latest 4.2.1, and also installed the
latest netcdf 3.6.2. Now it works! many thanks for your help. 
let me ask you about the min and max values of the grid after conversion from 
Arcinfo
Ascii to GMT .grd format. look at these outputs please:
-----------------------------------------------------------
> grdinfo z_46_6.grd
z_46_6.grd: Title: Grid computed inside Mirone
z_46_6.grd: Command:
z_46_6.grd: Remark: File written from Matlab
z_46_6.grd: Normal node registration used
z_46_6.grd: Grid file format: ns (# 16)
z_46_6.grd: x_min: 45.0004 x_max: 49.9996 x_inc: 0.000833333 name: longitude
[degrees_east] nx: 6000
z_46_6.grd: y_min: 30.0004 y_max: 34.9996 y_inc: 0.000833333 name: latitude
[degrees_north] ny: 6000
z_46_6.grd: z_min: -31 z_max: 3798 name: z [unknown]
z_46_6.grd: scale_factor: 1 add_offset: 0
and ----------------------------
> grdinfo z_46_7.grd
z_46_7.grd: Title: Grid computed inside Mirone
z_46_7.grd: Command:
z_46_7.grd: Remark: File written from Matlab
z_46_7.grd: Normal node registration used
z_46_7.grd: Grid file format: ns (# 16)
z_46_7.grd: x_min: 45.0004 x_max: 49.9996 x_inc: 0.000833333 name: longitude
[degrees_east] nx: 6000
z_46_7.grd: y_min: 25.0004 y_max: 29.9996 y_inc: 0.000833333 name: latitude
[degrees_north] ny: 6000
z_46_7.grd: z_min: -49 z_max: 976 name: z [unknown]
z_46_7.grd: scale_factor: 1 add_offset: 0
-------------------------
if I want to merge these two grids with grdpaste or etc, the y_min=30.0004 and 
y_max=
 29.9996 are not concide! there is a gap in y direction. would you please help me??

many thanks
Faramarz

Original comment by Far...@gmail.com on 7 Mar 2008 at 12:27

GoogleCodeExporter commented 8 years ago
False alarm. Trouble was due to the use of a too old GMT version

Original comment by jl...@ualg.pt on 9 Mar 2008 at 11:05