unable to find requested variable: zeta_time

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
sargenta

unable to find requested variable: zeta_time

#1 Unread post by sargenta »

Hi,

I have a problem that is probably very easy to solve, but is driving me crazy. I have read other topics with similar issues, but I cannot seem to find the solution. I am trying to run ROMS for a realistic case in which I have sea surface height at the boundaries, and I have defined the corresponding boundary file (roms_bry.nc). When I try to run the code, after reading the initial state of the system and the wind forcing conditions, I get the following error:


GET_NGFLD - unable to find requested variable: zeta_time
in file: roms_bry.nc

However, if I do a ncdump of roms_bry.nc, I see that the variable zeta_time IS present in the file, so it ought to be found. Part of the ncdump is shown below.

%% Dimensions:

nc('xi_u') = 101;
nc('xi_rho') = 102;
nc('eta_v') = 197;
nc('eta_rho') = 198;
nc('s_rho') = 5;
nc('bry_time') = 2;
nc('zeta_time') = 2;
nc('v2d_time') = 2;
nc('v3d_time') = 2;
nc('tracer_time') = 2;
nc('one') = 1;

%% Variables and attributes:

[...]

nc{'Cs_r'} = ncdouble('s_rho'); %% 5 elements.
nc{'Cs_r'}.long_name = ncchar('S-coordinate stretching curves at RHO-points');
nc{'Cs_r'}.units = ncchar('nondimensional');
nc{'Cs_r'}.valid_min = ncdouble(-1);
nc{'Cs_r'}.valid_max = ncdouble(0);

nc{'bry_time'} = ncdouble('bry_time'); %% 2 elements.
nc{'bry_time'}.long_name = ncchar('time for temperature climatology');
nc{'bry_time'}.units = ncchar('day');

nc{'zeta_time'} = ncdouble('bry_time'); %% 2 elements.
nc{'zeta_time'}.long_name = ncchar('time for zeta');
nc{'zeta_time'}.units = ncchar('day');

nc{'v2d_time'} = ncdouble('v2d_time'); %% 2 elements.
nc{'v2d_time'}.long_name = ncchar('time for v2d');
nc{'v2d_time'}.units = ncchar('day');

nc{'v3d_time'} = ncdouble('v3d_time'); %% 2 elements.
nc{'v3d_time'}.long_name = ncchar('time for v3d');
nc{'v3d_time'}.units = ncchar('day');

nc{'tracer_time'} = ncdouble('tracer_time'); %% 2 elements.
nc{'tracer_time'}.long_name = ncchar('time for tracer');
nc{'tracer_time'}.units = ncchar('day');

nc{'temp_south'} = ncdouble('bry_time', 's_rho', 'xi_rho'); %% 1020 elements.
nc{'temp_south'}.long_name = ncchar('southern boundary potential temperature');
nc{'temp_south'}.units = ncchar('Celsius');

[...]

Apparently zeta_time is only used in the varinfo.dat file, to dimension zeta_east, zeta_west, ....
Any idea on what can be happening?

Thanks

mathieu
Posts: 74
Joined: Fri Sep 17, 2004 2:22 pm
Location: Institut Rudjer Boskovic

Re: unable to find requested variable: zeta_time

#2 Unread post by mathieu »

Try replacing
nc{'zeta_time'} = ncdouble('bry_time');
by

Code: Select all

nc{'zeta_time'} = ncdouble('zeta_time');

sargenta

Re: unable to find requested variable: zeta_time

#3 Unread post by sargenta »

Mathieu,

Thanks for your suggestion, but it still doesn't work.

mathieu
Posts: 74
Joined: Fri Sep 17, 2004 2:22 pm
Location: Institut Rudjer Boskovic

Re: unable to find requested variable: zeta_time

#4 Unread post by mathieu »

Then, my next suggestion would be to discard completely the variable bry_time and use instead zeta_time, v2d_time, v3d_time, temp_time, salt_time. There is indeed a cdl file bry_unlimit.cdl in the ROMS distribution, but the variable bry_time that it uses does not appear anywhere in the shipped varinfo.dat file. Thus I advise you to use the file bry_limit.cdl as model.

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: unable to find requested variable: zeta_time

#5 Unread post by kate »

There are two ways to find out what is the appropriate time variable for something. One is with the "time" attribute on the variable:

Code: Select all

        float salt_south(ocean_time, s_rho, xi_rho) ;
                salt_south:long_name = "salinity south boundary condition" ;
                salt_south:units = "PSU" ;
                salt_south:field = "salt_south, scalar, series" ;
                salt_south:time = "ocean_time" ;
This is the CF compliant way to go. The other way is to set it in the varinfo.dat file:

Code: Select all

'salt_south'                                       ! Input
  'salinity southern boundary condition'
  'nondimensional'                                 ! [PSU]
  'salt_south, scalar, series'
  'ocean_time'
  'idTbry(isouth,isalt)'
  'nulvar'
  1.0d0
I have had trouble with C-based tools writing the C end-of-string character to the end of the NetCDF attribute, causing ROMS to fail to match "ocean_time\0" with "ocean_time".

As for "ocean_time" vs. "salt_time" vs. "bry_time", just pick one and be consistent.

sargenta

Re: unable to find requested variable: zeta_time

#6 Unread post by sargenta »

Following your suggestions I have first discarded bry_time, and then used the time index zeta_time for all my boundary variables (i.e., zeta_east, ubar_east, vbar_east, u_east, ...and so on) by modifying the varinfo.dat file. I have managed to get rid of the original error (so thank you very much, :) ). However, a new but similar error appears, stating that the variable zeta cannot be found:

....
GET_NGFLD - 2D v-momentum southern boundary condition, t = 12 24:00:00
(Rec=0001, Index=2, File: roms_bry.nc)
(Tmin= 13.0000 Tmax= 20.0000)
(Min = -1.00000000E-01 Max = -1.00000000E-01)
GET_NGFLD - 2D u-momentum northern boundary condition, t = 12 24:00:00
(Rec=0001, Index=2, File: roms_bry.nc)
(Tmin= 13.0000 Tmax= 20.0000)
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - 2D v-momentum northern boundary condition, t = 12 24:00:00
(Rec=0001, Index=2, File: roms_bry.nc)
(Tmin= 13.0000 Tmax= 20.0000)
(Min = -1.00000000E-01 Max = -1.00000000E-01)

GET_2DFLD - unable to find requested variable: zeta
in file: file:
roms_bry.nc

Isn`t zeta the free surface? Why is ROMS looking for it in the boundary file, then?
Again, thank you for your comments

jcwarner
Posts: 1182
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: unable to find requested variable: zeta_time

#7 Unread post by jcwarner »

what cpp defs are u using? if you are using the flather options, you may need to activate the ana_fsobc and ana_m2obc options.

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: unable to find requested variable: zeta_time

#8 Unread post by kate »

The boundary zeta would be 'zeta_east' and friends. I don't know why it's looking for zeta in the boundary file. Do you have a debugger you could use to investigate this?

sargenta

Re: unable to find requested variable: zeta_time

#9 Unread post by sargenta »

Sorry for not answering before. I have installed the gdb debugger (I'm working with Cygwin), but I cannot get it to work. The executable oceanG.exe starts to run but seem unable to find the *.in file, although I do specify it with the "set args" command. I'll keep working on this.

jcwarner, my cppdefs list is as follows:

#define UV_ADV
#define UV_COR
#define UV_QDRAG
#define UV_VIS2
#undef MIX_GEO_UV
#define MIX_S_UV
#undef TS_U3HADVECTION
#undef TS_C4VADVECTION
#define STATIONS
#undef TS_MPDATA
#undef DJ_GRADPS
#define TS_DIF2
#undef TS_DIF4
#undef MIX_GEO_TS
#define MIX_S_TS
#undef LMD_MIXING
#define MY25_MIXING

#define BODYFORCE

#if defined LMD_MIXING
# define LMD_RIMIX
# define LMD_CONVEC
#endif

#if defined GLS_MIXING || defined MY25_MIXING
# undef KANTHA_CLAYSON
# define N2S2_HORAVG
#else
# undef ANA_VMIX
#endif

#define SPHERICAL
#define SALINITY
#define NONLIN_EOS
#define SOLVE3D
#undef SPLINES
#define CURVGRID
#define MASKING
#define AVERAGES
#define DIAGNOSTICS_TS
#undef DIAGNOSTICS_UV

#define TCLIMATOLOGY
#define ZCLIMATOLOGY
#undef TCLM_NUDGING

#undef ANA_GRID
#undef ANA_INITIAL
#undef ANA_SMFLUX
#define ANA_FSOBC
#define ANA_M2OBC
#undef ANA_M3OBC
#undef ANA_TOBC
#undef ANA_TCLIMA
#define ANA_STFLUX
#define ANA_SSFLUX
#define ANA_BTFLUX
#define ANA_BSFLUX

#define SPONGE
#define OBC_DATA
#define OBC_EAST
#define OBC_SOUTH
#define OBC_NORTH
#define OBC_WEST

#define EAST_FSCHAPMAN
#define EAST_M2FLATHER
#define EAST_M3GRADIENT
#define EAST_TGRADIENT

#define NORTH_FSCHAPMAN
#define NORTH_M2FLATHER
#define NORTH_M3GRADIENT
#define NORTH_TGRADIENT

#define SOUTH_FSCHAPMAN
#define SOUTH_M2FLATHER
#define SOUTH_M3GRADIENT
#define SOUTH_TGRADIENT

#define WEST_FSCHAPMAN
#define WEST_M2FLATHER
#define WEST_M3GRADIENT
#define WEST_TGRADIENT

Is there any incompatibility between the options? But, even then, why should ROMS be looking for zeta in the boundary file?

jcwarner
Posts: 1182
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: unable to find requested variable: zeta_time

#10 Unread post by jcwarner »

the issue might be with zclimatology. i do not use that. see if it works without that.

User avatar
arango
Site Admin
Posts: 1351
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: unable to find requested variable: zeta_time

#11 Unread post by arango »

Check the following :arrow: post.

Post Reply