Tidal forcing file

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
rgon
Posts: 12
Joined: Thu Jan 29, 2009 4:00 pm
Location: University of Plymouth

Tidal forcing file

#1 Unread post by rgon »

Hello,
I've got the tidal constituents (surface elevations and tidal ellipses) from the OTPS software, in order to setup the tidal forcing file.nc, and following the forum instructions, I am a bit confused. I downloaded the otps2frc_v3.m Matlab files from http://marine.rutgers.edu/~hunter/roms/tides/otps/ and now my questions is How to construct the tidal file.nc if I already have the tidal constituents, ellipses and the grid.nc file?
Moreover, in \roms\trunk\Data\ROMS\CDL there are some templates of the netcdf formats required for ROMS, Q: How to add my tidal information to these netcdf format (i.e. frc_tides.cdl)?

Regards.
Raúl

ocecept
Posts: 42
Joined: Tue Jan 08, 2008 3:57 pm
Location: Universidade Federal do Ceará
Contact:

Re: Tidal forcing file

#2 Unread post by ocecept »

Hi Raul;

Have you read the information at https://www.myroms.org/wiki/index.php/Tidal_Forcing?

I had followed it when creating my tidal forcing with no big problems.

Cheers;

Carlos Teixeira

rgon
Posts: 12
Joined: Thu Jan 29, 2009 4:00 pm
Location: University of Plymouth

Re: Tidal forcing file

#3 Unread post by rgon »

Hi,
I've done all the instructions of https://www.myroms.org/wiki/index.php/Tidal_Forcing and my comments are as follow:

1. I had to compile the extract_HC file on linux-fortran becuase the OTIS format is in big_endian binary, recorded in bytes on a UNIX system. -> make extract_HC (adding: -convert big_endian -assume byterecl to the make file)

2. When typing: extract_HC<setup.inp three files (tmpz,tmpu,tmpv) are produced with data from the OTIS model. I couldn't do this step in matlab using otps2frc_v3.m ([s,w]=unix('extract_HC<otps_input')) because the error is: w = Program too big to fit in memory , thus I had to comment out this step on matlab.

3. I am using matlab to produce my tidal forcing file in netcdf. When compiling the otps2frc_v3.m file the following error is shown:
Gridfile wh_grd.nc lat/lon written to ./ll.dat
Mode parameter file used: ...\DATA\Model_ES2008
Reading tmpz...
Reading tmpu...
Reading tmpv...
??? Error using ==> netcdflib
Variable ID retrieval failed, library error message "NetCDF: Variable not found"

Error in ==> inqVarID at 21
varid = netcdflib('inq_varid', ncid, varname);

Error in ==> nc_varget_tmw at 4
varid=netcdf.inqVarid(ncid,varname);

Error in ==> nc_varget at 71
data = nc_varget_tmw(ncfile,varname,start,count,stride);

Error in ==> roms_get_grid at 53
tmp = nc_varget(grd_file,vname);

Error in ==> otps2frc_v3 at 127
rg = roms_get_grid ( gfile );


Any guess of how to sort this problem out? All I want is the tidal forcing file.
Regards.

Post Reply