Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Sun Dec 16, 2018 6:00 am




Post new topic Reply to topic  [ 8 posts ] 

All times are UTC

Author Message
PostPosted: Sun Jul 31, 2011 9:08 pm 
Hello everybody,

I am having a little problem using the matlab to create tidal forcing. I wonder if anyone could help me to find out how to solve this. Below you can find the error, I can create the output file, but cannot convert to netcdf.

Thanks!
Rafael


Check DATA/Model_tpxo7

*******************************************
Reading otps_harmonics_z...
Reading otps_harmonics_u...
Reading otps_harmonics_v...

iconst =

57


iconst =

57 48


iconst =

57 48 21


iconst =

57 48 21 13

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

Error in ==> t_getconsts at 167
ii=finite(const.ishallow); % diffs are in the 10th decimal place (9th sig fig).

Error in ==> t_vuf at 30
[const,sat,shallow]=t_getconsts(ctime);

Error in ==> otps2frc_v3 at 146
[V,U,F]=t_vuf(base_date,iconst,reflat);


Top
  
Reply with quote  
PostPosted: Mon Aug 01, 2011 6:43 am 
Offline
User avatar

Joined: Tue Jun 03, 2003 7:39 pm
Posts: 18
Location: NATO Undersea Research Centre
I suspect you're dealing with old code and a new MATLAB version. Try replacing
Code:
finite
with
Code:
isfinite
.

Code:
                             < M A T L A B >
                  Copyright 1984-2007 The MathWorks, Inc.
                         Version 7.5.0.338 (R2007b)
                               August 9, 2007

 
  To get started, type one of these: helpwin, helpdesk, or demo.
  For product information, visit www.mathworks.com.
 
>> finite
Warning: FINITE is obsolete and will be removed in future versions. Use
ISFINITE instead.
(Type "warning off MATLAB:FINITE:obsoleteFunction" to suppress this warning.)
??? Error using ==> finite


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 01, 2011 2:56 pm 
Offline

Joined: Mon Dec 11, 2006 6:13 pm
Posts: 9
Location: IMCS
Hello,

Yep, this error is due to an older version of the t_tide toolbox used with newer versions of MATLAB. Rich Pawlowicz has an updated version of t_tide on his website http://www.eos.ubc.ca/~rich/#T_Tide. I have posted a note on the Wikiroms tidal forcing page and the undated t_tide zip file at http://marine.rutgers.edu/~hunter/roms/tides/t_tide/t_tide_v1.3beta.zip.


Eli


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 02, 2011 2:42 am 
cvl wrote:
I suspect you're dealing with old code and a new MATLAB version. Try replacing
Code:
finite
with
Code:
isfinite
.

Code:
                             < M A T L A B >
                  Copyright 1984-2007 The MathWorks, Inc.
                         Version 7.5.0.338 (R2007b)
                               August 9, 2007

 
  To get started, type one of these: helpwin, helpdesk, or demo.
  For product information, visit www.mathworks.com.
 
>> finite
Warning: FINITE is obsolete and will be removed in future versions. Use
ISFINITE instead.
(Type "warning off MATLAB:FINITE:obsoleteFunction" to suppress this warning.)
??? Error using ==> finite


Eli,
many thanks, an error persists, I am using the newer version. I will be grateful for your help.
Rafael
iconst =

57 48 21


iconst =

57 48 21 13

??? In an assignment A(I) = B, the number of elements in B and
I must be the same.

Error in ==> t_getconsts at 168
const.freq(~ii) = (const.doodson(~ii,:)*ader)/(24);

Error in ==> t_vuf at 50
[const,sat,shallow]=t_getconsts(ctime);

Error in ==> otps2frc_v3 at 146
[V,U,F]=t_vuf(base_date,iconst,reflat);


Top
  
Reply with quote  
PostPosted: Tue Aug 02, 2011 2:39 pm 
Offline

Joined: Mon Dec 11, 2006 6:13 pm
Posts: 9
Location: IMCS
This is yet another version compatibility problem.

Newer versions of t_vuf in the t_tide toolbox require another input variable.

e.g.

[V,U,F]=t_vuf(base_date,iconst,reflat);

becomes

[V,U,F]=t_vuf('nodal',base_date,iconst,reflat);


I put an updated version of otps2frc*.m on:

http://marine.rutgers.edu/~hunter/roms/ ... s2frc_v4.m

Eli


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 03, 2011 1:57 am 
elhunter wrote:
This is yet another version compatibility problem.

Newer versions of t_vuf in the t_tide toolbox require another input variable.

e.g.

[V,U,F]=t_vuf(base_date,iconst,reflat);

becomes

[V,U,F]=t_vuf('nodal',base_date,iconst,reflat);


I put an updated version of otps2frc*.m on:

http://marine.rutgers.edu/~hunter/roms/ ... s2frc_v4.m

Eli


Eli, I am most grateful- it worked. On a side note, would you be kind to tell me what is it that you would write when prompt by the program to the following:
Enter domain name for NetCDf attribute:

Thanks!
Rafael


Top
  
Reply with quote  
PostPosted: Wed Aug 03, 2011 11:16 am 
Offline

Joined: Mon Dec 11, 2006 6:13 pm
Posts: 9
Location: IMCS
Hi Rafael,

The domain name is just a string describing your grid domain. It ends up as an attribute in the NetCDF file.


Eli


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 09, 2011 4:12 am 
Eli et al.
I come back with a question. The tidal forcing is not working properly for me right now, so I wonder if I am doing something wrong. I need to simulate 5 days from september 1 2006 to september 6, so I put the the following commands in the matlab:

t=datenum(2006,9,1);
tpred=datenum(2006,9,6);
base_dir='/home/rpacheco/SRC/MyTest/cdw/Data/';
gfile=[base_dir,'roms_grdJul2011_nolandmask.nc'];
tideout=[base_dir,'roms_tides_frc_nolandmaskRP.nc'];
otps2frc_v4(gfile,t,tpred,tideout,'DATA/Model_tpxo7')

I get the frc nc file, but I wonder if the datenum t and tpred are correctly set for my simulation

I am most grateful.
Rafael


Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group