I'm trying to use the AVERAGES_DETIDE option, but I got the following error in the first time-step.
DEF_VAR - unable to define variable: CosWCosW
in NetCDF file: tides_extended_gulfs_grd.nc
ROMS/TOMS - Output NetCDF summary for Grid 01:
ROMS/TOMS - Output error ............ exit_flag: 3
ERROR: Abnormal termination: NetCDF OUTPUT.
REASON: NetCDF: NC_UNLIMITED in the wrong index
I concluded that the model is not been able to create/write the CosWCosW variable in my forcing file, but I'm not sure why!
My tidal forcing file is not write protected and I have two forcing (one for atmospheric and one for tides) files as recommended by Arango in this post viewtopic.php?f=17&t=855&hilit=detide
Any suggestions?
Thanks in advance;
Carlos
Problems with AVERAGES_DETIDE
Re: Problems with AVERAGES_DETIDE
Carlos,
If you're getting an error message about NC_UNLIMITED that makes me suspect the way you have set the dimensions of the tide variables.
ncdump -h your file and show us how you have defined variables.
Note that there are CDL templates for all netcdf files in the ./Data/ROMS/CDL folder in the standard source code.
John.
If you're getting an error message about NC_UNLIMITED that makes me suspect the way you have set the dimensions of the tide variables.
ncdump -h your file and show us how you have defined variables.
Note that there are CDL templates for all netcdf files in the ./Data/ROMS/CDL folder in the standard source code.
John.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: Problems with AVERAGES_DETIDE
Hi John;
Thanks for your replay. That's the problem that I told you about in the ROMS workshop at Sydney.
I used the Matlab routines found in http://marine.rutgers.edu/~hunter/roms/tides/otps/ to create my tidal forcing.
That's the details of the forcing file.
netcdf tides_extended_gulfs_grd {
dimensions:
two = 2 ;
eta_rho = 154 ;
xi_rho = 190 ;
tide_period = UNLIMITED ; // (4 currently)
variables:
double lat_rho(eta_rho, xi_rho) ;
lat_rho:long_name = "latitude of RHO-points" ;
lat_rho:units = "degree_north" ;
lat_rho:field = "lat_rho, scalar" ;
double lon_rho(eta_rho, xi_rho) ;
lon_rho:long_name = "longitude of RHO-points" ;
lon_rho:units = "degree_east" ;
lon_rho:field = "lon_rho, scalar" ;
double mask_rho(eta_rho, xi_rho) ;
mask_rho:long_name = "mask on RHO-points" ;
mask_rho:option_0 = "land" ;
mask_rho:option_1 = "water" ;
double tide_period(tide_period) ;
tide_period:long_name = "tide angular period" ;
tide_period:units = "hours" ;
tide_period:field = "tide_period, scalar, series" ;
double tide_Ephase(tide_period, eta_rho, xi_rho) ;
tide_Ephase:long_name = "tidal elevation phase angle" ;
tide_Ephase:units = "degrees, time of maximum elevation with respect to chosen time origin" ;
tide_Ephase:field = "tide_Ephase, scalar, series" ;
double tide_Eamp(tide_period, eta_rho, xi_rho) ;
tide_Eamp:long_name = "tidal elevation amplitude" ;
tide_Eamp:units = "meter" ;
tide_Eamp:field = "tide_Eamp, scalar, series" ;
double tide_Cphase(tide_period, eta_rho, xi_rho) ;
tide_Cphase:long_name = "tidal current phase angle" ;
tide_Cphase:units = "degrees, time of maximum velocity with respect chosen time origin" ;
tide_Cphase:field = "tide_Cphase, scalar" ;
double tide_Cangle(tide_period, eta_rho, xi_rho) ;
tide_Cangle:long_name = "tidal current inclination angle" ;
tide_Cangle:units = "degrees between semi-major axis and East" ;
tide_Cangle:field = "tide_Cangle, scalar" ;
double tide_Cmin(tide_period, eta_rho, xi_rho) ;
tide_Cmin:long_name = "minimum tidal current, ellipse semi-minor axis" ;
tide_Cmin:units = "meter second-1" ;
tide_Cmin:field = "tide_Cmin, scalar" ;
double tide_Cmax(tide_period, eta_rho, xi_rho) ;
tide_Cmax:long_name = "maximum tidal current, ellipse semi-major axis" ;
tide_Cmax:units = "meter second-1" ;
tide_Cmax:field = "tide_Cmax, scalar" ;
char tidal_constituents(tide_period, two) ;
tidal_constituents:long_name = "Tidal Constituent Names" ;
// global attributes:
:type = "ROMS Forcing File" ;
:title = "Forcing for domain" ;
:base_date = "days since 2008-01-01 00:00:00" ;
:grid_file = "extended_gulfs_grd.nc" ;
:source = "OTPS" ;
:source_url = "http://www.coas.oregonstate.edu/researc ... egion.html" ;
:history = "16-Sep-2008 18:36:27: Created by jffm with write_roms_otps_ncfile.\n",
"" ;
:comment = "Inputs for OTPS executable \"extract_HC\" created with m-file roms2ll.m using the grid file as input./home/jffm/USER1/otps/data/Model_tpxo7.1 was used as the OTPS regional model. " ;
:tidal_constituents = "s2, m2, k1, o1" ;
Now I can see the problem, the "tide_period" dimension was defined as UNLIMITED. I change that for 4. I also had to add the xi_u; eta_u; xi_v and eta_v dimensions in the forcing file to make the option AVERAGES_DETIDE work.
The CDL templates were very useful. I didn't know about it.
Thanks a lot. Now I don't need to use Matlab to detide my results!
Cheers;
Carlos
Thanks for your replay. That's the problem that I told you about in the ROMS workshop at Sydney.
I used the Matlab routines found in http://marine.rutgers.edu/~hunter/roms/tides/otps/ to create my tidal forcing.
That's the details of the forcing file.
netcdf tides_extended_gulfs_grd {
dimensions:
two = 2 ;
eta_rho = 154 ;
xi_rho = 190 ;
tide_period = UNLIMITED ; // (4 currently)
variables:
double lat_rho(eta_rho, xi_rho) ;
lat_rho:long_name = "latitude of RHO-points" ;
lat_rho:units = "degree_north" ;
lat_rho:field = "lat_rho, scalar" ;
double lon_rho(eta_rho, xi_rho) ;
lon_rho:long_name = "longitude of RHO-points" ;
lon_rho:units = "degree_east" ;
lon_rho:field = "lon_rho, scalar" ;
double mask_rho(eta_rho, xi_rho) ;
mask_rho:long_name = "mask on RHO-points" ;
mask_rho:option_0 = "land" ;
mask_rho:option_1 = "water" ;
double tide_period(tide_period) ;
tide_period:long_name = "tide angular period" ;
tide_period:units = "hours" ;
tide_period:field = "tide_period, scalar, series" ;
double tide_Ephase(tide_period, eta_rho, xi_rho) ;
tide_Ephase:long_name = "tidal elevation phase angle" ;
tide_Ephase:units = "degrees, time of maximum elevation with respect to chosen time origin" ;
tide_Ephase:field = "tide_Ephase, scalar, series" ;
double tide_Eamp(tide_period, eta_rho, xi_rho) ;
tide_Eamp:long_name = "tidal elevation amplitude" ;
tide_Eamp:units = "meter" ;
tide_Eamp:field = "tide_Eamp, scalar, series" ;
double tide_Cphase(tide_period, eta_rho, xi_rho) ;
tide_Cphase:long_name = "tidal current phase angle" ;
tide_Cphase:units = "degrees, time of maximum velocity with respect chosen time origin" ;
tide_Cphase:field = "tide_Cphase, scalar" ;
double tide_Cangle(tide_period, eta_rho, xi_rho) ;
tide_Cangle:long_name = "tidal current inclination angle" ;
tide_Cangle:units = "degrees between semi-major axis and East" ;
tide_Cangle:field = "tide_Cangle, scalar" ;
double tide_Cmin(tide_period, eta_rho, xi_rho) ;
tide_Cmin:long_name = "minimum tidal current, ellipse semi-minor axis" ;
tide_Cmin:units = "meter second-1" ;
tide_Cmin:field = "tide_Cmin, scalar" ;
double tide_Cmax(tide_period, eta_rho, xi_rho) ;
tide_Cmax:long_name = "maximum tidal current, ellipse semi-major axis" ;
tide_Cmax:units = "meter second-1" ;
tide_Cmax:field = "tide_Cmax, scalar" ;
char tidal_constituents(tide_period, two) ;
tidal_constituents:long_name = "Tidal Constituent Names" ;
// global attributes:
:type = "ROMS Forcing File" ;
:title = "Forcing for domain" ;
:base_date = "days since 2008-01-01 00:00:00" ;
:grid_file = "extended_gulfs_grd.nc" ;
:source = "OTPS" ;
:source_url = "http://www.coas.oregonstate.edu/researc ... egion.html" ;
:history = "16-Sep-2008 18:36:27: Created by jffm with write_roms_otps_ncfile.\n",
"" ;
:comment = "Inputs for OTPS executable \"extract_HC\" created with m-file roms2ll.m using the grid file as input./home/jffm/USER1/otps/data/Model_tpxo7.1 was used as the OTPS regional model. " ;
:tidal_constituents = "s2, m2, k1, o1" ;
Now I can see the problem, the "tide_period" dimension was defined as UNLIMITED. I change that for 4. I also had to add the xi_u; eta_u; xi_v and eta_v dimensions in the forcing file to make the option AVERAGES_DETIDE work.
The CDL templates were very useful. I didn't know about it.
Thanks a lot. Now I don't need to use Matlab to detide my results!
Cheers;
Carlos