read my data in wmsread

조회 수: 3 (최근 30일)
Victor Ebolo
Victor Ebolo 2023년 8월 24일
댓글: Voss 2023년 8월 25일
clear;close all; clc
Tink_wms='https://nrt.cmems-du.eu/thredds/wms/global-analysis-forecast-bio-001-028-daily?request=GetCapabilities&service=WMS'
WMSinfo=wmsinfo(Tink_wms)
WMSinfo.LayerNames
WMSinfo.Layer(1).Abstract
%definir la variable
variable= WMSinfo.LayerNames(1)
%Define the parameters of the plot
date='2021-03-10T00:00:00.000Z';
lonlim=[-180:180];
latlim= [50:90];
style= 'boxfill/alg'
%read data corresponding to the parameters
[A,R]=wmsread(variable,'Time',date,'Stylename',style,'latlim',latlim,'lonlim',lonlim);
%plot data
figure(1)
gcolor [1 1 1 ] %grid in white
landcolor=[204 204 204]/255 %land in grey
axe=axems('egaazim',...
....,'Origin',[90 0 0],'MapLatLim',[50 90],...
....,'grid','on','Gcolor',gcolor)................%select the view and the grid
axis off
geoshow(A,B) %plot ice thickness
land= shaperead ('landareas','UseGeoCoords',true) %plot coastlines
geoshow(land,'FaceColor',landcolor) %plot land
title('inpunt the title') %titre
date='2021-08-10T00:00:00.000z';
I don't know how to limit the study area only for the golf of guinea. lneed help for the modification of the coordinates
lonlim=[-180:180];
latlim= [50:90];
style= 'boxfill/alg'
I would like to represent the distribution of ph in the Gulf of Guinea. at line 17 of my code there is a bug. please I would like you to help me to correct this and also to limit my study area at the level of the golf of guinea thank you in advance
%read data corresponding to the parameters
[A,B]=wmsread(variable,'Time',date,'Stylename',style,'latlim',latlim,'lonlim',lonlim); %my problem starts at this line
%plot data
figure(2)
figure(1)
gcolor[1 1 1 ] %grid in white
landcolor=[204 204 204]/255 %land in grey
axe=axems('egaazim',...
....,'Origin',[90 0 0],'MapLatLim',[50 90],...
....,'grid','on','Gcolor',gcolor)................%select the view and the grid
axis off
geoshow(A,B) %plot ice thickness
land= shaperead ('landareas','UseGeoCoords',true) %plot coastlines
geoshow(land,'FaceColor',landcolor) %plot land
title('inpunt the title') %titre

채택된 답변

Voss
Voss 2023년 8월 24일
clear;close all; clc
Tink_wms='https://nrt.cmems-du.eu/thredds/wms/global-analysis-forecast-bio-001-028-daily?request=GetCapabilities&service=WMS'
Tink_wms = 'https://nrt.cmems-du.eu/thredds/wms/global-analysis-forecast-bio-001-028-daily?request=GetCapabilities&service=WMS'
WMSinfo=wmsinfo(Tink_wms)
WMSinfo =
WMSCapabilities Properties: ServerTitle: 'CMEMS DU' ServerURL: 'https://nrt.cmems-du.eu/thredds/wms/global-analysis-forecast-bio-001-028-daily?request=GetCapabilities&service=WMS' ServiceName: 'WMS' Version: '1.3.0' Abstract: 'Scientific Data' OnlineResource: '' ContactInformation: [1x1 struct] AccessConstraints: 'none' Fees: 'no conditions apply' KeywordList: {6x1 cell} ImageFormats: {5x1 cell} LayerNames: {12x1 cell} Layer: [12x1 WMSLayer] AccessDate: '24-Aug-2023' Methods
ph_idx = find(strcmpi(WMSinfo.LayerNames,'ph'));
WMSinfo.Layer(ph_idx).Abstract
ans = 'PH'
%Define the parameters of the plot
% date = '2021-03-10T00:00:00.000Z';
lonlim = [-10 10];
latlim = [-10 10];
style = 'boxfill/alg';
%read data corresponding to the parameters
[A,R] = wmsread(WMSinfo.Layer(ph_idx),'StyleName',style,'latlim',latlim,'lonlim',lonlim);
%plot data
figure
ax = axesm('eqaazim','MapLatLimit',latlim,'FlatLimit',[],'MapLonLimit',lonlim);
Warning: Ignoring the value provided for 'MapLonLimit'. If you are trying to use the 'MapLonLimit' property to initialize the equatorial aspect of an azimuthal projection, you should precede it with 'FLatLimit',[] in your call to AXESM.
geoshow(ax,A,R)
landcolor=[204 204 204]/255; %land in grey
land = shaperead ('landareas','UseGeoCoords',true); %plot coastlines
geoshow(land,'FaceColor',landcolor) %plot land
  댓글 수: 2
Victor Ebolo
Victor Ebolo 2023년 8월 25일
thank you
Voss
Voss 2023년 8월 25일
You're welcome!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by