Skip to content

Commit

Permalink
phase02 scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
a2ray committed Nov 26, 2024
1 parent 40334ee commit 78bc109
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
26 changes: 26 additions & 0 deletions zz_portalcurtains/copy_all_vtk_sgrids_xyz_images_phase02.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Glob
## multiple surveys
items = [item for item in walkdir("/g/data/z67/ar0754/largeaem/production")]
idx_summary = [basename(it[1]) == "summary" for it in items]
src_dir = [it[1] for it in items[idx_summary]]
src_epsg = [28351, 28351, 28351, 28350, 28350, 28351, 28351, 28350]
rootdir = "/scratch/ns59/ar0754/probabilistic_AEM_phase_02_products"
map(zip(src_dir, src_epsg)) do (sdir, epsg)
prefix = split(sdir, "/")[end-2]*"_"*basename(dirname(sdir))*"_"
containingdir = dirname(sdir)
map(zip(["images", "sgrids", "vtk", "xyzlog10rho"],["pngs", "sgrids", "vtk", "summary"])) do (dstname, srcname)
sd_use = joinpath(containingdir, srcname)
dst_dir = joinpath(rootdir, dstname, prefix[1:end-1])
isdir(dst_dir) || mkpath(dst_dir)
if srcname == "summary"
fn = readdir(glob"*_summary_xyzrho.txt", sd_use)
cp.(fn, joinpath.(dst_dir, basename.(fn)))
else
cp(sd_use, dst_dir; force=true)
end
ioproj = open(joinpath(dst_dir, "0000_projection.txt"), "w")
write(ioproj, "EPSG: $epsg")
close(ioproj)
end
@info "done $sdir"
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using HiQGA, PyPlot
includet("RDP.jl")
##
nlayers = 52
dr = 200
dz = 2
dpi = 400
fnamebar = "colorbar.jpg"
cmap = "turbo"
writegeom = true
vmin, vmax = -2.5, 0.5
ϵfrac = 0.001
barfigsize = (0.4, 1.2)
shrink = 8000
VE = 30
rootdir = "/scratch/ns59/ar0754/final_02_TEMPEST"
## multiple surveys
items = [item for item in walkdir("/home/547/ar0754/z67/ar0754/largeaem/production")]
idx_summary = [basename(it[1]) == "summary" for it in items]
src_dir = [it[1] for it in items[idx_summary]]
src_epsg = [28351, 28351, 28351, 28351, 28351]
map(zip(src_dir, src_epsg)) do (sdir, epsg)
prefix = split(sdir, "/")[end-2]*"_"*basename(dirname(sdir))*"_"
dst_dir = joinpath(rootdir, prefix[1:end-1]) # drop the ending underscore
RDP.doallcurtaintriads.(;src_dir=sdir, dst_dir, nlayers, dr, dz, ϵfrac, src_epsg=epsg,
barfigsize, dpi, cmap, fnamebar, shrink, VE, prefix,
vmin, vmax, writegeom)
end
13 changes: 13 additions & 0 deletions zz_portalcurtains/makevtk_from_all_xyzrho_phase_02.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using HiQGA, PyPlot
includet("RDP.jl")
nlayers = 52
vmin, vmax = -2.5, 0.5
outputrootdir = "/scratch/ns59/ar0754/probabilistic_AEM_phase_02_products"
items = [item for item in walkdir("/g/data/z67/ar0754/largeaem/production")]
idx_summary = [basename(it[1]) == "summary" for it in items]
src_dir = [it[1] for it in items[idx_summary]]
src_epsg = [28351, 28351, 28351, 28350, 28350, 28351, 28351, 28350]
map(zip(src_dir, src_epsg)) do (dir, epsg)
@show dst_dir = joinpath(outputrootdir, "GDA94_vtk", split(dir,"/")[end-1])
RDP.writevtkfromxyzrhodir(nlayers; src_dir=dir, dst_dir, src_epsg=epsg, vmin, vmax)
end

0 comments on commit 78bc109

Please sign in to comment.