Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand All @@ -22,9 +24,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
- '1.11'
- 'lts'
- '1'
# - 'pre'
os:
- ubuntu-latest
Expand All @@ -36,11 +37,11 @@ jobs:
include:
- os: macOS-latest
arch: aarch64
version: '1.10'
version: 'lts'
allow_failure: false
- os: macOS-latest
arch: aarch64
version: '1.11'
version: '1'
allow_failure: false
- os: macOS-latest
arch: aarch64
Expand Down
28 changes: 11 additions & 17 deletions src/ProfileProcessing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function create_profile_screenshot!(Profile::ProfileData, DataSet::NamedTuple)
else
# we do not have this implemented
#error("horizontal profiles not yet implemented")
end
end
end
Profile.SurfData = tmp # assign to profile data structure
return
Expand Down Expand Up @@ -390,35 +390,29 @@ end


"""
extract_ProfileData!(Profile::ProfileData,VolData::GeoData, SurfData::NamedTuple, PointData::NamedTuple, ScreenshotData::NamedTuple; DimsVolCross=(100,100),Depth_extent=nothing,DimsSurfCross=(100,),section_width=50)
extract_ProfileData!(Profile::ProfileData,VolData::GeoData, SurfData::NamedTuple, PointData::NamedTuple; DimsVolCross=(100,100),Depth_extent=nothing,DimsSurfCross=(100,),section_width=50, ScreenshotData=nothing)

Extracts data along a vertical or horizontal profile
"""
function extract_ProfileData!(Profile::ProfileData, VolData::Union{Nothing, GeoData} = nothing, SurfData::NamedTuple = NamedTuple(), PointData::NamedTuple = NamedTuple(),ScreenshotData::NamedTuple = NamedTuple(); DimsVolCross = (100, 100), Depth_extent = nothing, DimsSurfCross = (100,), section_width = 50km)
function extract_ProfileData!(Profile::ProfileData, VolData::Union{Nothing, GeoData} = nothing, SurfData::NamedTuple = NamedTuple(), PointData::NamedTuple = NamedTuple(); DimsVolCross = (100, 100), Depth_extent = nothing, DimsSurfCross = (100,), section_width = 50km, ScreenshotData = nothing)

return extract_ProfileData!(Profile, VolData, SurfData, PointData, ScreenshotData; DimsVolCross = DimsVolCross, Depth_extent = Depth_extent, DimsSurfCross = DimsSurfCross, section_width = section_width)
end

# Internal method - called by the main method with ScreenshotData as positional argument
function extract_ProfileData!(Profile::ProfileData, VolData::Union{Nothing, GeoData}, SurfData::NamedTuple, PointData::NamedTuple, ScreenshotData::Union{Nothing, NamedTuple}; DimsVolCross = (100, 100), Depth_extent = nothing, DimsSurfCross = (100,), section_width = 50km)

if !isnothing(VolData)
create_profile_volume!(Profile, VolData; DimsVolCross = DimsVolCross, Depth_extent = Depth_extent)
end
create_profile_surface!(Profile, SurfData, DimsSurfCross = DimsSurfCross)
create_profile_point!(Profile, PointData, section_width = section_width)
if !isempty(ScreenshotData)
if !isnothing(ScreenshotData)
create_profile_screenshot!(Profile, ScreenshotData)
end
return nothing
end

"""
extract_ProfileData!(Profile::ProfileData,VolData::GeoData, SurfData::NamedTuple, PointData::NamedTuple; DimsVolCross=(100,100),Depth_extent=nothing,DimsSurfCross=(100,),section_width=50)

Extracts data along a vertical or horizontal profile.
"""
function extract_ProfileData!(Profile::ProfileData, VolData::Union{Nothing, GeoData} = nothing, SurfData::NamedTuple = NamedTuple(), PointData::NamedTuple = NamedTuple(); DimsVolCross = (100, 100), Depth_extent = nothing, DimsSurfCross = (100,), section_width = 50km)

# call the actual function to extract the profile data
extract_ProfileData!(Profile, VolData, SurfData, PointData,NamedTuple(); DimsVolCross = DimsVolCross, Depth_extent = Depth_extent, DimsSurfCross = DimsSurfCross, section_width = section_width)
return nothing
end




Expand Down Expand Up @@ -468,7 +462,7 @@ function extract_ProfileData(ProfileCoordFile::String, ProfileNumber::Int64, Dat

# project data onto profile:
extract_ProfileData!(
profile, VolData_combined, SurfData, PointData,
profile, VolData_combined, SurfData, PointData;
DimsVolCross = DimsVolCross, DimsSurfCross = DimsSurfCross,
Depth_extent = DepthVol, section_width = WidthPointProfile
)
Expand Down
9 changes: 9 additions & 0 deletions test/test_pTatin_IO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ fe_data = convert2FEData(q1_data)

out = write_pTatin_mesh(fe_data)
@test isnothing(out)
@test isfile("md.bin")
@test isfile("region_cell.bin")
@test isfile("T_vertex.bin")
@test isfile("Z_vertex.bin")

rm("md.bin")
rm("region_cell.bin")
rm("T_vertex.bin")
rm("Z_vertex.bin")
Loading