⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uncmp_nc.m

📁 matlacb程序包
💻 M
字号:
function status = uncmp_nc(cdf)% UNCMP_NC offers to uncompress a netCDF file%--------------------------------------------------------------------%     Copyright J. V. Mansbridge, CSIRO, june 23 1993%     Revision $Revision: 1.3 $%% status = uncmp_nc(cdf)%% DESCRIPTION:%  This offers to uncompress the file cdf.  It returns a status flag%  (see below) which describes the result of the operation.%  %  Note that there will be trouble if the operating system does not%  have the Unix uncompress facility.% % INPUT:%  cdf is the name of a netCDF file, including the .cdf extent, but%  without any .Z extent.%% OUTPUT:%  status; a status flag; %  = 0 if the netCDF file has been successfully uncompressed.%  = 1 if the file is uncompressed because the user chose not to do it.%  = 2 if the uncompression of the file failed.%% EXAMPLE:%  status = uncmp_nc('fred.cdf')%% This function is called by: attnc.m, getnc.m, getnc_s.m, inqnc.m%% AUTHOR:   J. V. Mansbridge, CSIRO%     Copyright (C), J.V. Mansbridge, %     Commonwealth Scientific and Industrial Research Organisation%     $Id: uncmp_nc.m Mon, 03 Jul 2006 17:16:40 $% %--------------------------------------------------------------------s = [ cdf ' is compressed.  Do you want it to be uncompressed?' ...    '  (y/n) [y] ' ];compit = input(s, 's');% compit is converted to 'y' if it is empty or 'Y'.if isempty(compit)  compit = 'y';elseif compit == 'Y'  compit = 'y';endif compit == 'y'  comp = [ cdf '.Z' ];  s = [ '!uncompress ' comp ];  eval(s)  if exist(cdf) == 2    status = 0;  else    status = 2;  endelse  status = 1;end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -