Feature #680

CURVE Algorithm

Added by Samantha over 2 years ago. Updated 5 months ago.

Status:FeedbackStart date:2015-02-24
Priority:NormalDue date:
Assignee:Samantha% Done:

0%

Category:-
Target version:Candidate for next minor release
Platform:

Description

The CUBE Uncertainty pRopagated Variance Equation (CURVE) provides a gridded uncertainty estimate for sparse data gridding algorithms that often lack inherent uncertainty estimations.

History

#1 Updated by Samantha over 2 years ago

CURVE is an algorithm we have developed and would very much like to see about how to included it within GMT. We augmented CUBE's propagated variance equation to account for bottom slope and made it applicable to Sparse data. In our work, we couple this gridded uncertainty estimate with a gridded surface from GMT's Splines-In-Tension.

#2 Updated by Paul over 2 years ago

  • Target version changed from Candidate for next bugfix release to Candidate for next minor release

Could you provide some documentation, references, please, so we can evaluate what this is.

#4 Updated by Paul over 2 years ago

  • Status changed from New to Feedback

Sorry we have not responded. I'm workin on a proposal so little time. Some comments from the group suggest this could be used for any of the gridding routines in GMT and that while the CUBE part is generic the CURVE part is more specific to data such as bathy. As far as implementing this in GMT: If it is considered generic and not tied to a single gridding algorithm then it could be a new module, decoupled form the gridding function. As far as who should be doing this: Maybe you are in the best position. Given the GMT5 API and the GMT Custom project examples you could probably code this up from what you already have done into a GMT-like module. Our plates are pretty full at the moment so waiting for us to take the lead could take some time. Let me know. Alternatively, if ONR actually had funds to help with this implementation then it could be sped up as well, since reality is we work on funded stuff first.

#5 Updated by Joseph over 2 years ago

I agree we should make Sam do this All kidding aside, my side of the building could use this too, and since you (Samantha) are writing a paper on it, you are sort of the authority. My super quick glance at the paper suggests it would be pretty easy to code this as a GMT script using "grdmath"; IF you abandoned the TIN representation long enough to calculate a TPU grid, which could then be "re-TIN-ed".

I could help you with some of the tricks involved with grdmath and surface and such, but I don't have time to reinvent grdmath for data stored in a TIN...

-jj

#6 Updated by Samantha about 2 years ago

I am having quite some trouble trying to build and install the GMT-custom. On Windows, I was finally able to build but I cannot install due to not target definition for the make -j1 install command and missing gmt_dev, gmt_config.h...and others when building the VS. I've looked and have re-downloaded but nothing seems to be working. I've also tried on CentOS. Any ideas? --Thanks

#7 Updated by Paul about 2 years ago

Sorry, gmt-custom needs GMT 5.2, which you can get via svn. I will update the wiki to point that out. It will still be a while before 5.2 is released officially but that is what we are all using.

#8 Updated by Samantha about 2 years ago

Thanks, did ya'll update the version number to 5.2 for gmt --version? I'm getting 5.1.3 but I also have many versions installed. I want to make sure this is the right one.

#9 Updated by Paul about 2 years ago

To get GMT 5.2 you need to svn from the root, e.g.,

svn co svn://gmtserver.soest.hawaii.edu/gmt5 gmt5-dev

and then gmt5-dev will contain the three directories trunk (i.e., 5.1.3 at the moment), branches (which only contains 5.2.0) and tags (ignore this). You then cd into branches/5.2.0 and preform the same cmake setup and build there as you would normally do in the trunk.

#10 Updated by Samantha about 2 years ago

Yes I did this, but it did not contain 3 directories. I just wanted to make sure the gmt --version afterwards still shows 5.1.3 to make sure I'm not accidently referencing the wrong install. Thank you.

#11 Updated by Paul about 2 years ago

OK, well that is a job for gmtswitch to select the ,,,/branches/5.2.0/build/gmt5/bin as the path to the executables. Or any other way in which you set up your PATH.
I think gmtswitch is the easiest way to switch between a bunch of different GMT installations.

#12 Updated by Samantha about 2 years ago

oh...I didn't know about the branches; I svn'd into the trunk following the building instructions.

#13 Updated by Samantha about 2 years ago

ok. I build and I get errors for missing stdbool.h inttypes etc. I modified the calling files to find these as was done in the trunk and it fixes those but creates way more. Suggestions?

#14 Updated by Paul about 2 years ago

We're looking into why the compat dir is not in 5.2.0. You could just copy it from the trunk. I assume you are doing this with MS Visual C/C++ or something? Did you follow the building under Windows instructions?

#15 Updated by Samantha about 2 years ago

I copied the missing files into compat, replaced common_string.h and gmt_notposix.h from the trunk, and am using Windows SDK 7. Doing this gives redefinition and macro redefinition errors. I am performing cmake -G "NMake Makefiles" .. without problems followed by nmake which crashes.

#16 Updated by Joaquim about 2 years ago

'compat' dir in 5.2 should only have qsort.c|h
At last for building with Visual Studio (tested 10 and 12).

#17 Updated by Joaquim about 2 years ago

Misinform. I tested also with VS2015 Community Version (or whatever it's called) and 5.2 build fine too.

#18 Updated by Samantha about 2 years ago

I was able to build the trunk without any problems but I am still getting errors for stdbool.h and other files it can't find for the 5.2 branch. I also tried vs command window instead of the sdk. Where is stdbool.h if it is no longer in compat/ ?

#19 Updated by Joaquim about 2 years ago

Well, I have it for instances in

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stdbool.h

Are you building in the same build dir as first built 5.1? In case yes, don't do it. Start from a clean build dir.

#20 Updated by Samantha about 2 years ago

I think the problem is that I'm using vs 2010. Its include doesn't have these files but I added them. I was finally able to pick the errors out of the hay-stack:

-gmt_vector.c(426) error c3014: expected a for loop following OpenMp 'parallel for' directive. I moved the #define section immediately before the following for loop.

-gmtregress.c (1108) cannot convert double * to _Bool. I did a quick cast

k. The error now is TestBigEndian failure. no suitable type found.

#21 Updated by Joaquim about 2 years ago

Do a svn up. I fixed that one yesterday.

#22 Updated by Samantha about 2 years ago

The TestBigEndian is failing when the debug settings in ConfigUser.cmake are commented back in.
Additionally:
I had to add GMT_BINDIR explicitly and
I added the following to cmake/modules/CreateDebugSym.cmake

elseif (MSVC AND _debug_build)
  1. usefull macros
    + include (CustomHelperMacros)

In order to do the nmake I changed inline to _inline in customVersion.h
I added #include "gmt_synopsis.h" to gmtaverage.c and gmtmercmap.c and copied the file to src/

Does svn://gmtserver.soest.hawaii.edu/gmt-data work?

I changed set (CMAKE_SHARED_MODULE_SUFFIX .so) to set (CMAKE_SHARED_MODULE_SUFFIX .lib)
and pointed gmt.conf to it but I can't find it from gmt to run

.... and I am officially out of ideas... its so close I can taste it....

#23 Updated by Samantha about 2 years ago

I've hit a wall. I was able to nmake and nmake install. I see custom.dll and reference it in gmt.conf. It finds it but gmt --help does not show the modules.

#24 Updated by Paul about 2 years ago

ON vacation until next week so cannot help but once I am back I could have a look. Are you able to build a tar/zip ball for me? Can it build under Unix? How about running things in debug in VS and step through and see why it does not go into your shared lib. Permission issues? Path not correct (the GMT_CUSTOM_LIBS setting must have full path to the actual name, i.e., C:\path\custom.dll.

#25 Updated by Samantha about 2 years ago

Thank you so much. I can create a .tar with 7zip. Do you want the whole directory for custom and 5.2? Unix stirs up a whole slew of new problems starting at the beginning. I use the entire path because if I don't I get an error message saying it cannot either open or find the dll, that's how I know it finds it... I just don't get the modules. Let me know how you would like me to send the tars. Thank you again!

#26 Updated by Paul about 2 years ago

I don't need 5.2, just your custom directory. Joaquim is offline but emailed me to tell you that "best is to put the dll in the same place as the supplements.dll
If it still doesn't work that's because of those two files I don't remember now (a .c and a .h) with module description that are not correct. " These are the two special files with "module" in their name that is created by running that script.

#27 Updated by Larry 5 months ago

Here is some more info about OpenMP: wiki

Also available in: Atom PDF