how do I fix netcdf.putAtt error?

5 vues (au cours des 30 derniers jours)
Mija Lovric
Mija Lovric le 5 Mai 2015
Réponse apportée : 俊 马 le 13 Juin 2022
I created a netcdf file, but I have a problem with writing an attribute. This is how I did it: netcdf.putAtt(ncid,varid2,'units','months_since_Jan_1999'); but it gives me this error:
Error using netcdflib The NetCDF library encountered an error during execution of 'putAttText' function - 'Operation not allowed in data mode (NC_ENOTINDEFINE)'. Error in netcdf.putAtt (line 82) netcdflib('putAttText',ncid,varid,attname,attvalue);

Réponses (1)

俊 马
俊 马 le 13 Juin 2022
hi, have you fixed this issue? I have met the same problem, do you know how to solve it ? thanks

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by