How can I increase coastal resolution with M_map?
22 views (last 30 days)
Show older comments
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 Comment
Answers (1)
Aleksei
on 9 Dec 2022
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
0 Comments
See Also
Categories
Find more on Coastal Engineering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!