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

Error using load in Matlab #38

Closed
SarahAlidoost opened this issue Aug 25, 2022 · 2 comments · Fixed by #48
Closed

Error using load in Matlab #38

SarahAlidoost opened this issue Aug 25, 2022 · 2 comments · Fixed by #48
Labels
enhancement New feature or request

Comments

@SarahAlidoost
Copy link
Member

Related to generating forcing_globals.mat, matlab version 9.10.0.1684407 (R2021a) Update 3

STEMMUS_SCOPE_exe(string(config_path));
    "Reading config from "    "D:\test0825\input\AR-SLu_2022-08-25-1547\AR-SLu_2022-08…"

Error using load
Unable to read MAT-file D:\test0825\input\AR-SLu_2022-08-25-1547\forcing_globals.mat. Not a binary MAT-file. Try load -ASCII
to read as text.

Error in filesread (line 24)
load(forcing_global_path, 'DELT', 'Dur_tot', 'IGBP_veg_long', 'latitude', 'longitude', 'reference_height', 'canopy_height',
'sitename')

Error in run (line 91)
evalin('caller', strcat(script, ';'));

Error in STEMMUS_SCOPE (line 26)
run filesread %get paths and prepare input files

Error in run (line 91)
evalin('caller', strcat(script, ';'));

Error in STEMMUS_SCOPE_exe (line 11)
run STEMMUS_SCOPE
@SarahAlidoost SarahAlidoost added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Aug 25, 2022
@SarahAlidoost
Copy link
Member Author

The MAT-file D:\test0825\input\AR-SLu_2022-08-25-1547\forcing_globals.mat is generated using calling python from matlab on a windows system where the system language is not English. Looking at the content of this file, the time is not written correctly. Hence, matlab complains about the content of the file.

To generate the MAT-file, we uses hdf5storage.savemat that uses a writes function including datetime.datetime.now().strftime('%a %b %d %H:%M:%S %Y').

Perhaps this issue will be fixed if the forcing_globals is saved as a netcdf file, see issue #16

@BSchilperoort
Copy link
Contributor

A workaround could be to set the locale to en_US, using Python's locale module.

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

Successfully merging a pull request may close this issue.

2 participants