Ocean Modeling Discussion


Search for:
It is currently Fri Nov 24, 2017 3:48 am

Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Author Message
PostPosted: Sat Oct 01, 2011 8:35 pm 

Joined: Wed Jun 22, 2011 1:49 pm
Posts: 3
Location: Stanford University
I am trying to implement river discharge in an idealized domain using input forcing files. I constructed my river forcing file using the CDL file that comes with ROMS trunk. The implementation has been going well in 3D runs for one river or multiple rivers.

HOWEVER, problems occur when I try to run it in 2D mode. It works well when the number of river is ONE, but when it's more than one, it has the following run time error about reading the river_Vshape parameter:


NETCDF_GET_FVAR_1D - error while reading variable: river_Vshape
in input file: input/frc11.nc
call from: get_cycle.F

GET_NGFLD - error while reading variable: river_Vshape at TIME index = 6


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

ERROR: Abnormal termination: NetCDF INPUT.
REASON: NetCDF: Index exceeds dimension bound


I have no idea why the error refers to the TIME index, when the river_Vshape should only have dimensions in S_rho (number of layers) and number of rivers. I've made many futile attempt to change the dimensions and definition of river_Vshape and none works. I even tried to remove river_Vshape from my forcing file, because apparently it shouldn't be required for 2D run (i.e. it must be unity at each river!). But in this case, the model still asks for this variable.

I'm attaching the he full running log and the ncdump of my forcing file for your inspection below. Any prompt help will be greatly appreciated.

Simon Wong

Running log

Model Input Parameters: ROMS/TOMS version 3.5
Monday - October 3, 2011 - 10:46:13 AM

SZ Plume Grid Sensitivity

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

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

Local Root : /home/whcsimon/research/ROMS/trunk
Header Dir : /home/whcsimon/research/ROMS/projects/square_toy/header
Header file : square4.h
Analytical Dir: /home/whcsimon/research/ROMS/projects/square_toy

Resolution, Grid 01: 0005x0040x001, Parallel Threads: 1, Tiling: 001x001

Physical Parameters, Grid: 01

200000 ntimes Number of timesteps for 3-D equations.
0.020 dt Timestep size (s) for 3-D equations.
1 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.
10000000 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).
1000 nHIS Number of timesteps between the writing fields
into history file.
7.0000E-01 nl_visc2 NLM Horizontal, harmonic mixing coefficient
(m2/s) for momentum.
0.0000E+00 rdrg Linear bottom drag coefficient (m/s).
1.0000E-02 rdrg2 Quadratic bottom drag coefficient.
3.0000E-02 Zob Bottom roughness (m).
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 Znudg Nudging/relaxation time scale (days)
for free-surface.
0.0000E+00 M2nudg Nudging/relaxation time scale (days)
for 2D momentum.
0.0000E+00 obcfac Factor between passive and active
open boundary conditions.
-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.

Output/Input Files:

Output Restart File: output/ocean_rst_3.nc
Output History File: output/ocean_his_6.nc
Input Grid File: input/grid4.nc

Tile partition information for Grid 01: 0005x0040 tiling: 001x001

tile Istr Iend Jstr Jend Npts

0 1 5 1 40 200

Tile minimum and maximum fractional grid coordinates:
(interior points only)

tile Xmin Xmax Ymin Ymax grid

0 -2.50 7.50 0.50 41.50 RHO-points

0 -3.00 7.00 0.50 41.50 U-points

0 -2.50 7.50 0.00 41.00 V-points

Activated C-preprocessing Options:

sz SZ Plume Grid Sensitivity
ANA_FSOBC Analytical free-surface boundary conditions.
ANA_INITIAL Analytical initial conditions.
ANA_M2OBC Analytical 2D momentum boundary conditions.
ANA_SMFLUX Analytical kinematic surface momentum flux.
ASSUMED_SHAPE Using assumed-shape arrays.
DJ_GRADPS Parabolic Splines density Jacobian (Shchepetkin, 2002).
DOUBLE_PRECISION Double precision arithmetic.
EW_PERIODIC East-West periodic boundaries.
MASKING Land/Sea masking.
NONLINEAR Nonlinear Model.
NORTHERN_WALL Wall boundary at Northern edge.
PROFILE Time profiling activated .
!RST_SINGLE Double precision fields in restart NetCDF file.
SOUTHERN_WALL Wall boundary at Southern edge.
SPLINES Conservative parabolic spline reconstruction.
THREE_GHOST Using three Ghost Points in halo regions.
UV_ADV Advection of momentum.
UV_QDRAG Quadratic bottom stress.
UV_PSOURCE Mass point sources and sinks.
UV_VIS2 Harmonic mixing of momentum.

Process Information:

Thread # 0 (pid= 1102) is active.

INITIAL: Configuring and initializing forward nonlinear model ...

Minimum X-grid spacing, DXmin = 1.00000000E-03 km
Maximum X-grid spacing, DXmax = 1.00000000E-03 km
Minimum Y-grid spacing, DYmin = 2.50000000E-03 km
Maximum Y-grid spacing, DYmax = 2.50000000E-03 km

Minimum barotropic Courant Number = 9.54132066E-02
Maximum barotropic Courant Number = 9.54132066E-02
Maximum Coriolis Courant Number = 0.00000000E+00

GET_NGFLD - river runoff XI-positions at RHO-points
(Min = 1.00000000E+00 Max = 5.00000000E+00)
GET_NGFLD - river runoff ETA-positions at RHO-points
(Min = 1.00000000E+00 Max = 4.20000000E+01)
GET_NGFLD - river runoff direction
(Min = 1.00000000E+00 Max = 1.00000000E+00)

NETCDF_GET_FVAR_1D - error while reading variable: river_Vshape
in input file: input/frc11.nc
call from: get_cycle.F

GET_NGFLD - error while reading variable: river_Vshape at TIME index = 6

Elapsed CPU time (seconds):

Thread # 0 CPU: 0.008
Total: 0.008

Nonlinear model elapsed time profile:

Allocation and array initialization .............. 0.004 (50.0062 %)
Total: 0.004 50.0062

All percentages are with respect to total time = 0.008

ROMS/TOMS - Output NetCDF summary for Grid 01:

Analytical header files used:


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

ERROR: Abnormal termination: NetCDF INPUT.
REASON: NetCDF: Index exceeds dimension bound

nudump of forcing

NetCDF frc/frc11.nc {

xi_rho = 7 ;
xi_u = 6 ;
xi_v = 7 ;
eta_rho = 42 ;
eta_u = 42 ;
eta_v = 41 ;
s_rho = 1 ;
river = 6 ;
river_time = 3 ;

// Preference 'PRESERVE_FVD': false,
// dimensions consistent with ncBrowse, not with native MATLAB netcdf package.
double river(river), shape = [6]
river:long_name = "river runoff identification number"
double river_Xposition(river), shape = [6]
river_Xposition:long_name = "river XI-position at RHO-points"
river_Xposition:valid_min = 1
river_Xposition:valid_max = 41
double river_Eposition(river), shape = [6]
river_Eposition:long_name = "river ETA-position at RHO-points"
river_Eposition:valid_min = 1
river_Eposition:valid_max = 69
double river_direction(river), shape = [6]
river_direction:long_name = "river runoff direction"
double river_time(river_time), shape = [3]
river_time:long_name = "river runoff time"
river_time:units = "days since 00:00:00"
river_time:add_offset = 0
double river_Vshape(s_rho,river), shape = [1 6]
river_Vshape:long_name = "river runoff mass transport vertical profile"
double river_transport(river_time,river), shape = [3 6]
river_transport:long_name = "river runoff vertically integrated mass transport"
river_transport:units = "meter3 second-1"
river_transport:time = "river_time"
double river_temp(river_time,s_rho,river), shape = [3 1 6]
river_temp:long_name = "river runoff potential temperature"
river_temp:units = "Celsius"
river_temp:time = "river_time"
double river_salt(river_time,s_rho,river), shape = [3 1 6]
river_salt:long_name = "river runoff salinity"
river_salt:time = "river_time"

//global Attributes:
:type = "ROMS FORCING file"
:title = "RIVERPLUME1 test case"
:grd_file = "xxx.nc"
:rivers = "Random rivers"


Reply with quote  
PostPosted: Thu Jul 17, 2014 2:56 pm 

Joined: Tue Jul 24, 2012 8:36 pm
Posts: 6
Location: Yantai Institute of Coastal Zone Research
Hi, everyone! I also have met the same problem, " GET_NGFLD -error while reading variable: river_Vshape at TIME index = 1"
I also wondered what wrong is it, please help me,thank you very much.

Reply with quote  
PostPosted: Fri Jul 18, 2014 12:38 am 
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3254
Location: IMS/UAF, USA
What happens if you tell it not to read Vshape in get_idata.F? You can put "#ifdef SOLVE3D" around that section.

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group