Skip to content

Commit

Permalink
Added calculation of kernel function to limb test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
lars2015 committed Jan 3, 2024
1 parent cea5028 commit 20754d5
Show file tree
Hide file tree
Showing 26 changed files with 192,564 additions and 5 deletions.
96,242 changes: 96,242 additions & 0 deletions example/limb/kernel.org

Large diffs are not rendered by default.

96,242 changes: 96,242 additions & 0 deletions example/limb/kernel.tab

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions example/limb/limb.ctl
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,21 @@ EMITTER[4] = CCl4
ND = 2
NU[0] = 792.0000
NU[1] = 832.0000

# Kernel...
RETP_ZMIN = -100
RETP_ZMAX = 100
RETT_ZMIN = -100
RETT_ZMAX = 100
RETQ_ZMIN[0] = -100
RETQ_ZMAX[0] = 100
RETQ_ZMIN[1] = -100
RETQ_ZMAX[1] = 100
RETQ_ZMIN[2] = -100
RETQ_ZMAX[2] = 100
RETQ_ZMIN[3] = -100
RETQ_ZMAX[3] = 100
RETQ_ZMIN[4] = -100
RETQ_ZMAX[4] = 100
RETK_ZMIN[0] = -100
RETK_ZMAX[0] = 100
Binary file added example/limb/plot_kernel_CCl4_792.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_CCl4_832.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_CO2_792.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_CO2_832.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_F11_792.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_F11_832.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_H2O_792.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_H2O_832.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_O3_792.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_O3_832.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_extinction_792.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_extinction_832.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_pressure_792.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_pressure_832.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_temperature_792.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/limb/plot_kernel_temperature_832.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/limb/plot_rad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/limb/plot_rad_diff_abs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/limb/plot_rad_diff_rel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/limb/plot_tau.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/limb/plot_tau_diff_abs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/limb/plot_tau_diff_rel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 62 additions & 5 deletions example/limb/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ $jurassic/limb limb.ctl obs.tab
# Call forward model...
$jurassic/formod limb.ctl obs.tab atm.tab rad.tab TASK time

# Plot results...
# Compute kernel...
$jurassic/kernel limb.ctl obs.tab atm.tab kernel.tab

# Plot radiance and transmittance...
gnuplot <<EOF
set term png enh truecolor font "Helvetica,28" size 1600,1200 crop lw 2
set term pngcairo enh truecolor font "Helvetica,28" size 1600,1200 crop lw 3
set size ratio 0.75
set out "plot_rad.png"
set xla "Radiance [nW / (cm^2 sr cm^{-1})]"
Expand All @@ -24,6 +28,9 @@ set mytics
set log x
set key spac 1.5
set key left bot
set key box
set grid
plot "rad.org" u (\$11*1e5):8 w lp pt 1 t "REF (792 cm^{-1})", \
"rad.org" u (\$12*1e5):8 w lp pt 1 t "REF (832 cm^{-1})", \
"rad.tab" u (\$11*1e5):8 w lp pt 2 t "TEST (792 cm^{-1})", \
Expand Down Expand Up @@ -64,6 +71,56 @@ plot "< paste rad.tab rad.org" u (100.*(\$27-\$13)/\$13):8 w lp pt 1 t "TEST - R
"< paste rad.tab rad.org" u (100.*(\$28-\$14)/\$14):8 w lp pt 1 t "TEST - REF (832 cm^{-1})"
EOF

# Get differences...
echo -e "\nCheck for differences..."
diff -sq rad.tab rad.org
# Plot kernel functions...
for nu in 792 832 ; do
gnuplot <<EOF
set term pngcairo enh truecolor font "Helvetica,28" size 1600,1200 crop lw 3
set size ratio 0.75
set yla "Altitude [km]"
set cbla "View point altitude [km]"
set cbla offset (0,1)
set mxtics
set mytics
set grid
set pal def
set out "plot_kernel_pressure_${nu}.png"
set xla "Kernel function (pressure at $nu cm^{-1}) [nW / (cm^2 sr cm^{-1}) / hPa]"
plot "kernel.tab" u ((strcol(8) eq "PRESSURE" && \$2==$nu) ? 1e5*\$13 : 1/0):10:4 w lp pt 1 lc pal z t ""
set out "plot_kernel_temperature_${nu}.png"
set xla "Kernel function (temperature at $nu cm^{-1}) [nW / (cm^2 sr cm^{-1}) / K]"
plot "kernel.tab" u ((strcol(8) eq "TEMPERATURE" && \$2==$nu) ? 1e5*\$13 : 1/0):10:4 w lp pt 1 lc pal z t ""
set out "plot_kernel_CO2_${nu}.png"
set xla "Kernel function (CO_2 at $nu cm^{-1}) [nW / (cm^2 sr cm^{-1}) / ppmv]"
plot "kernel.tab" u ((strcol(8) eq "CO2" && \$2==$nu) ? 1e-6*1e5*\$13 : 1/0):10:4 w lp pt 1 lc pal z t ""
set out "plot_kernel_H2O_${nu}.png"
set xla "Kernel function (H_2O at $nu cm^{-1}) [nW / (cm^2 sr cm^{-1}) / ppmv]"
plot "kernel.tab" u ((strcol(8) eq "H2O" && \$2==$nu) ? 1e-6*1e5*\$13 : 1/0):10:4 w lp pt 1 lc pal z t ""
set out "plot_kernel_O3_${nu}.png"
set xla "Kernel function (O_3 at $nu cm^{-1}) [nW / (cm^2 sr cm^{-1}) / ppmv]"
plot "kernel.tab" u ((strcol(8) eq "O3" && \$2==$nu) ? 1e-6*1e5*\$13 : 1/0):10:4 w lp pt 1 lc pal z t ""
set out "plot_kernel_F11_${nu}.png"
set xla "Kernel function (CFC-11 at $nu cm^{-1}) [nW / (cm^2 sr cm^{-1}) / pptv]"
plot "kernel.tab" u ((strcol(8) eq "F11" && \$2==$nu) ? 1e-12*1e5*\$13 : 1/0):10:4 w lp pt 1 lc pal z t ""
set out "plot_kernel_CCl4_${nu}.png"
set xla "Kernel function (CCl_4 at $nu cm^{-1}) [nW / (cm^2 sr cm^{-1}) / pptv]"
plot "kernel.tab" u ((strcol(8) eq "CCl4" && \$2==$nu) ? 1e-12*1e5*\$13 : 1/0):10:4 w lp pt 1 lc pal z t ""
set out "plot_kernel_extinction_${nu}.png"
set xla "Kernel function (extinction at $nu cm^{-1}) [10^{6} nW / (cm^2 sr cm^{-1}) / km^{-1}]"
plot "kernel.tab" u ((strcol(8) eq "EXTINCT_WINDOW_0" && \$2==$nu) ? 1e-6*1e5*\$13 : 1/0):10:4 w lp pt 1 lc pal z t ""
EOF
done

# Compare files...
echo -e "\nCompare results..."
error=0
diff -sq rad.tab rad.org || error=1
diff -sq kernel.tab kernel.org || error=1
exit $error

0 comments on commit 20754d5

Please sign in to comment.