/[MITgcm]/MITgcm/utils/matlab/ocean_basin/mk_basin.m
ViewVC logotype

Contents of /MITgcm/utils/matlab/ocean_basin/mk_basin.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Feb 7 17:02:10 2017 UTC (7 years, 5 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, HEAD
adding ocean_basin routines for defining basin masks

1 % construct a 1x1 degree file containing ocean basin information
2 % 0: Land
3 % 1: Pacific
4 % 2: Atlantic
5 % 3: Indian
6 % 4: Southern
7 % 5: Arctic
8 % 6: Mediterranean
9 % 7: Sea of Japan
10 % 8: Other
11
12 clear all, clf reset
13 cd /hosts/triton/dm1/dimitri/matlab/plotfun/ocean_basin
14
15 load topo
16 lon=.5:359.5;
17 lat=-89.5:89.5;
18 [X Y]=meshgrid(lon,lat);
19 basin=topo;
20 clear t*
21
22 % Land
23 basin(find(basin<=0))=-1;
24 basin(find(basin>0))=0;
25
26 % Southern
27 ix=find(Y<-35&basin==-1);
28 basin(ix)=4;
29 ix=find(X>119&X<137&Y>-35&Y<-32&basin==-1);
30 basin(ix)=4;
31
32 % Arctic
33 ix=find(Y>66&basin==-1);
34 basin(ix)=5;
35 ix=find(X>35&X<40&Y>64&Y<66&basin==-1);
36 basin(ix)=5;
37
38 % Atlantic
39 ix=find(X>277&X<309&Y>66&Y<79&basin==5);
40 basin(ix)=2;
41 ix=find(X>262&basin==-1);
42 basin(ix)=2;
43 ix=find(X<25&Y>50&basin==-1);
44 basin(ix)=2;
45 ix=find(X<20&Y<10&basin==-1);
46 basin(ix)=2;
47
48 % Pacific
49 ix=find(X>142&basin==-1);
50 basin(ix)=1;
51 ix=find(X==280.5&Y==8.5);
52 basin(ix)=0;
53 ix=find(X<290&X>90&Y<9&basin==2);
54 basin(ix)=1;
55 ix=find(X<275&X>90&Y<16&basin==2);
56 basin(ix)=1;
57 ix=find(X>99&Y>-8&basin==-1);
58 basin(ix)=1;
59
60 % Indian
61 ix=find(X>22&Y<30&basin==-1);
62 basin(ix)=3;
63 ix=find(X==137.5&Y==-28.5);
64 basin(ix)=8;
65 ix=find(X>22&X<102&Y<7&basin==1);
66 basin(ix)=3;
67 ix=find(X>22&X<107&Y<-6&basin==1);
68 basin(ix)=3;
69 ix=find(X>22&X<104&Y<-4&basin==1);
70 basin(ix)=3;
71
72 % Mediterranean
73 ix=find(X>355&Y<38&Y>35&basin==2);
74 basin(ix)=6;
75 ix=find(X<42&Y<47&basin==-1);
76 basin(ix)=6;
77 ix=find(X==27.5&Y==29.5);
78 basin(ix)=8;
79
80 % Sea of Japan
81 ix=find(X<142&X>120&Y>43&Y<52&basin==1);
82 basin(ix)=7;
83 ix=find(X<140&X>128&Y>35&Y<52&basin==1);
84 basin(ix)=7;
85
86 % Other
87 ix=find(basin==-1);
88 basin(ix)=8;
89
90 % Separate Southern Ocean into Pacific
91 % Atlantic, and Indian Ocean Sectors
92 ix=find((X<20|X>293|(X>291&Y>-68)|(X==292.5&Y==-79.5))&basin==4);
93 basin(ix)=4.02;
94 ix=find(X<146&basin==4);
95 basin(ix)=4.03;
96 ix=find(basin==4);
97 basin(ix)=4.01;
98
99 mypcolor(lon,lat,basin);
100 % $$$ caxis([3.9 4.04])
101 caxis([6 8])
102 grid
103
104 save basin lon lat basin

  ViewVC Help
Powered by ViewVC 1.1.22