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

RegridLoop does not iterate to the last index in the LUH2 dataset variable list #15

Open
glemieux opened this issue Aug 23, 2024 · 0 comments · May be fixed by #23
Open

RegridLoop does not iterate to the last index in the LUH2 dataset variable list #15

glemieux opened this issue Aug 23, 2024 · 0 comments · May be fixed by #23
Labels
bug Something isn't working

Comments

@glemieux
Copy link
Collaborator

The variable varlen does not need to be reduced by one as range will generate an iterable object starting from 0.

ds_varnames = list(ds_to_regrid.variables.keys())
varlen = len(ds_to_regrid.variables)
first_var = False
for i in range(varlen-1):

This is a silent and "harmless" bug as the last index in the LUH2 datasets are not variables that are regridded and thus skipped anyways. That said, this should be fixed should the variable order change.

@glemieux glemieux added the bug Something isn't working label Aug 23, 2024
samsrabin added a commit to samsrabin/tools-fates-landusedata that referenced this issue Aug 26, 2024
Resolves NGEET#15: RegridLoop does not iterate to the last index in the LUH2 dataset variable list
samsrabin added a commit to samsrabin/tools-fates-landusedata that referenced this issue Sep 10, 2024
Resolves NGEET#15: RegridLoop does not iterate to the last index in the LUH2 dataset variable list
@samsrabin samsrabin linked a pull request Sep 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant