Back to home page

MITgcm

 
 

    


Warning, /utils/matlab/ocean_basin/mk_basin.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 127047c0 on 2017-02-07 17:02:10 UTC
127047c0ca Dimi*0001 % construct a 1x1 degree file containing ocean basin information
                0002 % 0: Land
                0003 % 1: Pacific
                0004 % 2: Atlantic
                0005 % 3: Indian
                0006 % 4: Southern
                0007 % 5: Arctic
                0008 % 6: Mediterranean
                0009 % 7: Sea of Japan
                0010 % 8: Other
                0011 
                0012 clear all, clf reset
                0013 cd /hosts/triton/dm1/dimitri/matlab/plotfun/ocean_basin
                0014 
                0015 load topo
                0016 lon=.5:359.5;
                0017 lat=-89.5:89.5;
                0018 [X Y]=meshgrid(lon,lat);
                0019 basin=topo;
                0020 clear t*
                0021 
                0022 % Land
                0023 basin(find(basin<=0))=-1;
                0024 basin(find(basin>0))=0;
                0025 
                0026 % Southern
                0027 ix=find(Y<-35&basin==-1);
                0028 basin(ix)=4;
                0029 ix=find(X>119&X<137&Y>-35&Y<-32&basin==-1);
                0030 basin(ix)=4;
                0031 
                0032 % Arctic
                0033 ix=find(Y>66&basin==-1);
                0034 basin(ix)=5;
                0035 ix=find(X>35&X<40&Y>64&Y<66&basin==-1);
                0036 basin(ix)=5;
                0037 
                0038 % Atlantic
                0039 ix=find(X>277&X<309&Y>66&Y<79&basin==5);
                0040 basin(ix)=2;
                0041 ix=find(X>262&basin==-1);
                0042 basin(ix)=2;
                0043 ix=find(X<25&Y>50&basin==-1);
                0044 basin(ix)=2;
                0045 ix=find(X<20&Y<10&basin==-1);
                0046 basin(ix)=2;
                0047 
                0048 % Pacific
                0049 ix=find(X>142&basin==-1);
                0050 basin(ix)=1;
                0051 ix=find(X==280.5&Y==8.5);
                0052 basin(ix)=0;
                0053 ix=find(X<290&X>90&Y<9&basin==2);
                0054 basin(ix)=1;
                0055 ix=find(X<275&X>90&Y<16&basin==2);
                0056 basin(ix)=1;
                0057 ix=find(X>99&Y>-8&basin==-1);
                0058 basin(ix)=1;
                0059 
                0060 % Indian
                0061 ix=find(X>22&Y<30&basin==-1);
                0062 basin(ix)=3;
                0063 ix=find(X==137.5&Y==-28.5);
                0064 basin(ix)=8;
                0065 ix=find(X>22&X<102&Y<7&basin==1);
                0066 basin(ix)=3;
                0067 ix=find(X>22&X<107&Y<-6&basin==1);
                0068 basin(ix)=3;
                0069 ix=find(X>22&X<104&Y<-4&basin==1);
                0070 basin(ix)=3;
                0071 
                0072 % Mediterranean
                0073 ix=find(X>355&Y<38&Y>35&basin==2);
                0074 basin(ix)=6;
                0075 ix=find(X<42&Y<47&basin==-1);
                0076 basin(ix)=6;
                0077 ix=find(X==27.5&Y==29.5);
                0078 basin(ix)=8;
                0079 
                0080 % Sea of Japan
                0081 ix=find(X<142&X>120&Y>43&Y<52&basin==1);
                0082 basin(ix)=7;
                0083 ix=find(X<140&X>128&Y>35&Y<52&basin==1);
                0084 basin(ix)=7;
                0085 
                0086 % Other
                0087 ix=find(basin==-1);
                0088 basin(ix)=8;
                0089 
                0090 % Separate Southern Ocean into Pacific
                0091 % Atlantic, and Indian Ocean Sectors
                0092 ix=find((X<20|X>293|(X>291&Y>-68)|(X==292.5&Y==-79.5))&basin==4);
                0093 basin(ix)=4.02;
                0094 ix=find(X<146&basin==4);
                0095 basin(ix)=4.03;
                0096 ix=find(basin==4);
                0097 basin(ix)=4.01;
                0098 
                0099 mypcolor(lon,lat,basin);
                0100 % $$$ caxis([3.9 4.04])
                0101 caxis([6 8])
                0102 grid
                0103 
                0104 save basin lon lat basin