mexcdf-discussion Mailing List for mexcdf
Brought to you by:
johnevans007
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(8) |
Feb
(2) |
Mar
(1) |
Apr
(4) |
May
(4) |
Jun
(21) |
Jul
(13) |
Aug
(1) |
Sep
(12) |
Oct
(2) |
Nov
|
Dec
(1) |
2006 |
Jan
(1) |
Feb
|
Mar
(7) |
Apr
|
May
(4) |
Jun
(1) |
Jul
(4) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(6) |
Dec
(4) |
2007 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(3) |
Nov
|
Dec
(2) |
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
From: <joh...@gm...> - 2008-09-18 05:13:28
|
On Tuesday 16 September 2008 23:57, muhammad hasan ali baig wrote: > When we execute test_mexnc in matlab, the following message appears: > > ??? Error using ==> test_rename_att > > test_rename_att: Test 14: Succeeded when it should have failed I wouldn't worry too much about it, the test tries to rename an attribute to the empty string, which should be illegal according to the netcdf documentation. I've only seen the test fail when trying to compile mexnc with opendap. Is that the case here? |
From: muhammad h. a. b. <mha...@gm...> - 2008-09-16 20:58:03
|
When we execute test_mexnc in matlab, the following message appears: ??? Error using ==> test_rename_att test_rename_att: Test 14: Succeeded when it should have failed Error in ==> test_mexnc at 69 test_rename_att ( 'foo_rename_att.nc' ); Kindly guide me how to resolve this problem. -- Muhammad Hasan Ali Baig, Meteorologist, Research & Development Division, National Weather Forecasting Centre, Pakistan Meteorological Department, H-8,Islamabad, Pakistan. 0ff:+92519250363-4 Cell:+923335297863 Fax:+92519250370 email: mha...@gm... m_h...@ho... |
From: John E. <joh...@ma...> - 2008-09-05 13:34:43
|
Hi Robin, In order to append along the unlimited dimension, you need to specify the index values, otherwise nothing will happen. Use the PUT_VARA_x functions for that. So to write the first two values to, say, your N_PROF variable, use % length of x is 2 >> mexnc('PUT_VARA_DOUBLE_DOUBLE',ncid,varid_SLA,0,2,x); To write to the next 10 items, >> mex('PUT_VARA_DOUBLE',ncid,varid_N_PROF,2,10,x); I believe that the reason you don't get an error using PUT_VAR_DOUBLE is that the PUT_VAR routines expect to write to the entire variable. In your case the variable is empty, so it thinks that there is nothing to write. On Wednesday 03 September 2008 14:18, Robin Kovach wrote: > I am having trouble writing data to a netcdf file when specifying an > 'unlimited' dimension. If I specifiy a fixed dimension, it works fine. > > > If I do an ncdump on the file it shows zero values for N_PROF and no > data for anything using that dimension > netcdf test { > dimensions: > N_PROF = UNLIMITED ; // (0 currently) > N_LEVS = 1 ; > STR8 = 8 ; > SCALAR = 1 ; > > Here is how I defined the unlimited dimension: > % Define Dimensions > [dimid_N_PROF,status] = mexnc('DEF_DIM',ncid,'N_PROF', 0); > > Here is the code to write the file: > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > fname = ['/ocean/OCN_IN/DATA/SAT/AVISO/FINAL/test.nc']; > > % Set up NetCDF Output File > ex = exist(fname,'file'); > if (ex==2 & mode=='w'), > deletestr = ['delete ', fname]; > eval(deletestr); > end > > % Open NetCDF File > [ncid,status] = mexnc('create',fname,nc_clobber_mode); > if status, error(mexnc('STRERROR',status)), end > > % Global Attributes > nc.title = 'AVISO Sea-Level-Anomaly (m)'; > status = > mexnc('put_att_text',ncid,-1,'title','char',length(nc.title),nc.title); > if status, error(mexnc('STRERROR',status)), end > status = > mexnc('put_att_text',ncid,-1,'source','char',length(nc.source),nc.source); > if status, error(mexnc('STRERROR',status)), end > status = > mexnc('put_att_text',ncid,-1,'history','char',length(nc.history),nc.history >); if status, error(mexnc('STRERROR',status)), end > status = > mexnc('put_att_text',ncid,-1,'conventions','char',length(nc.conventions),nc >.conventions); if status, error(mexnc('STRERROR',status)), end > > % Set up Counters > startN_PROF = 1; > countN_PROF = 5; > > startVAR = [1, 1]; > countVAR = [1, 5]; > > startSTR = [1, 1]; > countSTR = [8, 5]; > > N_PROF = [startN_PROF:1:countN_PROF]'; > > % Define Dimensions > [dimid_N_PROF,status] = mexnc('DEF_DIM',ncid,'N_PROF', 0); > %[dimid_N_PROF,status] = mexnc('DEF_DIM',ncid,'N_PROF', 5); > if status, error(mexnc('STRERROR',status)), end > > [dimid_N_LEVS,status] = mexnc('DEF_DIM',ncid,'N_LEVS',1); > if status, error(mexnc('STRERROR',status)), end > [dimid_STR8,status] = mexnc('DEF_DIM',ncid,'STR8', 8); > if status, error(mexnc('STRERROR',status)), end > [dimid_SCALAR,status] = mexnc('DEF_DIM',ncid,'SCALAR',1); > if status, error(mexnc('STRERROR',status)), end > > % Define Variables > [varid_FIELD_ID_GEN,status] = > mexnc('DEF_VAR',ncid,'FIELD_ID_GEN','INT',[1],dimid_SCALAR); > if status, error(mexnc('STRERROR',status)), end > [varid_INST_ERROR,status] = > mexnc('DEF_VAR',ncid,'INST_ERROR','FLOAT',[1],dimid_SCALAR); > if status, error(mexnc('STRERROR',status)), end > [varid_MISSING,status] = > mexnc('DEF_VAR',ncid,'MISSING','FLOAT',[1],dimid_SCALAR); > if status, error(mexnc('STRERROR',status)), end > > [varid_STN_NAME,status] = > mexnc('DEF_VAR',ncid,'STN_NAME','CHAR',[2],[dimid_N_PROF,dimid_STR8]); > if status, error(mexnc('STRERROR',status)), end > > [varid_DATE_TIME,status] = > mexnc('DEF_VAR',ncid,'DATE_TIME','INT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_N_PROF,status] = > mexnc('DEF_VAR',ncid,'N_PROF','DOUBLE',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_IBAS_SPC,status] = > mexnc('DEF_VAR',ncid,'IBAS_SPC','INT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_IBAS_GEN,status] = > mexnc('DEF_VAR',ncid,'IBAS_GEN','INT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_LON,status] = > mexnc('DEF_VAR',ncid,'LON','FLOAT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_LAT,status] = > mexnc('DEF_VAR',ncid,'LAT','FLOAT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_NPTS,status] = > mexnc('DEF_VAR',ncid,'NPTS','INT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_INTERP_PRF,status] = > mexnc('DEF_VAR',ncid,'INTERP_PRF','INT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_SUPEROB_PRF,status] = > mexnc('DEF_VAR',ncid,'SUPEROB_PRF','INT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_STN_ID,status] = > mexnc('DEF_VAR',ncid,'STN_ID','INT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_FIELD_ID_SPC,status] = > mexnc('DEF_VAR',ncid,'FIELD_ID_SPC','INT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > [varid_QC_PRF,status] = > mexnc('DEF_VAR',ncid,'QC_PRF','FLOAT',[1],dimid_N_PROF); > if status, error(mexnc('STRERROR',status)), end > > [varid_SLA,status] = > mexnc('DEF_VAR',ncid,'SLA','FLOAT',[2],[dimid_N_PROF,dimid_N_LEVS]); > if status, error(mexnc('STRERROR',status)), end > [varid_DEPTH,status] = > mexnc('DEF_VAR',ncid,'DEPTH','FLOAT',[2],[dimid_N_PROF,dimid_N_LEVS]); > if status, error(mexnc('STRERROR',status)), end > [varid_QC_LEV,status] = > mexnc('DEF_VAR',ncid,'QC_LEV','FLOAT',[2],[dimid_N_PROF,dimid_N_LEVS]); > if status, error(mexnc('STRERROR',status)), end > [varid_OBS_ERROR,status] = > mexnc('DEF_VAR',ncid,'OBS_ERROR','FLOAT',[2],[dimid_N_PROF,dimid_N_LEVS]); > if status, error(mexnc('STRERROR',status)), end > > % Write Variables > status = mexnc('ENDDEF',ncid); > if status, error(mexnc('STRERROR',status)), end > > status = mexnc('PUT_VAR_DOUBLE', ncid,varid_N_PROF,N_PROF); > if status, error(mexnc('STRERROR',status)), end > > status = mexnc('PUT_VAR_TEXT', ncid,varid_STN_NAME,nc.STN_NAME'); > if status, error(mexnc('STRERROR',status)), end > > status = mexnc('PUT_VAR_INT', > ncid,varid_FIELD_ID_GEN,int32(nc.FIELD_ID_GEN)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_FLOAT', > ncid,varid_INST_ERROR,single(nc.INST_ERROR)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_FLOAT', ncid,varid_MISSING,single(nc.MISSING)); > if status, error(mexnc('STRERROR',status)), end > > status = mexnc('PUT_VAR_INT', > ncid,varid_DATE_TIME,int32(nc.DATE_TIME)); if status, > error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_INT', ncid,varid_IBAS_SPC,int32(nc.IBAS_SPC)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_INT', ncid,varid_IBAS_GEN,int32(nc.IBAS_GEN)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_FLOAT', ncid,varid_LON,single(nc.LON)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_FLOAT', ncid,varid_LAT,single(nc.LAT)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_INT', ncid,varid_NPTS,int32(nc.NPTS)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_INT', > ncid,varid_INTERP_PRF,int32(nc.INTERP_PRF)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_INT', > ncid,varid_SUPEROB_PRF,int32(nc.SUPEROB_PRF)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_INT', ncid,varid_STN_ID,int32(nc.STN_ID)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_INT', > ncid,varid_FIELD_ID_SPC,int32(nc.FIELD_ID_SPC)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_FLOAT', ncid,varid_QC_PRF,single(nc.QC_PRF)); > if status, error(mexnc('STRERROR',status)), end > > status = mexnc('PUT_VAR_FLOAT', ncid,varid_SLA,single(nc.SLA)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_FLOAT', > ncid,varid_OBS_ERROR,single(nc.OBS_ERROR)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_FLOAT', ncid,varid_DEPTH,single(nc.DEPTH)); > if status, error(mexnc('STRERROR',status)), end > status = mexnc('PUT_VAR_FLOAT', ncid,varid_QC_LEV,single(nc.QC_LEV)); > if status, error(mexnc('STRERROR',status)), end > > % Close File > status = mexnc('close',ncid); > > if I do an ncdump on the file it shows zero values for N_PROF and no > data for anything using that dimension > > netcdf test { > dimensions: > N_PROF = UNLIMITED ; // (0 currently) > N_LEVS = 1 ; > STR8 = 8 ; > SCALAR = 1 ; > variables: > int FIELD_ID_GEN(SCALAR) ; > float INST_ERROR(SCALAR) ; > float MISSING(SCALAR) ; > char STN_NAME(N_PROF, STR8) ; > int DATE_TIME(N_PROF) ; > double N_PROF(N_PROF) ; > int IBAS_SPC(N_PROF) ; > int IBAS_GEN(N_PROF) ; > float LON(N_PROF) ; > float LAT(N_PROF) ; > int NPTS(N_PROF) ; > int INTERP_PRF(N_PROF) ; > int SUPEROB_PRF(N_PROF) ; > int STN_ID(N_PROF) ; > int FIELD_ID_SPC(N_PROF) ; > float QC_PRF(N_PROF) ; > float SLA(N_PROF, N_LEVS) ; > float DEPTH(N_PROF, N_LEVS) ; > float QC_LEV(N_PROF, N_LEVS) ; > float OBS_ERROR(N_PROF, N_LEVS) ; > > // global attributes: > :title = "AVISO Sea-Level-Anomaly (m)" ; > :source = > > "ftp://ftp.cls.fr/pub/oceano/AVISO/SSH/monomission/dt/sla/upd/" ; > > :history = "Created on 03-Sep-2008 by Robin Kovach" ; > :conventions = "COARDS" ; > > data: > } |
From: Robin K. <rob...@na...> - 2008-09-03 18:19:06
|
I am having trouble writing data to a netcdf file when specifying an 'unlimited' dimension. If I specifiy a fixed dimension, it works fine. If I do an ncdump on the file it shows zero values for N_PROF and no data for anything using that dimension netcdf test { dimensions: N_PROF = UNLIMITED ; // (0 currently) N_LEVS = 1 ; STR8 = 8 ; SCALAR = 1 ; Here is how I defined the unlimited dimension: % Define Dimensions [dimid_N_PROF,status] = mexnc('DEF_DIM',ncid,'N_PROF', 0); Here is the code to write the file: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fname = ['/ocean/OCN_IN/DATA/SAT/AVISO/FINAL/test.nc']; % Set up NetCDF Output File ex = exist(fname,'file'); if (ex==2 & mode=='w'), deletestr = ['delete ', fname]; eval(deletestr); end % Open NetCDF File [ncid,status] = mexnc('create',fname,nc_clobber_mode); if status, error(mexnc('STRERROR',status)), end % Global Attributes nc.title = 'AVISO Sea-Level-Anomaly (m)'; status = mexnc('put_att_text',ncid,-1,'title','char',length(nc.title),nc.title); if status, error(mexnc('STRERROR',status)), end status = mexnc('put_att_text',ncid,-1,'source','char',length(nc.source),nc.source); if status, error(mexnc('STRERROR',status)), end status = mexnc('put_att_text',ncid,-1,'history','char',length(nc.history),nc.history); if status, error(mexnc('STRERROR',status)), end status = mexnc('put_att_text',ncid,-1,'conventions','char',length(nc.conventions),nc.conventions); if status, error(mexnc('STRERROR',status)), end % Set up Counters startN_PROF = 1; countN_PROF = 5; startVAR = [1, 1]; countVAR = [1, 5]; startSTR = [1, 1]; countSTR = [8, 5]; N_PROF = [startN_PROF:1:countN_PROF]'; % Define Dimensions [dimid_N_PROF,status] = mexnc('DEF_DIM',ncid,'N_PROF', 0); %[dimid_N_PROF,status] = mexnc('DEF_DIM',ncid,'N_PROF', 5); if status, error(mexnc('STRERROR',status)), end [dimid_N_LEVS,status] = mexnc('DEF_DIM',ncid,'N_LEVS',1); if status, error(mexnc('STRERROR',status)), end [dimid_STR8,status] = mexnc('DEF_DIM',ncid,'STR8', 8); if status, error(mexnc('STRERROR',status)), end [dimid_SCALAR,status] = mexnc('DEF_DIM',ncid,'SCALAR',1); if status, error(mexnc('STRERROR',status)), end % Define Variables [varid_FIELD_ID_GEN,status] = mexnc('DEF_VAR',ncid,'FIELD_ID_GEN','INT',[1],dimid_SCALAR); if status, error(mexnc('STRERROR',status)), end [varid_INST_ERROR,status] = mexnc('DEF_VAR',ncid,'INST_ERROR','FLOAT',[1],dimid_SCALAR); if status, error(mexnc('STRERROR',status)), end [varid_MISSING,status] = mexnc('DEF_VAR',ncid,'MISSING','FLOAT',[1],dimid_SCALAR); if status, error(mexnc('STRERROR',status)), end [varid_STN_NAME,status] = mexnc('DEF_VAR',ncid,'STN_NAME','CHAR',[2],[dimid_N_PROF,dimid_STR8]); if status, error(mexnc('STRERROR',status)), end [varid_DATE_TIME,status] = mexnc('DEF_VAR',ncid,'DATE_TIME','INT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_N_PROF,status] = mexnc('DEF_VAR',ncid,'N_PROF','DOUBLE',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_IBAS_SPC,status] = mexnc('DEF_VAR',ncid,'IBAS_SPC','INT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_IBAS_GEN,status] = mexnc('DEF_VAR',ncid,'IBAS_GEN','INT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_LON,status] = mexnc('DEF_VAR',ncid,'LON','FLOAT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_LAT,status] = mexnc('DEF_VAR',ncid,'LAT','FLOAT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_NPTS,status] = mexnc('DEF_VAR',ncid,'NPTS','INT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_INTERP_PRF,status] = mexnc('DEF_VAR',ncid,'INTERP_PRF','INT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_SUPEROB_PRF,status] = mexnc('DEF_VAR',ncid,'SUPEROB_PRF','INT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_STN_ID,status] = mexnc('DEF_VAR',ncid,'STN_ID','INT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_FIELD_ID_SPC,status] = mexnc('DEF_VAR',ncid,'FIELD_ID_SPC','INT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_QC_PRF,status] = mexnc('DEF_VAR',ncid,'QC_PRF','FLOAT',[1],dimid_N_PROF); if status, error(mexnc('STRERROR',status)), end [varid_SLA,status] = mexnc('DEF_VAR',ncid,'SLA','FLOAT',[2],[dimid_N_PROF,dimid_N_LEVS]); if status, error(mexnc('STRERROR',status)), end [varid_DEPTH,status] = mexnc('DEF_VAR',ncid,'DEPTH','FLOAT',[2],[dimid_N_PROF,dimid_N_LEVS]); if status, error(mexnc('STRERROR',status)), end [varid_QC_LEV,status] = mexnc('DEF_VAR',ncid,'QC_LEV','FLOAT',[2],[dimid_N_PROF,dimid_N_LEVS]); if status, error(mexnc('STRERROR',status)), end [varid_OBS_ERROR,status] = mexnc('DEF_VAR',ncid,'OBS_ERROR','FLOAT',[2],[dimid_N_PROF,dimid_N_LEVS]); if status, error(mexnc('STRERROR',status)), end % Write Variables status = mexnc('ENDDEF',ncid); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_DOUBLE', ncid,varid_N_PROF,N_PROF); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_TEXT', ncid,varid_STN_NAME,nc.STN_NAME'); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_INT', ncid,varid_FIELD_ID_GEN,int32(nc.FIELD_ID_GEN)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_FLOAT', ncid,varid_INST_ERROR,single(nc.INST_ERROR)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_FLOAT', ncid,varid_MISSING,single(nc.MISSING)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_INT', ncid,varid_DATE_TIME,int32(nc.DATE_TIME)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_INT', ncid,varid_IBAS_SPC,int32(nc.IBAS_SPC)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_INT', ncid,varid_IBAS_GEN,int32(nc.IBAS_GEN)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_FLOAT', ncid,varid_LON,single(nc.LON)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_FLOAT', ncid,varid_LAT,single(nc.LAT)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_INT', ncid,varid_NPTS,int32(nc.NPTS)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_INT', ncid,varid_INTERP_PRF,int32(nc.INTERP_PRF)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_INT', ncid,varid_SUPEROB_PRF,int32(nc.SUPEROB_PRF)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_INT', ncid,varid_STN_ID,int32(nc.STN_ID)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_INT', ncid,varid_FIELD_ID_SPC,int32(nc.FIELD_ID_SPC)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_FLOAT', ncid,varid_QC_PRF,single(nc.QC_PRF)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_FLOAT', ncid,varid_SLA,single(nc.SLA)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_FLOAT', ncid,varid_OBS_ERROR,single(nc.OBS_ERROR)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_FLOAT', ncid,varid_DEPTH,single(nc.DEPTH)); if status, error(mexnc('STRERROR',status)), end status = mexnc('PUT_VAR_FLOAT', ncid,varid_QC_LEV,single(nc.QC_LEV)); if status, error(mexnc('STRERROR',status)), end % Close File status = mexnc('close',ncid); if I do an ncdump on the file it shows zero values for N_PROF and no data for anything using that dimension netcdf test { dimensions: N_PROF = UNLIMITED ; // (0 currently) N_LEVS = 1 ; STR8 = 8 ; SCALAR = 1 ; variables: int FIELD_ID_GEN(SCALAR) ; float INST_ERROR(SCALAR) ; float MISSING(SCALAR) ; char STN_NAME(N_PROF, STR8) ; int DATE_TIME(N_PROF) ; double N_PROF(N_PROF) ; int IBAS_SPC(N_PROF) ; int IBAS_GEN(N_PROF) ; float LON(N_PROF) ; float LAT(N_PROF) ; int NPTS(N_PROF) ; int INTERP_PRF(N_PROF) ; int SUPEROB_PRF(N_PROF) ; int STN_ID(N_PROF) ; int FIELD_ID_SPC(N_PROF) ; float QC_PRF(N_PROF) ; float SLA(N_PROF, N_LEVS) ; float DEPTH(N_PROF, N_LEVS) ; float QC_LEV(N_PROF, N_LEVS) ; float OBS_ERROR(N_PROF, N_LEVS) ; // global attributes: :title = "AVISO Sea-Level-Anomaly (m)" ; :source = "ftp://ftp.cls.fr/pub/oceano/AVISO/SSH/monomission/dt/sla/upd/" ; :history = "Created on 03-Sep-2008 by Robin Kovach" ; :conventions = "COARDS" ; data: } -- This message has been scanned for viruses and dangerous content by GMAO's MailScanner, and is believed to be clean. |
From: John E. <joh...@gm...> - 2008-07-30 01:26:55
|
Muhammad, when you say it's on the path, do you mean the matlab path or the system path? It should be on the system path. I'm guessing that on your computer, it should be in D:\MATLAB7\bin\ or D:\MATLAB7\bin\win32 > When I tried to execute the following command > in Matlab: > >> S=netcdf('D:\MATLAB7\work\hgt.nc') > > it returns the following error: > Mex file entry point is missing. Please check the (case-sensitive) > spelling of mexFunction (for C MEX-files), or the (case-insensitive) > spelling of MEXFUNCTION (for FORTRAN MEX-files). > ??? Invalid MEX-file 'D:\MATLAB7\work\mexnc\win32\netcdf.dll': The specified > module could not be found. > > > While the netcdf.dll file exists on the path mentioned in the error. > > Kindly help me in this regard. Thanking you in anticipation. -- - John Evans |
From: muhammad h. a. b. <mha...@gm...> - 2008-07-24 07:31:45
|
Dear fellows, When I tried to execute the following command in Matlab: >> S=netcdf('D:\MATLAB7\work\hgt.nc') it returns the following error: Mex file entry point is missing. Please check the (case-sensitive) spelling of mexFunction (for C MEX-files), or the (case-insensitive) spelling of MEXFUNCTION (for FORTRAN MEX-files). ??? Invalid MEX-file 'D:\MATLAB7\work\mexnc\win32\netcdf.dll': The specified module could not be found. While the netcdf.dll file exists on the path mentioned in the error. Kindly help me in this regard. Thanking you in anticipation. -- Muhammad Hasan Ali Baig, Meteorologist, Research & Development Division, National Weather Forecasting Centre, Pakistan Meteorological Department, H-8,Islamabad, Pakistan. 0ff:+92519250363-4 Cell:+923335297863 Fax:+92519250370 email: mha...@gm... m_h...@ho... |
From: <joh...@gm...> - 2007-12-18 16:07:00
|
On Saturday 15 December 2007 22:15, David Wang wrote: > Hi, > > I wonder if nc_varput may automatically scale the data when writing to a > netcdf file given the existing attributes add_offset and scale_factor. > nc_varget does this when load the data into the workspace, so when I put > the already scaled data back using nc_varput after some manipulations (say, > filtering), the data would be wrongly scaled in the netcdf file. > > For example, if the variable has a single datum 273.15 and the attribute > add_offset -273.15. nc_varget will give me 0 in the workspace, and when I > write it back using nc_varput, the datum would be wrongly scaled to > -273.15. David, sorry for the late response. I checked this and I think it's working correctly. Your variable datum definitely should be 273.15 when written back. Could you check your version of SNCTOOLS for me? |
From: David W. <cli...@gm...> - 2007-12-16 03:15:20
|
Hi, I wonder if nc_varput may automatically scale the data when writing to a netcdf file given the existing attributes add_offset and scale_factor. nc_varget does this when load the data into the workspace, so when I put the already scaled data back using nc_varput after some manipulations (say, filtering), the data would be wrongly scaled in the netcdf file. For example, if the variable has a single datum 273.15 and the attribute add_offset -273.15. nc_varget will give me 0 in the workspace, and when I write it back using nc_varput, the datum would be wrongly scaled to -273.15. Thanks, D |
From: Derrick S. <Der...@no...> - 2007-10-24 21:19:08
|
Hi John, Don't know if this interests you but I think I just had some success building mexnc and opendap on a slightly different platform than you show on your example page. I'm using Max OSX 10.4 and Matlab 2007b. I installed the libdap++ 3.7.8 and libnc-dap 3.7.0. I then built everything using the mexopts.sh script you provide with the modifications you recommended on the website. ############################################################################# # # Architecture independent lines: # # Set and uncomment any lines which will apply to all architectures. # #---------------------------------------------------------------------------- OPENDAP="/usr/local" EXTRA_CFLAGS="-I${OPENDAP}/include/libnc-dap -I${OPENDAP}/include/libdap " EXTRA_CLIBS="-L${OPENDAP}/lib -lnc-dap -ldap -lcurl -lssl -lcrypto -lxml2 -lz -lm -lpthread " CFLAGS="-g $CFLAGS ${EXTRA_CFLAGS}" CLIBS="$CLIBS ${EXTRA_CLIBS} " The only additional change I made was in the maci section of the architecture dependent section: I changed FC=g95 to FC=gfortran but I don't know if that had any effect or not. It's not too much different than what you had on your site, but at least you know nothing has changed with the newer releases of Matlab and libdap*. Oh, and I almost gave up thinking it failed when I tried your example url on queequeg. It doesn't seem to be working. Maybe you could remove that??? Thanks very much |
From: <joh...@gm...> - 2007-10-03 19:28:43
|
On Tuesday 02 October 2007 17:40, Yolande Serra wrote: > Hello. > > I've got matlab R14 sp3 running on a power pc mac with the 2007-08-17 > release of mexnc for my version of matlab and have netcdf > version 3. I've used the netCDF toolbox for awhile now but > recently realized that my version of matlab came with mexnc If it came with mexnc, then someone there must have installed it for you, as Matlab doesn't ship with mexnc. This could explain a lot, as I suspect you might be looking at old documentation. Check the version that you say came with matlab, see how current it is. > so tried > to use it today, as the toolbox can be awkward. I write c and fortran > code to I/O netCDF files so the syntax is relatively straight forward > for me. The problems I've encountered are : > > 1) I get an error when I use the line, > newid=mexnc('OPEN',newfile,'nc_write_mode'); > > but it works with > > newid=mexnc('OPEN',newfile,'nc_write'); > > The mexnc-doc specifically adds the _mode to all the options. What is > the deal? What is the correct syntax here? Both syntaxes are correct, but only one of them is char. Check the installation directory for mexnc, there will be a bunch of m-files for the various modes. That could probably be made a little clearer in the documentation. Character strings for the modes still work, but the reason why I started trying to emphasis numeric modes is that when netcdf-4 comes around, there will be many more modes that can be combined to get new modes using BITOR. This seemed to me like a better route than trying to specify multiple char strings. > 2) I tried to write a global attribute ('history') to the file and am > just guessing at the format. The mexnc-doc states: > > status = mexnc > ('PUT_ATT_TEXT',ncid,varid,attname,datatype,attvalue); > > While I'm not sure what a datatype is (it is not defined anywhere > simply in the doc file), I got a numeric value from another netcdf > file for a history attribute and used it for my input. I'm assuming > it is char, float, double, etc, but am not sure of the syntax for > these, i.e. do I use nc_char or char?? At first I followed the > instructions and typed, > > clk=clock; > hist=['Created ' num2str(clk(1)) '-' num2str(clk(2)) '-' num2str(clk > (3)) ... > ' ' num2str(clk(4)) ':' num2str(clk(5)) ... > ' by vorticity_seasonal_cycle.m']; > status=mexnc('PUT_ATT_TEXT',newid,nc_global,'history',2,hist); > > I got the error that I needed at least 7 arguments for > PUT_ATT_TEXT!?? So I made another one up, I put the length of my text > string in there giving the command, > > status=mexnc('PUT_ATT_TEXT',newid,nc_global,'history',2,... > length(hist),hist); > > This seemed to work but why is the documentation wrong? And how do I > find out what to use for datatype? I also guessed at what to use for > a global variable id. This is also not discussed in the > documentation. My code is still running so I cannot yet check whether > the history attribute was written correctly. What is the correct way > to write a text-type global attribute to a file? How do you write non- > text global attributes? > The documentation states: status = mexnc ( 'put_att_XXX', ncid, varid, attname, datatype, attlen, attvalue ); Writes an attribute value. The "datatype" attribute can be either the numeric value of the external datatype (e.g. 6 for nc_double), or just the string equivalent (e.g. "double"). so it does list seven input arguments. Again, I'm wondering if you are looking at out-of-date documentation. As far as figuring out the datatype, I suspect that this is really a question about how this routine is used. Please check the netCDF User's Guide at http://my.unidata.ucar.edu/content/software/netcdf/docs.html . What that will tell you is that "PUT_ATT_TEXT" will write a text attribute, but the "datatype" refers to the datatype of your attribute. This could be given as either "char" or nc_char, since you are passing in a string. As far as writing a global attribute, you could use the actual value for the NC_GLOBAL, which is -1, or you could use the helper m-file (also in the same directory as mexnc). |
From: Yolande S. <se...@at...> - 2007-10-02 21:41:16
|
Hello. I've got matlab R14 sp3 running on a power pc mac with the 2007-08-17 release of mexnc for my version of matlab and have netcdf version 3. I've used the netCDF toolbox for awhile now but recently realized that my version of matlab came with mexnc so tried to use it today, as the toolbox can be awkward. I write c and fortran code to I/O netCDF files so the syntax is relatively straight forward for me. The problems I've encountered are : 1) I get an error when I use the line, newid=mexnc('OPEN',newfile,'nc_write_mode'); but it works with newid=mexnc('OPEN',newfile,'nc_write'); The mexnc-doc specifically adds the _mode to all the options. What is the deal? What is the correct syntax here? 2) I tried to write a global attribute ('history') to the file and am just guessing at the format. The mexnc-doc states: status = mexnc ('PUT_ATT_TEXT',ncid,varid,attname,datatype,attvalue); While I'm not sure what a datatype is (it is not defined anywhere simply in the doc file), I got a numeric value from another netcdf file for a history attribute and used it for my input. I'm assuming it is char, float, double, etc, but am not sure of the syntax for these, i.e. do I use nc_char or char?? At first I followed the instructions and typed, clk=clock; hist=['Created ' num2str(clk(1)) '-' num2str(clk(2)) '-' num2str(clk (3)) ... ' ' num2str(clk(4)) ':' num2str(clk(5)) ... ' by vorticity_seasonal_cycle.m']; status=mexnc('PUT_ATT_TEXT',newid,nc_global,'history',2,hist); I got the error that I needed at least 7 arguments for PUT_ATT_TEXT!?? So I made another one up, I put the length of my text string in there giving the command, status=mexnc('PUT_ATT_TEXT',newid,nc_global,'history',2,... length(hist),hist); This seemed to work but why is the documentation wrong? And how do I find out what to use for datatype? I also guessed at what to use for a global variable id. This is also not discussed in the documentation. My code is still running so I cannot yet check whether the history attribute was written correctly. What is the correct way to write a text-type global attribute to a file? How do you write non- text global attributes? Thanks for your help, Yolande ---------------------------------------------------------- Yolande Serra, Research Scientist Department of Atmospheric Science University of Arizona |
From: David W. <cli...@gm...> - 2007-08-04 22:17:16
|
Hi John, that works. maybe snctools that i was using is way too old. thanks very much, d. On 8/3/07, joh...@gm... <joh...@gm...> wrote: > > David, I'm surprised I never ran into this before. I made some > modifications > to nc_varput and nc_addnewrecs and released version 2.3.15. They should > work > for you now. > > > > i'm scratching my head how to add a variable of dimension [nt 1 1] into > > a netcdf file. essentially this is a time series at a particular station > > whose longitude and latitude are specified in two dimension variables > > respectively. and my variable is, therefore, defined on three > dimensions, > > time, lat and lon. my trouble is i can never create a matrix of size > > [nt 1 1] because matlab always removes trailing singleton dimensions. > the > > result is that nc_addnewrecs complains rank mismatch when i try to feed > > it with 1-D array time series. does anyone have any workarounds? > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Mexcdf-discussion mailing list > Mex...@li... > https://lists.sourceforge.net/lists/listinfo/mexcdf-discussion > -- "Now you have found your last wish", she said finally, "what you really and truly want is to love." "But why can't I, Dame Eyola?" "You won't be able to until you have drunk of the Water of Life", she said, "And you can't go back to your own world unless you take some of it back for others." THE NEVERENDING STORY |
From: <joh...@gm...> - 2007-08-03 22:16:16
|
David, I'm surprised I never ran into this before. I made some modifications to nc_varput and nc_addnewrecs and released version 2.3.15. They should work for you now. > i'm scratching my head how to add a variable of dimension [nt 1 1] into > a netcdf file. essentially this is a time series at a particular station > whose longitude and latitude are specified in two dimension variables > respectively. and my variable is, therefore, defined on three dimensions, > time, lat and lon. my trouble is i can never create a matrix of size > [nt 1 1] because matlab always removes trailing singleton dimensions. the > result is that nc_addnewrecs complains rank mismatch when i try to feed > it with 1-D array time series. does anyone have any workarounds? |
From: David W. <cli...@gm...> - 2007-08-03 01:03:34
|
Hello folks, i'm scratching my head how to add a variable of dimension [nt 1 1] into a netcdf file. essentially this is a time series at a particular station whose longitude and latitude are specified in two dimension variables respectively. and my variable is, therefore, defined on three dimensions, time, lat and lon. my trouble is i can never create a matrix of size [nt 1 1] because matlab always removes trailing singleton dimensions. the result is that nc_addnewrecs complains rank mismatch when i try to feed it with 1-D array time series. does anyone have any workarounds? Thanks, David |
From: Nicolas W. <wie...@oc...> - 2007-03-23 17:18:52
|
Morning! In my version of netcdf.m, i have "open" statements but never any corresponding "close" one. I was wondering if that could be why i often get the following error message when using the toolbox: >> ls ??? /usr/local/matlab_7.3/toolbox/matlab/general/ls.m: Too many files open. Thanks a lot. Have a great week-end. n -- Dr. Nicolas Wienders (850) 644-1987 (office) Oceanography - OSB415 294-3542 (cell) Florida State University 644-2581 (fax) Tallahassee, FL - 32306 wie...@oc... |
From: Nicolas W. <wie...@oc...> - 2007-03-23 16:07:25
|
Morning! In my version of netcdf.m, i have "open" statements but never any corresponding "close" one. I was wondering if that could be why i often get the following error message when using the toolbox: >> ls ??? /usr/local/matlab_7.3/toolbox/matlab/general/ls.m: Too many files open. Thanks a lot. Have a great week-end. n -- Dr. Nicolas Wienders (850) 644-1987 (office) Oceanography - OSB415 294-3542 (cell) Florida State University 644-2581 (fax) Tallahassee, FL - 32306 wie...@oc... |
From: Susumu M. <wic...@sa...> - 2006-12-11 23:04:43
|
VfAGRA from $3. 30 and other goods. http://www.daseruijdefnuhatersun.com =20 all over his now brilliantly pink face. He got to his feet, wincing. Moody, we never use Transfiguration as a punishment! said Professor McGonagall wealdy. Surely Professor Dumbledore told you that?=20 |
From: Jax (G. C. <gua...@ha...> - 2006-12-07 22:14:59
|
Hi, Earlier I submitted message inquiring the netcdf toolbox problem, and I have solved that problem. I used mexnc-i64-2.0.15-1.2.tar.gz for mexnc earlier, and when I shifted to mexnc-glx-R14-2.0.20-2.tar.gz for mexnc today, everything seems ok. Thanks. Jax |
From: John E. <je...@ma...> - 2006-12-05 22:18:34
|
Matlab isn't finding the mex-file. Type "which mexnc" at the matlab prompt, see what it says. On Tuesday 05 December 2006 17:10, Jax (Guangxia) Cao wrote: > Hi all, > > Recently I reinstall Linux and Matlab (R14) netcdf toolbox, but with > netcdf not functioning well. When typing help netcdf some explaining > message appears. I put sys/os/glnx86 files into /old, I switch off and > on mexnc, but error maintains although contents differ. I ever > successfully installed netcdf tool with the help from John Evans to work > on sys/os/glnx86. I don't know what happened this time. > > my system: > > [root@localhost ~]# uname -a > Linux localhost.localdomain 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST > 2005 i686 i686 i386 GNU/Linux > > > Error message script is attached below for your information. > > Thank you so much for your time in help. > > Jax > > ****************** > just netcdf toolbox by Charles Denham > > >> f=netcdf('wrfout_d02_2003-01-06_18:00:00', 'write'); > > ??? Error using ==> feval > Undefined command/function 'mexcdf53'. > > Error in ==> ncmex at 139 > [varargout{:}] = feval(fcn, varargin{:}); > > Error in ==> netcdf.open at 20 > [theNCid, status] = ncmex('open', name(self), thePermission); > > Error in ==> netcdf.netcdf at 431 > result = open(result, thePermission); > > >>path > > .... > /usr/local/netcdf_toolbox/netcdf > /usr/local/netcdf_toolbox/netcdf/nctype > /usr/local/netcdf_toolbox/netcdf/ncutility > /usr/local/netcdf_toolbox/netcdf/ncsource > > ********************** > when mexnc by John Evans et al. included. > > >> f=netcdf('wrfout_d02_2003-01-06_18:00:00', 'write'); > > ??? Error using ==> mexnc > Too many output arguments. > > Error in ==> mexcdf53 at 9 > [varargout{:}] = feval('mexnc', varargin{:}); > > Error in ==> ncmex at 139 > [varargout{:}] = feval(fcn, varargin{:}); > > Error in ==> netcdf.open at 20 > [theNCid, status] = ncmex('open', name(self), thePermission); > > Error in ==> netcdf.netcdf at 431 > result = open(result, thePermission); > > /usr/local/mexnc > /usr/local/netcdf_toolbox/netcdf > /usr/local/netcdf_toolbox/netcdf/nctype > /usr/local/netcdf_toolbox/netcdf/ncutility > /usr/local/netcdf_toolbox/netcdf/ncsource > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys - and earn > cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Mexcdf-discussion mailing list > Mex...@li... > https://lists.sourceforge.net/lists/listinfo/mexcdf-discussion -- John Evans: IMCS Rutgers University 71 Dudley Rd, New Brunswick, NJ 08901-8521 ph: 732-932-3435 |
From: Jax (G. C. <gua...@ha...> - 2006-12-05 22:10:27
|
Hi all, Recently I reinstall Linux and Matlab (R14) netcdf toolbox, but with netcdf not functioning well. When typing help netcdf some explaining message appears. I put sys/os/glnx86 files into /old, I switch off and on mexnc, but error maintains although contents differ. I ever successfully installed netcdf tool with the help from John Evans to work on sys/os/glnx86. I don't know what happened this time. my system: [root@localhost ~]# uname -a Linux localhost.localdomain 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux Error message script is attached below for your information. Thank you so much for your time in help. Jax ****************** just netcdf toolbox by Charles Denham >> f=netcdf('wrfout_d02_2003-01-06_18:00:00', 'write'); ??? Error using ==> feval Undefined command/function 'mexcdf53'. Error in ==> ncmex at 139 [varargout{:}] = feval(fcn, varargin{:}); Error in ==> netcdf.open at 20 [theNCid, status] = ncmex('open', name(self), thePermission); Error in ==> netcdf.netcdf at 431 result = open(result, thePermission); >>path .... /usr/local/netcdf_toolbox/netcdf /usr/local/netcdf_toolbox/netcdf/nctype /usr/local/netcdf_toolbox/netcdf/ncutility /usr/local/netcdf_toolbox/netcdf/ncsource ********************** when mexnc by John Evans et al. included. >> f=netcdf('wrfout_d02_2003-01-06_18:00:00', 'write'); ??? Error using ==> mexnc Too many output arguments. Error in ==> mexcdf53 at 9 [varargout{:}] = feval('mexnc', varargin{:}); Error in ==> ncmex at 139 [varargout{:}] = feval(fcn, varargin{:}); Error in ==> netcdf.open at 20 [theNCid, status] = ncmex('open', name(self), thePermission); Error in ==> netcdf.netcdf at 431 result = open(result, thePermission); /usr/local/mexnc /usr/local/netcdf_toolbox/netcdf /usr/local/netcdf_toolbox/netcdf/nctype /usr/local/netcdf_toolbox/netcdf/ncutility /usr/local/netcdf_toolbox/netcdf/ncsource |
From: John E. <joh...@gm...> - 2006-11-22 23:44:51
|
I finally got some steady access to an intel mac, and this has flushed out a few bugs from the dustier corners of mexnc. Mexnc now passes the test suite on the Intel Mac platform (R2006b), and so 2.0.21 is now released. -- John Evans: IMCS Rutgers University 71 Dudley Rd, New Brunswick, NJ 08901-8521 ph: 732-932-3435 |
From: John E. <joh...@gm...> - 2006-11-15 19:28:44
|
Hi Ed, Unfortunately I don't have easy access to an intel mac with which to properly test mexnc. The last brief chance I had with such a mac, I did see problems with character data. Hopefully I'll get easy long-term access soon, so I can find out if this is a problem with mexnc or the fact that R2006b is still a beta for mac-tel. On Wednesday 15 November 2006 14:15, Ed Zaron wrote: > Hi John, > > Getting matlab+tools set up on a new computer and encountered the > following: > > I find that I need to use the netcdf-2.4 mexnc API to successfully > put a text attribute. For example, the commented code works on my PPC > Mac with Matlab6 and mexnc, but the uncommented code is required on a > new Intel Mac with Matlab 2006b. > > % Put the attributes: > for k = 2:length(x.mdata.fieldnames), > % status = mexnc('put_att_text',ncid,x.id, ... > % x.mdata.fieldnames{k},'text', ... > % length(x.mdata.(x.mdata ... > % .fieldnames{k})), ... > % x.mdata.(x.mdata.fieldnames{k})) ; > status = mexnc('ATTPUT',ncid,x.id, ... > x.mdata.fieldnames{k},nc_char, ... > length(x.mdata.(x.mdata ... > .fieldnames{k})), ... > x.mdata.(x.mdata.fieldnames{k})) ; > end ; > > Also, the test_mexnc script fails on this platform. Apparently, > Matlab can't yet handle the error conditions properly. > > Regards, > > Ed > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Edward D. Zaron > Research Associate > Hydrodynamic Process and Ecosystems Research Group > Department of Civil and Environmental Engineering > Portland State University > Portland, OR 97207-0751 > Phone: (503)-725-2435 > FAX: (503)-725-5950 > za...@ce... > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys - and earn > cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Mexcdf-discussion mailing list > Mex...@li... > https://lists.sourceforge.net/lists/listinfo/mexcdf-discussion -- John Evans: IMCS Rutgers University 71 Dudley Rd, New Brunswick, NJ 08901-8521 ph: 732-932-3435 |
From: Ed Z. <za...@ce...> - 2006-11-15 19:16:04
|
Hi John, Getting matlab+tools set up on a new computer and encountered the following: I find that I need to use the netcdf-2.4 mexnc API to successfully put a text attribute. For example, the commented code works on my PPC Mac with Matlab6 and mexnc, but the uncommented code is required on a new Intel Mac with Matlab 2006b. % Put the attributes: for k = 2:length(x.mdata.fieldnames), % status = mexnc('put_att_text',ncid,x.id, ... % x.mdata.fieldnames{k},'text', ... % length(x.mdata.(x.mdata ... % .fieldnames{k})), ... % x.mdata.(x.mdata.fieldnames{k})) ; status = mexnc('ATTPUT',ncid,x.id, ... x.mdata.fieldnames{k},nc_char, ... length(x.mdata.(x.mdata ... .fieldnames{k})), ... x.mdata.(x.mdata.fieldnames{k})) ; end ; Also, the test_mexnc script fails on this platform. Apparently, Matlab can't yet handle the error conditions properly. Regards, Ed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Edward D. Zaron Research Associate Hydrodynamic Process and Ecosystems Research Group Department of Civil and Environmental Engineering Portland State University Portland, OR 97207-0751 Phone: (503)-725-2435 FAX: (503)-725-5950 za...@ce... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
From: John E. <joh...@gm...> - 2006-10-07 12:43:00
|
Hi Dan, I can't compile it as I don't have access to such a beast as of yet. I'm hoping that it would not be much different than what is outlined for the PPC version at http://mexcdf.sourceforge.net/downloads/source.html . If you want to give it a try, contact me personnally and I'd be glad to help out in whatever way I can. Alternatively, SNCTOOLS can use java as a backend for read-only access to netcdf files and does not need the mex-file (although it does need some of the m-files found in the mexnc distribution). On 10/6/06, Dan Rudnick <dru...@uc...> wrote: > Has anyone compiled mexcdf for intel macs, now that the beta version > of matlab for intel macs is available? > > Thanks, Dan > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Mexcdf-discussion mailing list > Mex...@li... > https://lists.sourceforge.net/lists/listinfo/mexcdf-discussion > |
From: Dan R. <dru...@uc...> - 2006-10-07 01:43:30
|
Has anyone compiled mexcdf for intel macs, now that the beta version of matlab for intel macs is available? Thanks, Dan |