| 1 | gmaze | 1.1 | % Here we define as global variables grids for u, v, theta and salt | 
| 2 |  |  | % and also sub domain for the CLIMODE North Atlantic study | 
| 3 |  |  |  | 
| 4 |  |  |  | 
| 5 |  |  | function grid_setup | 
| 6 |  |  |  | 
| 7 |  |  | global domain subdomain1 subdomain2 subdomain3 subdomain4 | 
| 8 |  |  |  | 
| 9 |  |  |  | 
| 10 |  |  | % Load grid | 
| 11 |  |  |  | 
| 12 |  |  | GRID_125 | 
| 13 |  |  |  | 
| 14 |  |  | % Setup standard grid variables: | 
| 15 |  |  |  | 
| 16 |  |  | lon_salt=lon125; | 
| 17 |  |  | lon_thet=lon125; | 
| 18 |  |  | lon_u=[lon125(1)-360+lon125(end) (lon125(2:end)+lon125(1:end-1))/2]; | 
| 19 |  |  | lon_v=lon125; | 
| 20 |  |  |  | 
| 21 |  |  | lat_salt=lat125'; | 
| 22 |  |  | lat_thet=lat125'; | 
| 23 |  |  | lat_u=lat125'; | 
| 24 |  |  | lat_v=[lat125(1)-(lat125(2)-lat125(1))/2 (lat125(1:end-1)+lat125(2:end))/2]'; | 
| 25 |  |  |  | 
| 26 |  |  | dpt_salt=dpt125; | 
| 27 |  |  | dpt_thet=dpt125; | 
| 28 |  |  | dpt_u=dpt125; | 
| 29 |  |  | dpt_v=dpt125; | 
| 30 |  |  | dpt_w=[0 cumsum(thk125(1:end-1))]; | 
| 31 |  |  |  | 
| 32 |  |  |  | 
| 33 |  |  | % Define the domain with structure: | 
| 34 |  |  | domain = struct(... | 
| 35 |  |  | 'SALTanom',struct('lon',lon_salt,'lat',lat_salt','dpt',dpt_salt),... | 
| 36 |  |  | 'THETA',   struct('lon',lon_thet,'lat',lat_thet','dpt',dpt_thet),... | 
| 37 |  |  | 'UVEL',   struct('lon',lon_u,'lat',lat_u','dpt',dpt_u),... | 
| 38 |  |  | 'VVEL',   struct('lon',lon_v,'lat',lat_v','dpt',dpt_v),... | 
| 39 |  |  | 'WVEL',   struct('lon',lon_salt,'lat',lat_salt','dpt',dpt_w)... | 
| 40 |  |  | ); | 
| 41 |  |  |  | 
| 42 |  |  |  | 
| 43 |  |  |  | 
| 44 |  |  | % And here we define the subdomain global structure containing 3D limits | 
| 45 |  |  | % of the studied region, defined on the central grid. | 
| 46 |  |  |  | 
| 47 |  |  | sub_name='western_north_atlantic'; | 
| 48 |  |  | lonmin=lon125(2209); | 
| 49 |  |  | lonmax=lon125(2401); | 
| 50 |  |  | latmin=lat125(1225); | 
| 51 |  |  | latmax=lat125(1497); | 
| 52 |  |  | dptmin=dpt125(1); | 
| 53 |  |  | dptmax=dpt125(29); | 
| 54 |  |  |  | 
| 55 |  |  | subdomain1=struct('name',sub_name,... | 
| 56 |  |  | 'limlon',[lonmin lonmax],... | 
| 57 |  |  | 'limlat',[latmin latmax],... | 
| 58 |  |  | 'limdpt',[dptmin dptmax]); | 
| 59 |  |  |  | 
| 60 |  |  |  | 
| 61 |  |  | sub_name='climode'; | 
| 62 |  |  | lonmin=lon125(2312); % = 332E | 
| 63 |  |  | lonmax=lon125(2384); % = 306E | 
| 64 |  |  | latmin=lat125(1368); % = 27N | 
| 65 |  |  | latmax=lat125(1414); % = 50N | 
| 66 |  |  | dptmin=dpt125(1);    % = 5m | 
| 67 |  |  | dptmax=dpt125(29);   % = 1105.9m | 
| 68 |  |  |  | 
| 69 |  |  | subdomain2=struct('name',sub_name,... | 
| 70 |  |  | 'limlon',[lonmin lonmax],... | 
| 71 |  |  | 'limlat',[latmin latmax],... | 
| 72 |  |  | 'limdpt',[dptmin dptmax]); | 
| 73 |  |  |  | 
| 74 |  |  |  | 
| 75 |  |  | sub_name='north_atlantic'; | 
| 76 |  |  | lonmin=lon125(2209); | 
| 77 |  |  | lonmax=lon125(2880); | 
| 78 |  |  | latmin=lat125(1157); | 
| 79 |  |  | latmax=lat125(1564); | 
| 80 |  |  | dptmin=dpt125(1); | 
| 81 |  |  | dptmax=dpt125(29); | 
| 82 |  |  |  | 
| 83 |  |  | subdomain3=struct('name',sub_name,... | 
| 84 |  |  | 'limlon',[lonmin lonmax],... | 
| 85 |  |  | 'limlat',[latmin latmax],... | 
| 86 |  |  | 'limdpt',[dptmin dptmax]); | 
| 87 |  |  |  | 
| 88 |  |  |  | 
| 89 |  |  | sub_name='global'; | 
| 90 |  |  | lonmin=lon125(1); | 
| 91 |  |  | lonmax=lon125(2880); | 
| 92 |  |  | latmin=lat125(1); | 
| 93 |  |  | latmax=lat125(2176); | 
| 94 |  |  | dptmin=dpt125(1); | 
| 95 |  |  | dptmax=dpt125(29); | 
| 96 |  |  |  | 
| 97 |  |  | subdomain4=struct('name',sub_name,... | 
| 98 |  |  | 'limlon',[lonmin lonmax],... | 
| 99 |  |  | 'limlat',[latmin latmax],... | 
| 100 |  |  | 'limdpt',[dptmin dptmax]); |