Why does ncread misreads a string variable?
Ältere Kommentare anzeigen
Hello
I am reading data from a netcdf file using ncread. All is well, except when trying to read a particular string variable, containing multiple lines of text. I have read the variable data using ncks, which I include with (part of) the output below (1). Reading it in matlab does not produce an error message but returns a string of seemingly random characters, part of which is copied below (2). Any idea why this may be?
Thanks,
Aviv
p.s.
The netcdf file type is 'classic' mas inquired by "ncdump -k (filename)"
_______________________________________________
(1) Reading the variable with ncks from the command line
ncks -H -v LAUNCH_CONFIG_PARAMETER_NAME 1900037_meta.nc
netcdf 1900037_meta {
dimensions:
N_LAUNCH_CONFIG_PARAM = 9 ;
STRING128 = 128 ;
variables:
char LAUNCH_CONFIG_PARAMETER_NAME(N_LAUNCH_CONFIG_PARAM,STRING128) ;
data:
LAUNCH_CONFIG_PARAMETER_NAME =
"CONFIG_ParkAndProfileCycleCounter_COUNT ",
"CONFIG_CycleTime_hours ",
"CONFIG_DescentToParkTimeOut_hours ",
______________________________________________________
(2) reading the variable using ncread in matlab
K>> LaunchParamNames = ncread(1900037_meta.nc, 'LAUNCH_CONFIG_PARAMETER_NAME')
LaunchParamNames =
128×9 char array
'CCCCCCCCC'
'OOOOOOOOO'
'NNNNNNNNN'
'FFFFFFFFF'
'IIIIIIIII'
'GGGGGGGGG'
'_________'
'PCDPASTPP'
'ayeasurar'
'rcsrcraro'
'klckefnkf'
'AeeTnasPi'
'nTnitcmrl'
'ditmTeiee'
'PmTeoTssP'
'reo_Sissr'
'o_Phumiue'
'fhaoreors'
'iorufOnes'
'lukrauR_u'
'erTsctedr'
'Csi e_pbe'
'y m Thea_'
'c e iotrd'
'l O mui b'
'e u ert a'
'C t Osi r'
'o _ u o '
'u h t n '
'n o _ P '
't u h e '
'e r o r '
'r s u i '
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu NetCDF finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!