Surafce Area based on -R

Hello GMT friends,
I want to find out if there is any GMT module that writes the surface area of a region if -R is specified.

For instance with either

gmt coast -JM6i -R0/15/0/20, or
gmt grdcut -R0/15/0/20

then it will output the surface area based on the geographic extent in -R.

Thanks in advance

There is no module that takes -R and returns the area. Depending on the accuracy you need you can compute polygon areas with gmt spatial -Q+p -fg. It will break any polygon down into a series of spherical triangles and apply spherical calculations. It does not do ellipsoidal areas though. So you can make a polygon for your -R region and use that. However, since spherical triangles are based on great circle segments, you will want to resample parallels densely enough so that these approximate those small circles.

Thank you for the response. I will try out your solution and see how it goes.