Skip to content
Snippets Groups Projects
Commit 63a1f4d0 authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add comments for unit and long_name

parent 123e1f2a
No related branches found
No related tags found
1 merge request!181fix reading netcdf with units not defined (e.g. fi cdf), add shot as input
Pipeline #245813 passed
......@@ -61,6 +61,7 @@ for i=1:length(coordnames_sorted)
for ij=1:length(fields_variables_to_copy)
matcdf.coords(i).(fields_variables_to_copy{ij}) = allinfo.Variables(matcdf.coords(i).index_allvarnames).(fields_variables_to_copy{ij});
end
% define defaults before fetching the values in Attributes (if provided)
matcdf.coords(i).units = '';
matcdf.coords(i).long_name = [matcdf.coords(i).name ' empty'];
for jj=1:numel(allinfo.Variables(matcdf.coords(i).index_allvarnames).Attributes)
......@@ -97,6 +98,7 @@ for i=1:length(varnames_sorted)
for ij=1:length(fields_variables_to_copy)
matcdf.vars(i).(fields_variables_to_copy{ij}) = allinfo.Variables(matcdf.vars(i).index_allvarnames).(fields_variables_to_copy{ij});
end
% define defaults before fetching the values in Attributes (if provided)
matcdf.vars(i).units = '';
matcdf.vars(i).long_name = [matcdf.vars(i).name ' empty'];
for jj=1:numel(allinfo.Variables(matcdf.vars(i).index_allvarnames).Attributes)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment