GET_2DFLD - unable to find requested variable: wind_time

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

GET_2DFLD - unable to find requested variable: wind_time

#1 Unread post by drivas »

Hi all,
I just installed the last ROMS version a couple of days ago. This compiles well but doesn't run. I had this model running before in another computer, but now I moved to a another computer and updated the model and the new version doesn't work. I'm using the option BULK_FLUXES. When I run de model, I obtain this message (repeated several times):

GET_2DFLD - unable to find requested variable: wind_time
in file:
/home/david/mydir/Data/ROMS/Forcing/TSBroms_blk_ModDR2006_PROM.nc

But I'm completely sure that the variable "wind_time" does exist in the NETCDF file.

I also get this message by the end of my output file:

ROMS/TOMS - Input error ............. exit_flag: 2

ERROR: Abnormal termination: NetCDF INPUT.
REASON: No error

I guess the problem is simple, but I haven't able to find it. Any comment is welcome.
Thanks,
drivas

mathieu

Re: GET_2DFLD - unable to find requested variable: wind_time

#2 Unread post by mathieu »

Please show us the header of your wind forcing file by doing

Code: Select all

ncdump -h wind_frc.nc
One header that work well (other combinations are possible) is

Code: Select all

netcdf aladin_wet_wind {
dimensions:
        eta_rho = 291 ;
        xi_rho = 266 ;
        wind_time = 489 ;
variables:
        double wind_time(wind_time) ;
                wind_time:units = "days since 1968-05-23" ;
                wind_time:_FillValue = 1.e+35 ;
        float Uwind(wind_time, eta_rho, xi_rho) ;
                Uwind:_FillValue = 1.e+35f ;
                Uwind:units = "m/s" ;
        float Vwind(wind_time, eta_rho, xi_rho) ;
                Vwind:_FillValue = 1.e+35f ;
                Vwind:units = "m/s" ;

// global attributes:
                :title = "wind file forcing" ;
}

drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

Re: GET_2DFLD - unable to find requested variable: wind_time

#3 Unread post by drivas »

I prepare the NC files by using Matlab. Here is what results from the "ncdump":

%% ncdump('TSBroms_blk_ModDR2006_PROM.nc') %% Generated 09-Apr-2010 15:52:43

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

%% Global attributes:

nc.title = ncchar('Todos Santos Bay Experiment');
nc.date = ncchar('10-Aug-2009');
nc.clim_file = ncchar('../Run/ROMS_FILES/TSB_roms_bry.nc');
nc.grd_file = ncchar('../Run/ROMS_FILES/TSB_roms_grd.nc');
nc.type = ncchar('BULK file');
nc.history = ncchar('ROMS');

%% Dimensions:

nc('xi_rho') = 75;
nc('eta_rho') = 110;
nc('bulk_time') = 365;
nc('wind_time') = 365;
nc('srf_time') = 365;
nc('qair_time') = 365;
nc('tair_time') = 365;
nc('rain_time') = 365;
nc('lrf_time') = 365;
nc('pair_time') = 365;
nc('tide_period') = 10;

%% Variables and attributes:

nc{'bulk_time'} = ncdouble('bulk_time'); %% 365 elements.
nc{'bulk_time'}.long_name = ncchar('bulk formulation execution time');
nc{'bulk_time'}.units = ncchar('days');
nc{'bulk_time'}.cycle_length = ncdouble(365);

nc{'wind_time'} = ncdouble('wind_time'); %% 365 elements.
nc{'wind_time'}.long_name = ncchar('wind time');
nc{'wind_time'}.units = ncchar('days');
nc{'wind_time'}.cycle_length = ncdouble(365);

nc{'srf_time'} = ncdouble('srf_time'); %% 365 elements.
nc{'srf_time'}.long_name = ncchar('Solar shortwave radiation time');
nc{'srf_time'}.units = ncchar('days');
nc{'srf_time'}.cycle_length = ncdouble(365);

nc{'qair_time'} = ncdouble('qair_time'); %% 365 elements.
nc{'qair_time'}.long_name = ncchar('Relative humidity time');
nc{'qair_time'}.units = ncchar('days');
nc{'qair_time'}.cycle_length = ncdouble(365);

nc{'tair_time'} = ncdouble('tair_time'); %% 365 elements.
nc{'tair_time'}.long_name = ncchar('Surface air temperature time');
nc{'tair_time'}.units = ncchar('days');
nc{'tair_time'}.cycle_length = ncdouble(365);

nc{'rain_time'} = ncdouble('rain_time'); %% 365 elements.
nc{'rain_time'}.long_name = ncchar('Rainfall rate time');
nc{'rain_time'}.units = ncchar('days');
nc{'rain_time'}.cycle_length = ncdouble(365);

nc{'lrf_time'} = ncdouble('lrf_time'); %% 365 elements.
nc{'lrf_time'}.long_name = ncchar('Downwelling longwave radiation time');
nc{'lrf_time'}.units = ncchar('days');
nc{'lrf_time'}.cycle_length = ncdouble(365);

nc{'pair_time'} = ncdouble('pair_time'); %% 365 elements.
nc{'pair_time'}.long_name = ncchar('Surface air pressure time');
nc{'pair_time'}.units = ncchar('days');
nc{'pair_time'}.cycle_length = ncdouble(365);

nc{'swrad'} = ncdouble('bulk_time', 'eta_rho', 'xi_rho'); %% 3011250 elements.
nc{'swrad'}.long_name = ncchar('shortwave radiation');
nc{'swrad'}.units = ncchar('Watts meter-2');
nc{'swrad'}.positive = ncchar('downward flux, heating water');

nc{'Qair'} = ncdouble('bulk_time', 'eta_rho', 'xi_rho'); %% 3011250 elements.
nc{'Qair'}.long_name = ncchar('relative humidity');
nc{'Qair'}.units = ncchar('percentage');

nc{'Tair'} = ncdouble('bulk_time', 'eta_rho', 'xi_rho'); %% 3011250 elements.
nc{'Tair'}.long_name = ncchar('surface air temperature');
nc{'Tair'}.units = ncchar('Celsius');

nc{'Uwind'} = ncdouble('bulk_time', 'eta_rho', 'xi_rho'); %% 3011250 elements.
nc{'Uwind'}.long_name = ncchar('u-wind');
nc{'Uwind'}.units = ncchar('m/s');

nc{'Vwind'} = ncdouble('bulk_time', 'eta_rho', 'xi_rho'); %% 3011250 elements.
nc{'Vwind'}.long_name = ncchar('v-wind');
nc{'Vwind'}.units = ncchar('m/s');

nc{'rain'} = ncdouble('bulk_time', 'eta_rho', 'xi_rho'); %% 3011250 elements.
nc{'rain'}.long_name = ncchar('rain fall rate');
nc{'rain'}.units = ncchar('kg/m^2/s');

nc{'lwrad_down'} = ncdouble('bulk_time', 'eta_rho', 'xi_rho'); %% 3011250 elements.
nc{'lwrad_down'}.long_name = ncchar('downwelling longwave radiation');
nc{'lwrad_down'}.units = ncchar('Watts meter-2');
nc{'lwrad_down'}.positive = ncchar('upward flux, cooling water');

nc{'Pair'} = ncdouble('bulk_time', 'eta_rho', 'xi_rho'); %% 3011250 elements.
nc{'Pair'}.long_name = ncchar('surface air PRESSURE');
nc{'Pair'}.units = ncchar('hPa');

nc{'tide_period'} = ncdouble('tide_period'); %% 10 elements.
nc{'tide_period'}.long_name = ncchar('Tide angular period');
nc{'tide_period'}.units = ncchar('Hours');

nc{'tide_Ephase'} = ncdouble('tide_period', 'eta_rho', 'xi_rho'); %% 82500 elements.
nc{'tide_Ephase'}.long_name = ncchar('Tidal elevation phase angle');
nc{'tide_Ephase'}.units = ncchar('Degrees');

nc{'tide_Eamp'} = ncdouble('tide_period', 'eta_rho', 'xi_rho'); %% 82500 elements.
nc{'tide_Eamp'}.long_name = ncchar('Tidal elevation amplitude');
nc{'tide_Eamp'}.units = ncchar('Meter');

nc{'tide_Cmin'} = ncdouble('tide_period', 'eta_rho', 'xi_rho'); %% 82500 elements.
nc{'tide_Cmin'}.long_name = ncchar('Tidal current ellipse semi-minor axis');
nc{'tide_Cmin'}.units = ncchar('Meter second-1');

nc{'tide_Cmax'} = ncdouble('tide_period', 'eta_rho', 'xi_rho'); %% 82500 elements.
nc{'tide_Cmax'}.long_name = ncchar('Tidal current, ellipse semi-major axis');
nc{'tide_Cmax'}.units = ncchar('Meter second-1');

nc{'tide_Cangle'} = ncdouble('tide_period', 'eta_rho', 'xi_rho'); %% 82500 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_Cphase'} = ncdouble('tide_period', 'eta_rho', 'xi_rho'); %% 82500 elements.
nc{'tide_Cphase'}.long_name = ncchar('Tidal current phase angle');
nc{'tide_Cphase'}.units = ncchar('Degrees');

endef(nc)
close(nc)

This configuration worked very well in my previous model version, but now it doesn't.
Thanks again,
DAVID

mathieu

Re: GET_2DFLD - unable to find requested variable: wind_time

#4 Unread post by mathieu »

Well try replacing bulk_time by wind_time or srf_time, etc. and tell us how it goes. Splitting file in several forcing files also helps in practice.

drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

Re: GET_2DFLD - unable to find requested variable: wind_time

#5 Unread post by drivas »

Thank you very much for your kind reply, Mathieu. But I think the solution you suggest could be a little problematic, since there can be some cases when I apply forcing variables with different temporal resolution. I think it's better to find out where exactly the model is failing in reading the variables in the file. Don't you think? (And please don't get me wrong, I do appreciate your concern)

DAVID

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: GET_2DFLD - unable to find requested variable: wind_time

#6 Unread post by wilkin »

ROMS has two ways of associating a time variable with a forcing variable.

(1) Use the 5th entry for the forcing variable in varinfo.dat. Read about how varinfo works on the Wiki at https://www.myroms.org/wiki/index.php/varinfo.dat. The default for wind stress is "wind_time". If your time variable is actually something else, liked "bulk_time", you can just change the entry in varinfo.dat.

(2) Name the time variable to associate with a forcing variable by giving it a "time" attribute in the forcing netcdf file. There are templates for the files in your source code: Data/ROMS/CDL/*.cdl If the forcing variable has a "time" attribute then this over-rides the varinfo.dat entry:

float Vwind(time, eta_rho, xi_rho) ;
Vwind:long_name = "surface v-wind component" ;
Vwind:units = "meter second-1" ;
Vwind:time = "bulk_time" ;
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply