Closed Nicholaswogan closed 2 years ago
You can easily fix this by changing the reference pressure. See the tutorial for Terrestrial Planets.
It's just a quick addition of a line:
opacity = jdi.opannection(wave_range=[0.3,2]) #lets just use all defaults
start_case = jdi.inputs()
#phase angle
start_case.phase_angle(0) #radians
#define gravity
start_case.gravity(gravity=9.81, gravity_unit=u.Unit('m/(s**2)')) #any astropy units available
#define star
start_case.star(opacity, 5000,0,4.0) #opacity db, pysynphot database, temp, metallicity,
start_case.atmosphere(filename='earth.pt', delim_whitespace=True)
#NEW ADDITION
start_case.inputs['p_reference'] = 0.5 #bars! Just needs to be lower than your highest pressure
df = start_case.spectrum(opacity)
The other edit you will want to make is the addition of surface reflectance. For example, for a constant surface albedo of 0.3:
start_case.surface_reflect(0.3,opacity.wno) #this inputs the surface reflectivity and tells the code
This can be run anytime before you run your spectrum.
I will keep your question open until I put a proper raise Except. Thanks so much for pointing this out.
Thanks! Looks like I had to add a slightly different line in v2.2.1
start_case.inputs['approx']['p_reference'] = 0.5
But ya everything looks good now!
@Nicholaswogan I made a better change to just set reference pressure to the max pressure if it is out of bounds. For terrestrial planets especially, this makes more sense and results in the correct altitude calculations. Will merge to master and update pip to 2.3.1.
Sounds great, thanks again.
Hi. I'm just beginning to play around with Picaso. I wanted to compute a reflected light spectrum of Earth. So, following the "Getting Started : Basic Inputs and Outputs" in the docs, I put together a file for P, T and mixing ratios for Earth. I've attached it here: earth.pt.zip
I then run
I get the following error
Wondering if you could help spot the issue with my input file.