ROMS Tools and Techniques

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
pingding

ROMS Tools and Techniques

#1 Unread post by pingding »

hi,i want to known
! Constants used in momentum stress computation.

RDRG == 3.0d-04 ! m/s
RDRG2 == 3.0d-03 ! nondimensional
Zob == 0.003d0 ! m
Zos == 0.001d0 ! m
rdrg2 in one area can have diffrent constants? i mean is that some where rarg2=0.0025 .ohter rarg2=0.0014

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

Re: ROMS Tools and Techniques

#2 Unread post by kate »

Yes, you can have a spatially variable bottom drag. You set UV_DRAG_GRID. Then you have a choice of putting the bottom drag in your grid file or putting it in ana_drag.h (flag ANA_DRAG).

pingding

Re: ROMS Tools and Techniques

#3 Unread post by pingding »

Yes, you can have a spatially variable bottom drag. You set UV_DRAG_GRID. Then you have a choice of putting the bottom drag in your grid file or putting it in ana_drag.h (flag ANA_DRAG).

thanks,i am vary happy to hear this.but in ocean,i cann't find UV_DRAG_GRID,so now i not solve my problem.

pingding

Re: ROMS Tools and Techniques

#4 Unread post by pingding »

kate wrote:Yes, you can have a spatially variable bottom drag. You set UV_DRAG_GRID. Then you have a choice of putting the bottom drag in your grid file or putting it in ana_drag.h (flag ANA_DRAG).
thanks,i am vary happy to hear this.but in ocean.h,i cann't find UV_DRAG_GRID,so now i not solve my problem.

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

Re: ROMS Tools and Techniques

#5 Unread post by kate »

UV_DRAG_GRID is one of your cpp options. To search for strings in the ROMS code, you can:

Code: Select all

grep -r UV_DRAG_GRID .
from the top of the ROMS tree. You can add "-i" if you don't know the case of something.

pingding

Re: ROMS Tools and Techniques

#6 Unread post by pingding »

kate wrote:UV_DRAG_GRID is one of your cpp options. To search for strings in the ROMS code, you can:

Code: Select all

grep -r UV_DRAG_GRID .
from the top of the ROMS tree. You can add "-i" if you don't know the case of something.
thank you very much :D

pingding

Re: ROMS Tools and Techniques

#7 Unread post by pingding »

kate wrote:UV_DRAG_GRID is one of your cpp options. To search for strings in the ROMS code, you can:

Code: Select all

grep -r UV_DRAG_GRID .
from the top of the ROMS tree. You can add "-i" if you don't know the case of something.
Hi,
My mode is sensitive to drag coefficients and inverse techniques using adjont parameter estimation is the most resonale way, I want to know
in roms whether there have that method to deal with drag coefficients?
thanks for your help,look forward to your reply!

pingding

Re: ROMS Tools and Techniques

#8 Unread post by pingding »

pingding wrote:
kate wrote:Yes, you can have a spatially variable bottom drag. You set UV_DRAG_GRID. Then you have a choice of putting the bottom drag in your grid file or putting it in ana_drag.h (flag ANA_DRAG).
hi,editing in ana_drag.h like this , define ana_drag in estuary.h,then ./build_estuary.sh ,then run.But in the output file why the drag2=6E-04,not a array.

in ana_drag.h like this:
# elif defined UV_QDRAG
DO j=JstrT,JendT ! based on Chezy coefficient (g/c^2)
DO i=IstrT,IendT
cff=1.8_r8*GRID(ng)%h(i,j)*LOG(GRID(ng)%h(i,j))
rdrag2(i,j)=g/(cff*cff)
END DO
END DO
# endif
#else
# if defined UV_LOGDRAG
DO j=JstrT,JendT
DO i=IstrT,IendT
ZoBot(i,j)=???
END DO
END DO
# elif defined UV_LDRAG
DO j=JstrT,JendT
DO i=IstrT,IendT
rdrag(i,j)=???
END DO
END DO
# elif defined UV_QDRAG
DO j=JstrT,JendT
DO i=IstrT,IendT
if(GRID(ng)%h(i,j).GE.100.0_r8)then
rdrag2(i,j)=1.5363E-03_r8
elif(GRID(ng)%h(i,j).LT.30.0_r8)then
rdrag2(i,j)=(100.0_r8-0.5413_r8*GRID(ng)%h(i,j))E-05
else
write(*,*),'12'
rdrag2(i,j)=(56.8850_r8+0.9674_r8*GRID(ng)%h(i,j))E-05

end if
END DO
END DO
# endif
#endif




output file:
Physical Parameters, Grid: 01
=============================

1152000 ntimes Number of timesteps for 3-D equations.
3.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.
28800 nRST Number of timesteps between the writing of data
into restart fields.
10 ninfo Number of timesteps between print of information
to standard output.
T ldefout Switch to create a new output NetCDF file(s).
1200 nHIS Number of timesteps between the writing fields
into history file.
115200 ndefHIS Number of timesteps between creation of new
history files.
0 ntsAVG Starting timestep for the accumulation of output
time-averaged data.
1200 nAVG Number of timesteps between the writing of
time-averaged data into averages file.
115200 ndefAVG Number of timesteps between creation of new
time-averaged file.
8.0000E+00 nl_visc2 NLM Horizontal, harmonic mixing coefficient
(m2/s) for momentum.
F LuvSponge Turning OFF sponge on horizontal momentum.
3.0000E-04 rdrg Linear bottom drag coefficient (m/s).
6.0000E-04 rdrg2 Quadratic bottom drag coefficient.
3.0000E-03 Zob Bottom roughness (m).
1028.000 rho0 Mean density (kg/m3) for Boussinesq approximation.
0.000 dstart Time-stamp assigned to model initialization (days).
0.00 time_ref Reference time for units attribute (yyyymmdd.dd)
1.0000E-03 Znudg Nudging/relaxation time scale (days)
for free-surface.

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

Re: ROMS Tools and Techniques

#9 Unread post by wilkin »

hi,editing in ana_drag.h like this , define ana_drag in estuary.h,then ./build_estuary.sh ,then run.But in the output file why the drag2=6E-04,not a array.
Do you have both of these, in uppercase?

#define ANA_DRAG
#define UV_DRAG_GRID
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

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

Re: ROMS Tools and Techniques

#10 Unread post by kate »

If you have both those things defined and the model is using a 2-D array of values, the report will still give you those rdrg and rdrg2 values, as well as Zob. You need to look to the report on the cpp flags - if both ANA_DRAG and UV_DRAG_GRID are defined, it will tell you ANA_DRAG_GRID is defined (mini bug).

pingding

Re: ROMS Tools and Techniques

#11 Unread post by pingding »

wilkin wrote:
hi,editing in ana_drag.h like this , define ana_drag in estuary.h,then ./build_estuary.sh ,then run.But in the output file why the drag2=6E-04,not a array.
Do you have both of these, in uppercase?

#define ANA_DRAG
#define UV_DRAG_GRID
thank you !it is solved now!

pingding

Re: ROMS Tools and Techniques

#12 Unread post by pingding »

kate wrote:If you have both those things defined and the model is using a 2-D array of values, the report will still give you those rdrg and rdrg2 values, as well as Zob. You need to look to the report on the cpp flags - if both ANA_DRAG and UV_DRAG_GRID are defined, it will tell you ANA_DRAG_GRID is defined (mini bug).
Thank you ! It is solved now,and the result is like you see!

pingding

Re: ROMS Tools and Techniques

#13 Unread post by pingding »

pingding wrote:
pingding wrote:
kate wrote:Yes, you can have a spatially variable bottom drag. You set UV_DRAG_GRID. Then you have a choice of putting the bottom drag in your grid file or putting it in ana_drag.h (flag ANA_DRAG).
hi,editing in ana_drag.h like this , define ana_drag in estuary.h,then ./build_estuary.sh ,then run.But in the output file why the drag2=6E-04,not a array.

in ana_drag.h like this:
# elif defined UV_QDRAG
DO j=JstrT,JendT ! based on Chezy coefficient (g/c^2)
DO i=IstrT,IendT
cff=1.8_r8*GRID(ng)%h(i,j)*LOG(GRID(ng)%h(i,j))
rdrag2(i,j)=g/(cff*cff)
END DO
END DO
# endif
#else
# if defined UV_LOGDRAG
DO j=JstrT,JendT
DO i=IstrT,IendT
ZoBot(i,j)=???
END DO
END DO
# elif defined UV_LDRAG
DO j=JstrT,JendT
DO i=IstrT,IendT
rdrag(i,j)=???
END DO
END DO
# elif defined UV_QDRAG
DO j=JstrT,JendT
DO i=IstrT,IendT
if(GRID(ng)%h(i,j).GE.100.0_r8)then
rdrag2(i,j)=1.5363E-03_r8
elif(GRID(ng)%h(i,j).LT.30.0_r8)then
rdrag2(i,j)=(100.0_r8-0.5413_r8*GRID(ng)%h(i,j))E-05
else
write(*,*),'12'
rdrag2(i,j)=(56.8850_r8+0.9674_r8*GRID(ng)%h(i,j))E-05

end if
END DO
END DO
# endif
#endif




output file:
Physical Parameters, Grid: 01
=============================

1152000 ntimes Number of timesteps for 3-D equations.
3.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.
28800 nRST Number of timesteps between the writing of data
into restart fields.
10 ninfo Number of timesteps between print of information
to standard output.
T ldefout Switch to create a new output NetCDF file(s).
1200 nHIS Number of timesteps between the writing fields
into history file.
115200 ndefHIS Number of timesteps between creation of new
history files.
0 ntsAVG Starting timestep for the accumulation of output
time-averaged data.
1200 nAVG Number of timesteps between the writing of
time-averaged data into averages file.
115200 ndefAVG Number of timesteps between creation of new
time-averaged file.
8.0000E+00 nl_visc2 NLM Horizontal, harmonic mixing coefficient
(m2/s) for momentum.
F LuvSponge Turning OFF sponge on horizontal momentum.
3.0000E-04 rdrg Linear bottom drag coefficient (m/s).
6.0000E-04 rdrg2 Quadratic bottom drag coefficient.
3.0000E-03 Zob Bottom roughness (m).
1028.000 rho0 Mean density (kg/m3) for Boussinesq approximation.
0.000 dstart Time-stamp assigned to model initialization (days).
0.00 time_ref Reference time for units attribute (yyyymmdd.dd)
1.0000E-03 Znudg Nudging/relaxation time scale (days)
for free-surface.
Thank you ! I always have question why the rdrag2 at the same grid,such as rdrag2(355,466),have diffrent constant at diffrent time step?

Post Reply