I was wondering if you could help me out with this I have a .grd data set which I need to extract some statistics and make a Classification (supervised) from the .grd file. Is this possible to do with GMT?
I would like to make 5 groups out of a continuum dataset of Velocities then I would established ranges of velocities let´s say the continuum is from 300 m/s to 900 m/s then I would like to make 1 class from 300 to 400 m/s , 400 to 500 m/s, 500 to 600 m/s, 600 to 700 m/s and 700 to 900 m/s. based on the mean value and the dispersion fo the dataset which is interpolated with near neighbour interpolation.
of for example letâs say I would like to subtract the average velocity value and just see the max and min values i think this could be achived with grdmath not so sure really because I am still learning the function
The histrograms are easy. You could create a table with grd2xyz and them used (ps)histrogram to make the plot.
For the first part, if I undesertand correctly, I think it can be done with GMT. With gmt select -Z you could filter the grd based on the velocities values, then calculated the mean and dispersion of each sub-set with grdinfo.
It is obviously true that working from Julia, Python, or Matlab adds tremendous extra computational options to such tasks. But that does not mean this is hard in GMT proper, e.g.,
gmt grdmath -R300/900/0/600 -I10 X 300 SUB 600 DIV 5 MUL CEIL = bin.nc
gmt grdview t.nc -JX4i -JZ3i -Qi100 -p200/35 -B -Bz -png map
Dear all, Thank you for your many devices. I have managed to get this far However still the Velocities are in a continuum form and is best to get ranges of velocities rather than a continuum.
and this is the classification I would like to implement on the map to separate velocities y 4 classes with ranges AB >650; C = 400 to 650 m/s ; D =200 - 400 m/s; D >200 m/s
Not sure what would like to do but with grdclip you could classified the grid based on your ranges. Maybe also grdmask to create masks of your selected areas (based on your ranges) to perform math operationes.
Hi, well this is kind of the idea behind, based on the classification trying to get the polygons and then get the Discretized each area. this was made with GMT but I am still getting around with the script to just the idea with my data
I think you have to make an effort to explain better what you are trying to achieve. On my side, Iâm lost. Your last example has nothing to do with the Vs30 image question.
Oh okay sorry, I would try to explain myself better, I am trying to make a classification.
My dataset is a .grd file that integrates measurement Velocities (Vs30: Shear wave velocity of the first 30 meters) that were acquired in the field and a topographic model that estimates the Vs30 from the Slope of the relief https://earthquake.usgs.gov/data/vs30/, I have to integrate both datasets because field measurements have much more resolution than only the topographic model and Also the topographic model itself has more coverage in extension but lower resolution, I have achieved this task, with the Surface command. The generation of an integrated .grd that would include field measurement and the topographic model.
The next step is to study the velocities which I did with the Histogram command and establish ranges that would correspond to classes (from the image above the first one I have published ) I have built 4 classes using the integrated grid of Vs30 (field measurements + topographic approx)
Now I have the ranges for the classes and I need to separate those classes and give One Color to each class so my map represent discrete areas of the Velocities rather than a continuum variation, this means that my map should have 4 colours one for each class
and with these areas or this new grid with 4 classes, I will build polygons.
I hope I have made my best explaining what I am trying to achieve. I am sorry if I confuse you guys. and Thank you for your support.
OK, so what is wrong with the solution I gave you?
Paulâs solution depends on using and expression but you can split it also in multiple grdmath commands.
Once you have the grid with the classes, grdcontour can be used to output the classes polygons.
BTW, if you can build GMT, the shakemap branch let you can compute the Vs30 velocities much easier than that USGS recipe, but it only has a online help.
I don´t think there is a problem with your solution. The situation is that I don´t know how to use Julia at this moment I have downloaded Julia however GMT wrapper don´t know how to install it and get it working. For the moment I have instal GMT 6 and learning to get things with it
K
Hi,
I am trying to run the first example you game me so I can understand how GMT julia works or I can make it run and I am getting this ERROR. any suggestions on what should I do?