Skip to content

Commit

Permalink
update to a new version (w/ updeps and format), add some type annotat…
Browse files Browse the repository at this point in the history
…ions, remove unused code, update tests, and add let blocks to improve performance of captured variables, update CI to julia 1.10.5
  • Loading branch information
jbphyswx committed Jan 17, 2025
1 parent 61838f6 commit bcc46ab
Show file tree
Hide file tree
Showing 19 changed files with 560 additions and 5,290 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CodeCov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Julia
uses: julia-actions/setup-julia@latest
with:
version: 1.10.3
version: 1.10.5

- name: Test with coverage
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/JuliaFormatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: julia-actions/setup-julia@latest
if: steps.filter.outputs.julia_file_change == 'true'
with:
version: 1.10.3
version: 1.10.5

- name: Apply JuliaFormatter
if: steps.filter.outputs.julia_file_change == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/UpDeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- uses: julia-actions/setup-julia@latest
with:
version: 1.10.3
version: 1.10.5

- name: Apply UpDeps
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.10.3'
- '1.10.5'
os:
- ubuntu-latest
- macOS-latest
Expand Down
38 changes: 21 additions & 17 deletions Data/Atlas_LES_Profiles/download_atlas_les_profiles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ SOCRATES_flight_observations_Box_links = Dict( # The raw observational data from
These all have the same fiilename so we have to manually append the flight number to the filename
"""
function download_atlas_les_outputs(; cases = cases)
function download_atlas_les_outputs(; cases::AbstractArray{Int} = cases, forcing_type::Symbol = :obs_data)

# create joinpath(thisdir, "Output_Data") if doesn't exist
if !isdir(joinpath(thisdir, "Output_Data"))
Expand All @@ -106,23 +106,27 @@ function download_atlas_les_outputs(; cases = cases)
ERA5_filename = RF_num * "_output/era5/SOCRATES_128x128_100m_10s_rad10_vg_M2005_aj.nc" # e.g. https://atmos.uw.edu/~ratlas/RF12_output/era5/SOCRATES_128x128_100m_10s_rad10_vg_M2005_aj.nc

# download obs model output
try
obs_savepath = joinpath(thisdir, "Output_Data", RF_num * "_Obs_" * split(obs_filename, "/")[end]) # just the filename, not any paths
download("https://atmos.uw.edu/~ratlas/" * obs_filename, obs_savepath)
@info "Found $("https://atmos.uw.edu/~ratlas/"*obs_filename)"
catch e
@warn "Did not find $("https://atmos.uw.edu/~ratlas/"*obs_filename)"
# @warn e
end

# download ERA5 forcing
try
ERA5_savepath = joinpath(thisdir, "Output_Data", RF_num * "_ERA5_" * split(ERA5_filename, "/")[end]) # just the filename, not any paths
download("https://atmos.uw.edu/~ratlas/" * ERA5_filename, ERA5_savepath)
@info "Found $("https://atmos.uw.edu/~ratlas/"*ERA5_filename)"
catch e
@warn "Did not find $("https://atmos.uw.edu/~ratlas/"*ERA5_filename)"
# @warn e
if forcing_type == :obs_data
try
obs_savepath = joinpath(thisdir, "Output_Data", RF_num * "_Obs_" * split(obs_filename, "/")[end]) # just the filename, not any paths
download("https://atmos.uw.edu/~ratlas/" * obs_filename, obs_savepath)
@info "Found $("https://atmos.uw.edu/~ratlas/"*obs_filename)"
catch e
@warn "Did not find $("https://atmos.uw.edu/~ratlas/"*obs_filename)"
# @warn e
end

elseif forcing_type == :ERA5_data
# download ERA5 forcing
try
ERA5_savepath = joinpath(thisdir, "Output_Data", RF_num * "_ERA5_" * split(ERA5_filename, "/")[end]) # just the filename, not any paths
download("https://atmos.uw.edu/~ratlas/" * ERA5_filename, ERA5_savepath)
@info "Found $("https://atmos.uw.edu/~ratlas/"*ERA5_filename)"
catch e
@warn "Did not find $("https://atmos.uw.edu/~ratlas/"*ERA5_filename)"
# @warn e
end
end
end
end
Loading

2 comments on commit bcc46ab

@jbphyswx
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/123171

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.10.3 -m "<description of version>" bcc46ab48d4ec6bb45b8141aecb8080a8038e430
git push origin v0.10.3

Please sign in to comment.