alex-s-gardner / GEMB

A 1D column that simulates snow/firn/ice processes and surface-atmosphere mass and energy exchanges
Apache License 2.0
5 stars 2 forks source link

Unreachable section of code in thermo.m #2

Open chadagreene opened 3 months ago

chadagreene commented 3 months ago

@alex-s-gardner There's a section of code in thermo.m that says:

if false
    [Define constants one way.]
elseif false 
    [Define the constants a different way.] 
elseif false
    [Define the constants yet another way.] 
else 
    [Define the constants.]
end

The section seems to take the form of a switch that would allow the user to select a method of defining constants, but currently none of the false options can ever be reached. Or perhaps this is the result of trying out different methods during the development of the code before settling on a final option?

I'd like to clean this up, so should I:

  1. Delete the unused methods of defining the constants, or
  2. Rewrite it as a switch and add optional inputs to the thermo function to allow the user to select which method is used. If this, please tell me how I should refer to each option.
alex-s-gardner commented 3 months ago

@chadagreene you are correct that this was used in development, I believe Nicole added this. We should: Rewrite it as a switch and add optional inputs to the thermo function to allow the user to select which method is used.

We should ask Nicole for method definitions

NJSchlegel commented 3 months ago

We decided to create a new input, and create a switch as suggested. Also, @chadagreene to go through the other "Idx" inputs and suggest name changes that are less cryptic.

chadagreene commented 1 month ago

In some recent in-person discussions, @alex-s-gardner suggested simply removing the unreachable sections of code, so I did that in commit d0c292b.