FormingWorlds / PROTEUS

Coupled atmosphere-interior framework to simulate the temporal evolution of rocky planets.
https://proteus-code.readthedocs.io
Apache License 2.0
11 stars 1 forks source link

Fix for break condition #15

Closed mark-hammond closed 4 years ago

mark-hammond commented 4 years ago

https://github.com/OxfordPlanetaryClimate/couple-interior-atmosphere/blob/9dc781fe2f4e8cfdd46d737247c49673e603dbd9/SocRadConv.py#L129

The break condition uses the wrong flux level for the OLR. I also suggest that we just use an OLR check and get rid of the temperature check, as we only care about OLR convergence. So, this could be changed to:

if abs(atm.LW_flux_up[0]-PrevOLR) < 50. and i > 5 :
   print("break")
   break    # break here

We could also make the OLR convergence criterion depend on the magnitude of the flux expected, for example:

if abs(atm.LW_flux_up[0]-PrevOLR) < 0.1*(5.67e-8*atm.ts**4)**0.5. and i > 5 :
   print("break")
   break    # break here

(here the extra **0.5 is to represent the fact that the upper atmosphere temperature typically does not scale linearly with surface temperature in this case). But, we could experiment with this.

timlichtenberg commented 4 years ago

Done, break condition seems to be working.