Problem

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
ThanosG
Posts: 14
Joined: Mon May 27, 2013 11:02 pm

Problem

#1 Unread post by ThanosG »

Hi,

I am trying to run easygrid.m and I get:

??? Undefined function or method 'spheriq_dist' for input arguments of
type 'double'.

Error in ==> easygrid at 167
latdist = spheriq_dist(lon,lat,lon,lat+1); % Length (in meters) of 1
degree of latitude

All routines are in the matlab path. When I replace the values in the place of variables, like:

latdist=spheric_dist(-62.8855,44.8125,-62.8855,45.8125); instead of
latdist = spheriq_dist(lon,lat,lon,lat+1);

it works fine. Otherwise I get the aforementioned error.

Anyone faced the same problem?

Thanks in advance,
Thanos

ymamoutos
Posts: 71
Joined: Fri Nov 19, 2010 2:33 pm
Location: University of Aegean

Re: Problem

#2 Unread post by ymamoutos »

Greetings,

you can use geodesic_dist.m script
which is located in ROMS/matlab/utility
folder. It's the same with the old
spheric_dist.m plus it gives you the
term galpha which is the Geodesic
azimuth from point 1 to point 2 clockwise
from North in decimal degrees. To be honest
I am using seagrid.

Giannis

ThanosG
Posts: 14
Joined: Mon May 27, 2013 11:02 pm

Re: Problem

#3 Unread post by ThanosG »

Thanks Giannis,

I appreciate it! I am also focusing on using seagrid, but I am facing some problems, probably with the Netcdf routines. Do you also have any experience with Roms_tools on the grid/forcing files creation?

Best,
Thanos

ymamoutos
Posts: 71
Joined: Fri Nov 19, 2010 2:33 pm
Location: University of Aegean

Re: Problem

#4 Unread post by ymamoutos »

Hi Thanos,

I have never used Roms_tools for grid and forcing files.
I am using the last 2.5 years the matlab routines that
are provided through the svn repository. If you download
the latest version of Rutgers ROMS matlab tools I am sure
that you are not going to have any problems with the netcdf
routines because this version uses the matlab (2012+) native netcdf
interface. There is a possibility to have some problems when
you try to create the mex files that seagrid requires. Check it
out. If you have any problem I am sure that you will find plenty
of help in the forum (including me).

Wish you a pleasant evening.

Giannis

piyalicms

Re: Problem

#5 Unread post by piyalicms »

Hi All,

Even I am trying to run easygrid but unfortunately I am getting this error message:

"Undefined function 'spheriq_dist' for input arguments of type 'double'.

Error in easygrid (line 166)
latdist = spheriq_dist(-62.8855,44.8125,-62.8855,45.8125); % Length (in meters) of 1 degree of latitude"

I see that Thanos has replaced the variables with the data and could run easygrid that way, but it does not work for me. Can anyone suggest why is this happening or is there any other script to create grids?

Thanks in advance!

Piyali

hodamahyar
Posts: 16
Joined: Wed Jan 11, 2017 3:25 pm
Location: k.n.toosi University of Technology

Re: Problem

#6 Unread post by hodamahyar »

hello. how can i change the longitude and latitude of easygrid plot?

Post Reply