Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework InterpolateTopographyOnPlane as a InterpolateDataFields2D method #66

Merged
merged 5 commits into from
Feb 29, 2024

Conversation

albert-de-montserrat
Copy link
Member

Example

# should throw an error with a 2D dataset
Lon,Lat,Depth   =   LonLatDepthGrid(10:20,30:40,-50km);
Data1           =   Depth*2;                # some data
Vx1,Vy1,Vz1     =   Data1*3,Data1*4,Data1*5
Data_set2D      =   GeoData(Lon,Lat,Depth,(Depthdata=Data1,LonData1=Lon, Velocity=(Vx1,Vy1,Vz1)))  
@test_throws ErrorException CrossSection(Data_set2D, Depth_level=-10)

# Test interpolation of depth to a given cartesian XY-plane
x = 11:19
y = 31:39
plane1 = InterpolateDataFields2D(Data_set2D, x, y)
proj   = ProjectionPoint()
plane2 = InterpolateDataFields2D(Data_set2D, proj, x, y)

@assert plane1 == plane2
@assert all(==(-50e0), plane1)

@albert-de-montserrat albert-de-montserrat marked this pull request as draft February 29, 2024 11:35
@mthielma
Copy link
Contributor

Looks good to me.

@mthielma
Copy link
Contributor

From the failing tests, it seems that it is still looking for InterpolateTopographyOnPlane somewhere. Maybe it is still being exported?

@albert-de-montserrat
Copy link
Member Author

Yep that's fixed now. 1.9 in Ubuntu fails because of an unrelated GMT issue in downloading something.

@mthielma mthielma marked this pull request as ready for review February 29, 2024 13:31
@mthielma mthielma merged commit 148f3ef into JuliaGeodynamics:main Feb 29, 2024
12 of 13 checks passed
@albert-de-montserrat albert-de-montserrat deleted the adm/conflict branch February 29, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants