Skip to content

Commit

Permalink
Merge pull request #159 from mabarnes/makie-post-processing-netcdf-fix
Browse files Browse the repository at this point in the history
Fix use of `makie_post_processing` with NetCDF output files
  • Loading branch information
johnomotani authored Nov 24, 2023
2 parents 8d29d1e + d3db3ff commit 137b9ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion docs/src/post_processing_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Post processing functionality is provided by the
processing, call
[`moment_kinetics.makie_post_processing.makie_post_process`](@ref) e.g.
```julia
julia> using moment_kinetics.makie_post_process
julia> using moment_kinetics.makie_post_processing
julia> makie_post_process("runs/example-run/")
```
or
Expand Down Expand Up @@ -39,6 +39,12 @@ To see all the options that can be set,
be used to create an example file containing all the options with their default
values. The options are all commented out when the file is created.

!!! note "Viewing animations"
Animations are produced in `.gif` format. Most utilities just play gifs,
but provide no options to pause them, etc. One that provides a few more
features is [multigifview](https://github.com/johnomotani/multigifview)
(developed by @johnomotani).

Interactive use
---------------

Expand Down
3 changes: 2 additions & 1 deletion src/makie_post_processing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ function get_run_info(run_dir::Union{AbstractString,Tuple{AbstractString,Union{I
ext = "moments"
end

has_data = all(length(glob(basename(p) * ".$ext*.h5", dirname(p))) > 0
has_data = all(length(glob(basename(p) * ".$ext*.h5", dirname(p))) > 0 ||
length(glob(basename(p) * ".$ext*.cdf", dirname(p))) > 0
for p run_prefixes)
if !has_data
println("No $ext data found for $run_prefixes, skipping $ext")
Expand Down

0 comments on commit 137b9ca

Please sign in to comment.