Skip to content

Commit

Permalink
Merge branch 'main' into compathelper/new_version/2022-10-31-13-44-28…
Browse files Browse the repository at this point in the history
…-704-03345107033
  • Loading branch information
cfranken committed Aug 8, 2023
2 parents 666ab0f + b776cf3 commit c1e21ef
Show file tree
Hide file tree
Showing 124 changed files with 1,793,881 additions and 1,079 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/AutomatedGPUTests.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: self-hosted
strategy:
matrix:
julia-version: ['1.6.0', '1.7.0']
julia-version: ['1.7.3','1.8.2']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/AutomatedTests.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.6.0', '1.7.0']
julia-version: ['1.7.3','1.8.2']
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -24,5 +24,4 @@ test/precompile
wigner_values_sparse.jld
wigner_values.jld
*.pyc
*.dat
*.hdf.nc4
*.hdf.nc4
27 changes: 27 additions & 0 deletions .zenodo.json
@@ -0,0 +1,27 @@
{
"description": "vSmartMOM.jl is an end-to-end modular software suite for vectorized atmospheric radiative transfer calculations, based on the Matrix Operator Method.",
"license": "other-open",
"title": "vSmartMOM.jl: an Open-Source Julia Package for Atmospheric Radiative Transfer and Remote Sensing Tools",
"version": "v1.0.1",
"upload_type": "software",
"publication_date": "2022-11-28",
"creators": [
{
"orcid": "0000-0003-0142-7367",
"affiliation": "California Institute of Technology",
"name": "Jeyaram, Rupesh"
},
{
"orcid": "0000-0003-0754-9154",
"affiliation": "NASA Jet Propulsion Laboratory",
"name": "Sanghavi, Suniti"
},
{
"orcid": "0000-0002-0546-5857",
"affiliation": "California Institute of Technology",
"name": "Frankenberg, Christian"
}
],
"access_right": "open",
"keywords": ["Radiative Transfer", "Atmosphere", "Remote Sensing", "Absorption", "Scattering"]
}
41 changes: 28 additions & 13 deletions Project.toml
@@ -1,11 +1,13 @@
name = "vSmartMOM"
uuid = "7ba11eeb-0a61-4a04-a413-bf612cc2007e"
authors = ["Rupesh Jeyaram <rjeyaram@caltech.edu> and contributors"]
version = "0.5.0"
version = "1.0.1"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
CUDAKernels = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57"
CanopyOptics = "a18e34a6-5dbe-4f38-a44b-e5141852e7a7"
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
Expand All @@ -19,47 +21,60 @@ JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
NetCDF = "30363a11-5582-574a-97bb-aa9a979735b9"
NetCDF_jll = "7243133f-43d8-5620-bbf4-c2c921802cf3"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Polynomials = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
UnitfulEquivalences = "da9c4bc3-91c8-4f02-8a40-6b990d2a7e0c"
WignerSymbols = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

[compat]
CUDA = "3"
CUDA = "3, 4"
CUDAKernels = "0.2, 0.3"
DataInterpolations = "3.6"

DataInterpolations = "3.6, 4"
DelimitedFiles = "1"
DiffResults = "1.0"
Distributions = "0.23, 0.24, 0.25"
DocStringExtensions = "0.8, 0.9"
FastGaussQuadrature = "0.4"
ForwardDiff = "0.10"
FastGaussQuadrature = "0.4, 0.5"

InstrumentOperator = "0.1"
Interpolations = "0.12, 0.13"
Interpolations = "0.12, 0.13, 0.14"
JLD2 = "0.1, 0.2, 0.3, 0.4"
JSON = "0.21"
KernelAbstractions = "0.6, 0.7"
NCDatasets = "0.11"
NNlib = "0.8"


KernelAbstractions = "0.8, 0.9"
NCDatasets = "0.11, 0.12"
NNlib = "0.8, 0.9"
NetCDF = "0.10, 0.11"
NetCDF_jll = "400.701.400 - 400.702.400"
Parameters = "0.12"
Polynomials = "2"
Polynomials = "2, 3"
ProgressMeter = "1.3"
SpecialFunctions = "2"
StaticArrays = "1.2"
StatsBase = "0.33"
StatsBase = "0.33, 0.34"
TimerOutputs = "0.5"
YAML = "0.4"
julia = "1.6, 1.7"
julia = "1.7, 1.8"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
4 changes: 1 addition & 3 deletions README.md
Expand Up @@ -99,6 +99,4 @@ This project is being developed in the Christian Frankenberg and Paul Wennberg l

## Copyright Notice

Apache 2.0 License

Copyright 2022, by the California Institute of Technology. ALL RIGHTS RESERVED. United States Government Sponsorship acknowledged. Any commercial use must be negotiated with the Office of Technology Transfer at the California Institute of Technology. This software may be subject to U.S. export control laws. By accepting this software, the user agrees to comply with all applicable U.S. export laws and regulations. User has the responsibility to obtain export licenses, or other export authority as may be required before exporting such information to foreign countries or providing access to foreign persons.
Apache 2.0 License; Copyright 2022, by the California Institute of Technology. United States Government Sponsorship acknowledged.
4 changes: 3 additions & 1 deletion docs/src/pages/Absorption/Example.md
Expand Up @@ -41,10 +41,12 @@ model_interp = make_interpolation_model(hitran_data, Voigt(), ν_grid, pressures
## STEP 3: Calculate the absorption cross section with the created model
##

# NOTE: Please replace the "model_*" in the following lines with whichever model option you prefer from Step 2

# You can specify the wavelength grid, pressure, and temperature.
profile = absorption_cross_section(model_*, 6000:0.01:6400, 1000.1, 296.1)

# You can obtain the derivatives of the cross-section by setting the autodiff parameter to true:
profile, derivs = absorption_cross_section(model, 6000:0.01:6400, 1000.1, 296.1, autodiff=true);
profile, derivs = absorption_cross_section(model_*, 6000:0.01:6400, 1000.1, 296.1, autodiff=true);

```
10 changes: 5 additions & 5 deletions docs/src/pages/tutorials/Tutorial_Scattering.jl
Expand Up @@ -22,19 +22,19 @@ using Plots
# Now, we define the aerosol size distribution and properties. We only support univariate
# aerosols for now, but will add multivariate aerosols soon (we can use mixture models easily).

μ = 0.3; ## Log-normal median radius [μm]
σ = 2.0; ## Log-normal stddev of radius
rₘ = 0.3; ## median radius [μm]
σ = 2.0; ## geometric stddev of radius
nᵣ = 1.3; ## Real part of refractive index
nᵢ = 0.0; ## Imag part of refractive index (sign changed, use only + here)
r_max = 30.0; ## Maximum radius [μm]
nquad_radius = 2500; ## Number of quadrature points for integrating of size dist.

## Create a Size Distribution (using Julia's Distributions package)
size_distribution = LogNormal(log(μ), log(σ));
## Create a Size Distribution (using Julia's Distributions package), note we have to take the natural log here
size_distribution = LogNormal(log(rₘ), log(σ));

#----------------------------------------------------------------------------

# Create the aerosol
# Create the aerosol with distribution and refractive index
aero = Aerosol(size_distribution, nᵣ, nᵢ)
#----------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions myfile.txt
@@ -0,0 +1 @@
0.523599 1.308997 0.000000 0.816923 -1.0000000.523599 1.308997 0.000000 0.816923 -1.000000
25 changes: 16 additions & 9 deletions src/Absorption/compute_absorption_cross_section.jl
Expand Up @@ -56,8 +56,10 @@ function compute_absorption_cross_section(
grid_min, grid_max = wavelength_flag ? (nm_per_m /grid_max, nm_per_m/grid_min) : (grid_min, grid_max)

# Interpolators from grid bounds to index values
grid_idx_interp_low = LinearInterpolation(grid, 1:1:length(grid), extrapolation_bc=1)
grid_idx_interp_high = LinearInterpolation(grid, 1:1:length(grid), extrapolation_bc=length(grid))
if length(grid)>1
grid_idx_interp_low = LinearInterpolation(grid, 1:1:length(grid), extrapolation_bc=1)
grid_idx_interp_high = LinearInterpolation(grid, 1:1:length(grid), extrapolation_bc=length(grid))
end

# Temporary storage array for output of qoft!. Compiler/speed issues when returning value in qoft
rate = zeros(eltype(temperature), 1)
Expand Down Expand Up @@ -99,13 +101,18 @@ function compute_absorption_cross_section(

end

# Calculate index range that this ν impacts
ind_start = Int64(round(grid_idx_interp_low- wing_cutoff)))
ind_stop = Int64(round(grid_idx_interp_high+ wing_cutoff)))

# Create views from the result and grid arrays
result_view = view(result, ind_start:ind_stop);
grid_view = view(grid, ind_start:ind_stop);
if length(grid)>1
# Calculate index range that this ν impacts
ind_start = Int64(round(grid_idx_interp_low- wing_cutoff)))
ind_stop = Int64(round(grid_idx_interp_high+ wing_cutoff)))

# Create views from the result and grid arrays
result_view = view(result, ind_start:ind_stop);
grid_view = view(grid, ind_start:ind_stop);
else
result_view = view(result, 1);
grid_view = view(grid, 1);
end

# Kernel for performing the lineshape calculation
kernel! = line_shape!(device)
Expand Down
5 changes: 4 additions & 1 deletion src/Absorption/make_model_helpers.jl
Expand Up @@ -160,7 +160,10 @@ function make_interpolation_model(
end

# Perform the interpolation
itp = interpolate(cs_matrix, BSpline(Cubic(Line(OnGrid()))))
# BSpline(Cubic(Line(OnGrid())))
# BSpline(Quadratic(Line(OnGrid())))

itp = interpolate(cs_matrix, (BSpline(Linear()),BSpline(Quadratic(Line(OnGrid()))),BSpline(Quadratic(Line(OnGrid())))))

# Get the molecule and isotope numbers from the HitranTable
mol = absco.mol
Expand Down

0 comments on commit c1e21ef

Please sign in to comment.