GEUS-Glaciology-and-Climate / ice_discharge

Greenland Ice Sheet solid ice discharge from 1986 through last month
https://doi.org/10.5194/essd-12-1367-2020
GNU Lesser General Public License v3.0
8 stars 4 forks source link

Update 2D error calculation #49

Open signehl opened 3 weeks ago

signehl commented 3 weeks ago

In line 956 the error due to projection is calculated using proj -VS:

paste -d" " <(cut -d" " -f1,2 ./tmp/llxy.txt) <(cut -d" " -f3,4 ./tmp/llxy.txt | proj -VS ${PROJSTR} | grep Areal | column -t | sed s/\ \ /,/g | cut -d, -f4) > ./tmp/xy_err.txt

After proj v6 this function is deprecated, and there is, to my knowledge no direct function that gives "Areal" so this should probably be updated to match the newest versions of proj.

mankoff commented 3 weeks ago

Suggested fixes:

  1. I'm not sure what changed (I'm still running a proj locally which puts out Areal), but my output is
Meridian scale (h) : 0.97460025 ( -2.54 % error )
Parallel scale (k) : 0.97460025 ( -2.54 % error ) 
Areal scale (s): 0.94984565 ( -5.015 % error )

So if only Areal is missing in the updated proj, we could take the Parallel and Meridian and multiply the scales.

  1. Install, use, and cite the Planimeter tool https://geographiclib.sourceforge.io/C++/doc/Planimeter.1.html

  2. If this is in docker, we should be able to use whatever version of proj we want. Although if proj is just a dependency of grass (and we want an updated grass), then it could get messy, with a grass container calling a separate proj-only container.