GithubHelp home page GithubHelp logo

natashabatalha / virga Goto Github PK

View Code? Open in Web Editor NEW
27.0 6.0 13.0 83.66 MB

A Cloud Model for Exoplanets and Brown Dwarfs

Home Page: https://natashabatalha.github.io/virga/

Python 100.00%
exoplanets clouds atmospheres planetary science

virga's Introduction




Cloud code for exoplanet atmospheres.

image

virga's People

Contributors

astrocaroline avatar caoimherooney11 avatar james-mang avatar logan-pearce avatar natashabatalha avatar sagnickm avatar semoran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

virga's Issues

units in notebook 4_PairingOutputToPICASO

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.

Feature request to pass do_virtual from top level in picaso to eddysed in virga

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):

def compute(atmo, directory = None, as_dict = False, og_solver = True, refine_TP = True, analytical_rg = True):

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)

qc, qt, rg, reff, ndz, qc_path = eddysed(atmo.t_top, atmo.p_top, atmo.t, atmo.p,

Which probably should be true for all eddysed keywords:

def eddysed(t_top, p_top,t_mid, p_mid, condensibles, gas_mw, gas_mmr,rho_p,

Question on 1_GettingStarted. Lack of .refrind folder.

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!
Screenshot 2024-03-04 at 12 27 04 PM
Screenshot 2024-03-04 at 12 27 23 PM

Integrate Peter Gao's Code

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.