## Problems with basic model

Discussion of how to use ROMS on different regional and basin scale applications.

Moderators: arango, robertson

Message
Author
nils.lindeen
Posts: 19
Joined: Fri Jul 30, 2010 3:56 am
Location: Pontifica Universidad Catolica de Chile

### Problems with basic model

Hi,

I've been creating a basic tidal model for a fjords region in the South of Chile, yet when I run the model I get the following:

INITIAL: Configuring and initializing forward nonlinear model ...

Minimum X-grid spacing, DXmin = 1.30679698E+01 km
Maximum X-grid spacing, DXmax = 1.36471318E+01 km
Minimum Y-grid spacing, DYmin = 1.54879672E+01 km
Maximum Y-grid spacing, DYmax = 1.61743829E+01 km

Minimum barotropic Courant Number = 2.89402500E-02
Maximum barotropic Courant Number = 9.27620490E-01
Maximum Coriolis Courant Number = 5.05579105E-03

GET_NGFLD - tidal period
(Min = 4.47141600E+04 Max = 4.47141600E+04)
GET_2DFLD - tidal elevation amplitude
(Min = 0.00000000E+00 Max = 2.29857027E+00)
GET_2DFLD - tidal elevation phase angle
(Min = 2.25224429E+00 Max = 5.00462852E+00)
GET_2DFLD - tidal current inclination angle
(Min = 0.00000000E+00 Max = 6.28298242E+00)
GET_2DFLD - tidal current phase angle
(Min = 0.00000000E+00 Max = 6.26794571E+00)
GET_2DFLD - maximum tidal current, ellipse major axis
(Min = 0.00000000E+00 Max = 1.39033768E+00)
GET_2DFLD - minimum tidal current, ellipse minor axis
(Min = -5.48086133E-02 Max = 1.86995283E-01)

Initial basin volumes: TotVolume = 2.1435121769E+13 m3
MinVolume = 7.3575904785E+08 m3
MaxVolume = 7.0505585568E+11 m3
Max/Min = 9.5827004470E+02

NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 00000001 - 00017280)

STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME

0 0 00:00:00 0.000000E+00 0.000000E+00 0.000000E+00 2.143512E+13
DEF_HIS - creating history file: nils_his_2.nc
WRT_HIS - wrote history fields (Index=1) into time record = 0000001
72 0 01:00:00 NaN NaN NaN NaN

Elapsed CPU time (seconds):

Thread # 0 CPU: 4.088
Total: 4.088

Nonlinear model elapsed time profile:

Initialization ................................... 0.004 ( 0.0978 %)
Reading of input data ............................ 0.004 ( 0.0978 %)
Computation of vertical boundary conditions ...... 0.160 ( 3.9138 %)
Computation of global information integrals ...... 0.004 ( 0.0978 %)
Writing of output data ........................... 0.004 ( 0.0979 %)
Model 2D kernel .................................. 3.868 (94.6185 %)
Tidal forcing .................................... 0.016 ( 0.3914 %)
Total: 4.060 99.3151

All percentages are with respect to total time = 4.088

ROMS/TOMS - Output NetCDF summary for Grid 01:
number of time records written in HISTORY file = 00000001

Analytical header files used:

ROMS/Functionals/ana_fsobc.h
ROMS/Functionals/ana_initial.h
ROMS/Functionals/ana_m2obc.h
ROMS/Functionals/ana_smflux.h

ROMS/TOMS - Blows up ................ exit_flag: 1

Does anyone happen to know why it is blowing up? The coriolis parameter looks good, but I cannot manage to get why the model Blows Up.

I also have a problem when I try to compile another model. i don't know why, but I get the following mistake:

In file included from Compilers/make_macros.h:17:
Compilers/../ROMS/Include/cppdefs.h:750: error: /home/nils/Projects/nils/Inputs/nils.h: No existe el archivo o directorio
/bin/sh: cannot create Build/MakeDepend: Permission denied

I hope, someone can give some kind of solution to these problems, they have me kind of stuck at the moement. Thanks alot.

Cheers,

Nils

ocecept
Posts: 41
Joined: Tue Jan 08, 2008 3:57 pm
Location: Universidade Federal do Ceará
Contact:

### Re: Problems with basic model

Regarding the first problem, I would recommend you to save the output every time step to see where the problem occurs. Also post the configurations you have used in the model (your *.h file), it will let us to help you.

Regarding the second problem, the model is telling you the problem:

/home/nils/Projects/nils/Inputs/nils.h: No existe el archivo o directorio

Do you have this file in the right place? Are referring to the right *.h file?

Cheers

Carlos Teixeira

shchepet
Posts: 185
Joined: Fri Nov 14, 2003 4:57 pm

### Re: Problems with basic model

....
Maximum barotropic Courant Number = 9.27620490E-01
....
is a bit too much. Increase ndtfast slightly, by 10...20%,
or reduce main time step by the same fraction.

Also make output at every time step to see how the instability
develops.

nils.lindeen
Posts: 19
Joined: Fri Jul 30, 2010 3:56 am
Location: Pontifica Universidad Catolica de Chile

### Re: Problems with basic model

Thanks to both of you. I will follow your recommendations and let you know how I do. I can then post my .h file.

Cheers,

Nils

nils.lindeen
Posts: 19
Joined: Fri Jul 30, 2010 3:56 am
Location: Pontifica Universidad Catolica de Chile

### Re: Problems with basic model

Carlos,

You were right about the second problem, I had the .h file referred wrong. Anyway, I continue getting the same error. It seems like it does not give me permission to enter some certain file. This is what I get:

/bin/sh: cannot create Build/MakeDepend: Permission denied
make: *** No hay ninguna regla para construir el objetivo `Build/MakeDepend', necesario para `all'. Alto.

Anyway, here goes my configurations if it helps by any chance:

#define UV_VIS2
#define UV_COR
#define UV_QDRAG
#define TS_FIXED
#undef AVERAGES
#define CURVGRID
#undef SOLVE3D
#undef SPLINES
#define MIX_S_UV
#undef ZCLIMATOLOGY
#define M2CLIMATOLOGY
#define EASTERN_WALL
#define SSH_TIDES
#ifdef SSH_TIDES
# define RAMP_TIDES
# define WEST_FSCHAPMAN
# define SOUTH_FSCHAPMAN
# define NORTH_FSCHAPMAN
#else
#endif
#define UV_TIDES
#ifdef UV_TIDES
# define WEST_M2FLATHER
# define SOUTH_M2FLATHER
# define NORTH_M2FLATHER
#else
#endif
#define ANA_FSOBC
#define ANA_M2OBC
#define ANA_TCLIMA
#define ANA_M2CLIMA
#define ANA_SMFLUX
#define ANA_SRFLUX
#define ANA_INITIAL

About the second problem, I tried all the instructions you both gave me, yet I continue getting the same error:

Process Information:

Thread # 0 (pid= 3376) is active.

Model Input Parameters: ROMS/TOMS version 3.4
Thursday - January 13, 2011 - 5:45:33 PM
-----------------------------------------------------------------------------

Barotopic Tides in the Chilean Inland Sea

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

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

Local Root : /home/nils/MyDir
Header Dir : /home/nils/Projects/nils
Header file : nils.h
Analytical Dir: /home/nils/MyDir/ROMS/Functionals

Resolution, Grid 01: 0018x0018x001, Parallel Threads: 1, Tiling: 001x001

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

17280 ntimes Number of timesteps for 3-D equations.
40.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.
86400 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).
1 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.
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).
1025.000 rho0 Mean density (kg/m3) for Boussinesq approximation.
0.000 dstart Time-stamp assigned to model initialization (days).
0.000 tide_start Reference time origin for tidal forcing (days).
0.00 time_ref Reference time for units attribute (yyyymmdd.dd)
0.0000E+00 Znudg Nudging/relaxation time scale (days)
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: nils_rst.nc
Output History File: nils_his_2.nc
Input Grid File: /home/nils/Projects/nils/Inputs/nils_grd_2.nc

Tile partition information for Grid 01: 0018x0018 tiling: 001x001

tile Istr Iend Jstr Jend Npts

0 1 18 1 18 324

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

tile Xmin Xmax Ymin Ymax grid

0 -0.50 20.50 -0.50 20.50 RHO-points

0 -0.50 20.50 -0.50 20.50 U-points

0 -0.50 20.50 -0.50 20.50 V-points

Activated C-preprocessing Options:

NILS Barotopic Tides in the Chilean Inland Sea
ADD_FSOBC Adding tidal elevation to proccesed OBC data.
ADD_M2OBC Adding tidal currents to proccesed OBC data.
ANA_FSOBC Analytical free-surface boundary conditions.
ANA_INITIAL Analytical initial conditions.
ANA_M2CLIMA Analytical 2D momentum climatology.
ANA_M2OBC Analytical 2D momentum boundary conditions.
ANA_SMFLUX Analytical kinematic surface momentum flux.
ASSUMED_SHAPE Using assumed-shape arrays.
CURVGRID Orthogonal curvilinear grid.
DJ_GRADPS Parabolic Splines density Jacobian (Shchepetkin, 2002).
DOUBLE_PRECISION Double precision arithmetic.
EASTERN_WALL Wall boundary at Eastern edge.
NONLINEAR Nonlinear Model.
NORTH_FSCHAPMAN Northern edge, free-surface, Chapman condition.
NORTH_M2FLATHER Northern edge, 2D momentum, Flather condition.
PROFILE Time profiling activated .
RADIATION_2D Use tangential phase speed in radiation conditions.
RAMP_TIDES Ramping tidal forcing for one day.
!RST_SINGLE Double precision fields in restart NetCDF file.
SOUTH_FSCHAPMAN Southern edge, free-surface, Chapman condition.
SOUTH_M2FLATHER Southern edge, 2D momentum, Flather condition.
SSH_TIDES Add tidal elevation to SSH climatology.
TS_FIXED Diagnostic configuration, no evolution of tracer.
UV_COR Coriolis term.
UV_QDRAG Quadratic bottom stress.
UV_TIDES Add tidal currents to 2D momentum climatologies.
UV_VIS2 Harmonic mixing of momentum.
WEST_FSCHAPMAN Western edge, free-surface, Chapman condition.
WEST_M2FLATHER Western edge, 2D momentum, Flather condition.

INITIAL: Configuring and initializing forward nonlinear model ...

Minimum X-grid spacing, DXmin = 1.30679698E+01 km
Maximum X-grid spacing, DXmax = 1.36471318E+01 km
Minimum Y-grid spacing, DYmin = 1.54879672E+01 km
Maximum Y-grid spacing, DYmax = 1.61743829E+01 km

Minimum barotropic Courant Number = 2.31522000E-02
Maximum barotropic Courant Number = 7.42096392E-01
Maximum Coriolis Courant Number = 4.04463284E-03

GET_NGFLD - tidal period
(Min = 4.47141600E+04 Max = 4.47141600E+04)
GET_2DFLD - tidal elevation amplitude
(Min = 0.00000000E+00 Max = 2.29857027E+00)
GET_2DFLD - tidal elevation phase angle
(Min = 2.25224429E+00 Max = 5.00462852E+00)
GET_2DFLD - tidal current inclination angle
(Min = 0.00000000E+00 Max = 6.28298242E+00)
GET_2DFLD - tidal current phase angle
(Min = 0.00000000E+00 Max = 6.26794571E+00)
GET_2DFLD - maximum tidal current, ellipse major axis
(Min = 0.00000000E+00 Max = 1.39033768E+00)
GET_2DFLD - minimum tidal current, ellipse minor axis
(Min = -5.48086133E-02 Max = 1.86995283E-01)

Initial basin volumes: TotVolume = 2.1435121769E+13 m3
MinVolume = 7.3575904785E+08 m3
MaxVolume = 7.0505585568E+11 m3
Max/Min = 9.5827004470E+02

NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 00000001 - 00017280)

STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME

0 0 00:00:00 0.000000E+00 0.000000E+00 0.000000E+00 2.143512E+13
DEF_HIS - creating history file: nils_his_2.nc
WRT_HIS - wrote history fields (Index=1) into time record = 0000001
1 0 00:00:40 NaN 0.000000E+00 NaN 2.143512E+13

Elapsed CPU time (seconds):

Thread # 0 CPU: 0.048
Total: 0.048

Nonlinear model elapsed time profile:

Initialization ................................... 0.008 (16.6660 %)
Reading of input data ............................ 0.004 ( 8.3330 %)
Model 2D kernel .................................. 0.012 (25.0010 %)
Total: 0.024 50.0000

All percentages are with respect to total time = 0.048

ROMS/TOMS - Output NetCDF summary for Grid 01:
number of time records written in HISTORY file = 00000001

Analytical header files used:

ROMS/Functionals/ana_fsobc.h
ROMS/Functionals/ana_initial.h
ROMS/Functionals/ana_m2obc.h
ROMS/Functionals/ana_smflux.h

ROMS/TOMS - Blows up ................ exit_flag: 1

MAIN: Abnormal termination: BLOWUP.

I cannot manage to figure out, what can be going wrong. I already checked my input files, and there seems to be no problem at all. The error makes no sense. Hope someone knows what can be going wrong. Thanks alot.

Nils

jivica
Posts: 122
Joined: Mon May 05, 2003 2:41 pm
Location: The University of Western Australia, Perth, Australia

### Re: Problems with basic model

You should check your setup, think there is a problem
- do you use "tide.nc" file with tidal info for zeta and tidal ellipses or pure ANA?
(if so you have specified ANA_FSOBC as well, hope you know what you are doing)
2. you used ndtfast==1 ?! if not in 2D does not make much sense..
3. I usually keep CFL round 0.75 (you can compute dtmin for your setup and with that get ndtfast)
something like: min(0.75./sqrt(9.81*grid.h.*(grid.pm.^2+grid.pn.^2))) to get 0.75
4. Do you have nan in your bathy of some really small depth? What do you use for vertical structure?
When having NaN in the very first timestep than something is wrong in the input or setup...
I would recommend to check your grid and .h file
Seems that you do not have permission to write in the folder?

Cheers
Ivica

tony1230
Posts: 87
Joined: Wed Mar 31, 2010 3:29 pm
Location: SKLEC,ECNU,Shanghai,China

### Re: Problems with basic model

hi guys
as to the frist problem, you should check your initial netcdf file,
to see if some 'NaN' in temp, salt, depth or bottom drag cofficient values.
I'v get the similar prob times, every time i see the 'NaN', there muse be
odd values.

tony

nils.lindeen
Posts: 19
Joined: Fri Jul 30, 2010 3:56 am
Location: Pontifica Universidad Catolica de Chile

### Re: Problems with basic model

Hi guys,

Thanks alot for all your posts, they were really helpful. Finally I had a problem with my grid input file, and how I had my land points given.

I managed to make it run, yet now I get the following mistake:

WRT_HIS - error while writing variable: zeta
into history NetCDF file for time record: ****

Elapsed CPU time (seconds):

Thread # 0 CPU: 260.060
Total: 260.060

Nonlinear model elapsed time profile:

Initialization ................................... 0.028 ( 0.0108 %)
Reading of input data ............................ 0.020 ( 0.0077 %)
Processing of input data ......................... 0.864 ( 0.3322 %)
Computation of vertical boundary conditions ...... 4.360 ( 1.6766 %)
Computation of global information integrals ...... 0.428 ( 0.1646 %)
Writing of output data ........................... 25.406 ( 9.7691 %)
Model 2D kernel .................................. 186.912 (71.8725 %)
Tidal forcing .................................... 41.303 (15.8819 %)
Total: 259.320 99.7154

All percentages are with respect to total time = 260.060

ROMS/TOMS - Output NetCDF summary for Grid 01:
number of time records written in HISTORY file = 00013003

Analytical header files used:

ROMS/Functionals/ana_fsobc.h
ROMS/Functionals/ana_initial.h
ROMS/Functionals/ana_m2obc.h
ROMS/Functionals/ana_smflux.h

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

ERROR: Abnormal termination: NetCDF OUTPUT.
REASON: NetCDF: Numeric conversion not representable

Does anyone know why I'm getting a calculation mistake? Where can I check the mistake and try to solve it? Thanks so much.

Regards,

Nils

kate
Posts: 3678
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

### Re: Problems with basic model

It seems your zeta is blowing up on you. Are you getting the diag output every timestep? If so, it's surprising that that didn't trigger the writing of a restart record and then the model dying.

mumzy
Posts: 3
Joined: Fri Aug 31, 2018 1:55 pm
Location: University of Science and Techbology of China

### Re: Problems with basic model

kate wrote:It seems your zeta is blowing up on you. Are you getting the diag output every timestep? If so, it's surprising that that didn't trigger the writing of a restart record and then the model dying.
So,dou you know what's the problem if NINFO == 1?