% startup_template.m % % this program helps establish a matlab path for directoried obtained from the USGS % CMGP repository at http://hosted-projects.com %% Change the root locations of the paths as needed to fit your installation %% the "if statement" below should handle different OS: if strmatch(computer,'PCWIN') %32 bit windows machine cmgdir='c:/rps/m_cmg/trunk/'; contrib_dir='c:/rps/m_contrib/trunk/'; mexcdf_dir='c:/rps/m_contrib/trunk/mexcdf_2008b_plus/'; % Mirone addpath([contrib_dir 'mirone120'],'-end'); addpath([contrib_dir 'mirone120/utils'],'-end'); elseif strmatch(computer,'GLNX86') %my 32 bit Linux machine cmgdir='/usr/local/matlab/m_cmg/trunk/'; contrib_dir='/usr/local/matlab/m_contrib/trunk/'; mexcdf_dir='c:/usr/local/matlab/m_contrib/trunk/mexcdf_2008b_plus/'; else disp('Computer type not handled- edit startup.m'); end % netcdf toolbox global options (turn autoscale & autonan on) global nctbx_options nctbx_options.theAutoNaN=1; nctbx_options.theAutoscale=1; % shouldn't need to change all the backslashes to forward slashes % from here on down to work on linux: e.g. vi syntax: .,%s;\\;\/;g % netcdf stuff should come next % *** remember no .dll's should exist for matlab newer thank 2008a *** addpath([mexcdf_dir 'mexnc'],'-end'); addpath([mexcdf_dir 'snctools'],'-end'); addpath([mexcdf_dir 'netcdf_toolbox/netcdf'],'-end'); addpath([mexcdf_dir 'netcdf_toolbox/netcdf/nctype'],'-end'); addpath([mexcdf_dir 'netcdf_toolbox/netcdf/ncutility'],'-end'); %now add other toolboxes as needed % these are for use in data processing and file mainpulation addpath([cmgdir 'abslib'],'-end'); addpath([cmgdir 'adcp_tbx'],'-end'); addpath([cmgdir 'adcp_tbx/AddOns'],'-end'); addpath([cmgdir 'adcp_tbx/AddOns/presto'],'-end'); addpath([cmgdir 'adcp_tbx/AddOns/epic'],'-end'); addpath([cmgdir 'adcp_tbx/AddOns/form'],'-end'); addpath([cmgdir 'adcp_tbx/AddOns/proxy'],'-end'); addpath([cmgdir 'adcp_tbx/extraMs'],'-end'); addpath([cmgdir 'ABSS_tbx'],'-end'); addpath([cmgdir 'cmglib'],'-end'); addpath([cmgdir 'cmgtool'],'-end'); addpath([cmgdir 'cmgtool/corefiles'],'-end'); addpath([cmgdir 'cmgtool/corefiles/OSX'],'-end'); addpath([cmgdir 'cmgtool/CMGmfiles'],'-end'); addpath([cmgdir 'cmgtool/chuckstats'],'-end'); addpath([cmgdir 'cmgtool/gapfill'],'-end'); addpath([cmgdir 'cmgtool/rich'],'-end'); addpath([cmgdir 'cmgtool/t_tide'],'-end'); addpath([cmgdir 'dolly'],'-end'); addpath([cmgdir 'dolly/batch'],'-end'); addpath([cmgdir 'hydratools'],'-end'); addpath([cmgdir 'LISST'],'-end'); addpath([cmgdir 'midas'],'-end'); addpath([cmgdir 'meta_tools'],'-end'); addpath([cmgdir 'meta_tools/organize_meta'],'-end'); addpath([cmgdir 'MMstuff'],'-end'); addpath([cmgdir 'ndbc'],'-end'); addpath([cmgdir 'RPSstuff'],'-end'); addpath([cmgdir 'seagauge_tools'],'-end'); addpath([cmgdir 'sonarlib'],'-end'); addpath([cmgdir 'wave_tbx'],'-end'); addpath([cmgdir 'timeplt'],'-end'); addpath([cmgdir 'tri'],'-end'); addpath([cmgdir 'whfc_to_ge'],'-end'); addpath([contrib_dir 'm_map'],'-end'); addpath([contrib_dir 'seawater'],'-end'); % these are for modeling - if you don't model, you probably don't need these addpath([cmgdir 'toolsCSTM/matlab'],'-end'); addpath([cmgdir 'roms_rps'],'-end'); addpath([cmgdir 'omviz'],'-end'); addpath([cmgdir 'adcirc_tides'],'-end'); addpath([cmgdir 'timeplt'],'-end'); addpath([cmgdir 'tri'],'-end'); addpath([contrib_dir 'air_sea'],'-end'); addpath([contrib_dir 't_tide'],'-begin'); addpath([contrib_dir 'tidal_ellipse'],'-end'); addpath([contrib_dir 'misc'],'-end'); addpath([contrib_dir 'wafo/wstats'],'-end'); addpath([contrib_dir 'wafo/misc'],'-end'); addpath([contrib_dir 'wafo/wdemos'],'-end'); addpath([contrib_dir 'wafo/spec'],'-end'); addpath([contrib_dir 'Roms_tools/Preprocessing_tools'],'-end'); addpath([contrib_dir 'Roms_tools/Visualization_tools'],'-end'); % Turn on old style zooming, if you want % zoom v6 on % for use of the cf-tools and netcdf_java toolbox, please follow the instructions here: % http://njtbx.sourceforge.net/njdocs/njtbxhelp/environment_setup.html % the following lines may or may not be needed, but superceded by anything at % sourcforge. %% set SNCTOOLS to use Java for reading % setpref ( 'SNCTOOLS', 'USE_JAVA', true ) % %% specify the NetCDF-Java cache. This results in huge speedups for %% NcML aggregation after first time used. %% Here we set the cache every 60 minutes & keep for 30 days %% % nj_setcache(netcdf_java_cache_dir,60*24*30,15); % clear the variables that were set in startup.m so they don't pollute the workspace clear cmgdir contrib_dir mexcnc_dir