How can I increase coastal resolution with M_map?

11 vues (au cours des 30 derniers jours)
Jonathan Demmer
Jonathan Demmer le 11 Mar 2022
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 commentaire
jorge
jorge le 22 Août 2022
I have the same problem, and I haven't been able to fix it
Help please

Connectez-vous pour commenter.

Réponses (1)

Aleksei
Aleksei le 9 Déc 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

Catégories

En savoir plus sur Coastal Engineering dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by