-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reference state profile plots to docs
- Loading branch information
1 parent
56fcc60
commit d61c3cb
Showing
4 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
[deps] | ||
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" | ||
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" | ||
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" | ||
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
TurbulenceConvection = "8e072fc4-01f8-44fb-b9dc-f9336c367e6b" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Reference States | ||
|
||
```@example | ||
import TurbulenceConvection | ||
using Plots | ||
using NCDatasets | ||
tc_dir = dirname(dirname(pathof(TurbulenceConvection))) | ||
include(joinpath(tc_dir, "integration_tests", "utils", "generate_namelist.jl")) | ||
include(joinpath(tc_dir, "integration_tests", "utils", "generate_paramlist.jl")) | ||
include(joinpath(tc_dir, "integration_tests", "utils", "Cases.jl")) | ||
using .NameList | ||
using .ParamList | ||
import .Cases | ||
function export_ref_profile(case_name::String) | ||
namelist = default_namelist(case_name) | ||
paramlist = default_paramlist(case_name) | ||
grid = TurbulenceConvection.Grid(namelist) | ||
ref_state = TurbulenceConvection.ReferenceState(grid) | ||
Stats = TurbulenceConvection.NetCDFIO_Stats(namelist, paramlist, grid) | ||
case = Cases.CasesFactory(namelist, paramlist, grid, ref_state) | ||
Cases.initialize_reference(case, grid, ref_state, Stats) | ||
Dataset(joinpath(Stats.path_plus_file), "r") do ds | ||
zc = ds.group["profiles"]["z_half"][:] | ||
zf = ds.group["profiles"]["z"][:] | ||
ρc_0 = ds.group["reference"]["rho0_half"][:] | ||
pc_0 = ds.group["reference"]["p0_half"][:] | ||
αc_0 = ds.group["reference"]["alpha0_half"][:] | ||
ρf_0 = ds.group["reference"]["rho0"][:] | ||
pf_0 = ds.group["reference"]["p0"][:] | ||
αf_0 = ds.group["reference"]["alpha0"][:] | ||
p1 = plot(ρc_0, zc ./ 1000;label="centers") | ||
plot!(ρf_0, zf ./ 1000;label="faces") | ||
plot!(size=(1000,400)) | ||
plot!(margin=5Plots.mm) | ||
xlabel!("ρ_0") | ||
ylabel!("z (km)") | ||
title!("ρ_0") | ||
p2 = plot(pc_0 ./ 1000, zc ./ 1000;label="centers") | ||
plot!(pf_0 ./ 1000, zf ./ 1000;label="faces") | ||
plot!(size=(1000,400)) | ||
plot!(margin=5Plots.mm) | ||
xlabel!("p_0 (kPa)") | ||
ylabel!("z (km)") | ||
title!("p_0 (kPa)") | ||
p3 = plot(αc_0, zc ./ 1000;label="centers") | ||
plot!(αf_0, zf ./ 1000;label="faces") | ||
plot!(size=(1000,400)) | ||
plot!(margin=5Plots.mm) | ||
xlabel!("α_0") | ||
ylabel!("z (km)") | ||
title!("α_0") | ||
plot(p1,p2,p3; layout=(1,3)) | ||
savefig("$case_name.svg") | ||
end | ||
end | ||
for case_name in ( | ||
"Bomex", | ||
"life_cycle_Tan2018", | ||
"Soares", | ||
"Rico", | ||
"TRMM_LBA", | ||
"ARM_SGP", | ||
"GATE_III", | ||
"DYCOMS_RF01", | ||
"GABLS", | ||
"SP", | ||
"DryBubble", | ||
) | ||
export_ref_profile(case_name) | ||
end; | ||
``` | ||
|
||
## Bomex | ||
![](Bomex.svg) | ||
|
||
## life\_cycle\_Tan2018 | ||
![](life_cycle_Tan2018.svg) | ||
|
||
## Soares | ||
![](Soares.svg) | ||
|
||
## Rico | ||
![](Rico.svg) | ||
|
||
## TRMM\_LBA | ||
![](TRMM_LBA.svg) | ||
|
||
## ARM\_SGP | ||
![](ARM_SGP.svg) | ||
|
||
## GATE\_III | ||
![](GATE_III.svg) | ||
|
||
## DYCOMS\_RF01 | ||
![](DYCOMS_RF01.svg) | ||
|
||
## GABLS | ||
![](GABLS.svg) | ||
|
||
## SP | ||
![](SP.svg) | ||
|
||
## DryBubble | ||
![](DryBubble.svg) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# References | ||
|
||
```@bibliography | ||
``` | ||
|