unable to locate a time variable in netCDF inputs

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
sonaljit.m
Posts: 43
Joined: Wed Nov 30, 2016 11:18 pm
Location: University of Massachusetts Dartmouth

unable to locate a time variable in netCDF inputs

#1 Unread post by sonaljit.m »

Hello.

I'm facing a small problem; its probably a simple one but I couldn't get it sorted out.

My initialization netCDF file looks like this:

dimensions(sizes): s_rho(32), xi_rho(424), eta_rho(324), xi_u(423), eta_u(324), xi_v(424), eta_v(323), init_time(1), ocean_time(3)
variables(dimensions): float64 init_time(init_time), float64 ocean_time(ocean_time), float64 temp(init_time,s_rho,eta_rho,xi_rho), float64 salt(init_time,s_rho,eta_rho,xi_rho), float64 u(init_time,s_rho,eta_,xi_), float64 v(init_time,s_rho,eta_v,xi_v), float64 ubar(init_time,eta_,xi_), float64 vbar(init_time,eta_v,xi_v), float64 zeta(init_time,eta_rho,xi_rho)


I've prescribed two time variables (init_time(init_time) and ocean_time(ocean_time)). The initial velocities, temp, salt, and zeta are initialized using init_time.

The boundary netCDF file looks like this:

dimensions(sizes): s_rho(32), xi_rho(424), eta_rho(324), xi_u(423), eta_u(324), xi_v(424), eta_v(323), bry_time(3)
variables(dimensions): float64 bry_time(bry_time), float64 zeta_north(bry_time,xi_rho), float64 zeta_south(bry_time,xi_rho), float64 zeta_east(bry_time,eta_rho), float64 zeta_west(bry_time,eta_rho), float64 u_north(bry_time,s_rho,xi_), float64 ubar_north(bry_time,xi_), float64 u_south(bry_time,s_rho,xi_), float64 ubar_south(bry_time,xi_), float64 u_east(bry_time,s_rho,eta_), float64 ubar_east(bry_time,eta_), float64 u_west(bry_time,s_rho,eta_), float64 ubar_west(bry_time,eta_), float64 temp_north(bry_time,s_rho,xi_rho), float64 temp_south(bry_time,s_rho,xi_rho), float64 temp_east(bry_time,s_rho,eta_rho), float64 temp_west(bry_time,s_rho,eta_rho), float64 salt_north(bry_time,s_rho,xi_rho), float64 salt_south(bry_time,s_rho,xi_rho), float64 salt_east(bry_time,s_rho,eta_rho), float64 salt_west(bry_time,s_rho,eta_rho)


I have prescribed a dimension bry_time for all the boundary quantities.

On running the code I get this error:
unable to find requested variable: v3d_time
in file:
boundary.nc


So, I then add an extra variable float64 v3d_time(v3d_time) into the boundary netcdf file, and run it again. It still gives the same error.

Any idea how to fix this? I was referring to another thread that discussed a similar problem (with zeta_time). However that wasn't much help to me.

Thanks,
Sonaljit.

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

Re: unable to locate a time variable in netCDF inputs

#2 Unread post by kate »

It is better to use time attributes. For instance:

Code: Select all

	double aice_north(ocean_time, xi_rho) ;
		aice_north:_FillValue = 9.99999993381581e+36 ;
		aice_north:long_name = "aice Northern boundary condition" ;
		aice_north:time = "ocean_time" ;
		aice_north:coordinates = "None" ;
		aice_north:field = "ice concentration, scalar, series" ;
This has the "time" attribute pointing to ocean_time. Otherwise, you need to set the varinfo.dat file to have the time you are using for that variable:

Code: Select all

'aice_north'
  'ice concentration northern boundary condition'
  ' '  
  'aice_north, scalar, series'
  'bry_time'
  'idAibc(inorth)'
  'nulvar'
  1.0d0
Here, my varinfo.dat has bry_time, but I'm using something else. Since I'm using the time attribute, it all works fine and I don't have to change the varinfo.dat. With the change to the climatology no longer being in the varinfo.dat, you have to set the time attribute correctly for the climatology fields.

Post Reply