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

Hard-coded length of solar year #165

Open
brian-rose opened this issue May 11, 2022 · 1 comment
Open

Hard-coded length of solar year #165

brian-rose opened this issue May 11, 2022 · 1 comment

Comments

@brian-rose
Copy link
Collaborator

There are several places in the codebase where the length of the solar year is hard-coded to the value given by

climlab.utils.constants.days_per_year

This creates challenges particularly for modeling planetary atmospheres.

Related to #120, it would be good to have the option to modify this.

I hacked up some fixes that seem to work (not currently in a PR):

  • provide an optional days_per_year argument to the climlab.solar.insolation.daily_insolation() function (and pass this in the internal call to climlab.solar.insolation.solar_longitude(), which already accepts this argument
  • Add a .days_per_year attribute to the TimeDependentProcess class (which defaults to the standard Earth value)
  • Use this value in the timestep.setter method
  • Modify the DailyInsolation class to use the stored days_per_year value

Maybe it would be best to continue to pursue a general solution to #120, which I started to hack up in #123

@brian-rose
Copy link
Collaborator Author

#188 added the days_per_year argument to climlab.solar.insolation.daily_insolation() and the new climlab.solar.insolation.instant_insolation()

That takes care of the insolation code, but not the stuff related to TimeDependentProcess and time-stepping.

Leaving this issue open to track a more complete solution.

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