<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>#climatedata &#187; Tag: Matlab - Recent Posts</title>
		<link>http://climatedata.blprnt.com/tags/matlab</link>
		<description>Data Visualization &amp; Climate Reality</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Feb 2012 03:21:14 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://climatedata.blprnt.com/search.php</link>
		</textInput>
		<atom:link href="http://climatedata.blprnt.com/rss/tags/matlab" rel="self" type="application/rss+xml" />

		<item>
			<title>Arenamontanus on "Matlab"</title>
			<link>http://climatedata.blprnt.com/topic/matlab#post-53</link>
			<pubDate>Wed, 16 Dec 2009 13:08:02 +0000</pubDate>
			<dc:creator>Arenamontanus</dc:creator>
			<guid isPermaLink="false">53@http://climatedata.blprnt.com/</guid>
			<description>&#60;p&#62;Great idea to run them as animations, I have to try that out. &#60;/p&#62;
&#60;p&#62;I just finished the overall analysis to my own satisfaction, placing it on &#60;a href=&#34;http://www.aleph.se/andart/archives/2009/12/significant_anomalies.html&#34; rel=&#34;nofollow&#34;&#62;http://www.aleph.se/andart/archives/2009/12/significant_anomalies.html&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Pictures at&#60;br /&#62;
&#60;a href=&#34;http://www.flickr.com/photos/arenamontanus/4186189678/&#34; rel=&#34;nofollow&#34;&#62;http://www.flickr.com/photos/arenamontanus/4186189678/&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://www.flickr.com/photos/arenamontanus/4189456021/&#34; rel=&#34;nofollow&#34;&#62;http://www.flickr.com/photos/arenamontanus/4189456021/&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://www.flickr.com/photos/arenamontanus/4189455889/&#34; rel=&#34;nofollow&#34;&#62;http://www.flickr.com/photos/arenamontanus/4189455889/&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://www.flickr.com/photos/arenamontanus/4189456149/&#34; rel=&#34;nofollow&#34;&#62;http://www.flickr.com/photos/arenamontanus/4189456149/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Overall, Matlab is great for doing calculations and statistics but lousy for actual visualisations. It shouldn't be cumbersome to make a simple colorbar scale showing the right scale, but it is.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>blprnt on "Matlab"</title>
			<link>http://climatedata.blprnt.com/topic/matlab#post-50</link>
			<pubDate>Wed, 16 Dec 2009 04:51:33 +0000</pubDate>
			<dc:creator>blprnt</dc:creator>
			<guid isPermaLink="false">50@http://climatedata.blprnt.com/</guid>
			<description>&#60;p&#62;Very nice. This series is very effective:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.flickr.com/photos/arenamontanus/4182402460/&#34; title=&#34;Suntar by Arenamontanus, on Flickr&#34;&#62;&#60;img src=&#34;http://farm3.static.flickr.com/2780/4182402460_1acf7a245c.jpg&#34; alt=&#34;Suntar&#34; /&#62;&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I'd like to see these as animations - I'd also like to see the boundary lines smoothed out a little bit...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Arenamontanus on "Matlab"</title>
			<link>http://climatedata.blprnt.com/topic/matlab#post-45</link>
			<pubDate>Mon, 14 Dec 2009 00:36:11 +0000</pubDate>
			<dc:creator>Arenamontanus</dc:creator>
			<guid isPermaLink="false">45@http://climatedata.blprnt.com/</guid>
			<description>&#60;p&#62;I have placed some of the resulting visualisations in &#60;a href=&#34;http://www.flickr.com/photos/arenamontanus/sets/72157622868634041/&#34; rel=&#34;nofollow&#34;&#62;http://www.flickr.com/photos/arenamontanus/sets/72157622868634041/&#60;/a&#62; (and of course the Flickr group).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Arenamontanus on "Matlab"</title>
			<link>http://climatedata.blprnt.com/topic/matlab#post-44</link>
			<pubDate>Sun, 13 Dec 2009 22:12:18 +0000</pubDate>
			<dc:creator>Arenamontanus</dc:creator>
			<guid isPermaLink="false">44@http://climatedata.blprnt.com/</guid>
			<description>&#60;p&#62;I wrote a little script to read the data into Matlab for further processing. Nothing particularly clever, mainly a bit of file management and string processing to extract data and convert it into arrays. Some basic visualisations can be done.&#60;br /&#62;
 Right now it just deals with each station separately, but the next step involves merging the data in various ways. &#60;/p&#62;
&#60;p&#62;Not sure if it works in Octave.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
% Matlab code to load Land surface climate station records&#60;br /&#62;
% Assumes the data is unzipped into a subdirectory named Data.&#60;br /&#62;
% Iterates through the subfolders, loading the data station by station&#60;br /&#62;
%&#60;br /&#62;
% Anders Sandberg&#60;br /&#62;
subdirs=dir('Data');&#60;br /&#62;
files={};&#60;/p&#62;
&#60;p&#62;llong=[];&#60;br /&#62;
llat=[];&#60;br /&#62;
hheight=[];&#60;/p&#62;
&#60;p&#62;for i=1:length(subdirs)&#60;br /&#62;
    if (subdirs(i).name(1)~='.')&#60;br /&#62;
        datafiles=dir(strcat('Data/',char(subdirs(i).name)));&#60;br /&#62;
        for j=1:length(datafiles)&#60;br /&#62;
            if (datafiles(j).name(1)~='.')&#60;br /&#62;
                filename = strcat('Data/',char(subdirs(i).name),'/',char(datafiles(j).name));&#60;/p&#62;
&#60;p&#62;                fid=fopen(filename,'r');&#60;br /&#62;
                %tline = fgetl(fid);&#60;br /&#62;
                %sscanf(tline,'%d'),&#60;/p&#62;
&#60;p&#62;                while (1)&#60;br /&#62;
                    tline = fgetl(fid);&#60;br /&#62;
                    if (strcmp(tline,'Obs:')) break; end&#60;br /&#62;
                    C=textscan(tline,'%s%s', 1,'Delimiter','=');&#60;br /&#62;
                    if (strcmp(C{1},'Number')) id=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Name')) name=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Country')) country=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Lat')) lat=C{2}; lat=str2num(lat{1}); end&#60;br /&#62;
                    if (strcmp(C{1},'Long')) long=C{2}; long=str2num(long{1}); end&#60;br /&#62;
                    if (strcmp(C{1},'Height')) height=C{2}; height=str2num(height{1}); end&#60;br /&#62;
                    if (strcmp(C{1},'Start year')) startyear=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'End year')) stopyear=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'First Good year')) goodyear=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Source ID')) sourceid=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Source file')) sourcefile=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Normals source')) normalsource=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Normals source start year')) normalstart=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Normals source end year')) normalend=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Normals')) normals=C{2}; nromals=str2num(normals{1}); end&#60;br /&#62;
                    if (strcmp(C{1},'Standard deviations source')) stdsource=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Standard deviations source start year')) stdstart=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Standard deviations source end year')) stdend=C{2}; end&#60;br /&#62;
                    if (strcmp(C{1},'Standard deviations')) stds=C{2}; stds=str2num(stds{1}); end&#60;br /&#62;
                end&#60;/p&#62;
&#60;p&#62;                data=textscan(fid,'%d%f%f%f%f%f%f%f%f%f%f%f%f');&#60;/p&#62;
&#60;p&#62;                % Vector of years for this station&#60;br /&#62;
                year=double(data{1});&#60;br /&#62;
                % Matrix of temp data&#60;br /&#62;
                bdata=[data{2} data{3} data{4} data{5} data{6} data{7} data{8} data{9} data{10} data{11} data{12} data{13}];&#60;br /&#62;
                % Vector of temp data&#60;br /&#62;
                sdata=bdata'; sdata=sdata(:);&#60;br /&#62;
                % Vectors of months and years&#60;br /&#62;
                smonth=repmat(1:12,1,length(year));&#60;br /&#62;
                syear=[]; for k=1:length(year); syear=[syear ones(1,12)*year(k)]; end&#60;/p&#62;
&#60;p&#62;                N=length(sdata);&#60;/p&#62;
&#60;p&#62;                % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%VISUALISATIONS&#60;br /&#62;
                % Comment/uncomment as needed&#60;/p&#62;
&#60;p&#62;                % Remove nonexistent data&#60;br /&#62;
                sdata(find(sdata&#38;lt;-98))=NaN;&#60;/p&#62;
&#60;p&#62;                % plot full data serially&#60;br /&#62;
                %plot(syear+(smonth-1)/12, sdata)&#60;/p&#62;
&#60;p&#62;                % plot year cycle&#60;br /&#62;
                %plot(sdata(1:(N-3)),sdata(4:N))&#60;/p&#62;
&#60;p&#62;%              % Plot colored year cycle&#60;br /&#62;
%                 clf&#60;br /&#62;
%                 hold on&#60;br /&#62;
%                 for ii=1:(N-4)&#60;br /&#62;
%                     co=ii*[1 1 1]/N;&#60;br /&#62;
%                     plot([sdata(ii) sdata(ii+1)],[sdata(ii+3) sdata(ii+4)],'LineWidth',2,'Color',co);&#60;br /&#62;
%                 end&#60;br /&#62;
%                 set(gca,'Color',[153 136 85]/255)&#60;br /&#62;
%                 xlabel('T(t)')&#60;br /&#62;
%                 ylabel('T(t+3)')&#60;br /&#62;
%                 V=axis;&#60;br /&#62;
%                 title(strcat(char(name),' / ',char(country)),'FontSize',20)&#60;br /&#62;
%                &#60;/p&#62;
&#60;p&#62;                % make map&#60;br /&#62;
                %if (height&#38;lt;-100) height=0; end; % remove missing heights&#60;br /&#62;
                %plot3(long,lat,height,'.')&#60;br /&#62;
                %text(long,lat,height,strcat(name,' ',country));&#60;/p&#62;
&#60;p&#62;                % plot monthly deviation from mean temperature&#60;br /&#62;
                %mm=mean(sdata(find(~isnan(sdata))));&#60;br /&#62;
                %plot(syear+(smonth-1)/12, sdata-mm);&#60;/p&#62;
&#60;p&#62;                % Plot a polar diagram of temperatures&#60;br /&#62;
                clf&#60;br /&#62;
                hold on&#60;br /&#62;
                singleplot=0; % single color or multicolor&#60;br /&#62;
                mi=-50;&#60;br /&#62;
                ma=50;&#60;br /&#62;
                % Draw background lines&#60;br /&#62;
                theta=2*pi*(0:100)/100;&#60;br /&#62;
                for r=-30:10:30&#60;br /&#62;
                    R=0.1+0.9*(r - mi)/(ma-mi);&#60;br /&#62;
                    if (R&#38;gt;0)&#60;br /&#62;
                        plot(R.*cos(theta),R.*sin(theta),'k','Color',[0.7 0.7 0.7])&#60;br /&#62;
                        text(R+.025,0+.025,num2str(r),'FontSize',8)&#60;br /&#62;
                    end&#60;br /&#62;
                end&#60;br /&#62;
                monthname=['Jan';'Feb';'Mar';'Apr';'May';'Jun';'Jul';'Aug';'Sep';'Oct';'Nov';'Dec'];&#60;br /&#62;
                for mo=1:12&#60;br /&#62;
                    tm=-2*pi*(mo-1)/12;&#60;br /&#62;
                    plot([0 Rm*cos(tm)],[0 Rm*sin(tm)],'k','Color',[0.7 0.7 0.7]);&#60;br /&#62;
                    text(1.05*Rm*cos(tm),1.05*Rm*sin(tm),monthname(mo,:),'HorizontalAlignment','center');&#60;br /&#62;
                end&#60;br /&#62;
                theta=-(2*pi*(smonth-1)/12)';&#60;br /&#62;
                R=0.1+0.9*(sdata - mi)/(ma-mi);&#60;br /&#62;
                Rm=1;&#60;br /&#62;
                if (singleplot==1)&#60;br /&#62;
                    plot(R.*cos(theta),R.*sin(theta))&#60;br /&#62;
                else&#60;br /&#62;
                    for ii=1:(N-1)&#60;br /&#62;
                        co=ii*[1 1 1]/N;&#60;br /&#62;
                        plot([R(ii)*cos(theta(ii)) R(ii+1)*cos(theta(ii+1))],[R(ii)*sin(theta(ii)) R(ii+1)*sin(theta(ii+1))],'Color',co,'LineWidth',2);&#60;br /&#62;
                    end&#60;br /&#62;
                end&#60;br /&#62;
                axis([-1.1 1.1 -1.1 1.1])&#60;br /&#62;
                axis square&#60;br /&#62;
                axis off&#60;br /&#62;
                title(strcat(char(name),' / ',char(country)),'FontSize',20)&#60;/p&#62;
&#60;p&#62;                % Make unreliable mean year plot&#60;br /&#62;
                % bdata(find(bdata&#38;lt;-98))=NaN;&#60;br /&#62;
                % plot(year, mean(bdata'))&#60;/p&#62;
&#60;p&#62;                drawnow&#60;br /&#62;
                pause&#60;/p&#62;
&#60;p&#62;                %%%%%%%%%%%%%%%%%%%%%%%%%&#60;br /&#62;
                % Collect data across stations&#60;br /&#62;
                llong=[llong long];&#60;br /&#62;
                llat=[llat lat];&#60;br /&#62;
                hheight=[hheight height];&#60;/p&#62;
&#60;p&#62;                fclose(fid);&#60;br /&#62;
            end&#60;br /&#62;
        end&#60;br /&#62;
    end&#60;br /&#62;
end&#60;br /&#62;
&#60;/code&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>

