Skip to content

Commit

Permalink
Fix: Sanitize params for fieldname usage
Browse files Browse the repository at this point in the history
  • Loading branch information
simmsa committed Jul 30, 2024
1 parent ec8fae7 commit ffe31db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mhkit/wave/IO/hindcast/request_wpto.m
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
paramURL = ['https://developer.nrel.gov/api/hsds/datasets/' paramID{:} '/value?api_key=' api_key '&select=[:,' num2str(idx(y)-1) ']' dom];
end
param = cached_webread(paramURL,options);
data(y).(parameter(z)) = param.value;
param_fieldname = strrep(parameter(z), "-", "_");
data(y).(param_fieldname) = param.value;
end
end

Expand Down Expand Up @@ -149,4 +150,3 @@
data(i).metadata = meta(i);
end
end

0 comments on commit ffe31db

Please sign in to comment.