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

Unused variables in melt.m #3

Open chadagreene opened 3 months ago

chadagreene commented 3 months ago

@alex-s-gardner There are a handful of variables in melt.m that never get used (e.g., surplusT). Do I have your blessing to delete them?

alex-s-gardner commented 3 months ago

I agree, we should delete all occurrences of unused variables that are likely introduces during development

NJSchlegel commented 3 months ago

Isn't it used on line 130 to throw a warning?

chadagreene commented 3 months ago

@NJSchlegel Nope, surplusT is never actually used. Line 130 just says:

surplusT=max(0, exsT(i) - LF/CI);
surplusE=surpE(i);
display([' WARNING: surplus energy at the base of GEMB column' newline])
NJSchlegel commented 3 months ago

Got it, the value is actually stored instead in surpT in this loop. Probably was used for printing the values in the warning statement and some point.