Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
constrain map domain

Subject: constrain map domain

From: Jonathan W Smith

Date: 4 Jun, 2013 13:04:08

Message: 1 of 1

Hello: I have the script below which opens up netcdf files and plots the O3_MR onto a world map. I would like to plot the data on a map from 40 W to 40 E and 40 S to 40 N as opposed to a World Map. How can constrain the map domain with the code below. The variables LON and LAT in the scatter function are part of the data output and have nothing to do with the map.Thanks

clear all

iasi_files = {'IASI_L02_M02_V090609_20100517114459Z_20100517114754Z.nc','IASI_L02_M02_V090609_20100522112954Z_20100522113257Z.nc'};


varNames = {'Latitude','Longitude','Pressure','O3_MR'};


for i = 1:numel(iasi_files);

        fileName = iasi_files{i};


        LAT{i} = ncread(fileName,varNames{1});

        LON{i} = ncread(fileName,varNames{2});

        P{i} = ncread(fileName,varNames{3});

        ozone{i} = ncread(fileName,varNames{4});

        figure

        load coast

        plot(long,lat,'k');

        hold on

        scatter(LON{i},LAT{i},85,ozone{i}(30,:),'filled');

        title([num2str(iasi_files{i})]);

        fig = sprintf('iasi_ozone%03d.jpeg', i);

        print(fig,'-djpeg');

end

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us