Cloud code for exoplanet atmospheres.
natashabatalha / virga Goto Github PK
View Code? Open in Web Editor NEWA Cloud Model for Exoplanets and Brown Dwarfs
Home Page: https://natashabatalha.github.io/virga/
A Cloud Model for Exoplanets and Brown Dwarfs
Home Page: https://natashabatalha.github.io/virga/
This enables users to save the figure for future reference.
In cell 11 of notebook 4_PairingOutputToPICASO (the Looking at Mie parameters section), the plots are labeled as microns and the discussion below says they are microns too, but they start at ~3000 not 0.3. I think this is because the wavelengths are multiplied by 1e4 ... Maybe it used to be converted to Angstroms?
qfig.line(1e4*wave[:,0], g_qscat[:,ind]/qscat[:,ind])
wfig.line(1e4*wave[:,0], qscat[:,ind]/qext[:,ind])
ps. The notebooks are great. This is all so amazing.
Give the ability to pass do_virtual from picaso, i.e.
def compute(atmo, directory = None, as_dict = False, og_solver = True, refine_TP = True, analytical_rg = True, do_virtual = True):
Line 17 in 303bde6
Allows the pass from the compute call to eddysed
qc, qt, rg, reff, ndz, qc_path = eddysed(atmo.t_top, atmo.p_top, atmo.t, atmo.p, condensibles, gas_mw, gas_mmr, rho_p , mmw, atmo.g, atmo.kz, atmo.fsed, mh,atmo.sig, do_virtual=do_virtual)
Line 89 in 303bde6
Which probably should be true for all eddysed keywords:
Line 266 in 303bde6
The single scattering and the asymmetry structure plots seem to invert the values in the heat map. Also, the wavenumber axis needs to be washed up.
Currently just shows figs so users can't save
I am working through the first tutorial with the goal of creating ".mie" files. In the tutorial it says that virga comes with a folder with files that end in .refrind, but I do not have .refrind folder. Below is the error when I run the cell to get the complex refractive indices and my virga folder. Thank you for your time!
From @sirpetergao
First, I added a few aerosol species to gas_properties and pvap, including CO2, H2SO4, and S8. They don't have metallicity dependencies and the gas_mmr is set to that of water, but the idea is that the user needs to give a below-cloud mixing ratio for these to work properly (though the gas_mmr input is still set as optional for now). For H2SO4 I've hard coded an 80% H2SO4 weight percentage - this should be a function of the water vapor mixing ratio and temperature but I think this is enough for now.
Second, for justdoit, I added an extra input argument into the init function of the Atmosphere class, bkg_atm, which is a string that determines what the background gas is; right now there is H2, N2, and CO2; if any other string is input it defaults to H2. Then I split the "true" constants in the constants function (R_GAS, AVOGADRO, K_BOLTZ) into its own function and made 3 other functions, constants_h2, constants_n2, and constants_co2; in these I put eps_k, d_molecule, and c_p_factor, which are different for each of H2, N2, and CO2 background atmospheres. I got the eps_k and d_molecule values for N2 and CO2 from the same source as you, Rosner 2000; for the c_p_factor of CO2 I'm using wikipedia for now, which shows that it's roughly 13/3 (or rather, gamma ~1.3 at room temperature, and c_p_factor = gamma/(gamma-1)).
And that's it! I probably missed something but I went through the whole code and these are the parts that stuck out to me. I would love to know if there are other parts that I need to change! Now I just need to put in the refractive indices for those new condensates and make the .mieff files.
gaocode.zip
Line 978 in 60c073a
Code throws uninformative error if user inputs e.g. H2O
instead of [H2O]
. Add check for list input.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.