Skip to content

Commit

Permalink
commit minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sunitisanghavi committed Nov 29, 2024
1 parent aae70e0 commit bbb577a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 38 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
CUDAKernels = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
CanopyOptics = "a18e34a6-5dbe-4f38-a44b-e5141852e7a7"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Expand All @@ -30,6 +31,7 @@ GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
GeoMakie = "db073c08-6b98-4ee5-b6a4-5efafb3259c6"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
GridLayoutBase = "3955a311-db13-416c-9275-1d80ed98e5e9"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
Expand Down
15 changes: 9 additions & 6 deletions test/benchmarks/creategrid_O2Aband_RamanSIF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ using Distributions
using Plots
using DelimitedFiles
#
## run this code using the following command:
## /net/fluo/data2/software/Julia/julia-1.9.3/bin/julia --project=/home/sanghavi/code/github/vSmartMOM.jl/ /home/sanghavi/code/github/vSmartMOM.jl/test/benchmarks/creategrid_O2Aband_RamanSIF.jl &

FT = Float64

# Load YAML files into parameter struct
Expand Down Expand Up @@ -46,7 +49,7 @@ Tsolar_interp = LinearInterpolation(Tsolar[4:end, 1], Tsolar[4:end, 2])
n_bands = length(parameters.spec_bands);
T_sun = 5777. # K

for isurf = 3:3 # 2:2 # 1:1 #
for isurf = 2:2 # 3:3 # 2:2 # 1:1 #
for= 1:21 #1:15 #3 #1:15
for iA = 1:14
parameters.sza = 1.0*sza[iA]
Expand Down Expand Up @@ -154,7 +157,7 @@ for isurf = 3:3 # 2:2 # 1:1 #
RS_type1.SIF₀[1,i] = SIF₀[i];
end =#
F₀ = Tsolar_interp.(ν) .* P;
SIF₀ = SIF_interp.(ν); # .= 0.0 #
SIF₀ .= 0.0 # = SIF_interp.(ν); #
RS_type0.F₀[1,:] = F₀; #1.0 #
RS_type1.F₀[1,:] = F₀;
RS_type0.SIF₀[1,:] = SIF₀; #1.0 #
Expand All @@ -179,11 +182,11 @@ for isurf = 3:3 # 2:2 # 1:1 #
vaz_str = replace(string(round(model.params.vaz[vctr], digits=1)),"."=>"p")

# With SIF
fname0 = "/home/sanghavi/data/RamanSIFgrid/raylSIF_sza"*sza_str*"_vza"*vza_str*"_vaz"*vaz_str*"_alb"*albedo*"_psurf"*string(psurf[isurf])*"hpa_nors_ABO2.dat"
fname1 = "/home/sanghavi/data/RamanSIFgrid/raylSIF_sza"*sza_str*"_vza"*vza_str*"_vaz"*vaz_str*"_alb"*albedo*"_psurf"*string(psurf[isurf])*"hpa_rrs_ABO2.dat"
#fname0 = "/home/sanghavi/data/RamanSIFgrid/raylSIF_sza"*sza_str*"_vza"*vza_str*"_vaz"*vaz_str*"_alb"*albedo*"_psurf"*string(psurf[isurf])*"hpa_nors_ABO2.dat"
#fname1 = "/home/sanghavi/data/RamanSIFgrid/raylSIF_sza"*sza_str*"_vza"*vza_str*"_vaz"*vaz_str*"_alb"*albedo*"_psurf"*string(psurf[isurf])*"hpa_rrs_ABO2.dat"
# No SIF
#fname0 = "/home/sanghavi/data/RamanSIFgrid/rayl_sza"*sza_str*"_vza"*vza_str*"_vaz"*vaz_str*"_alb"*albedo*"_psurf"*string(psurf[isurf])*"hpa_nors_ABO2.dat"
#fname1 = "/home/sanghavi/data/RamanSIFgrid/rayl_sza"*sza_str*"_vza"*vza_str*"_vaz"*vaz_str*"_alb"*albedo*"_psurf"*string(psurf[isurf])*"hpa_rrs_ABO2.dat"
fname0 = "/home/sanghavi/data/RamanSIFgrid/rayl_sza"*sza_str*"_vza"*vza_str*"_vaz"*vaz_str*"_alb"*albedo*"_psurf"*string(psurf[isurf])*"hpa_nors_ABO2.dat"
fname1 = "/home/sanghavi/data/RamanSIFgrid/rayl_sza"*sza_str*"_vza"*vza_str*"_vaz"*vaz_str*"_alb"*albedo*"_psurf"*string(psurf[isurf])*"hpa_rrs_ABO2.dat"

rayl_rrs_ABO2 = []
rayl_nors_ABO2 = []
Expand Down
4 changes: 2 additions & 2 deletions test/sandbox/oco_canopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ FT = Float64

# Load OCO Data:
# File names:
L1File = "/net/fluo/data1/group/oco2/L1bSc/oco2_L1bScND_26780a_190715_B10003r_200429212407.h5"
metFile = "/net/fluo/data1/group/oco2/L2Met/oco2_L2MetND_26780a_190715_B10003r_200429212406.h5"
L1File = "/net/squid/data3/data/FluoData1/group/oco2/L1bSc/oco2_L1bScND_26780a_190715_B10003r_200429212407.h5"
metFile = "/net/squid/data3/data/FluoData1/group/oco2/L2Met/oco2_L2MetND_26780a_190715_B10003r_200429212406.h5"
dictFile = "/home/cfranken/code/gitHub/InstrumentOperator.jl/json/oco2.yaml"
# Load L1 file (could just use filenames here as well)
oco = InstrumentOperator.load_L1(dictFile,L1File, metFile);
Expand Down
60 changes: 30 additions & 30 deletions test/test_parameters/O2_parameters2_SIF_grid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ geometry:
# Solar zenith angle (degrees)
sza: 19.0 #19. #45. #60 #30. #60 #32.4436
# Viewing zenith angles (degrees)
vza: [70., 70., 70., 70., 70.] #[0, 30, 60, 30] #[15, 30, 45, 60] #[32.4436] #[0.072]
vza: [60., 60., 60., 60., 60.] #[0, 30, 60, 30] #[15, 30, 45, 60] #[32.4436] #[0.072]
# Viewing azimuth angles (degrees)
vaz: [0.0, 45., 90., 135., 180.] #, 0.0, 0.0, 180.] #[0.0, 0.0, 180., 180.]
# Observation altitude (Pa)
Expand All @@ -87,16 +87,16 @@ geometry:
atmospheric_profile:
# Temperature Profile (TOA to BOA, in K)
# Full-levels, specified at layer centers
T: [231.62, 244.33, 251.34, 258.09, 264.25, 269.15,
T: #[231.62, 244.33, 251.34, 258.09, 264.25, 269.15,
# 272.59, 274.07, 273.30, 269.65, 264.27, 258.11,
# 251.52, 245.22, 239.20, 234.05, 229.71, 225.70,
# 222.70, 220.62, 219.32, 217.93, 216.98, 217.10,
# 218.35, 223.33, 234.19, 249.34] #, 264.12, 277.20,
[231.62, 244.33, 251.34, 258.09, 264.25, 269.15,
272.59, 274.07, 273.30, 269.65, 264.27, 258.11,
251.52, 245.22, 239.20, 234.05, 229.71, 225.70,
222.70, 220.62, 219.32, 217.93, 216.98, 217.10,
218.35, 223.33, 234.19, 249.34] #, 264.12, 277.20,
#[231.62, 244.33, 251.34, 258.09, 264.25, 269.15,
# 272.59, 274.07, 273.30, 269.65, 264.27, 258.11,
# 251.52, 245.22, 239.20, 234.05, 229.71, 225.70,
# 222.70, 220.62, 219.32, 217.93, 216.98, 217.10,
# 218.35, 223.33, 234.19, 249.34, 264.12] #, 277.20,
218.35, 223.33, 234.19, 249.34, 264.12] #, 277.20,
# 280.77, 282.60, 284.40, 285.80]
#[231.62, 244.33, 251.34, 258.09, 264.25, 269.15,
# 272.59, 274.07, 273.30, 269.65, 264.27, 258.11,
Expand All @@ -106,37 +106,37 @@ atmospheric_profile:
# 280.77, 282.60, 284.40, 285.80]
# Pressure Profile (TOA to BOA at each boundary, in hPa)
# Half-levels, specified at layer boundaries
p: [0.14, 0.22, 0.30, 0.39, 0.53, 0.71,
0.96, 1.28, 1.70, 2.27, 3.03, 4.03,
5.44, 7.26, 9.67, 12.90, 17.23, 23.30,
31.00, 42.07, 56.09, 74.78, 99.69, 131.00,
176.85, 236.64, 314.58, 418.87, 500.] #557.76, 735.00,
p: #[0.14, 0.22, 0.30, 0.39, 0.53, 0.71,
# 0.96, 1.28, 1.70, 2.27, 3.03, 4.03,
# 5.44, 7.26, 9.67, 12.90, 17.23, 23.30,
# 31.00, 42.07, 56.09, 74.78, 99.69, 131.00,
# 176.85, 236.64, 314.58, 418.87, 500.] #557.76, 735.00,
#800.12, 849.00, 912.00, 980.00, 1000.0] #1002.0] #1005.0]
#[ 0.14, 0.22, 0.30, 0.39, 0.53, 0.71,
# 0.96, 1.28, 1.70, 2.27, 3.03, 4.03,
# 5.44, 7.26, 9.67, 12.90, 17.23, 23.30,
# 31.00, 42.07, 56.09, 74.78, 99.69, 131.00,
# 176.85, 236.64, 314.58, 418.87, 557.76, 750.] #735.00,
[ 0.14, 0.22, 0.30, 0.39, 0.53, 0.71,
0.96, 1.28, 1.70, 2.27, 3.03, 4.03,
5.44, 7.26, 9.67, 12.90, 17.23, 23.30,
31.00, 42.07, 56.09, 74.78, 99.69, 131.00,
176.85, 236.64, 314.58, 418.87, 557.76, 750.] #735.00,
# #800.12, 849.00, 912.00, 980.00, 1000.0] #1002.0] #1005.0]
#[ 0.14, 0.22, 0.30, 0.39, 0.53, 0.71,
# 0.96, 1.28, 1.70, 2.27, 3.03, 4.03,
# 5.44, 7.26, 9.67, 12.90, 17.23, 23.30,
# 31.00, 42.07, 56.09, 74.78, 99.69, 131.00,
# 176.85, 236.64, 314.58, 418.87, 557.76, 735.00,
# 800.12, 849.00, 912.00, 980.00, 1000.0] #1002.0] #1005.0]
q: [2.1e-6, 2.85e-6, 3.45e-6, 4.5e-6, 5.7e-6,
6.45e-6, 7.35e-6, 9.3e-6, 11.4e-6, 13.95e-6,
15.3e-6, 16.5e-6, 17.7e-6, 20.1e-6, 20.7e-6,
23.1e-6, 25.2e-6, 26.4e-6, 27.3e-6, 19.65e-6,
14.1e-6, 8.7e-6, 5.85e-6, 4.95e-6, 4.95e-6,
16.95e-6, 195.0e-6, 577.5e-6, 1366.5e-6] #, 3673.5e-6] #,
q: #[2.1e-6, 2.85e-6, 3.45e-6, 4.5e-6, 5.7e-6,
# 6.45e-6, 7.35e-6, 9.3e-6, 11.4e-6, 13.95e-6,
# 15.3e-6, 16.5e-6, 17.7e-6, 20.1e-6, 20.7e-6,
# 23.1e-6, 25.2e-6, 26.4e-6, 27.3e-6, 19.65e-6,
# 14.1e-6, 8.7e-6, 5.85e-6, 4.95e-6, 4.95e-6,
# 16.95e-6, 195.0e-6, 577.5e-6, 1366.5e-6] #, 3673.5e-6] #,
#4350.0e-6, 5100.0e-6, 5994.0e-6, 6789.0e-6, 7029.0e-6]
#[2.1e-6, 2.85e-6, 3.45e-6, 4.5e-6, 5.7e-6,
#6.45e-6, 7.35e-6, 9.3e-6, 11.4e-6, 13.95e-6,
#15.3e-6, 16.5e-6, 17.7e-6, 20.1e-6, 20.7e-6,
#23.1e-6, 25.2e-6, 26.4e-6, 27.3e-6, 19.65e-6,
#14.1e-6, 8.7e-6, 5.85e-6, 4.95e-6, 4.95e-6,
#16.95e-6, 195.0e-6, 577.5e-6, 1366.5e-6, 3673.5e-6] #,
[2.1e-6, 2.85e-6, 3.45e-6, 4.5e-6, 5.7e-6,
6.45e-6, 7.35e-6, 9.3e-6, 11.4e-6, 13.95e-6,
15.3e-6, 16.5e-6, 17.7e-6, 20.1e-6, 20.7e-6,
23.1e-6, 25.2e-6, 26.4e-6, 27.3e-6, 19.65e-6,
14.1e-6, 8.7e-6, 5.85e-6, 4.95e-6, 4.95e-6,
16.95e-6, 195.0e-6, 577.5e-6, 1366.5e-6, 3673.5e-6] #,
##4350.0e-6, 5100.0e-6, 5994.0e-6, 6789.0e-6, 7029.0e-6]
#[2.1e-6, 2.85e-6, 3.45e-6, 4.5e-6, 5.7e-6,
#6.45e-6, 7.35e-6, 9.3e-6, 11.4e-6, 13.95e-6,
Expand Down

0 comments on commit bbb577a

Please sign in to comment.