ROMS/TOMS - I/O error

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
simaham
Posts: 8
Joined: Tue Oct 28, 2014 7:16 pm
Location: PTP

ROMS/TOMS - I/O error

#1 Unread post by simaham »

Hi everyone,

I am new in ROMS, I try to define a simple grid with ana_grid.h
and to put inflow on eastern boundary of the domain so I used ana_initial.h and ana_m3obc.h
it compiled without errors but when I run it

Code: Select all

Model Input Parameters:  ROMS/TOMS version 3.7  
                          Sunday - December 28, 2014 -  2:46:28 PM
 -----------------------------------------------------------------------------

 ISLAND WAKE

 Operating system : Linux
 CPU/hardware     : i686
 Compiler system  : gfortran
 Compiler command : /usr/bin/gfortran
 Compiler flags   : -frepack-arrays -O3 -ffast-math -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none

 SVN Root URL  : https://www.myroms.org/svn/src/trunk
 SVN Revision  : 700M

 Local Root    : /home/sima/Ocean
 Header Dir    : /home/sima/Ocean
 Header file   : island_wake.h
 Analytical Dir: /home/sima/Ocean/ROMS/Functionals/

 Resolution, Grid 01: ****x****x010,  Parallel Threads:  1,  Tiling: 001x002


 Physical Parameters, Grid: 01
 =============================

      60000  ntimes          Number of timesteps for 3-D equations.
    145.000  dt              Timestep size (s) for 3-D equations.
         40  ndtfast         Number of timesteps for 2-D equations between
                               each 3D timestep.
          1  ERstr           Starting ensemble/perturbation run number.
          1  ERend           Ending ensemble/perturbation run number.
          0  nrrec           Number of restart records to read from disk.
          T  LcycleRST       Switch to recycle time-records in restart file.
        288  nRST            Number of timesteps between the writing of data
                               into restart fields.
          1  ninfo           Number of timesteps between print of information
                               to standard output.
          T  ldefout         Switch to create a new output NetCDF file(s).
         72  nHIS            Number of timesteps between the writing fields
                               into history file.
 0.0000E+00  nl_visc2        NLM Horizontal, harmonic mixing coefficient
                               (m2/s) for momentum.
 1.0000E-06  Akt_bak(01)     Background vertical mixing coefficient (m2/s)
                               for tracer 01: temp
 1.0000E-06  Akt_bak(02)     Background vertical mixing coefficient (m2/s)
                               for tracer 02: salt
 1.0000E-05  Akv_bak         Background vertical mixing coefficient (m2/s)
                               for momentum.
 3.0000E-04  rdrg            Linear bottom drag coefficient (m/s).
 3.0000E-03  rdrg2           Quadratic bottom drag coefficient.
 2.0000E-02  Zob             Bottom roughness (m).
          2  Vtransform      S-coordinate transformation equation.
          4  Vstretching     S-coordinate stretching function.
 3.0000E+00  theta_s         S-coordinate surface control parameter.
 0.0000E+00  theta_b         S-coordinate bottom  control parameter.
     25.000  Tcline          S-coordinate surface/bottom layer width (m) used
                               in vertical coordinate stretching.
   1025.000  rho0            Mean density (kg/m3) for Boussinesq approximation.
      0.000  dstart          Time-stamp assigned to model initialization (days).
       0.00  time_ref        Reference time for units attribute (yyyymmdd.dd)
 0.0000E+00  Tnudg(01)       Nudging/relaxation time scale (days)
                               for tracer 01: temp
 0.0000E+00  Tnudg(02)       Nudging/relaxation time scale (days)
                               for tracer 02: salt
 0.0000E+00  Znudg           Nudging/relaxation time scale (days)
                               for free-surface.
 0.0000E+00  M2nudg          Nudging/relaxation time scale (days)
                               for 2D momentum.
 0.0000E+00  M3nudg          Nudging/relaxation time scale (days)
                               for 3D momentum.
 0.0000E+00  obcfac          Factor between passive and active
                               open boundary conditions.
          F  VolCons(1)      NLM western  edge boundary volume conservation.
          F  VolCons(2)      NLM southern edge boundary volume conservation.
          F  VolCons(3)      NLM eastern  edge boundary volume conservation.
          F  VolCons(4)      NLM northern edge boundary volume conservation.
     14.000  T0              Background potential temperature (C) constant.
     35.000  S0              Background salinity (PSU) constant.
   1027.000  R0              Background density (kg/m3) used in linear Equation
                               of State.
 1.7000E-04  Tcoef           Thermal expansion coefficient (1/Celsius).
 0.0000E+00  Scoef           Saline contraction coefficient (1/PSU).
      1.000  gamma2          Slipperiness variable: free-slip (1.0) or 
                                                    no-slip (-1.0).
          T  Hout(idFsur)    Write out free-surface.
          T  Hout(idUbar)    Write out 2D U-momentum component.
          T  Hout(idVbar)    Write out 2D V-momentum component.
          T  Hout(idUvel)    Write out 3D U-momentum component.
          T  Hout(idVvel)    Write out 3D V-momentum component.
          T  Hout(idWvel)    Write out W-momentum component.
          T  Hout(idOvel)    Write out omega vertical velocity.

 Output/Input Files:

             Output Restart File:  ocean_rst.nc
             Output History File:  ocean_his.nc

 READ_PHYPAR - could not find input file:  

 Elapsed CPU time (seconds):


 ROMS/TOMS - Output NetCDF summary for Grid 01:

 Analytical header files used:

     

 ROMS/TOMS - I/O error ............... exit_flag:   4


 ERROR: I/O related problem.
it seems I didn't define analytical files correctly,
I added them into my header file as:

# define ANA_GRID

could you please help me to solve it?

many thanks,

Sima

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

Re: ROMS/TOMS - I/O error

#2 Unread post by kate »

You also need to #define ANA_INITIAL for it to call ana_initial.

How many grid points do you have? You've overflowed the 4 character values for Lm and Mm.

simaham
Posts: 8
Joined: Tue Oct 28, 2014 7:16 pm
Location: PTP

Re: ROMS/TOMS - I/O error

#3 Unread post by simaham »

yes, I've added the ana_initial
I corrected Lm and Mm,
but now it is failed again by another error

Code: Select all

Model Input Parameters:  ROMS/TOMS version 3.7  
                          Monday - December 29, 2014 -  4:38:41 PM
 -----------------------------------------------------------------------------

 ISLAND WAKE

 Operating system : Linux
 CPU/hardware     : i686
 Compiler system  : gfortran
 Compiler command : /usr/bin/gfortran
 Compiler flags   : -frepack-arrays -g -fbounds-check -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none

 SVN Root URL  : https://www.myroms.org/svn/src/trunk
 SVN Revision  : 700M

 Local Root    : /home/sima/Ocean
 Header Dir    : /home/sima/Ocean
 Header file   : island_wake.h
 Analytical Dir: /home/sima/Ocean/ROMS/Functionals/

 Resolution, Grid 01: 0300x0300x010,  Parallel Threads:  1,  Tiling: 001x002


 Physical Parameters, Grid: 01
 =============================

      60000  ntimes          Number of timesteps for 3-D equations.
    145.000  dt              Timestep size (s) for 3-D equations.
         40  ndtfast         Number of timesteps for 2-D equations between
                               each 3D timestep.
          1  ERstr           Starting ensemble/perturbation run number.
          1  ERend           Ending ensemble/perturbation run number.
          0  nrrec           Number of restart records to read from disk.
          T  LcycleRST       Switch to recycle time-records in restart file.
        288  nRST            Number of timesteps between the writing of data
                               into restart fields.
          1  ninfo           Number of timesteps between print of information
                               to standard output.
          T  ldefout         Switch to create a new output NetCDF file(s).
         72  nHIS            Number of timesteps between the writing fields
                               into history file.
 0.0000E+00  nl_visc2        NLM Horizontal, harmonic mixing coefficient
                               (m2/s) for momentum.
 1.0000E-06  Akt_bak(01)     Background vertical mixing coefficient (m2/s)
                               for tracer 01: temp
 1.0000E-06  Akt_bak(02)     Background vertical mixing coefficient (m2/s)
                               for tracer 02: salt
 1.0000E-05  Akv_bak         Background vertical mixing coefficient (m2/s)
                               for momentum.
 3.0000E-04  rdrg            Linear bottom drag coefficient (m/s).
 3.0000E-03  rdrg2           Quadratic bottom drag coefficient.
 2.0000E-02  Zob             Bottom roughness (m).
          2  Vtransform      S-coordinate transformation equation.
          4  Vstretching     S-coordinate stretching function.
 3.0000E+00  theta_s         S-coordinate surface control parameter.
 0.0000E+00  theta_b         S-coordinate bottom  control parameter.
     25.000  Tcline          S-coordinate surface/bottom layer width (m) used
                               in vertical coordinate stretching.
   1025.000  rho0            Mean density (kg/m3) for Boussinesq approximation.
      0.000  dstart          Time-stamp assigned to model initialization (days).
       0.00  time_ref        Reference time for units attribute (yyyymmdd.dd)
 0.0000E+00  Tnudg(01)       Nudging/relaxation time scale (days)
                               for tracer 01: temp
 0.0000E+00  Tnudg(02)       Nudging/relaxation time scale (days)
                               for tracer 02: salt
 0.0000E+00  Znudg           Nudging/relaxation time scale (days)
                               for free-surface.
 0.0000E+00  M2nudg          Nudging/relaxation time scale (days)
                               for 2D momentum.
 0.0000E+00  M3nudg          Nudging/relaxation time scale (days)
                               for 3D momentum.
 0.0000E+00  obcfac          Factor between passive and active
                               open boundary conditions.
          F  VolCons(1)      NLM western  edge boundary volume conservation.
          F  VolCons(2)      NLM southern edge boundary volume conservation.
          F  VolCons(3)      NLM eastern  edge boundary volume conservation.
          F  VolCons(4)      NLM northern edge boundary volume conservation.
     14.000  T0              Background potential temperature (C) constant.
     35.000  S0              Background salinity (PSU) constant.
   1027.000  R0              Background density (kg/m3) used in linear Equation
                               of State.
 1.7000E-04  Tcoef           Thermal expansion coefficient (1/Celsius).
 0.0000E+00  Scoef           Saline contraction coefficient (1/PSU).
      1.000  gamma2          Slipperiness variable: free-slip (1.0) or 
                                                    no-slip (-1.0).
          T  Hout(idFsur)    Write out free-surface.
          T  Hout(idUbar)    Write out 2D U-momentum component.
          T  Hout(idVbar)    Write out 2D V-momentum component.
          T  Hout(idUvel)    Write out 3D U-momentum component.
          T  Hout(idVvel)    Write out 3D V-momentum component.
          T  Hout(idWvel)    Write out W-momentum component.
          T  Hout(idOvel)    Write out omega vertical velocity.

 Output/Input Files:

             Output Restart File:  ocean_rst.nc
             Output History File:  ocean_his.nc

 Tile partition information for Grid 01:  0300x0300x0010  tiling: 001x002

     tile     Istr     Iend     Jstr     Jend     Npts

        0        1      300        1      150   450000
        1        1      300      151      300   450000

 Tile minimum and maximum fractional coordinates for Grid 01:
   (interior points only)

     tile     Xmin     Xmax     Ymin     Ymax     grid

        0     0.50   301.50     0.50   302.50  RHO-points
        1     0.50   301.50    -0.50   301.50  RHO-points

        0     0.00   301.00     0.50   302.50    U-points
        1     0.00   301.00    -0.50   301.50    U-points

        0     0.50   301.50     0.00   302.50    V-points
        1     0.50   301.50    -0.50   301.00    V-points

 Lateral Boundary Conditions: NLM
 ============================

 Variable               Grid  West Edge    South Edge   East Edge    North Edge
 ---------              ----  ----------   ----------   ----------   ----------

 zeta                     1   Clamped      Closed       Clamped      Closed

 ubar                     1   Clamped      Closed       Clamped      Closed

 vbar                     1   Clamped      Closed       Clamped      Closed

 u                        1   Clamped      Closed       Clamped      Closed

 v                        1   Clamped      Closed       Clamped      Closed

 temp                     1   Clamped      Closed       Clamped      Closed

 salt                     1   Clamped      Closed       Clamped      Closed

 Activated C-preprocessing Options:

 ISLAND_WAKE         ISLAND WAKE
 ANA_GRID            Analytical grid set-up.
 ANA_INITIAL         Analytical initial conditions.
 ANA_SMFLUX          Analytical kinematic surface momentum flux.
 ANA_SSFLUX          Analytical kinematic surface salinity flux.
 ANA_STFLUX          Analytical kinematic surface temperature flux.
 ASSUMED_SHAPE       Using assumed-shape arrays.
 DOUBLE_PRECISION    Double precision arithmetic.
 LMD_CONVEC          LMD convective mixing due to shear instability.
 LMD_MIXING          Large/McWilliams/Doney interior mixing.
 LMD_RIMIX           LMD diffusivity due to shear instability.
 MIX_S_UV            Mixing of momentum along constant S-surfaces.
 NONLINEAR           Nonlinear Model.
 !NONLIN_EOS         Linear Equation of State for seawater.
 POWER_LAW           Power-law shape time-averaging barotropic filter.
 PRSGRD31            Standard density Jacobian formulation (Song, 1998).
 PROFILE             Time profiling activated .
 RHO_SURF            Include difference between rho0 and surface density.
 !RST_SINGLE         Double precision fields in restart NetCDF file.
 SOLVE3D             Solving 3D Primitive Equations.
 SPONGE              Enhanced horizontal mixing in the sponge areas.
 TS_C4HADVECTION     Fourth-order centered horizontal advection of tracers.
 TS_C4VADVECTION     Fourth-order centered vertical advection of tracers.
 UV_ADV              Advection of momentum.
 UV_COR              Coriolis term.
 UV_U3HADVECTION     Third-order upstream horizontal advection of 3D momentum.
 UV_C4VADVECTION     Fourth-order centered vertical advection of momentum.
 UV_VIS2             Harmonic mixing of momentum.
 VAR_RHO_2D          Variable density barotropic mode.

 CHECKDEFS - no bottom stress formulation is selected.

 Elapsed CPU time (seconds):


 ROMS/TOMS - Output NetCDF summary for Grid 01:

 ROMS/TOMS - Configuration error ..... exit_flag:   5


 ERROR: Illegal model configuration.
many thanks
sima

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

Re: ROMS/TOMS - I/O error

#4 Unread post by kate »

CHECKDEFS - no bottom stress formulation is selected.
I suggest you add a bottom stress option to your cppdefs.

simaham
Posts: 8
Joined: Tue Oct 28, 2014 7:16 pm
Location: PTP

Re: ROMS/TOMS - I/O error

#5 Unread post by simaham »

Hi Kate
I added a bottom stress option
but now its failed by

Code: Select all

 Model Input Parameters:  ROMS/TOMS version 3.7  
                          Wednesday - December 31, 2014 - 12:52:13 PM
 -----------------------------------------------------------------------------

 ISLAND WAKE

 Operating system : Linux
 CPU/hardware     : i686
 Compiler system  : gfortran
 Compiler command : /usr/bin/gfortran
 Compiler flags   : -frepack-arrays -g -fbounds-check -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none

 SVN Root URL  : https://www.myroms.org/svn/src/trunk
 SVN Revision  : 700M

 Local Root    : /home/sima/Ocean
 Header Dir    : /home/sima/Ocean
 Header file   : island_wake.h
 Analytical Dir: /home/sima/Ocean/ROMS/Functionals/

 Resolution, Grid 01: 0300x0300x010,  Parallel Threads:  1,  Tiling: 001x002


 Physical Parameters, Grid: 01
 =============================

      60000  ntimes          Number of timesteps for 3-D equations.
    145.000  dt              Timestep size (s) for 3-D equations.
         40  ndtfast         Number of timesteps for 2-D equations between
                               each 3D timestep.
          1  ERstr           Starting ensemble/perturbation run number.
          1  ERend           Ending ensemble/perturbation run number.
          0  nrrec           Number of restart records to read from disk.
          T  LcycleRST       Switch to recycle time-records in restart file.
        288  nRST            Number of timesteps between the writing of data
                               into restart fields.
          1  ninfo           Number of timesteps between print of information
                               to standard output.
          T  ldefout         Switch to create a new output NetCDF file(s).
         72  nHIS            Number of timesteps between the writing fields
                               into history file.
 0.0000E+00  nl_visc2        NLM Horizontal, harmonic mixing coefficient
                               (m2/s) for momentum.
 1.0000E-06  Akt_bak(01)     Background vertical mixing coefficient (m2/s)
                               for tracer 01: temp
 1.0000E-06  Akt_bak(02)     Background vertical mixing coefficient (m2/s)
                               for tracer 02: salt
 1.0000E-05  Akv_bak         Background vertical mixing coefficient (m2/s)
                               for momentum.
 3.0000E-04  rdrg            Linear bottom drag coefficient (m/s).
 3.0000E-03  rdrg2           Quadratic bottom drag coefficient.
 2.0000E-02  Zob             Bottom roughness (m).
          2  Vtransform      S-coordinate transformation equation.
          4  Vstretching     S-coordinate stretching function.
 3.0000E+00  theta_s         S-coordinate surface control parameter.
 0.0000E+00  theta_b         S-coordinate bottom  control parameter.
     25.000  Tcline          S-coordinate surface/bottom layer width (m) used
                               in vertical coordinate stretching.
   1025.000  rho0            Mean density (kg/m3) for Boussinesq approximation.
      0.000  dstart          Time-stamp assigned to model initialization (days).
       0.00  time_ref        Reference time for units attribute (yyyymmdd.dd)
 0.0000E+00  Tnudg(01)       Nudging/relaxation time scale (days)
                               for tracer 01: temp
 0.0000E+00  Tnudg(02)       Nudging/relaxation time scale (days)
                               for tracer 02: salt
 0.0000E+00  Znudg           Nudging/relaxation time scale (days)
                               for free-surface.
 0.0000E+00  M2nudg          Nudging/relaxation time scale (days)
                               for 2D momentum.
 0.0000E+00  M3nudg          Nudging/relaxation time scale (days)
                               for 3D momentum.
 0.0000E+00  obcfac          Factor between passive and active
                               open boundary conditions.
          F  VolCons(1)      NLM western  edge boundary volume conservation.
          F  VolCons(2)      NLM southern edge boundary volume conservation.
          F  VolCons(3)      NLM eastern  edge boundary volume conservation.
          F  VolCons(4)      NLM northern edge boundary volume conservation.
     14.000  T0              Background potential temperature (C) constant.
     35.000  S0              Background salinity (PSU) constant.
   1027.000  R0              Background density (kg/m3) used in linear Equation
                               of State.
 1.7000E-04  Tcoef           Thermal expansion coefficient (1/Celsius).
 0.0000E+00  Scoef           Saline contraction coefficient (1/PSU).
      1.000  gamma2          Slipperiness variable: free-slip (1.0) or 
                                                    no-slip (-1.0).
          T  Hout(idFsur)    Write out free-surface.
          T  Hout(idUbar)    Write out 2D U-momentum component.
          T  Hout(idVbar)    Write out 2D V-momentum component.
          T  Hout(idUvel)    Write out 3D U-momentum component.
          T  Hout(idVvel)    Write out 3D V-momentum component.
          T  Hout(idWvel)    Write out W-momentum component.
          T  Hout(idOvel)    Write out omega vertical velocity.

 Output/Input Files:

             Output Restart File:  ocean_rst.nc
             Output History File:  ocean_his.nc

 Tile partition information for Grid 01:  0300x0300x0010  tiling: 001x002

     tile     Istr     Iend     Jstr     Jend     Npts

        0        1      300        1      150   450000
        1        1      300      151      300   450000

 Tile minimum and maximum fractional coordinates for Grid 01:
   (interior points only)

     tile     Xmin     Xmax     Ymin     Ymax     grid

        0     0.50   301.50     0.50   302.50  RHO-points
        1     0.50   301.50    -0.50   301.50  RHO-points

        0     0.00   301.00     0.50   302.50    U-points
        1     0.00   301.00    -0.50   301.50    U-points

        0     0.50   301.50     0.00   302.50    V-points
        1     0.50   301.50    -0.50   301.00    V-points

 Lateral Boundary Conditions: NLM
 ============================

 Variable               Grid  West Edge    South Edge   East Edge    North Edge
 ---------              ----  ----------   ----------   ----------   ----------

 zeta                     1   Clamped      Closed       Clamped      Closed

 ubar                     1   Clamped      Closed       Clamped      Closed

 vbar                     1   Clamped      Closed       Clamped      Closed

 u                        1   Clamped      Closed       Clamped      Closed

 v                        1   Clamped      Closed       Clamped      Closed

 temp                     1   Clamped      Closed       Clamped      Closed

 salt                     1   Clamped      Closed       Clamped      Closed

 Activated C-preprocessing Options:

 ISLAND_WAKE         ISLAND WAKE
 ANA_GRID            Analytical grid set-up.
 ANA_INITIAL         Analytical initial conditions.
 ASSUMED_SHAPE       Using assumed-shape arrays.
 DOUBLE_PRECISION    Double precision arithmetic.
 MIX_S_UV            Mixing of momentum along constant S-surfaces.
 NONLINEAR           Nonlinear Model.
 !NONLIN_EOS         Linear Equation of State for seawater.
 POWER_LAW           Power-law shape time-averaging barotropic filter.
 PRSGRD31            Standard density Jacobian formulation (Song, 1998).
 PROFILE             Time profiling activated .
 RHO_SURF            Include difference between rho0 and surface density.
 !RST_SINGLE         Double precision fields in restart NetCDF file.
 SOLVE3D             Solving 3D Primitive Equations.
 SPONGE              Enhanced horizontal mixing in the sponge areas.
 TS_C4HADVECTION     Fourth-order centered horizontal advection of tracers.
 TS_C4VADVECTION     Fourth-order centered vertical advection of tracers.
 UV_ADV              Advection of momentum.
 UV_COR              Coriolis term.
 UV_U3HADVECTION     Third-order upstream horizontal advection of 3D momentum.
 UV_C4VADVECTION     Fourth-order centered vertical advection of momentum.
 UV_LDRAG            Linear bottom stress.
 UV_VIS2             Harmonic mixing of momentum.
 VAR_RHO_2D          Variable density barotropic mode.

 Process Information:

 Thread #  0 (pid=    1790) is active.

 INITIAL: Configuring and initializing forward nonlinear model ...
 *******

 Vertical S-coordinate System, Grid 01:

 level   S-coord     Cs-curve   Z   at hmin       at hc    half way     at hmax

    10   0.0000000   0.0000000       -0.000       0.000       0.000       0.000
     9  -0.1000000  -0.0050000        1.633      -1.313      -1.752      -2.400
     8  -0.2000000  -0.0204535        3.197      -2.756      -3.806      -5.636
     7  -0.3000000  -0.0477616        4.682      -4.347      -6.203      -9.821
     6  -0.4000000  -0.0894007        6.071      -6.118      -9.015     -15.152
     5  -0.5000000  -0.1491465        7.339      -8.114     -12.350     -21.932
     4  -0.6000000  -0.2324164        8.451     -10.405     -16.366     -30.593
     3  -0.7000000  -0.3467612        9.355     -13.085     -21.281     -41.741
     2  -0.8000000  -0.5025493        9.983     -16.282     -27.395     -56.204
     1  -0.9000000  -0.7139071       10.241     -20.174     -35.117     -75.113
     0  -1.0000000  -1.0000000       10.000     -25.000     -45.000    -100.000

 Time Splitting Weights for Grid 01:    ndtfast =  40    nfast =  56
 ==================================

    Primary            Secondary            Accumulated to Current Step

  1-0.0006038999279304 0.0250000000000000-0.0006038999279304 0.0250000000000000
  2-0.0011053727845635 0.0250150974981983-0.0017092727124939 0.0500150974981983
  3-0.0015044206959555 0.0250427318178123-0.0032136934084494 0.0750578293160106
  4-0.0018010519301026 0.0250803423352112-0.0050147453385520 0.1001381716512218
  5-0.0019952879837948 0.0251253686334638-0.0070100333223467 0.1252635402846856
  6-0.0020871735042116 0.0251752508330587-0.0090972068265583 0.1504387911177443
  7-0.0020767890452586 0.0252274301706640-0.0111739958718169 0.1756662212884082
  8-0.0019642666586465 0.0252793498967954-0.0131382625304634 0.2009455711852036
  9-0.0017498083197106 0.0253284565632616-0.0148880708501740 0.2262740277484652
 10-0.0014337071879729 0.0253722017712543-0.0163217780381469 0.2516462295197196
 11-0.0010163717024450 0.0254080444509537-0.0173381497405919 0.2770542739706733
 12-0.0004983525116731 0.0254334537435148-0.0178365022522649 0.3024877277141881
 13 0.0001196277614762 0.0254459125563066-0.0177168744907887 0.3279336402704947
 14 0.0008366419202876 0.0254429218622697-0.0168802325705011 0.3533765621327644
 15 0.0016515227599278 0.0254220058142625-0.0152287098105733 0.3787985679470269
 16 0.0025628247984349 0.0253807177452643-0.0126658850121384 0.4041792856922913
 17 0.0035687831729657 0.0253166471253035-0.0090971018391727 0.4294959328175947
 18 0.0046672697013015 0.0252274275459793-0.0044298321378712 0.4547233603635741
 19 0.0058557461086128 0.0251107458034468 0.0014259139707416 0.4798341061670209
 20 0.0071312144194823 0.0249643521507315 0.0085571283902239 0.5047984583177524
 21 0.0084901645151857 0.0247860717902444 0.0170472929054096 0.5295845301079968
 22 0.0099285188562319 0.0245738176773648 0.0269758117616416 0.5541583477853615
 23 0.0114415743701613 0.0243256047059590 0.0384173861318029 0.5784839524913205
 24 0.0130239415046020 0.0240395653467049 0.0514413276364049 0.6025235178380254
 25 0.0146694804455856 0.0237139668090899 0.0661108080819904 0.6262374846471153
 26 0.0163712345011199 0.0233472297979502 0.0824820425831104 0.6495847144450655
 27 0.0181213606500220 0.0229379489354222 0.1006034032331323 0.6725226633804877
 28 0.0199110572560077 0.0224849149191717 0.1205144604891400 0.6950075782996594
 29 0.0217304889470413 0.0219871384877715 0.1422449494361814 0.7169947167874309
 30 0.0235687086599425 0.0214438762640955 0.1658136580961238 0.7384385930515264
 31 0.0254135768502523 0.0208546585475969 0.1912272349463761 0.7592932515991233
 32 0.0272516778673573 0.0202193191263406 0.2184789128137333 0.7795125707254639
 33 0.0290682334948725 0.0195380271796567 0.2475471463086058 0.7990505979051206
 34 0.0308470136562825 0.0188113213422849 0.2783941599648883 0.8178619192474054
 35 0.0325702442858409 0.0180401460008778 0.3109644042507291 0.8359020652482831
 36 0.0342185123647286 0.0172258898937318 0.3451829166154578 0.8531279551420149
 37 0.0357706681224704 0.0163704270846136 0.3809535847379282 0.8694983822266285
 38 0.0372037244036097 0.0154761603815518 0.4181573091415379 0.8849745426081802
 39 0.0384927531996420 0.0145460672714616 0.4566500623411799 0.8995206098796418
 40 0.0396107793462069 0.0135837484414705 0.4962608416873868 0.9131043583211123
 41 0.0405286713855386 0.0125934789578153 0.5367895130729254 0.9256978372789276
 42 0.0412150295941741 0.0115802621731769 0.5780045426670996 0.9372780994521045
 43 0.0416360711759210 0.0105498864333225 0.6196406138430206 0.9478279858854270
 44 0.0417555126200830 0.0095089846539245 0.6613961264631036 0.9573369705393515
 45 0.0415344492249439 0.0084650968384224 0.7029305756880475 0.9658020673777740
 46 0.0409312317865102 0.0074267356077988 0.7438618074745578 0.9732288029855728
 47 0.0399013404525124 0.0064034548131361 0.7837631479270702 0.9796322577987089
 48 0.0383972557416642 0.0054059213018233 0.8221604036687344 0.9850381791005322
 49 0.0363683267281804 0.0044459899082817 0.8585287303969148 0.9894841690088138
 50 0.0337606363915535 0.0035367817400771 0.8922893667884684 0.9930209507488909
 51 0.0305168641315885 0.0026927658302883 0.9228062309200569 0.9957137165791792
 52 0.0265761454486959 0.0019298442269986 0.9493823763687528 0.9976435608061778
 53 0.0218739287894439 0.0012654405907812 0.9712563051581966 0.9989090013969589
 54 0.0163418295573680 0.0007185923710451 0.9875981347155646 0.9996275937680040
 55 0.0099074812890402 0.0003100466321109 0.9975056160046047 0.9999376404001149
 56 0.0024943839953957 0.0000623595998849 1.0000000000000004 0.9999999999999998

 ndtfast, nfast =   40  56   nfast/ndtfast =  1.40000

 Centers of gravity and integrals (values must be 1, 1, approx 1/2, 1, 1):

    1.000000000000 1.039265571007 0.519632785503 1.000000000000 1.000000000000

 Power filter parameters, Fgamma, gamma =  0.28400   0.21300

 Metrics information for Grid 01:
 ===============================

 Minimum X-grid spacing, DXmin =  1.00000000E+00 km
 Maximum X-grid spacing, DXmax =  1.00000000E+00 km
 Minimum Y-grid spacing, DYmin =  1.00000000E+00 km
 Maximum Y-grid spacing, DYmax =  1.00000000E+00 km
 Minimum Z-grid spacing, DZmin = -1.63333318E+00 m
 Maximum Z-grid spacing, DZmax =  2.48874290E+01 m

 Minimum barotropic Courant Number =  5.07758863E-02
 Maximum barotropic Courant Number =  1.60567451E-01
 Maximum Coriolis   Courant Number =  4.36450000E-04

At line 74 of file get_data.f90
Fortran runtime error: Array referenc
I checked line 74 of get_data.f90 file,the following lines shows line 74 and its upper and downer lines.

Code: Select all

!=======================================================================
!  Read in forcing data from FORCING NetCDF file.
!=======================================================================
!
!
!-----------------------------------------------------------------------
!  Surface wind stress components.
!-----------------------------------------------------------------------
!
      CALL get_2dfld (ng, iNLM, idUsms, ncFRCid(idUsms,ng),             &
 line 74   &                nFfiles(ng), FRC(1,ng), update(1),                &
     &                LBi, UBi, LBj, UBj, 2, 1,                         &
     &                FORCES(ng) % sustrG)
      IF (exit_flag.ne.NoError) RETURN
      CALL get_2dfld (ng, iNLM, idVsms, ncFRCid(idVsms,ng),             &
     &                nFfiles(ng), FRC(1,ng), update(1),                &
     &                LBi, UBi, LBj, UBj, 2, 1,                         &
     &                FORCES(ng) % svstrG)
      IF (exit_flag.ne.NoError) RETURN
!
!-----------------------------------------------------------------------
I don't have any netcdf forcing file, even i commented the " NFFILES == 1" in the ocean.in file

thanks again for your help

Sima

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

Re: ROMS/TOMS - I/O error

#6 Unread post by kate »

It will look for a forcing file unless you provide ANA alternatives for all the possible forcings. In your case it is looking for surface momentum flux (ANA_SMFLUX). You've already fixed the bottom momentum boundary condition. Next up will be ANA_STFLUX and ANA_BTFLUX.

You don't have SALINITY so you don't need its top and bottom boundary conditions. What did you put for NAT? You only need the one (temp), but it's listing LBC for both temp and salt.

simaham
Posts: 8
Joined: Tue Oct 28, 2014 7:16 pm
Location: PTP

Re: ROMS/TOMS - I/O error

#7 Unread post by simaham »

Happy new year,

I put NAT=2 but putting NAT=1 didnt change anything, it failed with the same error

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

Re: ROMS/TOMS - I/O error

#8 Unread post by kate »

You still need to add ANA_SMFLUX, ANA_STFLUX and ANA_BTFLUX even if they are all zero in the respective ana_xxx.h files.

simaham
Posts: 8
Joined: Tue Oct 28, 2014 7:16 pm
Location: PTP

Re: ROMS/TOMS - I/O error

#9 Unread post by simaham »

Hi kate
I added the ANA_* to my header file
and it failed with a new error

Code: Select all

 Model Input Parameters:  ROMS/TOMS version 3.7  
                          Thursday - January 1, 2015 -  4:37:23 PM
 -----------------------------------------------------------------------------

 ISLAND WAKE

 Operating system : Linux
 CPU/hardware     : i686
 Compiler system  : gfortran
 Compiler command : /usr/bin/gfortran
 Compiler flags   : -frepack-arrays -O3 -ffast-math -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none

 SVN Root URL  : https://www.myroms.org/svn/src/trunk
 SVN Revision  : 700M

 Local Root    : /home/sima/Ocean
 Header Dir    : /home/sima/Ocean
 Header file   : island_wake.h
 Analytical Dir: /home/sima/Ocean/ROMS/Functionals/

 Resolution, Grid 01: 0300x0300x010,  Parallel Threads:  1,  Tiling: 001x001


 Physical Parameters, Grid: 01
 =============================

      60000  ntimes          Number of timesteps for 3-D equations.
    145.000  dt              Timestep size (s) for 3-D equations.
         40  ndtfast         Number of timesteps for 2-D equations between
                               each 3D timestep.
          1  ERstr           Starting ensemble/perturbation run number.
          1  ERend           Ending ensemble/perturbation run number.
          0  nrrec           Number of restart records to read from disk.
          T  LcycleRST       Switch to recycle time-records in restart file.
        288  nRST            Number of timesteps between the writing of data
                               into restart fields.
          1  ninfo           Number of timesteps between print of information
                               to standard output.
          T  ldefout         Switch to create a new output NetCDF file(s).
         72  nHIS            Number of timesteps between the writing fields
                               into history file.
 0.0000E+00  nl_visc2        NLM Horizontal, harmonic mixing coefficient
                               (m2/s) for momentum.
 1.0000E-06  Akt_bak(01)     Background vertical mixing coefficient (m2/s)
                               for tracer 01: temp
 1.0000E-05  Akv_bak         Background vertical mixing coefficient (m2/s)
                               for momentum.
 3.0000E-04  rdrg            Linear bottom drag coefficient (m/s).
 3.0000E-03  rdrg2           Quadratic bottom drag coefficient.
 2.0000E-02  Zob             Bottom roughness (m).
          2  Vtransform      S-coordinate transformation equation.
          4  Vstretching     S-coordinate stretching function.
 3.0000E+00  theta_s         S-coordinate surface control parameter.
 0.0000E+00  theta_b         S-coordinate bottom  control parameter.
     25.000  Tcline          S-coordinate surface/bottom layer width (m) used
                               in vertical coordinate stretching.
   1025.000  rho0            Mean density (kg/m3) for Boussinesq approximation.
      0.000  dstart          Time-stamp assigned to model initialization (days).
       0.00  time_ref        Reference time for units attribute (yyyymmdd.dd)
 0.0000E+00  Tnudg(01)       Nudging/relaxation time scale (days)
                               for tracer 01: temp
 0.0000E+00  Znudg           Nudging/relaxation time scale (days)
                               for free-surface.
 0.0000E+00  M2nudg          Nudging/relaxation time scale (days)
                               for 2D momentum.
 0.0000E+00  M3nudg          Nudging/relaxation time scale (days)
                               for 3D momentum.
 0.0000E+00  obcfac          Factor between passive and active
                               open boundary conditions.
          T  VolCons(1)      NLM western  edge boundary volume conservation.
          F  VolCons(2)      NLM southern edge boundary volume conservation.
          T  VolCons(3)      NLM eastern  edge boundary volume conservation.
          F  VolCons(4)      NLM northern edge boundary volume conservation.
     14.000  T0              Background potential temperature (C) constant.
     35.000  S0              Background salinity (PSU) constant.
   1027.000  R0              Background density (kg/m3) used in linear Equation
                               of State.
 1.7000E-04  Tcoef           Thermal expansion coefficient (1/Celsius).
 0.0000E+00  Scoef           Saline contraction coefficient (1/PSU).
      1.000  gamma2          Slipperiness variable: free-slip (1.0) or 
                                                    no-slip (-1.0).
          T  Hout(idFsur)    Write out free-surface.
          T  Hout(idUbar)    Write out 2D U-momentum component.
          T  Hout(idVbar)    Write out 2D V-momentum component.
          T  Hout(idUvel)    Write out 3D U-momentum component.
          T  Hout(idVvel)    Write out 3D V-momentum component.
          T  Hout(idWvel)    Write out W-momentum component.
          T  Hout(idOvel)    Write out omega vertical velocity.

 Output/Input Files:

             Output Restart File:  ocean_rst.nc
             Output History File:  ocean_his.nc

 READ_PHYPAR - could not find input file:  ocean_bry.nc

 Elapsed CPU time (seconds):


 ROMS/TOMS - Output NetCDF summary for Grid 01:

 Analytical header files used:

     

 ROMS/TOMS - I/O error ............... exit_flag:   4


 ERROR: I/O related problem.
sima@ubuntu:~/Ocean$ mpirun -np 2 ./oceanS < island_wake.in

 Model Input Parameters:  ROMS/TOMS version 3.7  
                          Thursday - January 1, 2015 -  4:37:50 PM
 -----------------------------------------------------------------------------

 ISLAND WAKE

 Operating system : Linux
 CPU/hardware     : i686
 Compiler system  : gfortran
 Compiler command : /usr/bin/gfortran
 Compiler flags   : -frepack-arrays -O3 -ffast-math -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none

 SVN Root URL  : https://www.myroms.org/svn/src/trunk
 SVN Revision  : 700M

 Local Root    : /home/sima/Ocean
 Header Dir    : /home/sima/Ocean
 Header file   : island_wake.h
 Analytical Dir: /home/sima/Ocean/ROMS/Functionals/

 Resolution, Grid 01: 0300x0300x010,  Parallel Threads:  1,  Tiling: 001x001


 Physical Parameters, Grid: 01
 =============================

      60000  ntimes          Number of timesteps for 3-D equations.
    145.000  dt              Timestep size (s) for 3-D equations.
         40  ndtfast         Number of timesteps for 2-D equations between
                               each 3D timestep.
          1  ERstr           Starting ensemble/perturbation run number.
          1  ERend           Ending ensemble/perturbation run number.
          0  nrrec           Number of restart records to read from disk.
          T  LcycleRST       Switch to recycle time-records in restart file.
        288  nRST            Number of timesteps between the writing of data
                               into restart fields.
          1  ninfo           Number of timesteps between print of information
                               to standard output.
          T  ldefout         Switch to create a new output NetCDF file(s).
         72  nHIS            Number of timesteps between the writing fields
                               into history file.
 0.0000E+00  nl_visc2        NLM Horizontal, harmonic mixing coefficient
                               (m2/s) for momentum.
 1.0000E-06  Akt_bak(01)     Background vertical mixing coefficient (m2/s)
                               for tracer 01: temp
 1.0000E-05  Akv_bak         Background vertical mixing coefficient (m2/s)
                               for momentum.
 3.0000E-04  rdrg            Linear bottom drag coefficient (m/s).
 3.0000E-03  rdrg2           Quadratic bottom drag coefficient.
 2.0000E-02  Zob             Bottom roughness (m).
          2  Vtransform      S-coordinate transformation equation.
          4  Vstretching     S-coordinate stretching function.
 3.0000E+00  theta_s         S-coordinate surface control parameter.
 0.0000E+00  theta_b         S-coordinate bottom  control parameter.
     25.000  Tcline          S-coordinate surface/bottom layer width (m) used
                               in vertical coordinate stretching.
   1025.000  rho0            Mean density (kg/m3) for Boussinesq approximation.
      0.000  dstart          Time-stamp assigned to model initialization (days).
       0.00  time_ref        Reference time for units attribute (yyyymmdd.dd)
 0.0000E+00  Tnudg(01)       Nudging/relaxation time scale (days)
                               for tracer 01: temp
 0.0000E+00  Znudg           Nudging/relaxation time scale (days)
                               for free-surface.
 0.0000E+00  M2nudg          Nudging/relaxation time scale (days)
                               for 2D momentum.
 0.0000E+00  M3nudg          Nudging/relaxation time scale (days)
                               for 3D momentum.
 0.0000E+00  obcfac          Factor between passive and active
                               open boundary conditions.
          T  VolCons(1)      NLM western  edge boundary volume conservation.
          F  VolCons(2)      NLM southern edge boundary volume conservation.
          T  VolCons(3)      NLM eastern  edge boundary volume conservation.
          F  VolCons(4)      NLM northern edge boundary volume conservation.
     14.000  T0              Background potential temperature (C) constant.
     35.000  S0              Background salinity (PSU) constant.
   1027.000  R0              Background density (kg/m3) used in linear Equation
                               of State.
 1.7000E-04  Tcoef           Thermal expansion coefficient (1/Celsius).
 0.0000E+00  Scoef           Saline contraction coefficient (1/PSU).
      1.000  gamma2          Slipperiness variable: free-slip (1.0) or 
                                                    no-slip (-1.0).
          T  Hout(idFsur)    Write out free-surface.
          T  Hout(idUbar)    Write out 2D U-momentum component.
          T  Hout(idVbar)    Write out 2D V-momentum component.
          T  Hout(idUvel)    Write out 3D U-momentum component.
          T  Hout(idVvel)    Write out 3D V-momentum component.
          T  Hout(idWvel)    Write out W-momentum component.
          T  Hout(idOvel)    Write out omega vertical velocity.

 Output/Input Files:

             Output Restart File:  ocean_rst.nc
             Output History File:  ocean_his.nc

 Tile partition information for Grid 01:  0300x0300x0010  tiling: 001x001

     tile     Istr     Iend     Jstr     Jend     Npts

        0        1      300        1      300   900000

 Tile minimum and maximum fractional coordinates for Grid 01:
   (interior points only)

     tile     Xmin     Xmax     Ymin     Ymax     grid

        0     0.50   301.50     0.50   301.50  RHO-points

        0     0.00   301.00     0.50   301.50    U-points

        0     0.50   301.50     0.00   301.00    V-points

 Lateral Boundary Conditions: NLM
 ============================

 Variable               Grid  West Edge    South Edge   East Edge    North Edge
 ---------              ----  ----------   ----------   ----------   ----------

 zeta                     1   Clamped      Closed       Clamped      Closed

 ubar                     1   Clamped      Closed       Clamped      Closed

 vbar                     1   Clamped      Closed       Clamped      Closed

 u                        1   Clamped      Closed       Clamped      Closed

 v                        1   Clamped      Closed       Clamped      Closed

 temp                     1   Clamped      Closed       Clamped      Closed

 salt                     1   ped      Closed       Clamped      Closed

 Activated C-preprocessing Options:

 ISLAND_WAKE         ISLAND WAKE
 ANA_BTFLUX          Analytical kinematic bottom temperature flux.
 ANA_GRID            Analytical grid set-up.
 ANA_INITIAL         Analytical initial conditions.
 ANA_SMFLUX          Analytical kinematic surface momentum flux.
 ANA_STFLUX          Analytical kinematic surface temperature flux.
 ASSUMED_SHAPE       Using assumed-shape arrays.
 DOUBLE_PRECISION    Double precision arithmetic.
 MIX_S_UV            Mixing of momentum along constant S-surfaces.
 NONLINEAR           Nonlinear Model.
 !NONLIN_EOS         Linear Equation of State for seawater.
 POWER_LAW           Power-law shape time-averaging barotropic filter.
 PRSGRD31            Standard density Jacobian formulation (Song, 1998).
 PROFILE             Time profiling activated .
 RHO_SURF            Include difference between rho0 and surface density.
 !RST_SINGLE         Double precision fields in restart NetCDF file.
 SOLVE3D             Solving 3D Primitive Equations.
 SPONGE              Enhanced horizontal mixing in the sponge areas.
 TS_C4HADVECTION     Fourth-order centered horizontal advection of tracers.
 TS_C4VADVECTION     Fourth-order centered vertical advection of tracers.
 UV_ADV              Advection of momentum.
 UV_COR              Coriolis term.
 UV_U3HADVECTION     Third-order upstream horizontal advection of 3D momentum.
 UV_C4VADVECTION     Fourth-order centered vertical advection of momentum.
 UV_LDRAG            Linear bottom stress.
 UV_VIS2             Harmonic mixing of momentum.
 VAR_RHO_2D          Variable density barotropic mode.

 Process Information:

 Thread #  0 (pid=   25337) is active.

 INITIAL: Configuring and initializing forward nonlinear model ...
 *******

 Vertical S-coordinate System, Grid 01:

 level   S-coord     Cs-curve   Z   at hmin       at hc    half way     at hmax

    10   0.0000000   0.0000000       -0.000       0.000       0.000       0.000
     9  -0.1000000  -0.0050000        1.633      -1.313      -1.752      -2.400
     8  -0.2000000  -0.0204535        3.197      -2.756      -3.806      -5.636
     7  -0.3000000  -0.0477616        4.682      -4.347      -6.203      -9.821
     6  -0.4000000  -0.0894007        6.071      -6.118      -9.015     -15.152
     5  -0.5000000  -0.1491465        7.339      -8.114     -12.350     -21.932
     4  -0.6000000  -0.2324164        8.451     -10.405     -16.366     -30.593
     3  -0.7000000  -0.3467612        9.355     -13.085     -21.281     -41.741
     2  -0.8000000  -0.5025493        9.983     -16.282     -27.395     -56.204
     1  -0.9000000  -0.7139071       10.241     -20.174     -35.117     -75.113
     0  -1.0000000  -1.0000000       10.000     -25.000     -45.000    -100.000

 Time Splitting Weights for Grid 01:    ndtfast =  40    nfast =  56
 ==================================

    Primary            Secondary            Accumulated to Current Step

  1-0.0006038999279304 0.0250000000000000-0.0006038999279304 0.0250000000000000
  2-0.0011053727845635 0.0250150974981983-0.0017092727124939 0.0500150974981983
  3-0.0015044206959555 0.0250427318178123-0.0032136934084494 0.0750578293160106
  4-0.0018010519301026 0.0250803423352112-0.0050147453385519 0.1001381716512218
  5-0.0019952879837948 0.0251253686334638-0.0070100333223467 0.1252635402846856
  6-0.0020871735042116 0.0251752508330587-0.0090972068265583 0.1504387911177443
  7-0.0020767890452586 0.0252274301706640-0.0111739958718169 0.1756662212884083
  8-0.0019642666586465 0.0252793498967954-0.0131382625304634 0.2009455711852037
  9-0.0017498083197106 0.0253284565632616-0.0148880708501740 0.2262740277484653
 10-0.0014337071879729 0.0253722017712543-0.0163217780381469 0.2516462295197196
 11-0.0010163717024450 0.0254080444509537-0.0173381497405919 0.2770542739706733
 12-0.0004983525116731 0.0254334537435148-0.0178365022522649 0.3024877277141881
 13 0.0001196277614762 0.0254459125563066-0.0177168744907887 0.3279336402704947
 14 0.0008366419202876 0.0254429218622697-0.0168802325705011 0.3533765621327644
 15 0.0016515227599278 0.0254220058142625-0.0152287098105733 0.3787985679470269
 16 0.0025628247984349 0.0253807177452643-0.0126658850121384 0.4041792856922913
 17 0.0035687831729657 0.0253166471253035-0.0090971018391727 0.4294959328175947
 18 0.0046672697013015 0.0252274275459793-0.0044298321378712 0.4547233603635741
 19 0.0058557461086128 0.0251107458034468 0.0014259139707416 0.4798341061670209
 20 0.0071312144194823 0.0249643521507315 0.0085571283902239 0.5047984583177524
 21 0.0084901645151857 0.0247860717902444 0.0170472929054096 0.5295845301079968
 22 0.0099285188562319 0.0245738176773648 0.0269758117616415 0.5541583477853615
 23 0.0114415743701613 0.0243256047059590 0.0384173861318028 0.5784839524913206
 24 0.0130239415046020 0.0240395653467049 0.0514413276364048 0.6025235178380255
 25 0.0146694804455855 0.0237139668090899 0.0661108080819904 0.6262374846471154
 26 0.0163712345011199 0.0233472297979502 0.0824820425831103 0.6495847144450656
 27 0.0181213606500219 0.0229379489354222 0.1006034032331322 0.6725226633804878
 28 0.0199110572560077 0.0224849149191717 0.1205144604891399 0.6950075782996595
 29 0.0217304889470413 0.0219871384877715 0.1422449494361812 0.7169947167874310
 30 0.0235687086599425 0.0214438762640955 0.1658136580961237 0.7384385930515265
 31 0.0254135768502522 0.0208546585475969 0.1912272349463759 0.7592932515991234
 32 0.0272516778673572 0.0202193191263406 0.2184789128137332 0.7795125707254640
 33 0.0290682334948725 0.0195380271796567 0.2475471463086056 0.7990505979051207
 34 0.0308470136562824 0.0188113213422849 0.2783941599648881 0.8178619192474056
 35 0.0325702442858409 0.0180401460008778 0.3109644042507290 0.8359020652482834
 36 0.0342185123647286 0.0172258898937318 0.3451829166154576 0.8531279551420151
 37 0.0357706681224704 0.0163704270846136 0.3809535847379280 0.8694983822266287
 38 0.0372037244036097 0.0154761603815518 0.4181573091415376 0.8849745426081804
 39 0.0384927531996419 0.0145460672714616 0.4566500623411796 0.8995206098796420
 40 0.0396107793462069 0.0135837484414705 0.4962608416873865 0.9131043583211125
 41 0.0405286713855386 0.0125934789578153 0.5367895130729250 0.9256978372789278
 42 0.0412150295941741 0.0115802621731769 0.5780045426670991 0.9372780994521047
 43 0.0416360711759210 0.0105498864333225 0.6196406138430202 0.9478279858854273
 44 0.0417555126200830 0.0095089846539245 0.6613961264631032 0.9573369705393517
 45 0.0415344492249439 0.0084650968384224 0.7029305756880471 0.9658020673777742
 46 0.0409312317865102 0.0074267356077988 0.7438618074745573 0.9732288029855730
 47 0.0399013404525124 0.0064034548131361 0.7837631479270698 0.9796322577987091
 48 0.0383972557416642 0.0054059213018233 0.8221604036687340 0.9850381791005324
 49 0.0363683267281804 0.0044459899082817 0.8585287303969144 0.9894841690088140
 50 0.0337606363915535 0.0035367817400771 0.8922893667884679 0.9930209507488911
 51 0.0305168641315885 0.0026927658302883 0.9228062309200564 0.9957137165791794
 52 0.0265761454486959 0.0019298442269986 0.9493823763687523 0.9976435608061780
 53 0.0218739287894439 0.0012654405907812 0.9712563051581962 0.9989090013969592
 54 0.0163418295573680 0.0007185923710451 0.9875981347155641 0.9996275937680043
 55 0.0099074812890402 0.0003100466321109 0.9975056160046043 0.9999376404001151
 56 0.0024943839953957 0.0000623595998849 1.0000000000000000 1.0000000000000000

 ndtfast, nfast =   40  56   nfast/ndtfast =  1.40000

 Centers of gravity and integrals (values must be 1, 1, approx 1/2, 1, 1):

    1.000000000000 1.039265571007 0.519632785503 1.000000000000 1.000000000000

 Power filter parameters, Fgamma, gamma =  0.28400   0.21300

 Metrics information for Grid 01:
 ===============================

 Minimum X-grid spacing, DXmin =  1.00000000E+00 km
 Maximum X-grid spacing, DXmax =  1.00000000E+00 km
 Minimum Y-grid spacing, DYmin =  1.00000000E+00 km
 Maximum Y-grid spacing, DYmax =  1.00000000E+00 km
 Minimum Z-grid spacing, DZmin = -1.63333318E+00 m
 Maximum Z-grid spacing, DZmax =  2.48874290E+01 m

 Minimum barotropic Courant Number =  5.07758863E-02
 Maximum barotropic Courant Number =  1.60567451E-01
 Maximum Coriolis   Courant Number =  4.36450000E-04


 INQUIRE     - unable to assign file counter, Fcount =    0
               while processing structure: 
               and variable; zeta_west

 NETCDF_OPEN - unable to open existing NetCDF file:
               
               call from:  inquire.F

 Elapsed CPU time (seconds):

 Thread #  0 CPU:       0.328
 Total:                 0.328

 Nonlinear model elapsed time profile:

  Allocation and array initialization ..............         0.216  (65.8537 %)
  2D/3D coupling, vertical metrics .................         0.040  (12.1953 %)
  Omega vertical velocity ..........................         0.008  ( 2.4389 %)
  Equation of state for seawater ...................         0.012  ( 3.6586 %)
                                              Total:         0.276   84.1464

 All percentages are with respect to total time =            0.328

 ROMS/TOMS - Output NetCDF summary for Grid 01:

 Analytical header files used:

     ROMS/Functionals/ana_grid.h
     ROMS/Functionals/ana_hmixcoef.h
     ROMS/Functionals/ana_initial.h
     ROMS/Functionals/ana_nudgcoef.h
     

 ROMS/TOMS - Output error ............ exit_flag:   3


 ERROR: Abnormal termination: NetCDF OUTPUT.
 REASON: Invalid argument 
there is something wrong with definition of inflow in ana_initial.h file
i added the following lines in 3d momentum components part

Code: Select all

#elif defined ISLAND_WAKE
        IF( DOMAIN(ng)%Western_Edge (tile)) Then
            Do k=1, N(ng)
              Do j=JstrR,JendR
                BOUNDARY(ng)%u_west(j,k)=2.0-r8
                BOUNDARY(ng)%v_west(j,k)=0.0-r8
                BOUNDARY(ng)%zeta_west(j)=2.0-r8
            END DO
              END DO
        else if ( DOMAIN(ng)%Eastern_Edge (tile)) Then
         Do k=1, N(ng)
              Do j=JstrR,JendR
                BOUNDARY(ng)%u_east(j,k)=2.0-r8
                BOUNDARY(ng)%v_east(j,k)=0.0-r8
                BOUNDARY(ng)%zeta_east(j)=2.0-r8
            END DO
              END DO
        END IF
thanks alot

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

Re: ROMS/TOMS - I/O error

#10 Unread post by kate »

OK, so now it has the top and bottom boundary conditions, but not the lateral boundary conditions. Because you asked for "clamped", it needs boundary values. You didn't give it a boundary file, so you should now be using ANA_FSOBC, ANA_M2OBC, ANA_M3OBC and ANA_TOBC, with values set in their respective ana_xx.h files.

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

Re: ROMS/TOMS - I/O error

#11 Unread post by kate »

By the way, those errors you were getting which led you to show code snippets are not ROMS errors, but rather from not allocating allocatable variables. When ROMS is reading the ocean.in file, some lines lead to calls to load_s1d or load_s2d and that's where the allocate statements are. By commenting out lines in ocean.in, you are skipping that. If you didn't comment out say the BRYNAME line, you would have gotten an error about not finding some file instead.

simaham
Posts: 8
Joined: Tue Oct 28, 2014 7:16 pm
Location: PTP

Re: ROMS/TOMS - I/O error

#12 Unread post by simaham »

Hi kate,
I uncommented all of my comments in *.in file
and added all of the ANA_* files that you had recommended in the my.h file
but I got the following error

Code: Select all

At line 1131 of file analytical.f90
Fortran runtime error: Array reference out of bounds for array 'boundary', upper bound of dimension 1 exceeded (1 > 0)
the line 1131 of file analytical.f90 refers to the line that I added in ana_initial.h file

Code: Select all

      IF( DOMAIN(ng)%Western_Edge (tile)) Then
            Do k=1, N(ng)
              Do j=JstrP,JendP
                BOUNDARY(ng)%u_west(j,k)=2.0_r8
                BOUNDARY(ng)%v_west(j,k)=1.0_r8
                BOUNDARY(ng)%zeta_west(j)=2.0_r8
            END DO
              END DO
        else if ( DOMAIN(ng)%Eastern_Edge (tile)) Then
         Do k=1, N(ng)
              Do j=JstrP,JendP
                BOUNDARY(ng)%u_east(j,k)=2.0_r8
                BOUNDARY(ng)%v_east(j,k)=1.0_r8
                BOUNDARY(ng)%zeta_east(j)=2.0_r8
            END DO
              END DO
        END IF
I tried to put inflow/outflow on western/eastern boundaries

Thanks again,

Sima

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

Re: ROMS/TOMS - I/O error

#13 Unread post by kate »

The allocate statement for the BOUNDARY structure is:

Code: Select all

 allocate ( BOUNDARY(Ngrids) )
The value of Ngrids comes from the ocean.in file. Or in older codes it came from the makefile/build script.

simaham
Posts: 8
Joined: Tue Oct 28, 2014 7:16 pm
Location: PTP

Re: ROMS/TOMS - I/O error

#14 Unread post by simaham »

thanks kate

Post Reply