about detide file

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
wrh
Posts: 23
Joined: Fri Nov 14, 2008 4:26 pm
Location: zhejiang ocean university

about detide file

#1 Unread post by wrh »

dear all :

when I define #define AVERAGES_DETIDE and try to write out
Aout(idu3dD) == T ! u_detided detided 3D U-velocity
Aout(idv3dD) == T ! v_detided detided 3D V-velocity
Aout(idu2dD) == T ! ubar_detided detided 2D U-velocity
Aout(idv2dD) == T ! vbar_detided detided 2D V-velocity
Aout(idFsuD) == T ! zeta_detided detided free-surface

Aout(idTrcD) == T T ! temp_detided, ... detided temperature and salinity

I got following erros:
DEF_VAR - unable to define variable: zeta_tide
in NetCDF file: ./tide_per30.nc


but if :
Aout(idu3dD) == F ! u_detided detided 3D U-velocity
Aout(idv3dD) == F ! v_detided detided 3D V-velocity
Aout(idu2dD) == F ! ubar_detided detided 2D U-velocity
Aout(idv2dD) == F ! vbar_detided detided 2D V-velocity
Aout(idFsuD) == F ! zeta_detided detided free-surface
the mode can run

and ncdump tide_per30.nc
%% ncdump('tide_per30.nc') %% Generated 14-Sep-2014 11:00:28

nc = netcdf('tide_per30.nc', 'noclobber');
if isempty(nc), return, end

%% Global attributes:

nc.history = ncchar(''Created by create_roms_tide_forc on 14-Sep-2014 08:31:40'');
nc.type = ncchar(''tide forcing file'');

%% Dimensions:

nc('xrho') = 236;
nc('erho') = 140;
nc('tide_period') = 8;
nc('s_rho') = 30;
nc('harmonics') = 17;

%% Variables and attributes:

nc{'tide_period'} = ncdouble('tide_period'); %% 8 elements.
nc{'tide_period'}.long_name = ncchar(''tide angular period'');
nc{'tide_period'}.units = ncchar(''hours'');
nc{'tide_period'}.field = ncchar(''tide_period, scalar, series'');

nc{'tide_Ephase'} = ncdouble('tide_period', 'erho', 'xrho'); %% 264320 elements.
nc{'tide_Ephase'}.long_name = ncchar(''tidal elevation phase angle'');
nc{'tide_Ephase'}.units = ncchar(''degrees, time of maximum elevation with respect chosen time origin'');
nc{'tide_Ephase'}.field = ncchar(''tide_Ephase, scalar, series'');

nc{'tide_Eamp'} = ncdouble('tide_period', 'erho', 'xrho'); %% 264320 elements.
nc{'tide_Eamp'}.long_name = ncchar(''tidal elevation amplitude'');
nc{'tide_Eamp'}.units = ncchar(''meter'');
nc{'tide_Eamp'}.field = ncchar(''tide_Eamp, scalar, series'');

nc{'tide_Cphase'} = ncdouble('tide_period', 'erho', 'xrho'); %% 264320 elements.
nc{'tide_Cphase'}.long_name = ncchar(''tidal current phase angle'');
nc{'tide_Cphase'}.units = ncchar(''degrees, time of maximum velocity with respect chosen time origin'');
nc{'tide_Cphase'}.field = ncchar(''tide_Cphase, scalar, series'');

nc{'tide_Cangle'} = ncdouble('tide_period', 'erho', 'xrho'); %% 264320 elements.
nc{'tide_Cangle'}.long_name = ncchar(''tidal current inclination angle'');
nc{'tide_Cangle'}.units = ncchar(''degrees between semi-major axis and East'');
nc{'tide_Cangle'}.field = ncchar(''tide_Cangle, scalar, series'');

nc{'tide_Cmin'} = ncdouble('tide_period', 'erho', 'xrho'); %% 264320 elements.
nc{'tide_Cmin'}.long_name = ncchar(''minimum tidal current, ellipse semi-minor axis'');
nc{'tide_Cmin'}.units = ncchar(''meter second-1'');
nc{'tide_Cmin'}.field = ncchar(''tide_Cmin, scalar, series'');

nc{'tide_Cmax'} = ncdouble('tide_period', 'erho', 'xrho'); %% 264320 elements.
nc{'tide_Cmax'}.long_name = ncchar(''maximum tidal current, ellipse semi-minor axis'');
nc{'tide_Cmax'}.units = ncchar(''meter second-1'');
nc{'tide_Cmax'}.field = ncchar(''tide_Cmax, scalar, series'');

nc{'Hcount'} = nclong; %% 1 element.
nc{'Hcount'}.long_name = ncchar(''number of time-accumulated tide harmonics'');

nc{'ocean_time'} = ncdouble; %% 1 element.
nc{'ocean_time'}.long_name = ncchar(''accumulated harmonics time since initialization'');
nc{'ocean_time'}.units = ncchar(''seconds since 2000-01-00 00:00:00'');
nc{'ocean_time'}.calendar = ncchar(''gregorian'');

nc{'CosW'} = ncdouble('tide_period'); %% 8 elements.
nc{'CosW'}.long_name = ncchar(''time-accumulated COS(omega(k)*t)'');
nc{'CosW'}.units = ncchar(''radians'');

nc{'SinW'} = ncdouble('tide_period'); %% 8 elements.
nc{'SinW'}.long_name = ncchar(''time-accumulated SIN(omega(k)*t)'');
nc{'SinW'}.units = ncchar(''radians'');

nc{'CosWCosW'} = ncdouble('tide_period', 'tide_period'); %% 64 elements.
nc{'CosWCosW'}.long_name = ncchar(''time-accumulated COS(omega(k)*t)*COS(omega(l)*t) matrix'');
nc{'CosWCosW'}.units = ncchar(''radians'');

nc{'SinWSinW'} = ncdouble('tide_period', 'tide_period'); %% 64 elements.
nc{'SinWSinW'}.long_name = ncchar(''time-accumulated SIN(omega(k)*t)*SIN(omega(l)*t) matrix'');
nc{'SinWSinW'}.units = ncchar(''radians'');

nc{'SinWCosW'} = ncdouble('tide_period', 'tide_period'); %% 64 elements.
nc{'SinWCosW'}.long_name = ncchar(''time-accumulated SIN(omega(k)*t)*COS(omega(l)*t) matrix'');
nc{'SinWCosW'}.units = ncchar(''radians'');

endef(nc)
close(nc)

so I guess something wrong with:
Aout(idu3dD) == F ! u_detided detided 3D U-velocity
Aout(idv3dD) == F ! v_detided detided 3D V-velocity
Aout(idu2dD) == F ! ubar_detided detided 2D U-velocity
Aout(idv2dD) == F ! vbar_detided detided 2D V-velocity
Aout(idFsuD) == F ! zeta_detided detided free-surface
could you tell me how to fix it???

thank you!

Post Reply