Home > atmlab > datasets > +satreaders > ncep_cfsr_day.m

ncep_cfsr_day

PURPOSE ^

Read NCEP CFSR reanalysis data, split per day

SYNOPSIS ^

function S = ncep_cfsr_day(fullpath, fields)

DESCRIPTION ^

 Read NCEP CFSR reanalysis data, split per day

 Read data from the National Center of Environmental Prediction Climate
 Forecast System Reanalysis

 For info on the common format, see <a href="matlab:help SatDataset/reader">SatDataset/reader</a>.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

ncep_cfsr_day.m

SOURCE CODE ^

0001 function S = ncep_cfsr_day(fullpath, fields)
0002 
0003 % Read NCEP CFSR reanalysis data, split per day
0004 %
0005 % Read data from the National Center of Environmental Prediction Climate
0006 % Forecast System Reanalysis
0007 %
0008 % For info on the common format, see <a href="matlab:help SatDataset/reader">SatDataset/reader</a>.
0009 
0010 core_fields = {'lat', 'lon', 'time'};
0011 all_fields = union(core_fields, fields);
0012 
0013 S = struct();
0014 for i = 1:length(all_fields)
0015     S.(all_fields{i}) = h5read(fullpath, ['/' all_fields{i}]);
0016 end
0017 es = h5readatt(fullpath, '/time', 'units');
0018 ed = datevec(datenum(es(13:31))+double(S.time(1))/24);
0019 S.epoch = date2unixsecs(ed(1), ed(2), ed(3));
0020 S.time = mod(S.time, 24) * 3600;
0021 S.version = 'ds093.1';
0022 
0023 end

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005