How do I extract daily data from a NC yearly (which contain 365days) file?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Habtamu Tsegaye
el 27 de Ag. de 2021
Respondida: Augusto Gabriel da Costa Pereira
el 21 de Dic. de 2022
I need to extract the daily data from netCDF yearly data which contains 365 days. in the code, the asign prep could not read the variable precipitation from the file
clc
close all
clear all
filename = ('D:\Rainfall_Data_from_Satelite\CHIRPS\chirps-v2.0.2002.days_p05.nc');
info = ncinfo(filename);
% Variable 1
lat = double(ncread(filename,'latitude'));
% Variable 2
lon = double(ncread(filename,'longitude'));
% Variable 3
% data are for each day of the year (2019)
time = ncread(filename,'time');
unitsTime = info.Variables(4).Attributes(1).Value;
fprintf(1,'Time Units: %s\n',unitsTime);
tDatenum = datenum(1980,1,1,time,0,0); %1980-1-1 0:0:0
% Variable 4
prep = ncread(filename,'precip');
0 comentarios
Respuestas (1)
Augusto Gabriel da Costa Pereira
el 21 de Dic. de 2022
See, this link below has the answer you want. if you don't get your goal comment here
https://la.mathworks.com/matlabcentral/answers/1882277-error-sending-data-to-xlsx-netcdf?s_tid=mlc_ans_email_view#answer_1133137
0 comentarios
Ver también
Categorías
Más información sobre NetCDF en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!