From d57015cefcad0eadbc6f2da3aadc3e290028c407 Mon Sep 17 00:00:00 2001 From: Jacques Grelet <jacques.grelet@ird.fr> Date: Tue, 8 Jan 2008 15:08:40 +0000 Subject: [PATCH] utilise les conventions NetCDF V1.4 --- tsg_util/tsg_readTsgDataNetCDF.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tsg_util/tsg_readTsgDataNetCDF.m b/tsg_util/tsg_readTsgDataNetCDF.m index f4eeee2..95a7811 100644 --- a/tsg_util/tsg_readTsgDataNetCDF.m +++ b/tsg_util/tsg_readTsgDataNetCDF.m @@ -19,15 +19,25 @@ function [error] = tsg_readTsgDataNetCDF( hTsgGUI, filename) % ------------------------------------- tsg = getappdata( hTsgGUI, 'tsg_data'); +% Display read file info on console +% --------------------------------- +fprintf('\nREAD_NETCDF_FILE\n'); tic; + % Open netCDF file % ---------------- nc = netcdf(filename,'read'); if isempty(nc) msg_error = ['TSG_GOSUD file_lecture : Open file error : ' filename]; warndlg( msg_error, 'NetCDF error dialog'); + sprintf('...cannot locate %s\n', filename); error = -1; + return; end +% Display more info about read file on console +% -------------------------------------------- +fprintf('...reading %s : ', filename); + % Read global attributes: meta data % ---------------------------------- @@ -166,6 +176,10 @@ clear tsgdata %endef(nc) close(nc); +% Display time to read file on console +% ------------------------------------ +t = toc; fprintf('...done (%6.2f sec).\n\n',t); + % Everything OK % ------------- error = 1; -- GitLab