필터 지우기
필터 지우기

How can I increase coastal resolution with M_map?

조회 수: 15 (최근 30일)
Jonathan Demmer
Jonathan Demmer 2022년 3월 11일
답변: Aleksei 2022년 12월 9일
Hi all,
I am using the code provided as an example to get familair with M_map (see below). However when I ran it, an error(ish) message appeared (see below) which doesn't allowed me to have a full resolution of the coastal are. I already double checked and m_gshhs_f (and all others) are included in the folder. Can anyone help me please?
Warning: Coastline file C:\Matlab_download\m_map1.4\m_map/data/gshhs_f.b not found \n(Have you installed it? See the M_Map
User's Guide for details)\n ---Using default coastline instead
> In mu_coast>get_coasts (line 476)
In mu_coast (line 101)
In m_gshhs (line 118)
In m_gshhs_f (line 28)
In untitled (line 9)
close all
clear all
clc
% add path to TelemacTolls functions (i.e. to read in telemac files into MATLAB):
addpath ('C:\Matlab_download\m_map1.4\m_map\');
m_proj('UTM','long',[-72 -68],'lat',[40 44]);
m_gshhs_i('color','k');
m_grid('box','fancy','tickdir','in');
m_ruler(1.2,[.5 .8]);
% fake up a trackline
lons=[-71:.1:-67];
lats=60*cos((lons+115)*pi/180);
dates=datenum(1997,10,23,15,1:41,zeros(1,41));
m_track(lons,lats,dates,'ticks',0,'times',4,'dates',8,...
'clip','off','color','r','orient','upright');
m_northarrow(-68.5,43.4,.4,'type',2);
  댓글 수: 1
jorge
jorge 2022년 8월 22일
I have the same problem, and I haven't been able to fix it
Help please

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

답변 (1개)

Aleksei
Aleksei 2022년 12월 9일
The first solution I see is:
1) add folder with subfolders: addpath(genpath('C:\Matlab_download\m_map1.4\m_map\'));
your gshhs files are located in the subfolder 'data', but by addpath you add only files in the folder m_map
2) if you want your 'addpath' having permanent effect - don't forget the 'savepath' command

카테고리

Help CenterFile Exchange에서 Coastal Engineering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by