unrealistic pressure gradient forming along bathymetry

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
sonaljit.m
Posts: 40
Joined: Wed Nov 30, 2016 11:18 pm
Location: University of Massachusetts Dartmouth

unrealistic pressure gradient forming along bathymetry

#1 Post by sonaljit.m » Mon Nov 27, 2017 2:29 pm

Hello,

Previously, I posted a couple of discussion threads on 'unrealistic' velocities forming along the bathymetry on my domain. As a follow-up - I did some more analysis, and found out that the unrealistic velocities are forming due to spurious patterns in the pressure gradient, evolving along the spatially varying bathymetry. Below, are a few plots showing the problem.

Pressure gradient at the 1st time step
Figure_1.png
Notice the small-scale patterns forming. This is happening along the varying bathymetry. (plot below)
Figure_5.png
Velocity difference between 1st and 2nd timesteps
Figure_3.png
The anomalies in the velocity, match with the pressure gradient.

In this run, the pressure gradient is calculated with standard density jacobian algorithm. I was going through some threads, where it is said that the pressure gradient on a sigma coordinates can form errors, giving rise to spurious currents (probably that's what is happening here).

Any suggestions on how to accurately estimate the pressure gradient? I tried smoothing the bathymetry, but that doesn't solve the problem. Strong gradients eventually form at later times, shooting up the velocity to unrealistic levels.

Thanks,
Sonaljit.
Attachments
Figure_2.png
Figure_4.png

jcwarner
Posts: 857
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: unrealistic pressure gradient forming along bathymetry

#2 Post by jcwarner » Mon Nov 27, 2017 6:27 pm

this can occur for many reasons. One could be an imbalance of the initial density-velocity-bathymetry. Where did you get the density and velocity fields from? did you interpolate them to the roms grid? If you let it run for a while, do they go away?
-john

sonaljit.m
Posts: 40
Joined: Wed Nov 30, 2016 11:18 pm
Location: University of Massachusetts Dartmouth

Re: unrealistic pressure gradient forming along bathymetry

#3 Post by sonaljit.m » Mon Nov 27, 2017 8:30 pm

density and velocity fields - Obtained from HYCOM/NCODA analysis 1/12.

Interpolation - Yes, all fields are interpolated to the ROMS grid.

After running for a while, the problem still persists. The unrealistic velocities build up and the model crashes. I tried using smaller time step, in which case the simulation continues for a bit longer, but eventually the velocities build up to high values and it crashes again.

Can you elaborate on the imbalance of the initial density-velocity-bathymetry? I tried smoothing the bathymetry as well, but that just makes the simulation run a little longer. However, the pressure gradient errors eventually occur in the domain, incrementing the velocities to unrealistic values.

Also, this error is only happening in the velocities. The T/S fields are evolving smoothly.

jcwarner
Posts: 857
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: unrealistic pressure gradient forming along bathymetry

#4 Post by jcwarner » Mon Nov 27, 2017 8:44 pm

can you list your cppdefs.

sonaljit.m
Posts: 40
Joined: Wed Nov 30, 2016 11:18 pm
Location: University of Massachusetts Dartmouth

Re: unrealistic pressure gradient forming along bathymetry

#5 Post by sonaljit.m » Mon Nov 27, 2017 10:27 pm

#define UV_ADV
#define UV_COR
#define UV_LOGDRAG

#define PJ_GRADP

#define SPLINES_VDIFF
#define SPLINES_VVISC

#ifdef TS_U3ADV_SPLIT
# define TS_DIF2
# define DIFF_GRID
# define MIX_GEO_TS
#endif

#ifdef UV_U3ADV_SPLIT
# define UV_VIS2
# define VISC_GRID
# define MIX_GEO_UV
#endif

#define NONLIN_EOS
#define SALINITY
#define SOLVE3D
#define CURVGRID

#ifdef GLS_MIXING
# define CANUTO_A
# define CHARNOK
# define K_C4ADVECTION
# define N2S2_HORAVG
# define RI_SPLINES
#endif


Apart from these, I have the following settings in build.bash
export MY_CPP_FLAGS="${MY_CPP_FLAGS} -DTS_A4HADVECTION -DTS_A4VADVECTION"
export MY_CPP_FLAGS="${MY_CPP_FLAGS} -DUV_C4ADVECTION"

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

Re: unrealistic pressure gradient forming along bathymetry

#6 Post by kate » Mon Nov 27, 2017 11:23 pm

I believe we are all using DJ_GRADPS.

sonaljit.m
Posts: 40
Joined: Wed Nov 30, 2016 11:18 pm
Location: University of Massachusetts Dartmouth

Re: unrealistic pressure gradient forming along bathymetry

#7 Post by sonaljit.m » Tue Nov 28, 2017 12:02 am

I tried that, but doesn't seem to make a difference. Still the same patterns forming along bathymetry.
Figure_5.png

User avatar
susonic
Posts: 160
Joined: Tue Aug 21, 2007 5:44 pm
Location: Jeju National University
Contact:

Re: unrealistic pressure gradient forming along bathymetry

#8 Post by susonic » Tue Nov 28, 2017 5:00 am

Would you show us the log file?

-JH

dcherian
Posts: 14
Joined: Mon Oct 17, 2011 1:41 am
Location: WHOI

Re: unrealistic pressure gradient forming along bathymetry

#9 Post by dcherian » Tue Nov 28, 2017 5:35 am

Sonaljit, I had similar trouble in my idealized simulations.

In my case, the problem happened where the vertical grid spacing was largest (and s-surfaces were sloping; i.e. classic conditions for pressure gradient error). Reducing vertical grid spacing increased the amount of time it took the noise to appear, so you could try playing with the stretching or add more vertical grid points --- this might be "objectively" the best solution.

I ended up bumping up my background biharmonic viscosity and diffusivity using MIX_S_TS and MIX_S_UV (can't remember if these are the right options?). This didn't eliminate the noise but reduced the magnitude significantly --- my criterion was w < 1e-4 m/s throughout the simulation. Mixing along s-surfaces is unphysical; but to kill this noise, the mixing needs to be strong enough... Using biharmonic viscosity makes it slightly less bad.

EDIT: Just noticed that your snapshots are from the first two timesteps, so what I said above does not apply. It does seem like your initial conditions are mismatched. What happens if you run with flat isopycnals and no velocities? That'll give you a baseline for how bad the pressure gradient error is for your stretching / mixing / topography.

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

Re: unrealistic pressure gradient forming along bathymetry

#10 Post by jivica » Tue Nov 28, 2017 5:41 am

I think there was already a quite a lot discussion about HPGE and smoothing techniques in the forum.

In short, I would make pure HPGE simulation using only vertical profile of T and S (using ANA_INITIAL), and no forcing, closed brys (or clamp to the same profile of T,S using again ANA_).
You can compute mean vertical profile for your grid and then fit to analytical function *there are examples in ANA_INITIAL*.
Let model run for say 2 weeks and then have a look at the bottom (or near) currents. This will indicate what are HPGE effects for the bathy and :!: vertical setup (Vtransform, stretching, theta, N) ONLY, as you have no external forcing, density was horizontally homogeneous etc..
Note that higher number of vertical layers (especially at the bottom) and stronger vertical density gradient is actually main reason for large HPGE. What is killing you is not rx0 but rx1.
To handle that we've developed quite elaborate technique for smoothing, using iterations to compute HPGE velocities and then smooth ONLY :!: in those regions where they are above critical value, and then again new iteration.... but as I said, I wrote the cookbook long time ago on the forum...

for HPGE, I use something like:
#define UV_ADV
#define UV_COR
#define UV_QDRAG
#define UV_VIS2
#define MIX_S_UV
#define UV_U3HADVECTION
#define UV_C4VADVECTION

#define SALINITY
#define TS_U3HADVECTION
#define TS_C4VADVECTION
#define TS_DIF2
#define MIX_GEO_TS

#define DJ_GRADPS
#define MASKING
#define CURVGRID
#undef STATIONS

#define VISC_GRID
#define DIFF_GRID

#define AVERAGES
#define AVERAGES_FLUXES

#define SOLVE3D
#define GLS_MIXING
#define ANA_BSFLUX
#define ANA_BTFLUX

#if defined GLS_MIXING || defined MY25_MIXING
#undef LMD_MIXING
#define KANTHA_CLAYSON
#define N2S2_HORAVG
#define AKLIMIT
#endif

#undef ATM_PRESS
#define ANA_SMFLUX
#define ANA_STFLUX
#define ANA_SSFLUX
#define ANA_SRFLUX
#define ANA_BSFLUX
#define ANA_BTFLUX
#define ANA_INITIAL
#define ANA_FSOBC
#define ANA_M2OBC
#define ANA_M3OBC

sonaljit.m
Posts: 40
Joined: Wed Nov 30, 2016 11:18 pm
Location: University of Massachusetts Dartmouth

Re: unrealistic pressure gradient forming along bathymetry

#11 Post by sonaljit.m » Mon Feb 12, 2018 7:15 pm

Thanks very much for all the feedback. Based on your suggestions, I did the following changes which resulted in better performance of the simulation.

- As Kate suggested, I am now using DJ_GRADPS for pressure gradient.
- Deepak, thanks for the feedback. I am currently using biharmonic friction with mixing on GEO surfaces. Also, there was mismatch in my climatological inputs, which is fixed now.
- I changed the 2D fields boundary condition to flather. The strong currents in my simulation are still forming, but last for the first 2-3 day simulation time. They are subsiding eventually.
- John, thanks for your suggestions. The OPENMP version was giving trouble in my system. With openmp I was getting 0.0 minimum grid spacings, which might have been the cause for the blowups.

Metrics information for Grid 01:
===============================
Minimum X-grid spacing, DXmin = 0.00000000E+00 km
Maximum X-grid spacing, DXmax = 9.97359248E-01 km
Minimum Y-grid spacing, DYmin = 0.00000000E+00 km
Maximum Y-grid spacing, DYmax = 9.88258405E-01 km
Minimum Z-grid spacing, DZmin = 0.00000000E+00 m
Maximum Z-grid spacing, DZmax = 3.24032263E+02 m


Thanks everyone.

Post Reply