error while reading variable: wind_time at TIME index =

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
chaoyu1985
Posts: 20
Joined: Thu May 04, 2017 1:31 pm
Location: south china sea institute of oceanography

error while reading variable: wind_time at TIME index =

#1 Post by chaoyu1985 » Tue Jan 02, 2018 3:06 am

error while reading variable: wind_time at TIME index = 0
After I update the ROMS code, I got error inforamtion as belows:

Code: Select all

 Found Error: **   Line: 2240     Source: ROMS/Modules/mod_netcdf.F, netcdf_get_fvar

 NETCDF_GET_FVAR_0D - error while reading variable:  wind_time
                      in input file:  data/roms_frc.nc
                      call from:  ROMS/Utility/get_cycle.F
 Found Error: 02   Line: 195      Source: ROMS/Utility/get_2dfld.F

 GET_2DFLD   - error while reading variable: wind_time   at TIME index =       0
 Found Error: 02   Line: 134      Source: ROMS/Nonlinear/get_data.F
 Found Error: 02   Line: 767      Source: ROMS/Nonlinear/initial.F
 Found Error: 02   Line: 188      Source: ROMS/Drivers/nl_ocean.h

my wind time is

Code: Select all

wind_time has the following dimensions (input order):
  
           1) wind_time = 12
  
wind_time loaded into an array of size:  [12   1]

    15    45    75   105   135   165   195   225   255   285   315   345
cycle_length = 360

my frc files are:

Code: Select all

Source:
           D:\work\ROMS\TMPWORK\R18_Uwnd_v4\roms_frc.nc
Format:
           64bit
Global Attributes:
           title          = 'bio model'
           date           = '28-Dec-2017'
           type           = 'ROMS forcing file'
           grd_file       = 'D:\work\ROMS\TMPWORK\R18_Uwnd_v4\roms_grd.nc'
           start_tide_mjd = 51544
           components     = 'M2 S2 N2 K2 K1 O1 P1 Q1 Mf Mm '
Dimensions:
           xi_u        = 200
           eta_u       = 210
           xi_v        = 201
           eta_v       = 209
           xi_rho      = 201
           eta_rho     = 210
           xi_psi      = 200
           eta_psi     = 209
           sms_time    = 12
           shf_time    = 12
           lhf_time    = 12
           swf_time    = 12
           sst_time    = 12
           srf_time    = 12
           lrf_time    = 12
           sss_time    = 12
           wind_time   = 12
           frc_time    = 12
           pair_time   = 12
           tair_time   = 12
           qair_time   = 12
           tide_period = 10
Variables:
    pair_time  
           Size:       12x1
           Dimensions: pair_time
           Datatype:   double
           Attributes:
                       long_name    = 'Monthly Long Term Mean of Surface Pressure time'
                       units        = 'days since 1800-01-01 00:00:0.0'
                       cycle_length = 360
                       climo_period = '1981/01/01 - 2010/12/31'
                       actual_range = '[-657073 -656739]'
    tair_time  
           Size:       12x1
           Dimensions: tair_time
           Datatype:   double
           Attributes:
                       long_name    = 'Monthly Long Term Mean of Surface Pressure time'
                       units        = 'days since 1800-01-01 00:00:0.0'
                       cycle_length = 360
                       climo_period = '1981/01/01 - 2010/12/31'
                       actual_range = '[-657073 -656739]'
    qair_time  
           Size:       12x1
           Dimensions: qair_time
           Datatype:   double
           Attributes:
                       long_name    = 'Monthly Long Term Mean of Surface Pressure time'
                       units        = 'days since 1800-01-01 00:00:0.0'
                       cycle_length = 360
                       climo_period = '1981/01/01 - 2010/12/31'
                       actual_range = '[-657073 -656739]'
    frc_time   
           Size:       12x1
           Dimensions: frc_time
           Datatype:   double
           Attributes:
                       long_name    = 'surface momentum stress time'
                       units        = 'days'
                       cycle_length = 360
    sms_time   
           Size:       12x1
           Dimensions: sms_time
           Datatype:   double
           Attributes:
                       long_name    = 'surface momentum stress time'
                       units        = 'days'
                       cycle_length = 360
    wind_time  
           Size:       12x1
           Dimensions: wind_time
           Datatype:   double
           Attributes:
                       long_name    = 'surface momentum stress time'
                       units        = 'days'
                       cycle_length = 360
    shf_time   
           Size:       12x1
           Dimensions: shf_time
           Datatype:   double
           Attributes:
                       long_name    = 'surface heat flux time'
                       units        = 'days'
                       cycle_length = 360
    lhf_time   
           Size:       12x1
           Dimensions: lhf_time
           Datatype:   double
           Attributes:
                       long_name    = 'net latent heat flux time'
                       units        = 'days'
                       cycle_length = 360
    swf_time   
           Size:       12x1
           Dimensions: swf_time
           Datatype:   double
           Attributes:
                       long_name    = 'surface freshwater flux time'
                       units        = 'days'
                       cycle_length = 360
    sst_time   
           Size:       12x1
           Dimensions: sst_time
           Datatype:   double
           Attributes:
                       long_name    = 'sea surface temperature time'
                       units        = 'days'
                       cycle_length = 360
    sss_time   
           Size:       12x1
           Dimensions: sss_time
           Datatype:   double
           Attributes:
                       long_name    = 'sea surface salinity time'
                       units        = 'days'
                       cycle_length = 360
    lrf_time   
           Size:       12x1
           Dimensions: lrf_time
           Datatype:   double
           Attributes:
                       long_name    = 'solar longwave radiation time'
                       units        = 'days'
                       cycle_length = 360
    srf_time   
           Size:       12x1
           Dimensions: srf_time
           Datatype:   double
           Attributes:
                       long_name    = 'solar shortwave radiation time'
                       units        = 'days'
                       cycle_length = 360
    sustr      
           Size:       200x210x12
           Dimensions: xi_u,eta_u,frc_time
           Datatype:   double
           Attributes:
                       long_name = 'surface u-momentum stress'
                       units     = 'Newton meter-2'
    svstr      
           Size:       201x209x12
           Dimensions: xi_v,eta_v,frc_time
           Datatype:   double
           Attributes:
                       long_name = 'surface v-momentum stress'
                       units     = 'Newton meter-2'
    Uwind      
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,wind_time
           Datatype:   double
           Attributes:
                       long_name = 'surface u-wind component'
                       units     = 'meter second-1'
                       time      = 'wind_time'
    Vwind      
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,wind_time
           Datatype:   double
           Attributes:
                       long_name = 'surface v-wind component'
                       units     = 'meter second-1'
                       time      = 'wind_time'
    shflux     
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,shf_time
           Datatype:   double
           Attributes:
                       long_name = 'surface net heat flux'
                       units     = 'Watts meter-2'
                       time      = 'shf_time'
    swflux     
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,swf_time
           Datatype:   double
           Attributes:
                       long_name = 'surface freshwater flux (E-P)'
                       units     = 'centimeter day-1'
                       positive  = 'net evaporation'
                       negative  = 'net precipitation'
                       time      = 'swf_time'
    SST        
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,sst_time
           Datatype:   double
           Attributes:
                       long_name = 'sea surface temperature'
                       units     = 'Celsius'
                       time      = 'sst_time'
    SSS        
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,sss_time
           Datatype:   double
           Attributes:
                       long_name = 'sea surface salinity'
                       units     = 'PSU'
                       time      = 'sss_time'
    dQdSST     
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,sst_time
           Datatype:   double
           Attributes:
                       long_name = 'surface net heat flux sensitivity to SST'
                       units     = 'Watts meter-2 Celsius-1'
                       time      = 'sst_time'
    swrad      
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,srf_time
           Datatype:   double
           Attributes:
                       long_name = 'solar shortwave radiation'
                       units     = 'Watts meter-2'
                       time      = 'srf_time'
                       positive  = 'downward flux, heating'
                       negative  = 'upward flux, cooling'
    lwrad      
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,lrf_time
           Datatype:   double
           Attributes:
                       long_name = 'net longwave radiation flux'
                       units     = 'Watts meter-2'
                       time      = 'lrf_time'
                       positive  = 'downward flux, heating'
                       negative  = 'upward flux, cooling'
    latent     
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,lhf_time
           Datatype:   double
           Attributes:
                       long_name = 'net latent heat flux'
                       units     = 'Watts meter-2'
                       time      = 'lhf_time'
    sensible   
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,shf_time
           Datatype:   double
           Attributes:
                       long_name = 'net sensible heat flux'
                       units     = 'Watts meter-2'
                       time      = 'shf_time'
    Pair       
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,pair_time
           Datatype:   double
           Attributes:
                       long_name = 'surface air pressure'
                       units     = 'millibar'
                       time      = 'pair_time'
    Tair       
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,tair_time
           Datatype:   double
           Attributes:
                       long_name = 'surface air temperature'
                       units     = 'Celsius'
                       time      = 'tair_time'
    Qair       
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,qair_time
           Datatype:   double
           Attributes:
                       long_name = 'surface air relative humidity'
                       units     = 'percentage'
                       time      = 'qair_time'
    cloud      
           Size:       201x210x12
           Dimensions: xi_rho,eta_rho,frc_time
           Datatype:   double
           Attributes:
                       long_name = 'cloud fraction'
                       units     = 'nondimensional'
                       time      = 'frc_time'
    tide_period
           Size:       10x1
           Dimensions: tide_period
           Datatype:   double
           Attributes:
                       long_name = 'Tide angular period'
                       units     = 'Hours'
    tide_Ephase
           Size:       201x210x10
           Dimensions: xi_rho,eta_rho,tide_period
           Datatype:   double
           Attributes:
                       long_name = 'Tidal elevation phase angle'
                       units     = 'Degrees'
    tide_Eamp  
           Size:       201x210x10
           Dimensions: xi_rho,eta_rho,tide_period
           Datatype:   double
           Attributes:
                       long_name = 'Tidal elevation amplitude'
                       units     = 'Meter'
    tide_Cmin  
           Size:       201x210x10
           Dimensions: xi_rho,eta_rho,tide_period
           Datatype:   double
           Attributes:
                       long_name = 'Tidal current ellipse semi-minor axis'
                       units     = 'Meter second-1'
    tide_Cmax  
           Size:       201x210x10
           Dimensions: xi_rho,eta_rho,tide_period
           Datatype:   double
           Attributes:
                       long_name = 'Tidal current, ellipse semi-major axis'
                       units     = 'Meter second-1'
    tide_Cangle
           Size:       201x210x10
           Dimensions: xi_rho,eta_rho,tide_period
           Datatype:   double
           Attributes:
                       long_name = 'Tidal current inclination angle'
                       units     = 'Degrees between semi-major axis and East'
    tide_Cphase
           Size:       201x210x10
           Dimensions: xi_rho,eta_rho,tide_period
           Datatype:   double
           Attributes:
                       long_name = 'Tidal current phase angle'
                       units     = 'Degrees'
    tide_Pamp  
           Size:       201x210x10
           Dimensions: xi_rho,eta_rho,tide_period
           Datatype:   double
           Attributes:
                       long_name = 'Tidal potential amplitude'
                       units     = 'Meter'
    tide_Pphase
           Size:       201x210x10
           Dimensions: xi_rho,eta_rho,tide_period
           Datatype:   double
           Attributes:
                       long_name = 'Tidal potential phase angle'
                       units     = 'Degrees'
the force file worked well before. I did not change the forcing file. but I compiled the code by using the updated ROMS codes.
and, i also change the cpp (the test example in bio_toy)

Code: Select all

 BIO_TOY_GEO         The SCS Operational Forecasting System , 1/30 degree resolution
 ANA_BPFLUX          Analytical bottom passive tracers fluxes.
 ANA_BSFLUX          Analytical kinematic bottom salinity flux.
 ANA_BTFLUX          Analytical kinematic bottom temperature flux.
 ANA_CLOUD           Analytical cloud fraction.
 ANA_RAIN            Analytical rain fall rate.
 ANA_SPFLUX          Analytical surface passive tracer fluxes.
 ANA_SSFLUX          Analytical kinematic surface salinity flux.
 ASSUMED_SHAPE       Using assumed-shape arrays.
 AVERAGES            Writing out time-averaged nonlinear model fields.
 BIO_FENNEL          Fennel et al. (2006) nitrogen-based model.
 BIO_SEDIMENT        Restore fallen particulate material to the nutrient pool.
 !BOUNDARY_ALLGATHER Using mpi_allreduce in mp_boundary routine.
 BULK_FLUXES         Surface bulk fluxes parameterization.
 CARBON              Add Carbon constituents.
 !COLLECT_ALL...     Using mpi_isend/mpi_recv in mp_collect routine.
 CURVGRID            Orthogonal curvilinear grid.
 DENITRIFICATION     Add denitrification processes.
 DIAGNOSTICS_BIO     Computing and writing biological diagnostic terms.
 DJ_GRADPS           Parabolic Splines density Jacobian (Shchepetkin, 2002).
 DOUBLE_PRECISION    Double precision arithmetic.
 INLINE_2DIO         Processing 3D IO level by level to reduce memory needs.
 LMD_BKPP            KPP bottom boundary layer mixing.
 LMD_CONVEC          LMD convective mixing due to shear instability.
 LMD_MIXING          Large/McWilliams/Doney interior mixing.
 LMD_NONLOCAL        LMD convective nonlocal transport.
 LMD_RIMIX           LMD diffusivity due to shear instability.
 LMD_SKPP            KPP surface boundary layer mixing.
 LONGWAVE            Compute net longwave radiation internally.
 MASKING             Land/Sea masking.

chaoyu1985
Posts: 20
Joined: Thu May 04, 2017 1:31 pm
Location: south china sea institute of oceanography

Re: error while reading variable: wind_time at TIME index

#2 Post by chaoyu1985 » Tue Jan 02, 2018 3:10 am

I used the old executable file OCEANG which was compiled by using the old ROMS codes before, it works.

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Re: error while reading variable: wind_time at TIME index

#3 Post by yang » Tue Jan 02, 2018 8:03 am

This problem has been reported and fixed, see the following links. Update your code to the latest version and this problem will disappear.

viewtopic.php?f=19&t=4717

https://www.myroms.org/projects/src/ticket/756

Post Reply