Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a code pathway to return integrated energy level fluxes when not running a climate calculation #230

Open
natashabatalha opened this issue Jan 23, 2025 · 1 comment
Assignees

Comments

@natashabatalha
Copy link
Owner

Expected behavior:

  • user runs:
case = jdi.inputs()...

#then..

case.approx(get_lvl_flx=True)

#OR 

case.inputs['approx']['get_lvl_flux']=True 

And gets back integrated level fluxes

Changes needed for thermal

change:

            if get_lvl_flux: 
                atm.lvl_output_thermal = dict(flux_minus=0, flux_plus=0, flux_minus_mdpt=0, flux_plus_mdpt=0)

to

            if get_lvl_flux: 
                atm.lvl_output_thermal = dict(flux_minus=0, flux_plus=0, flux_minus_mdpt=0, flux_plus_mdpt=0)
                calc_type=1
            else: 
                calc_type=0

Changes needed for reflected

  • step 1) in justdoit.py change F0PI to actually get the unshifted stellar spec
F0PI = np.zeroes(nwo) + 1 -> opacityclass.unshifted_stellar_spec
  • step 2) in justdoit.py in def star
    define variable get_lvl_flx via approx dictionary get_lvl_flux=self.inputs['approx']['get_lvl_flux']
    then change elif 'climate' in self.inputs['calculation'] to (('climate' in self.inputs['calculation']) or (get_lvl_flux))
@natashabatalha natashabatalha self-assigned this Jan 23, 2025
imalsky added a commit to imalsky/picaso that referenced this issue Jan 24, 2025
…alculations (natashabatalha#230)

- Implemented a code pathway to return layer fluxes when not running a climate calculation.
- Updated the way `compress_disco` is called for layer fluxes:
  - Now integrates fluxes for each layer.
  - Still returns the albedo for the top-of-atmosphere calculation.
- Uncertainty: The current use of `compress_disco` for integrating wavelengths needs verification to confirm correct functionality.

Issues:
- Encountered an issue when setting `F0PI = np.zeros(nwno) + 1`. This may relate to `opacityclass.unshifted_stellar_spec`.
- Replacing zeros/NaNs in stellar spectra with interpolated values. Recommend checking by plotting `classname.inputs['star']['wno']` vs `classname.inputs['star']['flux']`.

Next Steps:
- Investigate the error with `F0PI` and verify the wavelength integration behavior.
imalsky added a commit to imalsky/picaso that referenced this issue Jan 25, 2025
…alculations (natashabatalha#230)

- Implemented a code pathway to return layer fluxes when not running a climate calculation.
- Updated the way `compress_disco` is called for layer fluxes:
  - Now integrates fluxes for each layer.
  - Still returns the albedo for the top-of-atmosphere calculation.
- Uncertainty: The current use of `compress_disco` for integrating wavelengths needs verification to confirm correct functionality.

Issues:
- Encountered an issue when setting `F0PI = np.zeros(nwno) + 1`. This may relate to `opacityclass.unshifted_stellar_spec`.
- Replacing zeros/NaNs in stellar spectra with interpolated values. Recommend checking by plotting `classname.inputs['star']['wno']` vs `classname.inputs['star']['flux']`.

Next Steps:
- Investigate the error with `F0PI` and verify the wavelength integration behavior.
imalsky added a commit to imalsky/picaso that referenced this issue Jan 25, 2025
…alculations (natashabatalha#230)

- Implemented a code pathway to return layer fluxes when not running a climate calculation.
- Updated the way `compress_disco` is called for layer fluxes:
  - Now integrates fluxes for each layer.
  - Still returns the albedo for the top-of-atmosphere calculation.
- Uncertainty: The current use of `compress_disco` for integrating wavelengths needs verification to confirm correct functionality.

Issues:
- Encountered an error when setting `F0PI = np.zeros(nwno) + 1`. This may relate to `opacityclass.unshifted_stellar_spec`.
- Replacing zeros/NaNs in stellar spectra with interpolated values. Recommend checking by plotting `classname.inputs['star']['wno']` vs `classname.inputs['star']['flux']`.

Next Steps:
- Investigate the error with `F0PI` and verify the wavelength integration behavior.
@natashabatalha
Copy link
Owner Author

All done and merged to branch #28
Needs tutorial in FAQs showing the process to get the units correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant