how to use Matlab netCDF functions for 4 dimensions data?
I have data with four dimensions, there are (lon,lat,level,time).
I have no idea what should I do with this kind of data..
this is the display of my data:
Variablename
Size: 249x249x34x2
Dimensions: west_east,south_north,bottom_top,Time
Datatype: single
Attributes:
FieldType = 104
MemoryOrder = ‘XYZ’
description = ‘pm10 dry mass’
units = ‘ug m^-3’
stagger = ”
coordinates = ‘XLONG XLAT’
% code
clc
clear
file = ‘F:…’;
data = double (ncread(file,’variablename’));
DATA = squeeze(data(:,:,1,1)); % I just think this command usable to 4D data (lon,lat,level,time), I don’t know for sure
DATA = log10(DATA);
% lattitude and longitude
lat = double(ncread(file,’XLAT’));
lon = double(ncread(file,’XLONG’));
xlat = lat(1,:,1);
xlon = lon(:,1,1);
[xlat,xlon] = meshgrid(xlat,xlon);
When I use ‘surfacem(xlat,xlon,DATA);’ with the codes that following above, my result it is not look good, the DATA only shown around the ocean (lat and lon).
please give me the suggestions the correct way to read 4D data and get the result from that kind of data..
I really need your help
Thank youI have data with four dimensions, there are (lon,lat,level,time).
I have no idea what should I do with this kind of data..
this is the display of my data:
Variablename
Size: 249x249x34x2
Dimensions: west_east,south_north,bottom_top,Time
Datatype: single
Attributes:
FieldType = 104
MemoryOrder = ‘XYZ’
description = ‘pm10 dry mass’
units = ‘ug m^-3’
stagger = ”
coordinates = ‘XLONG XLAT’
% code
clc
clear
file = ‘F:…’;
data = double (ncread(file,’variablename’));
DATA = squeeze(data(:,:,1,1)); % I just think this command usable to 4D data (lon,lat,level,time), I don’t know for sure
DATA = log10(DATA);
% lattitude and longitude
lat = double(ncread(file,’XLAT’));
lon = double(ncread(file,’XLONG’));
xlat = lat(1,:,1);
xlon = lon(:,1,1);
[xlat,xlon] = meshgrid(xlat,xlon);
When I use ‘surfacem(xlat,xlon,DATA);’ with the codes that following above, my result it is not look good, the DATA only shown around the ocean (lat and lon).
please give me the suggestions the correct way to read 4D data and get the result from that kind of data..
I really need your help
Thank you I have data with four dimensions, there are (lon,lat,level,time).
I have no idea what should I do with this kind of data..
this is the display of my data:
Variablename
Size: 249x249x34x2
Dimensions: west_east,south_north,bottom_top,Time
Datatype: single
Attributes:
FieldType = 104
MemoryOrder = ‘XYZ’
description = ‘pm10 dry mass’
units = ‘ug m^-3’
stagger = ”
coordinates = ‘XLONG XLAT’
% code
clc
clear
file = ‘F:…’;
data = double (ncread(file,’variablename’));
DATA = squeeze(data(:,:,1,1)); % I just think this command usable to 4D data (lon,lat,level,time), I don’t know for sure
DATA = log10(DATA);
% lattitude and longitude
lat = double(ncread(file,’XLAT’));
lon = double(ncread(file,’XLONG’));
xlat = lat(1,:,1);
xlon = lon(:,1,1);
[xlat,xlon] = meshgrid(xlat,xlon);
When I use ‘surfacem(xlat,xlon,DATA);’ with the codes that following above, my result it is not look good, the DATA only shown around the ocean (lat and lon).
please give me the suggestions the correct way to read 4D data and get the result from that kind of data..
I really need your help
Thank you netcdf, 4d datasets, surfacem MATLAB Answers — New Questions