I want to run .nc files by means of coda interface in Matlab . I brought all the functions of coda which related to matlab interface. but there is a big problem of using them.
How to extract all the datas of .nc files with interaction of coda in matlab?
What exactly is your problem? What have you tried?
Also have a look at the examples for matlab that are available.
as I’m going to run the functions invalid error appeared according to its path.
The main fact that I want to know is that how I can display all the data’s that I gathered from vires toolbox with .nc format by means of coda interface in Matlab.
I have no idea what error you are talking about. Can you maybe copy/paste the matlab code you are running and the exact error message?
Here you are this is the problem:
product = coda_open(aeolus.nc);
% The L2B product stores all valid profile points (which are called ‘results’) as one big consecutive array
% in the datasets mie_hloswind and rayleigh_hloswind.
% The associated geolocation for those point results are stored in mie_geolocation and rayleigh_geolocation.
% The specification of which points belong together in which profile is kept in the mie_profile and rayleigh_profile
% datasets. These datasets contain indices into the mie_hloswind and rayleigh hloswind datasets to specify which point
% belongs at which level in a profile.
% ### Mie horizontal line of sight wind profile points ###
disp(‘Individual Mie HLOS wind points’);
latitude = coda_fetch(product, ‘mie_geolocation’, -1, ‘windresult_geolocation/latitude_cog’);
longitude = coda_fetch(product, ‘mie_geolocation’, -1, ‘windresult_geolocation/longitude_cog’);
altitude = coda_fetch(product, ‘mie_geolocation’, -1, ‘windresult_geolocation/altitude_vcog’);
mie_wind_velocity = coda_fetch(product, ‘mie_hloswind’, -1, ‘windresult/mie_wind_velocity’);
disp(size(mie_wind_velocity));
% ### Rayleigh observation wind profiles points ###
disp(‘Individual Rayleight HLOS wind points’);
latitude = coda_fetch(product, ‘rayleigh_geolocation’, -1, ‘windresult_geolocation/latitude_cog’);
longitude = coda_fetch(product, ‘rayleigh_geolocation’, -1, ‘windresult_geolocation/longitude_cog’);
altitude = coda_fetch(product, ‘rayleigh_geolocation’, -1, ‘windresult_geolocation/altitude_vcog’);
rayleigh_wind_velocity = coda_fetch(product, ‘rayleigh_hloswind’, -1, ‘windresult/rayleigh_wind_velocity’);
disp(size(rayleigh_wind_velocity));
% ### Mie profile definition
disp(‘Mie HLOS wind profiles’);
result_id = coda_fetch(product, ‘mie_profile’, -1, ‘l2b_wind_profiles/wind_result_id_number’);
result_id = horzcat(result_id{:});
% populate wind_velocity profiles (using 0 for unavailable points)
wind_velocity = zeros(size(result_id));
wind_velocity(result_id ~= 0) = mie_wind_velocity(result_id(result_id ~= 0));
disp(size(wind_velocity))
% ### Rayleigh profile definition
disp(‘Rayleigh HLOS wind profiles’)
result_id = coda_fetch(product, ‘rayleigh_profile’, -1, ‘l2b_wind_profiles/wind_result_id_number’);
result_id = horzcat(result_id{:});
% populate wind_velocity profiles (using 0 for unavailable points)
wind_velocity = zeros(size(result_id));
wind_velocity(result_id ~= 0) = rayleigh_wind_velocity(result_id(result_id ~= 0));
disp(size(wind_velocity))
coda_close(product)
Unable to resolve the name aeolus.nc.
Error in aeolus_l2b (line 1)
product = coda_open(aeolus.nc);
There are several things here.
First, it doesn’t seem that you are that familiar with matlab. I would recommend you first try to improve that. Especially considering the difference between a variable reference and a string value (i.e. you have to provide a string value to coda_open()
).
Second, you might be confusing the output from vires with the official AEOLUS products. The official AEOLUS products are in a custom binary format and for those, coda would be the right library to read them. However, for these netcdf files that you have, you should be able to just use the MATLAB netcdf interface.
as a matter of fact, we have to extract all the data from DBL files but it seems that the problem is just with coda_matlab mex and there will also be another problem for coda open
[varargout{1:max(1,nargout)}] = coda_matlab(‘OPEN’,varargin{:});
what do I have to do?
To be honest we need step-by-step help. Is there any source and example?
If you want help, you will have to provide information on what exactly you did. Which AEOLUS file are you using, what commands are you running, what error message is shown, etc.
Also, please get familiar with MATLAB first. Be aware that this is not a forum to get help on MATLAB itself.