when I use LtracerSponge , LuvSponge , something wrong

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
zhangfy
Posts: 1
Joined: Wed Jul 02, 2014 2:50 pm
Location: First Institute of Oceanography

when I use LtracerSponge , LuvSponge , something wrong

#1 Unread post by zhangfy »

hi
something wrong happened ,when i make 'LuvSponge == T ;LtracerSponge == T T'...

GET_GRID - error while reading variable: spherical
in grid NetCDF file: ./input/GRID.nc

I use the code "roms_kata_svn". When i close the 'LuvSponge' and 'LtracerSponge', it works well , is thers some bug in the code,or i use the wrong option?

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

Re: when I use LtracerSponge , LuvSponge , something wrong

#2 Unread post by kate »

It looks like my version of get_grid.F got a bit scrambled. Try again? I've never used the sponge options, so that code hasn't been tested.

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: when I use LtracerSponge , LuvSponge , something wrong

#3 Unread post by wilkin »

Hernan Arango's add_sponge.m function in the myroms.org Matlab tools will add (or overwrite) the sponge to an existing grid file:

Code: Select all

add_sponge:  Adds sponge data to a ROMS Grid NetCDF file
 
  add_sponge(ncfile, visc_factor, diff_factor)
 
  Adds enhanced viscosity and diffusion scaling variables (visc_factor
  and diff_factor) to an existing ROMS Grid NetCDF file.  These scales
  are used in an application to set sponge areas with larger horizontal
  mixing coefficients for the damping of high frequency noise coming
  from open boundary conditions or nesting.  In ROMS, these scales are
  used as follows:
 
     visc2_r(i,j) = visc2_r(i,j) * visc_factor(i,j)
     visc4_r(i,j) = visc4_r(i,j) * visc_factor(i,j)
 
     diff2(i,j,itrc) = diff2(i,j,itrc) * diff_factor(i,j)
     diff4(i,j,itrc) = diff4(i,j,itrc) * diff_factor(i,j)
 
  where the variables 'visc_factor' and 'diff_factor' are defined at
  RHO-points.  Usually, sponges are linearly tapered over several grid
  points adjacent to the open boundaries.  Its positive values linearly
  increase from the inner to outer edges of the sponge. At the interior
  of the grid we can values of zero (no mixing) or one (regular mixing).
 
  NOTICE that it is more advantageous to specify these scaling factors
  in the ROMS Grid that coding it inside ROMS.  We can plot and adjust
  their values in an easy way in Matlab.
 
  On Input:
 
     ncfile        GRID NetCDF file name (string)
     visc_factor   Viscosity factor (2D array; nondimensional, positive)
     diff_factor   Diffusivity factor (2D array; nondimensional, positive)
 
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply