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

Avoid duplication of variables #188

Open
SarahAlidoost opened this issue Jun 30, 2023 · 1 comment
Open

Avoid duplication of variables #188

SarahAlidoost opened this issue Jun 30, 2023 · 1 comment

Comments

@SarahAlidoost
Copy link
Member

SarahAlidoost commented Jun 30, 2023

As a part of fixing #97, I noticed some variables are duplicated just with a different name. For example in STEMMUS_SCOPE.m:

% Convert unit to Centimeter-Gram-Second system
HR_a = 0.01 .* (ForcingData.RH_msr);
U = 100 .* (ForcingData.WS_msr);
TopPg = 100 .* (ForcingData.Pg_msr);

First the unit conversion should be moved to where it is used. Second, it can be refactored as:

% Convert unit to Centimeter-Gram-Second system
ForcingData.RH_msr = 0.01 .* (ForcingData.RH_msr);

relates to #141

@yijianzeng
Copy link
Contributor

Thanks a lot Sarah, this is also linked to the unit of input data. Perhaps, shall we avoid hard-coding such unit conversion factor? Just a quick thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants