ncid = netcdf.create('iroise.nc','CLASSIC_MODEL');
dim_lon = netcdf.defDim(ncid,'lon',50);
dim_lat = netcdf.defDim(ncid,'lat',50);
dim_depth = netcdf.defDim(ncid,'depth',50);
dim_time= netcdf.defDim(ncid,'time',50);
var_lon = netcdf.defVar(ncid,'lon','double',dim_lon);
var_lat = netcdf.defVar(ncid,'lat','double',dim_lat);
var_dep = netcdf.defVar(ncid,'depth','double',dim_depth);
var_ti = netcdf.defVar(ncid,'time','double',dim_time);
var_49 = netcdf.defVar(ncid,'var49','float', [dim_time dim_depth dim_lat dim_lon]);
var_50 = netcdf.defVar(ncid,'var50','float', [dim_time dim_depth dim_lat dim_lon]);
netcdf.putAtt(ncid,var_lon,'standard_name','longitude');
netcdf.putAtt(ncid,var_lon,'long_name','longitude');
netcdf.putAtt(ncid,var_lon,'units','degrees_east');
netcdf.putAtt(ncid,var_lon,'axis','X');
netcdf.putAtt(ncid,var_lat,'standard_name','latitude');
netcdf.putAtt(ncid,var_lat,'long_name','latitude');
netcdf.putAtt(ncid,var_lat,'units','degrees_north');
netcdf.putAtt(ncid,var_lat,'axis','Y');
netcdf.putAtt(ncid,var_dep,'standard_name','depth');
netcdf.putAtt(ncid,var_dep,'long_name','depth_below_sea');
netcdf.putAtt(ncid,var_dep,'units','m');
netcdf.putAtt(ncid,var_dep,'positive','down');
netcdf.putAtt(ncid,var_dep,'axis','Z');
netcdf.putAtt(ncid,var_ti,'standard_name','time');
netcdf.putAtt(ncid,var_ti,'units','hours since 2008-09-22 00:00:00');
netcdf.putAtt(ncid,var_ti,'calendar','proleptic_gregorian');
netcdf.putAtt(ncid,var_49,'table','3');
netcdf.putAtt(ncid,var_50,'table','3');
netcdf iroise {
dimensions:
lon = 50 ;
lat = 50 ;
depth = 50 ;
time = 50 ;
variables:
double lon(lon) ;
lon:standard_name = "longitude" ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
lon:axis = "X" ;
double lat(lat) ;
lat:standard_name = "latitude" ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
lat:axis = "Y" ;
double depth(depth) ;
depth:standard_name = "depth" ;
depth:long_name = "depth_below_sea" ;
depth:units = "m" ;
depth:positive = "down" ;
depth:axis = "Z" ;
double time(time) ;
time:standard_name = "time" ;
time:units = "hours since 2008-09-22 00:00:00" ;
time:calendar = "proleptic_gregorian" ;
float var49(lon, lat, depth, time) ;
var49:table = "3" ;
float var50(lon, lat, depth, time) ;
var50:table = "3" ;
}