Problem with reading grid size!

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
leikvin
Posts: 4
Joined: Thu Jul 09, 2009 4:45 am
Location: Akvaplan-niva

Problem with reading grid size!

#1 Unread post by leikvin »

Dear Roms-friends,

I am a new user to ROMS, and my understanding is still limited :D .

I am now going to run a 2D-model, to get indications on the barotropic component of the ocean current in the model domain.

I want have a parallel run, with MPI. I have compiled the structure, OK.
I have Netcdf installed, but I am not sure if it is correctly done, yet.

In my PROJECT.in file, I have written the dimensions of the grid (1081*1951*1).
I try to run the model, and do get a listing right away. However, when the resolution is listed, it comes up with
0000x0000x0000

How come?

Can anybody help me, please?

Best regard
leikvin

The listing is printed below:

Process Information:

Node # 1 (pid= 31162) is active.
Node # 2 (pid= 31163) is active.
Node # 3 (pid= 31164) is active.
Node # 0 (pid= 31161) is active.

Model Input Parameters: ROMS/TOMS version 3.2
Wednesday - July 22, 2009 - 3:38:45 PM
-----------------------------------------------------------------------------

ROMS/TOMS 3.2 - enisim_100

Operating system : Linux
CPU/hardware : x86_64
Compiler system : ifort
Compiler command : mpif90
Compiler flags : -heap-arrays -ip -O3 -xW -free

Input Script : ENI_100.in

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

Local Root : /home/ovanov/OL/roms_3.2
Header Dir : /home/ovanov/OL/roms_3.2/mycode/EniSim_100
Header file : enisim_100.h
Analytical Dir: mycode/EniSim_100

Resolution, Grid 01: 0000x0000x000, Parallel Nodes: 4, Tiling: 002x002


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

720 ntimes Number of timesteps for 3-D equations.
60.000 dt Timestep size (s) for 3-D equations.
60 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.
360 nRST Number of timesteps between the writing of data
into restart fields.
2 ninfo Number of timesteps between print of information
to standard output.
T ldefout Switch to create a new output NetCDF file(s).
90 nHIS Number of timesteps between the writing fields
into history file.
720 ndefHIS Number of timesteps between creation of new
history files.
1.0000E-01 visc2 Horizontal, harmonic mixing coefficient (m2/s)
for momentum.
1.0000E-05 Akv_bak Background vertical mixing coefficient (m2/s)
for momentum.
5.0000E-06 Akk_bak Background vertical mixing coefficient (m2/s)
for turbulent energy.
5.0000E-06 Akp_bak Background vertical mixing coefficient (m2/s)
for turbulent generic statistical field.
0.0000E+00 rdrg Linear bottom drag coefficient (m/s).
3.0000E-03 rdrg2 Quadratic bottom drag coefficient.
2.0000E-02 Zob Bottom roughness (m).
1 Vtransform S-coordinate transformation equation.
1 Vstretching S-coordinate stretching function.
5.0000E+00 theta_s S-coordinate surface control parameter.
6.0000E-01 theta_b S-coordinate bottom control parameter.
20.000 Tcline S-coordinate surface/bottom layer width (m) used
in vertical coordinate stretching.
1025.000 rho0 Mean density (kg/m3) for Boussinesq approximation.
54191.000 dstart Time-stamp assigned to model initialization (days).
0.000 tide_start Reference time origin for tidal forcing (days).
18581117.00 time_ref Reference time for units attribute (yyyymmdd.dd)
2.5000E+01 Znudg Nudging/relaxation time scale (days)
for free-surface.
2.5000E+01 M2nudg Nudging/relaxation time scale (days)
for 2D momentum.
2.5000E+01 M3nudg Nudging/relaxation time scale (days)
for 3D momentum.
2.5000E+01 obcfac Factor between passive and active
open boundary conditions.
6.000 T0 Background potential temperature (C) constant.
34.800 S0 Background salinity (PSU) constant.
-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: ocean_rst.nc
Prefix for History Files: ocean_his
Input Grid File: ENI_100_v3_grd.nc
Input Nonlinear Initial File: ENI_100_v3_ini.nc
Input Forcing File 01: ENI_100m_windstress_Uni.nc
Input Forcing File 02: ENI_100_tidal_frc_v3.nc
Input Climatology File: ENI_100_clm.nc
Input Boundary File: ENI_100_bry.nc
Input/Output USER File: External/MyFile.dat

Generic User Parameters:

2.5000E+01 user(01) User parameter 01.
2.5000E+01 user(02) User parameter 02.

Tile partition information for Grid 01: 0000x0000x0000 tiling: 002x002

tile Istr Iend Jstr Jend Npts

0 1 0 1 0 0

INP_PAR - domain decomposition error in input script file for grid: 1

The domain partition parameter, NtileI = 2
is incompatible with grid size, Lm = 0
because it yields too small tile, Istr = 1 Iend = 0
Decrease partition parameter: NtileI

Elapsed CPU time (seconds):

4 total processes killed (some possibly by mpirun during cleanup)

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

Re: Problem with reading grid size!

#2 Unread post by kate »

To run in 2D, you need to turn off SOLVE3D. For a 2D run, you need to have NDTFAST == 1. In this,

Code: Select all

          Lm == 540           ! Number of I-direction INTERIOR RHO-points
          Mm == 768           ! Number of J-direction INTERIOR RHO-points
           N == 42            ! Number of vertical levels
it will completely ignore the N value and will not attempt to print it.

leikvin
Posts: 4
Joined: Thu Jul 09, 2009 4:45 am
Location: Akvaplan-niva

Re: Problem with reading grid size!

#3 Unread post by leikvin »

Thank you for help, Kate!

Now I have done a new effort in switching off all 3D-options.

However, still I seem to not manage to read the grid size numbers from the .in file.
Why?

I still get 0000x0000x0000, even if I have numbers written in the .in-file.

Is it true that the .in-file-options are listed in the ocean.out file, before the .nc-files actually are read, or am I wrong here?

Could it be something wrong with the mpi-options, or perhaps the grid dimension? Anyway, I thought that the .in-file options would be listed first.
All other options seems to be read correctly, apart from the grid size!

Hoping for help...

Best regards
leikvin

Output from the ocean.out-file:

------------------------------------

Process Information:

Node # 0 (pid= 27116) is active.
Node # 1 (pid= 27117) is active.
Node # 2 (pid= 27118) is active.
Node # 3 (pid= 27119) is active.

Model Input Parameters: ROMS/TOMS version 3.2
Thursday - August 20, 2009 - 4:29:16 PM
-----------------------------------------------------------------------------

ROMS/TOMS 3.2 - eni_100

Operating system : Linux
CPU/hardware : x86_64
Compiler system : ifort
Compiler command : mpif90
Compiler flags : -heap-arrays -ip -O3 -xW -free

Input Script : ENI_100.in

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

Local Root : /home/ovanov/OL/roms_3.2
Header Dir : /home/ovanov/OL/roms_3.2/mycode/EniSim_100
Header file : enisim_100.h
Analytical Dir: mycode/EniSim_100

Resolution, Grid 01: 0000x0000x000, Parallel Nodes: 4, Tiling: 002x002


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

720 ntimes Number of timesteps for 3-D equations.
60.000 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.
360 nRST Number of timesteps between the writing of data
into restart fields.
2 ninfo Number of timesteps between print of information
to standard output.
T ldefout Switch to create a new output NetCDF file(s).
90 nHIS Number of timesteps between the writing fields
into history file.
720 ndefHIS Number of timesteps between creation of new
history files.
1.0000E-01 visc2 Horizontal, harmonic mixing coefficient (m2/s)
for momentum.
0.0000E+00 rdrg Linear bottom drag coefficient (m/s).
3.0000E-03 rdrg2 Quadratic bottom drag coefficient.
2.0000E-02 Zob Bottom roughness (m).
1025.000 rho0 Mean density (kg/m3) for Boussinesq approximation.
54191.000 dstart Time-stamp assigned to model initialization (days).
0.000 tide_start Reference time origin for tidal forcing (days).
18581117.00 time_ref Reference time for units attribute (yyyymmdd.dd)
2.5000E+01 Znudg Nudging/relaxation time scale (days)
for free-surface.
2.5000E+01 M2nudg Nudging/relaxation time scale (days)
for 2D momentum.
2.5000E+01 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: ocean_rst.nc
Prefix for History Files: ocean_his
Input Grid File: ENI_100_v3_grd.nc
Input Nonlinear Initial File: ENI_100_v3_ini.nc
Input Forcing File 01: ENI_100m_windstress_Uni.nc
Input Forcing File 02: ENI_100_tidal_frc_v3.nc
Input Boundary File: ENI_100_bry.nc
Input/Output USER File: External/MyFile.dat

Generic User Parameters:

2.5000E+01 user(01) User parameter 01.
2.5000E+01 user(02) User parameter 02.

Tile partition information for Grid 01: 0000x0000 tiling: 002x002

tile Istr Iend Jstr Jend Npts

0 1 0 1 0 0

INP_PAR - domain decomposition error in input script file for grid: 1

The domain partition parameter, NtileI = 2
is incompatible with grid size, Lm = 0
because it yields too small tile, Istr = 1 Iend = 0
Decrease partition parameter: NtileI

Elapsed CPU time (seconds):

4 total processes killed (some possibly by mpirun during cleanup)

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

Re: Problem with reading grid size!

#4 Unread post by kate »

Yes, the ocean.in file is read very early in the initialization - it provides the file names to be read.

Are you sure you have lines something like these?

Code: Select all

          Lm == 14            ! Number of I-direction INTERIOR RHO-points
          Mm == 12            ! Number of J-direction INTERIOR RHO-points
           N == 1             ! Number of vertical levels
If so, I'd break out the debugger and watch what happens in inp_par.

leikvin
Posts: 4
Joined: Thu Jul 09, 2009 4:45 am
Location: Akvaplan-niva

Re: Problem with reading grid size!

#5 Unread post by leikvin »

Hi, again!

Now I have set debug to "ON" in the makefile, and I do receive an "oceanG"-file when compiling.

When trying to run the model, I still get the same output in the ocean.out-file like written above, even if the debugger has been activated (or have I missed something?). The oceanG-file seems to be somewhat bigger than the oceanM-file, so it seems to be working. I have also removed the oceanM-file, just to be sure.

I have been looking at the inp_par-file, but I am not sure exactly what to look for...

In the ocean.in-file it is, amongst others, written:

--------------------------
Lm == 1079 ! Number of I-direction INTERIOR RHO-points
Mm == 1949 ! Number of J-direction INTERIOR RHO-points
N == 1 ! Number of vertical levels

Nbed == 0 ! Number of sediment bed layers

NAT == 0 ! Number of active tracers
NPT == 0 ! Number of inactive passive tracers
NCS == 0 ! Number of cohesive (mud) seidment tracers
NNS == 0 ! Number of non-cohesive (sand) sediment tracers
! Domain decomposition parameters for serial, distributed-memory or
! shared-memory configurations used to determine tile horizontal range
! indices (Istr,Iend) and (Jstr,Jend), [1:Ngrids].

NtileI == 2 ! I-direction partition
NtileJ == 2 ! J-direction partition

! Time-Stepping parameters.

NTIMES = 720 ! run for 12 hours total
DT == 60.0d0 ! long time step every 1 min
NDTFAST == 1 ! short time step every 1 sec

--------------------------------------------

Have I forgotten something when trying to run in debugging mode?

Any tip on how to progress?

All ideas are welcome :roll:

Best regards

leikvin

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

Re: Problem with reading grid size!

#6 Unread post by kate »

Well, the point of the oceanG file is that you run it from within a debugger. The one I use is totalview, which is one of the few to work with parallel codes.

leikvin
Posts: 4
Joined: Thu Jul 09, 2009 4:45 am
Location: Akvaplan-niva

Re: Problem with reading grid size!

#7 Unread post by leikvin »

Jippiii!
Finally finding the reason for not being able to read the .in-file properly.

The reason was that there was about 5 <TAB>s spread over the infile, which confused the model to not read variables properly. This was the case with the grid size!!!

I removed these <TAB>s and then I managed to progress further :D

On we go!

leikvin

Post Reply