roms blow up

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
gmxwx
Posts: 2
Joined: Thu Oct 13, 2011 12:46 pm
Location: sysu

roms blow up

#1 Unread post by gmxwx »

can anybody help me with the problem of blowing up? I've check whether there is any nan data in the init and grid file and find none. following is the output of the model

Model Input Parameters: ROMS/TOMS version 3.6
Monday - April 9, 2012 - 10:16:06 PM
-----------------------------------------------------------------------------

Wind-Driven Upwelling/Downwelling over a Periodic Channel

Operating system : Linux
CPU/hardware : i686
Compiler system : ifort
Compiler command : /opt/intel/composer_xe_2011_sp1.6.233/bin/ia32/ifort
Compiler flags : -heap-arrays -fp-model precise -ip -O3 -free -free

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

Local Root : /home/zh/roms
Header Dir : /home/zh/roms/ROMS/Include
Header file : scs.h
Analytical Dir: /home/zh/roms/ROMS/Functionals

Resolution, Grid 01: 0108x0088x020, Parallel Threads: 1, Tiling: 001x001


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

1440 ntimes Number of timesteps for 3-D equations.
5.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.
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.
1 ntsAVG Starting timestep for the accumulation of output
time-averaged data.
72 nAVG Number of timesteps between the writing of
time-averaged data into averages file.
2.0000E+01 nl_tnu2(01) NLM Horizontal, harmonic mixing coefficient
(m2/s) for tracer 01: temp
2.0000E+01 nl_tnu2(02) NLM Horizontal, harmonic mixing coefficient
(m2/s) for tracer 02: salt
5.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.
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.
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.
5.0000E+00 theta_s S-coordinate surface control parameter.
4.0000E-01 theta_b S-coordinate bottom control parameter.
200.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.000 tide_start Reference time origin for tidal forcing (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.
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.
T Hout(idTvar) Write out tracer 01: temp
T Hout(idTvar) Write out tracer 02: salt

T Aout(idFsur) Write out averaged free-surface.
T Aout(idUbar) Write out averaged 2D U-momentum component.
T Aout(idVbar) Write out averaged 2D V-momentum component.
T Aout(idUvel) Write out averaged 3D U-momentum component.
T Aout(idVvel) Write out averaged 3D V-momentum component.
T Aout(idWvel) Write out averaged W-momentum component.
T Aout(idOvel) Write out averaged omega vertical velocity.
T Aout(idTvar) Write out averaged tracer 01: temp
T Aout(idTvar) Write out averaged tracer 02: salt

Output/Input Files:

Output Restart File: ocean_rst.nc
Output History File: ocean_his.nc
Output Averages File: ocean_avg.nc
Input Grid File: /home/zh/roms/Data/ROMS/Grid/scs-grid.nc
Input Nonlinear Initial File: /home/zh/roms/Data/ROMS/Initial/scs-init.nc

Tile partition information for Grid 01: 0108x0088x0020 tiling: 001x001

tile Istr Iend Jstr Jend Npts

0 1 108 1 88 190080

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

tile Xmin Xmax Ymin Ymax grid

0 -2.50 111.50 0.50 89.50 RHO-points

0 -3.00 111.00 0.50 89.50 U-points

0 -2.50 111.50 0.00 89.00 V-points

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

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

zeta 1 Periodic Closed Closed Closed

ubar 1 Periodic Closed Closed Closed

vbar 1 Periodic Closed Closed Closed

u 1 Periodic Closed Closed Closed

v 1 Periodic Closed Closed Closed

temp 1 Periodic Closed Closed Closed

salt 1 Periodic Closed Closed Closed

tke 1 Periodic Closed Closed Closed

Activated C-preprocessing Options:

scs Wind-Driven Upwelling/Downwelling over a Periodic Channel
ANA_BTFLUX Analytical kinematic bottom temperature flux.
ANA_SMFLUX Analytical kinematic surface momentum flux.
ANA_STFLUX Analytical kinematic surface temperature flux.
ASSUMED_SHAPE Using assumed-shape arrays.
AVERAGES Writing out time-averaged nonlinear model fields.
DJ_GRADPS Parabolic Splines density Jacobian (Shchepetkin, 2002).
DOUBLE_PRECISION Double precision arithmetic.
KANTHA_CLAYSON Kantha and Clayson stability function formulation.
MASKING Land/Sea masking.
MIX_GEO_TS Mixing of tracers along geopotential surfaces.
MIX_S_UV Mixing of momentum along constant S-surfaces.
MY25_MIXING Mellor/Yamada Level-2.5 mixing closure.
NONLINEAR Nonlinear Model.
NONLIN_EOS Nonlinear Equation of State for seawater.
N2S2_HORAVG Horizontal smoothing of buoyancy and shear.
POWER_LAW Power-law shape time-averaging barotropic filter.
PROFILE Time profiling activated .
K_GSCHEME Third-order upstream advection of TKE fields.
!RST_SINGLE Double precision fields in restart NetCDF file.
SOLVE3D Solving 3D Primitive Equations.
SPLINES Conservative parabolic spline reconstruction.
SSH_TIDES Add tidal elevation to SSH climatology.
TS_MPDATA Recursive flux corrected MPDATA 3D advection of tracers.
TS_DIF2 Harmonic mixing 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_QDRAG Quadratic bottom stress.
UV_TIDES Add tidal currents to 2D momentum climatologies.
UV_VIS2 Harmonic mixing of momentum.
VAR_RHO_2D Variable density barotropic mode.

Process Information:

Thread # 0 (pid= 6893) is active.

INITIAL: Configuring and initializing forward nonlinear model ...

anger
anger

Vertical S-coordinate System:

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

20 0.0000000 0.0000000 0.000 0.000 0.000 0.000
19 -0.0500000 -0.0005206 -1.670 -5.052 -9.755 -11.110
18 -0.1000000 -0.0021144 -3.347 -10.211 -21.160 -25.656
17 -0.1500000 -0.0048798 -5.033 -15.488 -34.364 -43.953
16 -0.2000000 -0.0089871 -6.727 -20.899 -49.629 -66.546
15 -0.2500000 -0.0146880 -8.431 -26.469 -67.342 -94.242
14 -0.3000000 -0.0223307 -10.149 -32.233 -88.039 -128.155
13 -0.3500000 -0.0323782 -11.883 -38.238 -112.429 -169.767
12 -0.4000000 -0.0454338 -13.636 -44.543 -141.441 -221.011
11 -0.4500000 -0.0622719 -15.415 -51.227 -176.263 -284.365
10 -0.5000000 -0.0838752 -17.226 -58.388 -218.406 -362.977
9 -0.5500000 -0.1114783 -19.077 -66.148 -269.765 -460.798
8 -0.6000000 -0.1466152 -20.977 -74.662 -332.697 -582.740
7 -0.6500000 -0.1911684 -22.941 -84.117 -410.095 -734.831
6 -0.7000000 -0.2474113 -24.983 -94.741 -505.451 -924.349
5 -0.7500000 -0.3180318 -27.120 -106.803 -622.892 -1159.901
4 -0.8000000 -0.4061157 -29.374 -120.612 -767.161 -1451.366
3 -0.8500000 -0.5150586 -31.767 -136.506 -943.474 -1809.615
2 -0.9000000 -0.6483588 -34.322 -154.836 -1157.203 -2245.851
1 -0.9500000 -0.8092347 -37.062 -175.923 -1413.294 -2770.377
0 -1.0000000 -1.0000000 -40.000 -200.000 -1715.301 -3390.601

Time Splitting Weights: ndtfast = 1 nfast = 1

Primary Secondary Accumulated to Current Step

1 1.0000000000000000 1.0000000000000000 1.0000000000000000 1.0000000000000000

ndtfast, nfast = 1 1 nfast/ndtfast = 1.00000

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

1.000000000000 1.000000000000 0.500000000000 1.000000000000 1.000000000000

Power filter parameters, Fgamma, gamma = 0.28400 0.00000

WARNING: unstable weights, reduce parameter Fgamma in mod_scalars.F


Minimum X-grid spacing, DXmin = 8.87477211E+00 km
Maximum X-grid spacing, DXmax = 9.26788230E+00 km
Minimum Y-grid spacing, DYmin = 8.87477016E+00 km
Maximum Y-grid spacing, DYmax = 9.26788047E+00 km
Minimum Z-grid spacing, DZmin = 1.67013707E+00 m
Maximum Z-grid spacing, DZmax = 6.20224083E+02 m

Minimum barotropic Courant Number = 1.53987519E-02
Maximum barotropic Courant Number = 1.40354848E-01
Maximum Coriolis Courant Number = 2.77679662E-04


NLM: GET_STATE - Read state initial conditions, t = 0 00:00:00
(File: scs-init.nc, Rec=0001, Index=1)
- free-surface
(Min = -6.98092580E-02 Max = 7.27420375E-02)
- vertically integrated u-momentum component
(Min = -1.14098065E-01 Max = 9.99023467E-02)
- vertically integrated v-momentum component
(Min = -1.14831105E-01 Max = 6.89553097E-02)
- u-momentum component
(Min = -3.37402552E-01 Max = 3.89305800E-01)
- v-momentum component
(Min = -2.69870967E-01 Max = 2.58325964E-01)
- potential temperature
(Min = 2.31640267E+00 Max = 2.56121807E+01)
- salinity
(Min = 3.20656319E+01 Max = 3.47536621E+01)
GET_NGFLD - tidal period
(Min = 4.47141600E+04 Max = 4.47141600E+04)
GET_2DFLD - tidal elevation amplitude
(Min = 0.00000000E+00 Max = 9.88685411E-01)
GET_2DFLD - tidal elevation phase angle
(Min = 1.13879643E-03 Max = 6.27210680E+00)
GET_2DFLD - tidal current inclination angle
(Min = 0.00000000E+00 Max = 6.28312514E+00)
GET_2DFLD - tidal current phase angle
(Min = 0.00000000E+00 Max = 6.28312211E+00)
GET_2DFLD - maximum tidal current, ellipse major axis
(Min = 0.00000000E+00 Max = 1.03878503E+00)
GET_2DFLD - minimum tidal current, ellipse minor axis
(Min = -6.22284517E-01 Max = 1.89027231E-01)

Maximum grid stiffness ratios: rx0 = 1.843809E-01 (Beckmann and Haidvogel)
rx1 = 3.465886E+00 (Haney)


Initial basin volumes: TotVolume = 2.8176580971E+14 m3
MinVolume = 1.3190158927E+08 m3
MaxVolume = 5.2417501928E+10 m3
Max/Min = 3.9739856219E+02


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


STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME
C => (i,j,k) Cu Cv Cw Max Speed

0 0 00:00:00 NaN NaN NaN NaN
(088,39,01) 1.932417E-04 9.216514E-05 0.000000E+00 NaN

Elapsed CPU time (seconds):

Thread # 0 CPU: 0.172
Total: 0.172

Nonlinear model elapsed time profile:

Allocation and array initialization .............. 0.060 (34.8836 %)
Ocean state initialization ....................... 0.016 ( 9.3023 %)
Reading of input data ............................ 0.004 ( 2.3260 %)
Computation of global information integrals ...... 0.012 ( 6.9768 %)
2D/3D coupling, vertical metrics ................. 0.016 ( 9.3017 %)
Omega vertical velocity .......................... 0.004 ( 2.3254 %)
Equation of state for seawater ................... 0.028 (16.2791 %)
Total: 0.140 81.3949

All percentages are with respect to total time = 0.172

ROMS/TOMS - Output NetCDF summary for Grid 01:

Analytical header files used:

ROMS/Functionals/ana_btflux.h
ROMS/Functionals/ana_nudgcoef.h
ROMS/Functionals/ana_smflux.h
ROMS/Functionals/ana_stflux.h

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


MAIN: Abnormal termination: BLOWUP.


and my cpp file is shown as follows:
#define UV_ADV /* use to turn ON or OFF advection terms */
#define UV_COR /* use to turn ON or OFF Coriolis term */
#define UV_QDRAG /* use to turn ON or OFF quadratic bottom friction */
#define UV_VIS2 /* use to turn ON or OFF harmonic horizontal mixing */

#define DJ_GRADPS /* use if splines density Jacobian (Shchepetkin, 2000) */
#define MIX_S_UV /* momentum mixing on s-surfaces */
#define MIX_GEO_TS /* tracer mixing on constant z surfaces */

#define TS_DIF2 /* use to turn ON or OFF harmonic horizontal mixing */
#undef TS_U3HADVECTION /* use if 3rd-order upstream horiz. advection */
#undef TS_C4VADVECTION /* use if 4th-order centered vertical advection */
#define TS_MPDATA /* use if recursive MPDATA 3D advection */

#undef SOLAR_SOURCE /* use if solar radiation source term */
#define NONLIN_EOS /* use if using nonlinear equation of state */
#undef SALINITY /* use if having salinity */
#define SPLINES /* use to activate parabolic splines reconstruction */

#define AVERAGES /* use if writing out time-averaged data */
#define AVERAGES_FLUXES /* use if writing out time-averaged fluxes */
#define AVERAGES_AKV /* use if writing out time-averaged AKv */
#define AVERAGES_AKT /* use if writing out time-averaged AKt */

#define SOLVE3D /* use if solving 3D primitive equations */


#define WESTERN_WALL
#define MASKING
#undef EW_PERIODIC /* use if East-West periodic boundaries */
#undef NS_PERIODIC /* use if North-South periodic boundaries */
#define EAST_FSCHAPMAN
#define NORTH_FSCHAPMAN
#define SOUTH_FSCHAPMAN
#define EAST_M2FLATHER
#define NORTH_M2FLATHER
#define SOUTH_M2FLATHER
#define SSH_TIDES
#define UV_TIDES

#define MY25_MIXING /* use if Mellor/Yamada Level-2.5 closure */
#ifdef MY25_MIXING
# define N2S2_HORAVG /* use if Large et al. (1994) interior closure */
# define KANTHA_CLAYSON /* use if Kantha and Clayson stability function */
#endif

#undef ECOSIM
#if defined ECOSIM || defined BIO_FASHAM
# undef ANA_BIOLOGY /* use if analytical biology initial conditions */
# define ANA_SPFLUX /* use if analytical surface passive tracers fluxes */
# define ANA_BPFLUX /* use if analytical bottom passive tracers fluxes */
# define ANA_CLOUD /* use if analytical cloud fraction */
#endif

#undef BULK_FLUXES /* use if bulk fluxes computation */

#ifdef BULK_FLUXES
# define EMINUSP /* use if computing E-P */
# define LONGWAVE /* use if computing net longwave radiation */
# undef ANA_RAIN /* use if analytical rain fall rate */
#else
# define ANA_SMFLUX /* use if analytical surface momentum stress */
# define ANA_STFLUX /* use if analytical surface temperature flux */
#endif

#if defined BULK_FLUXES || defined ECOSIM
# undef ANA_CLOUD
# undef PAPA_CLM /* ? */
#endif
#undef ANA_SSFLUX /* use if analytical surface salinity flux */
#undef ANA_BSFLUX /* use if analytical bottom salinity flux */
#define ANA_BTFLUX /* use if analytical bottom temperature flux */

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

Re: roms blow up

#2 Unread post by kate »

At a glance, this needs fixing:

Code: Select all

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

zeta 1 Periodic Closed Closed Closed

ubar 1 Periodic Closed Closed Closed

vbar 1 Periodic Closed Closed Closed

u 1 Periodic Closed Closed Closed

v 1 Periodic Closed Closed Closed

temp 1 Periodic Closed Closed Closed

salt 1 Periodic Closed Closed Closed

tke 1 Periodic Closed Closed Closed
so that it is either period for both columns 1 and 3 or for neither of them. Also, you can get rid of the WESTERN_WALL business in your cpp file - it is being ignored now.

Also, what did you do to gamma?

Code: Select all

Power filter parameters, Fgamma, gamma = 0.28400 0.00000

WARNING: unstable weights, reduce parameter Fgamma in mod_scalars.F
I have:

Code: Select all

 Power filter parameters, Fgamma, gamma =  0.28400   0.14200
Oooh, I found it:

Code: Select all

      gamma=Fgamma*MAX(0.0_r8, 1.0_r8-10.0_r8/REAL(ndtfast(ng),r8))
It appears that ndtfast of 1 is not a well-behaved choice - unless you are running a 2-D problem for which it has to be 1. Try something that's rather larger than ten.

Post Reply