phetsims / greenhouse-effect

"Greenhouse Effect" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 4 forks source link

Layer Model screen: Ranges for IR emitted from surface are mapped incorrectly #381

Closed arouinfar closed 5 months ago

arouinfar commented 5 months ago

Related to #374

The Observation Window contains information about the amount of IR emitted from the surface which is mapped to the surface temperature.

Due to the large range of possible values on the Layer Model Screen, we added additional ranges and re-mapped the values, as specified in this section of the description doc: https://docs.google.com/document/d/1lkpnGpLhbvjRphW5bITHLGyKsj-OGq4WWO98ZM2wKVM/edit#heading=h.sxn9zi5ye8bb

Currently, on main the Layer Model screen uses the same ranges as the Waves/Photons screens, which is incorrect.

Assigning to @jbphet to correct this.

jbphet commented 5 months ago

I have this working, but the solution reveals a bit of a weakness with the approach of using static objects for the describers. I had to add another flag to some of the methods that generate the description strings, and these methods are starting to feel a bit unwieldly to me. I started down the road of making TemperatureDescriber stateful so that it could generate the strings based on locally available information, but it was just too big of a refactor to complete in a reasonable amount of time, so I bailed and left it static (add added the aforementioned additional flag).

jbphet commented 5 months ago

@arouinfar - this should be fixed on main. I only saw one place in the description that was affected, and that should now be fixed, but I'm a little nervous that I've missed something. Please have a look and let me know.

arouinfar commented 5 months ago

Thanks @jbphet. You are correct, there's only one place where this range appears in the description.

The changes look good on main, closing.