-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating Docs for commit 206a372 made on 2024-04-30T21:28:33+00:00 fr…
…om refs/heads/main by slarosa
- Loading branch information
0 parents
commit 59bd2b6
Showing
586 changed files
with
126,520 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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,3 @@ | ||
# GitHub Pages Cache | ||
Nothing to see here. The contents of this branch are essentially a cache that's not intended to be viewed on github.com. | ||
If you're looking to update our documentation, check the relevant development branch's 'docs/' dir. |
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,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 325cb0611dfa3cc3bc0cf6bdf5c04bbf | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+16 KB
en/main/.doctrees/examples/plot_brightness_temperature_uncertainties.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.14 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.AbsModel.__init__.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.94 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.AbsModel.implemented_models.doctree
Binary file not shown.
Binary file added
BIN
+6.44 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.AbsModel.set_ll.doctree
Binary file not shown.
Binary file added
BIN
+4.19 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.H2OAbsModel.__init__.doctree
Binary file not shown.
Binary file added
BIN
+14.2 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.H2OAbsModel.doctree
Binary file not shown.
Binary file added
BIN
+18.8 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.H2OAbsModel.h2o_absorption.doctree
Binary file not shown.
Binary file added
BIN
+8.99 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.H2OAbsModel.implemented_models.doctree
Binary file not shown.
Binary file added
BIN
+12.6 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.H2OAbsModel.set_ll.doctree
Binary file not shown.
Binary file added
BIN
+4.18 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.LiqAbsModel.__init__.doctree
Binary file not shown.
Binary file added
BIN
+12.6 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.LiqAbsModel.doctree
Binary file not shown.
Binary file added
BIN
+8.99 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.LiqAbsModel.implemented_models.doctree
Binary file not shown.
Binary file added
BIN
+15.7 KB
.../.doctrees/generated/pyrtlib.absorption_model.LiqAbsModel.liquid_water_absorption.doctree
Binary file not shown.
Binary file added
BIN
+6.49 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.LiqAbsModel.set_ll.doctree
Binary file not shown.
Binary file added
BIN
+4.17 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.N2AbsModel.__init__.doctree
Binary file not shown.
Binary file added
BIN
+13.3 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.N2AbsModel.doctree
Binary file not shown.
Binary file added
BIN
+8.97 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.N2AbsModel.implemented_models.doctree
Binary file not shown.
Binary file added
BIN
+14.5 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.N2AbsModel.n2_absorption.doctree
Binary file not shown.
Binary file added
BIN
+6.47 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.N2AbsModel.set_ll.doctree
Binary file not shown.
Binary file added
BIN
+4.17 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.O2AbsModel.__init__.doctree
Binary file not shown.
Binary file added
BIN
+13.6 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.O2AbsModel.doctree
Binary file not shown.
Binary file added
BIN
+8.97 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.O2AbsModel.implemented_models.doctree
Binary file not shown.
Binary file added
BIN
+25.3 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.O2AbsModel.o2_absorption.doctree
Binary file not shown.
Binary file added
BIN
+12.3 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.O2AbsModel.set_ll.doctree
Binary file not shown.
Binary file added
BIN
+4.17 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.O3AbsModel.__init__.doctree
Binary file not shown.
Binary file added
BIN
+13.8 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.O3AbsModel.doctree
Binary file not shown.
Binary file added
BIN
+8.97 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.O3AbsModel.implemented_models.doctree
Binary file not shown.
Binary file added
BIN
+13 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.O3AbsModel.o3_absorption.doctree
Binary file not shown.
Binary file added
BIN
+10.2 KB
en/main/.doctrees/generated/pyrtlib.absorption_model.O3AbsModel.set_ll.doctree
Binary file not shown.
Binary file added
BIN
+3.91 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.ERA5Reanalysis.__init__.doctree
Binary file not shown.
Binary file added
BIN
+9.75 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.ERA5Reanalysis.doctree
Binary file not shown.
Binary file added
BIN
+18.6 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.ERA5Reanalysis.read_data.doctree
Binary file not shown.
Binary file added
BIN
+16.4 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.ERA5Reanalysis.request_data.doctree
Binary file not shown.
Binary file added
BIN
+4.55 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.IGRAUpperAir.__init__.doctree
Binary file not shown.
Binary file added
BIN
+8.91 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.IGRAUpperAir.doctree
Binary file not shown.
Binary file added
BIN
+23.2 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.IGRAUpperAir.request_data.doctree
Binary file not shown.
Binary file added
BIN
+4.55 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.WyomingUpperAir.__init__.doctree
Binary file not shown.
Binary file added
BIN
+10.2 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.WyomingUpperAir.doctree
Binary file not shown.
Binary file added
BIN
+14.4 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.WyomingUpperAir.get_stations.doctree
Binary file not shown.
Binary file added
BIN
+17.6 KB
en/main/.doctrees/generated/pyrtlib.apiwebservices.WyomingUpperAir.request_data.doctree
Binary file not shown.
Binary file added
BIN
+3.95 KB
en/main/.doctrees/generated/pyrtlib.climatology.AtmosphericProfiles.__init__.doctree
Binary file not shown.
Binary file added
BIN
+11 KB
en/main/.doctrees/generated/pyrtlib.climatology.AtmosphericProfiles.atm_profiles.doctree
Binary file not shown.
Binary file added
BIN
+65.5 KB
en/main/.doctrees/generated/pyrtlib.climatology.AtmosphericProfiles.doctree
Binary file not shown.
Binary file added
BIN
+41.5 KB
en/main/.doctrees/generated/pyrtlib.climatology.AtmosphericProfiles.gl_atm.doctree
Binary file not shown.
Binary file added
BIN
+9.94 KB
en/main/.doctrees/generated/pyrtlib.climatology.AtmosphericProfiles.gl_atm_minor.doctree
Binary file not shown.
Binary file added
BIN
+11.5 KB
en/main/.doctrees/generated/pyrtlib.climatology.AtmosphericProfiles.gl_atm_trace.doctree
Binary file not shown.
Binary file added
BIN
+8.94 KB
en/main/.doctrees/generated/pyrtlib.climatology.ProfileExtrapolation.__init__.doctree
Binary file not shown.
Binary file added
BIN
+26.7 KB
en/main/.doctrees/generated/pyrtlib.climatology.ProfileExtrapolation.doctree
Binary file not shown.
Binary file added
BIN
+12.2 KB
en/main/.doctrees/generated/pyrtlib.climatology.ProfileExtrapolation.pressure.doctree
Binary file not shown.
Binary file added
BIN
+20.7 KB
...doctrees/generated/pyrtlib.climatology.ProfileExtrapolation.profile_extrapolation.doctree
Binary file not shown.
Binary file added
BIN
+11.5 KB
...in/.doctrees/generated/pyrtlib.climatology.ProfileExtrapolation.standard_pressure.doctree
Binary file not shown.
Binary file added
BIN
+10.2 KB
....doctrees/generated/pyrtlib.climatology.ProfileExtrapolation.standard_temperature.doctree
Binary file not shown.
Binary file added
BIN
+11.5 KB
.../generated/pyrtlib.climatology.ProfileExtrapolation.standard_water_vapour_density.doctree
Binary file not shown.
Binary file added
BIN
+13.3 KB
...generated/pyrtlib.climatology.ProfileExtrapolation.standard_water_vapour_pressure.doctree
Binary file not shown.
Binary file added
BIN
+12.2 KB
en/main/.doctrees/generated/pyrtlib.climatology.ProfileExtrapolation.temperature.doctree
Binary file not shown.
Binary file added
BIN
+12.4 KB
....doctrees/generated/pyrtlib.climatology.ProfileExtrapolation.water_vapour_density.doctree
Binary file not shown.
Binary file added
BIN
+3.81 KB
en/main/.doctrees/generated/pyrtlib.rt_equation.RTEquation.__init__.doctree
Binary file not shown.
Binary file added
BIN
+10.5 KB
en/main/.doctrees/generated/pyrtlib.rt_equation.RTEquation.bright.doctree
Binary file not shown.
Binary file added
BIN
+24.8 KB
en/main/.doctrees/generated/pyrtlib.rt_equation.RTEquation.clearsky_absorption.doctree
Binary file not shown.
Binary file added
BIN
+12.1 KB
en/main/.doctrees/generated/pyrtlib.rt_equation.RTEquation.cloud_integrated_density.doctree
Binary file not shown.
Binary file added
BIN
+15.5 KB
...in/.doctrees/generated/pyrtlib.rt_equation.RTEquation.cloud_radiating_temperature.doctree
Binary file not shown.
Binary file added
BIN
+15.2 KB
en/main/.doctrees/generated/pyrtlib.rt_equation.RTEquation.cloudy_absorption.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+16.4 KB
en/main/.doctrees/generated/pyrtlib.rt_equation.RTEquation.exponential_integration.doctree
Binary file not shown.
Binary file added
BIN
+18.2 KB
en/main/.doctrees/generated/pyrtlib.rt_equation.RTEquation.planck.doctree
Binary file not shown.
Binary file added
BIN
+13.1 KB
en/main/.doctrees/generated/pyrtlib.rt_equation.RTEquation.ray_tracing.doctree
Binary file not shown.
Binary file added
BIN
+13.9 KB
en/main/.doctrees/generated/pyrtlib.rt_equation.RTEquation.refractivity.doctree
Binary file not shown.
Binary file added
BIN
+17.6 KB
en/main/.doctrees/generated/pyrtlib.rt_equation.RTEquation.vapor.doctree
Binary file not shown.
Binary file added
BIN
+34.4 KB
en/main/.doctrees/generated/pyrtlib.tb_spectrum.TbCloudRTE.__init__.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+53.7 KB
en/main/.doctrees/generated/pyrtlib.tb_spectrum.TbCloudRTE.execute.doctree
Binary file not shown.
Binary file added
BIN
+34 KB
en/main/.doctrees/generated/pyrtlib.tb_spectrum.TbCloudRTE.init_absmdl.doctree
Binary file not shown.
Binary file added
BIN
+15.5 KB
en/main/.doctrees/generated/pyrtlib.tb_spectrum.TbCloudRTE.init_cloudy.doctree
Binary file not shown.
Binary file added
BIN
+12.5 KB
en/main/.doctrees/generated/pyrtlib.tb_spectrum.TbCloudRTE.set_amu.doctree
Binary file not shown.
Binary file added
BIN
+3.92 KB
en/main/.doctrees/generated/pyrtlib.uncertainty.AbsModUncertainty.__init__.doctree
Binary file not shown.
Binary file added
BIN
+16.2 KB
en/main/.doctrees/generated/pyrtlib.uncertainty.AbsModUncertainty.doctree
Binary file not shown.
Binary file added
BIN
+22.5 KB
....doctrees/generated/pyrtlib.uncertainty.AbsModUncertainty.parameters_perturbation.doctree
Binary file not shown.
Binary file added
BIN
+28.3 KB
....doctrees/generated/pyrtlib.uncertainty.AbsModUncertainty.uncertainty_propagation.doctree
Binary file not shown.
Binary file added
BIN
+10.1 KB
en/main/.doctrees/generated/pyrtlib.uncertainty.SpectroscopicParameter.__init__.doctree
Binary file not shown.
Binary file added
BIN
+30.5 KB
en/main/.doctrees/generated/pyrtlib.uncertainty.SpectroscopicParameter.doctree
Binary file not shown.
Binary file added
BIN
+14.2 KB
.../.doctrees/generated/pyrtlib.uncertainty.SpectroscopicParameter.oxygen_parameters.doctree
Binary file not shown.
Binary file added
BIN
+8.16 KB
...n/.doctrees/generated/pyrtlib.uncertainty.SpectroscopicParameter.ozono_parameters.doctree
Binary file not shown.
Binary file added
BIN
+13.7 KB
...ain/.doctrees/generated/pyrtlib.uncertainty.SpectroscopicParameter.set_parameters.doctree
Binary file not shown.
Binary file added
BIN
+15.4 KB
...n/.doctrees/generated/pyrtlib.uncertainty.SpectroscopicParameter.water_parameters.doctree
Binary file not shown.
Binary file added
BIN
+13.3 KB
en/main/.doctrees/generated/pyrtlib.utils.atmospheric_tickness.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.26 KB
en/main/.doctrees/generated/pyrtlib.utils.get_frequencies_sat.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+13.6 KB
en/main/.doctrees/generated/pyrtlib.utils.ppmv_to_moleculesm3.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+10.5 KB
en/main/.doctrees/generated/pyrtlib.utils.virtual_temperature.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
76 changes: 76 additions & 0 deletions
76
en/main/_downloads/022ea1c8a367f324a3b651e5af565388/plot_bt_igra2.py
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,76 @@ | ||
""" | ||
Performing Upwelling Brightness Temperature calculation using IGRA2 Upper Air Observations (with Extrapolation). | ||
================================================================================================================ | ||
""" | ||
|
||
# %% | ||
# This example shows how to use the | ||
# :py:class:`pyrtlib.tb_spectrum.TbCloudRTE` method to calculate brightness temperature from satellite (upwelling) using | ||
# observations from IGRA2 Upper Air Archive and comparison of BT with the extrapoletd profile. | ||
|
||
import numpy as np | ||
from datetime import datetime | ||
|
||
import matplotlib.pyplot as plt | ||
plt.rcParams.update({'font.size': 15}) | ||
|
||
from pyrtlib.tb_spectrum import TbCloudRTE | ||
from pyrtlib.climatology import ProfileExtrapolation | ||
from pyrtlib.utils import dewpoint2rh, to_kelvin | ||
from pyrtlib.absorption_model import H2OAbsModel | ||
from pyrtlib.apiwebservices import IGRAUpperAir | ||
|
||
date = datetime(2020, 6, 1, 12) | ||
station = 'SPM00008221' | ||
df_igra2, header = IGRAUpperAir.request_data(date, station) | ||
|
||
df_igra2 = df_igra2[df_igra2.pressure.notna() & | ||
df_igra2.temperature.notna() & | ||
df_igra2.dewpoint.notna() & | ||
df_igra2.height.notna()] | ||
|
||
z, p, t = df_igra2.height.values / 1000, df_igra2.pressure.values, to_kelvin(df_igra2.temperature.values) | ||
|
||
rh = dewpoint2rh(df_igra2.dewpoint, df_igra2.temperature).values | ||
|
||
mdl = 'R21SD' | ||
frq = np.arange(20, 201, 1) | ||
nf = len(frq) | ||
|
||
rte = TbCloudRTE(z, p, t, rh, frq) | ||
rte.init_absmdl('R20') | ||
H2OAbsModel.model = 'R21SD' | ||
H2OAbsModel.set_ll() | ||
df = rte.execute() | ||
df = df.set_index(frq) | ||
|
||
# %% | ||
# Extrapolation of profile | ||
ex = ProfileExtrapolation() | ||
zz, pp, tt, rhh = ex.profile_extrapolation(header.latitude.values[0], 6, z, (p, t, rh)) | ||
|
||
rte = TbCloudRTE(zz, pp, tt, rhh, frq) | ||
rte.init_absmdl('R20') | ||
H2OAbsModel.model = 'R21SD' | ||
H2OAbsModel.set_ll() | ||
dff = rte.execute() | ||
dff = dff.set_index(frq) | ||
|
||
#%% | ||
# Plotting | ||
fig, ax = plt.subplots(1, 1, figsize=(12, 8)) | ||
plt.suptitle("{}, {}, {} - {}".format(header.site_id.values[0], header.latitude.values[0], header.longitude.values[0], header.date.values[0]), y=0.96) | ||
plt.title("IGRA2 UpperAir Radiosonde Archive", fontsize=10, ha='center') | ||
ax.set_xlabel('Frequency [GHz]') | ||
ax.set_ylabel('${T_B}$ [K]') | ||
df.tbtotal.plot(ax=ax, linewidth=2, label='{} - {}'.format(header.site_id.values[0], mdl)) | ||
dff.tbtotal.plot(ax=ax, linewidth=2, label='Extrap {} - {}'.format(header.site_id.values[0], mdl)) | ||
ax.grid(True, 'both') | ||
ax.legend() | ||
plt.show() | ||
|
||
#%% | ||
# Difference BT | ||
|
||
df['delta'] = dff.tbtotal - df.tbtotal | ||
df.delta.plot(linewidth=2, xlabel='Frequency [GHz]', ylabel='$\Delta T_B$ [K]', grid=True, figsize=(12, 8)) |
252 changes: 252 additions & 0 deletions
252
en/main/_downloads/04ebb85e301429d7cb4d63349c11cf97/generic_tutorial.ipynb
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,252 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"\n# Generic Example\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"This example shows how to use calculate the upwelling brigthness temperature by using R16 and R03 absorption model\nand then plotting them difference.\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import matplotlib.pyplot as plt\n\nplt.rcParams.update({'font.size': 15})\nimport matplotlib.ticker as ticker\nfrom matplotlib.ticker import ScalarFormatter\nimport numpy as np" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Import pyrtlib package\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from pyrtlib.climatology import AtmosphericProfiles as atmp\nfrom pyrtlib.tb_spectrum import TbCloudRTE\nfrom pyrtlib.utils import ppmv2gkg, mr2rh" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"atm = ['Tropical',\n 'Midlatitude Summer',\n 'Midlatitude Winter',\n 'Subarctic Summer',\n 'Subarctic Winter',\n 'U.S. Standard']" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Load standard atmosphere (low res at lower levels, only 1 level within 1 km) and define which absorption model will be used.\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"z, p, d, t, md = atmp.gl_atm(atmp.TROPICAL)\ngkg = ppmv2gkg(md[:, atmp.H2O], atmp.H2O)\nrh = mr2rh(p, t, gkg)[0] / 100\n\nmdl = 'R16'" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Performing upwelling brightness temperature calculation\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Default calculatoin consideres no cloud\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"ang = np.array([90.])\nfrq = np.arange(20, 201, 1)\nnf = len(frq)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Setup matplotlib plot\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"fig, ax = plt.subplots(1, 1, figsize=(12,8))\nax.set_xlabel('Frequency [GHz]')\nax.set_ylabel('${T_B}$ [K]')\n\nrte = TbCloudRTE(z, p, t, rh, frq, ang)\nrte.init_absmdl(mdl)\ndf = rte.execute()\n\ndf = df.set_index(frq)\ndf.tbtotal.plot(ax=ax, linewidth=1, label='{} - {}'.format(atm[atmp.TROPICAL], mdl))\n\nax.legend()\nplt.show()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Print dataframe\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"df" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Performing calculation for R03 absorption model\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"mdl = 'R03'\nrte.init_absmdl(mdl)\ndf_r03 = rte.execute()\ndf_r03 = df_r03.set_index(frq)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Add brigthness temperature values as new column\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"df['delta'] = df.tbtotal - df_r03.tbtotal" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"df" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Difference between R16 and R03 brightness temperature\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"fig, ax = plt.subplots(1, 1, figsize=(12,8))\nax.set_xlabel('Frequency [GHz]')\nax.set_ylabel('$\\Delta {T_B}$ [K]')\ndf.delta.plot(ax=ax, figsize=(12,8), label='$\\Delta {T_B}$ (R16-R03)')\nax.legend()\nplt.show()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Performing downwelling brightness temperature calculation\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"fig, ax = plt.subplots(1, 1, figsize=(12,8))\nax.set_xlabel('Frequency [GHz]')\nax.set_ylabel('${T_B}$ [K]')\n\nrte.satellite = False\ndf_from_ground = rte.execute()\n\ndf_from_ground = df_from_ground.set_index(frq)\ndf_from_ground.tbtotal.plot(ax=ax, linewidth=1, label='{} - {}'.format(atm[atmp.TROPICAL], mdl))\nax.legend()\nplt.show()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"df_from_ground" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.12" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
50 changes: 50 additions & 0 deletions
50
en/main/_downloads/05da99fceea7871dd6706a0148d79a7e/plot_model_cloudy.ipynb
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,50 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"\n# Performing Downwelling Brightness Temperature calculation in cloudy condition.\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"This example shows how to use the\n:py:class:`pyrtlib.tb_spectrum.TbCloudRTE` method to calculate brightness temperature from ground (downwelling) in cloudy condition\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import matplotlib.pyplot as plt\nfrom matplotlib.ticker import FixedLocator, FormatStrFormatter\nplt.rcParams.update({'font.size': 15})\nimport numpy as np\nnp.seterr('raise')\n\nfrom pyrtlib.climatology import AtmosphericProfiles as atmp\nfrom pyrtlib.tb_spectrum import TbCloudRTE\nfrom pyrtlib.utils import ppmv2gkg, mr2rh\n\natm = ['Tropical',\n 'Midlatitude Summer',\n 'Midlatitude Winter',\n 'Subarctic Summer',\n 'Subarctic Winter',\n 'U.S. Standard']\n\nfig, ax = plt.subplots(1, 1, figsize=(12, 8))\n\nz, p, d, t, md = atmp.gl_atm(atmp.MIDLATITUDE_SUMMER)\ngkg = ppmv2gkg(md[:, atmp.H2O], atmp.H2O)\nrh = mr2rh(p, t, gkg)[0] / 100\n\nmdl = 'R19SD'\n\nang = np.array([90.])\nfrq = np.arange(20, 61, 1)\nnf = len(frq)\n\ndenliq = np.zeros(z.shape)\ndenice = np.zeros(z.shape)\ncldh = np.empty((2, 2))\n\nfor i in [False, True]:\n if not i:\n text_plot = 'clear-sky'\n else:\n # build a cloud\n ib = 1\n it = 3\n denliq[ib:it + 1] = 10 * np.ones((it - ib + 1))\n cldh[:, 0] = np.array([z[ib], z[it]])\n ib = 29\n it = 31\n denice[ib:it + 1] = 0.1 * np.ones((it - ib + 1))\n cldh[:, 1] = np.array([z[ib], z[it]])\n text_plot = 'cloudy'\n\n ax.set_xlabel('Frequency (GHz)')\n ax.set_ylabel('BT (K)')\n\n rte = TbCloudRTE(z, p, t, rh, frq, ang)\n rte.satellite = False\n rte.cloudy = i\n rte.init_cloudy(cldh, denice, denliq)\n rte.init_absmdl(mdl)\n df = rte.execute()\n\n df = df.set_index(frq)\n df.tbtotal.plot(x=frq, ax=ax, linewidth=1,\n label='{} - {} ({})'.format(atm[atmp.MIDLATITUDE_SUMMER], mdl, text_plot))\n\nax.grid(True, 'both')\nax.legend()\nplt.show()" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.12" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
Oops, something went wrong.