ROMS Tools and Techniques
ROMS Tools and Techniques
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
! 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
Re: ROMS Tools and Techniques
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).
Re: ROMS Tools and Techniques
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.
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.
Re: ROMS Tools and Techniques
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.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).
Re: ROMS Tools and Techniques
UV_DRAG_GRID is one of your cpp options. To search for strings in the ROMS code, you can:
from the top of the ROMS tree. You can add "-i" if you don't know the case of something.
Code: Select all
grep -r UV_DRAG_GRID .
Re: ROMS Tools and Techniques
thank you very muchkate wrote:UV_DRAG_GRID is one of your cpp options. To search for strings in the ROMS code, you can:from the top of the ROMS tree. You can add "-i" if you don't know the case of something.Code: Select all
grep -r UV_DRAG_GRID .
Re: ROMS Tools and Techniques
Hi,kate wrote:UV_DRAG_GRID is one of your cpp options. To search for strings in the ROMS code, you can:from the top of the ROMS tree. You can add "-i" if you don't know the case of something.Code: Select all
grep -r UV_DRAG_GRID .
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!
Re: ROMS Tools and Techniques
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.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).
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.
Re: ROMS Tools and Techniques
Do you have both of these, in uppercase?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.
#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
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: ROMS Tools and Techniques
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).
Re: ROMS Tools and Techniques
thank you !it is solved now!wilkin wrote:Do you have both of these, in uppercase?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.
#define ANA_DRAG
#define UV_DRAG_GRID
Re: ROMS Tools and Techniques
Thank you ! It is solved now,and the result is like you see!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).
Re: ROMS Tools and Techniques
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?pingding 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.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).
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.