--- MITgcm_contrib/gael/profilesMatlabProcessing/MITprof_global.m 2016/01/17 19:28:27 1.7 +++ MITgcm_contrib/gael/profilesMatlabProcessing/MITprof_global.m 2018/04/02 17:49:21 1.10 @@ -1,14 +1,17 @@ function []=MITprof_global(varargin); -%object: take care of path and global variables (mygrid and mitprofenv), -% and sends global variables to caller routine workspace -%notes: - in any call, if this has not yet been done, -% this routine also adds MITprof subdirectories -% to the matlab path, and it defines mitprofenv. -% - this routine replaces MITprof_path +% +% MITPROF_GLOBAL calls gcmfaces_global, adds MITprof paths, adds +% defines MITprof_climdir and MITprof_griddir in myenv, and +% adds myenv (global variable) to caller routine workspace %get/define global variables: gcmfaces_global; +warning(sprintf(['This version of MITprof, from an old CVS server, is now \n' ... + ' considered deprecated. Future devopment will proceed, instead, \n' ... + ' via GitHub. For up to date documentation, please refer to \n' ... + ' http://gcmfaces.readthedocs.io/en/latest/'])); + %take care of path: test0=which('MITprof_load.m'); if isempty(test0); @@ -38,7 +41,14 @@ if isdir('GRID/'); gridDir='GRID/'; end; if isdir('nctiles_grid/'); gridDir='nctiles_grid/'; end; - if isempty(gridDir); error('could not find grid'); end; + if isempty(gridDir); + fprintf('\n please indicate the ECCO v4 grid directory (e.g., ''nctiles_grid/'') \n\n'); + fprintf(' It can be obtained as follows: \n'); + fprintf(' wget --recursive ftp://mit.ecco-group.org/ecco_for_las/version_4/release2/nctiles_grid/ .\n'); + fprintf(' mv mit.ecco-group.org/ecco_for_las/version_4/release2/nctiles_grid/ . \n\n'); + gridDir=input(''); + end; + addpath(gridDir); fil=which('GRID.0001.nc'); if isempty(fil); fil=which('XC.meta'); end; @@ -60,7 +70,7 @@ if isempty(fil); fprintf('\n please indicate the climatologies directory (e.g., ''gcmfaces_climatologies/'') \n\n'); fprintf(' It can be obtained as follows: \n'); - fprintf(' wget --recursive ftp://mit.ecco-group.org/gforget/OCCAetcONv4GRID .\n\n'); + fprintf(' wget --recursive ftp://mit.ecco-group.org/gforget/OCCAetcONv4GRID .\n'); fprintf(' mv mit.ecco-group.org/gforget/OCCAetcONv4GRID gcmfaces_climatologies \n\n'); climDir=input(''); end; @@ -73,5 +83,5 @@ end; %send to workspace: -evalin('caller','global mygrid mitprofenv'); +evalin('caller','global mygrid myenv');