About bottom friction
-
- Posts: 6
- Joined: Tue Jul 24, 2012 8:36 pm
- Location: Yantai Institute of Coastal Zone Research
About bottom friction
Hi, everyone!
Now I'm running a tidal simulation, firstly I used "UV_QDRAG" option with "RDRG2 == 3.0d-03",the results of tidal amplitude was small compared to observations, and I knew that in the costal zone, expecially in shallow water region, the magnitude of bottom friction is important to tidal simulation. So I wanted to set up the quadratic bottom drag coefficient to be spatially variable, but I could not find the corresponding file to change it, is there anyone who can help me? Thank you very much!
Now I'm running a tidal simulation, firstly I used "UV_QDRAG" option with "RDRG2 == 3.0d-03",the results of tidal amplitude was small compared to observations, and I knew that in the costal zone, expecially in shallow water region, the magnitude of bottom friction is important to tidal simulation. So I wanted to set up the quadratic bottom drag coefficient to be spatially variable, but I could not find the corresponding file to change it, is there anyone who can help me? Thank you very much!
Re: About bottom friction
You need a pretty recent version of ROMS to have this option. It is called UV_DRAG_GRID and you can also pick ANA_DRAG for setting the values inside ROMS. You would then edit ana_drag.h to the values of your choice.
-
- Posts: 20
- Joined: Fri Dec 16, 2011 3:14 pm
- Location: School of Ocean Sciences
Re: About bottom friction
Hi Kate
thanks for your reply. Is there any test case with spatially variable friction coefficient which implements this?
thanks for your reply. Is there any test case with spatially variable friction coefficient which implements this?
-
- Posts: 6
- Joined: Tue Jul 24, 2012 8:36 pm
- Location: Yantai Institute of Coastal Zone Research
Re: About bottom friction
Hi, everyone!
Now I simulated the tide in the Bohai and Yellow Sea, I've changed the Quadratic bottom drag coefficient from 0.003 to 0.0012, but there are no changes in the results(tidal amplitude and phase), what's the problem? Please give me some advice, thank you very much.
Now I simulated the tide in the Bohai and Yellow Sea, I've changed the Quadratic bottom drag coefficient from 0.003 to 0.0012, but there are no changes in the results(tidal amplitude and phase), what's the problem? Please give me some advice, thank you very much.
Re: About bottom friction
Obviously the bottom drag should affect the tides. If you get absolutely no difference in the output while changing the drag, you need to investigate to find out what's going on. Are you setting the drag in ana_drag and not changing it there? Are you changing it there and not using ana_drag after all? If you don't have a debugger to use, I would add a print statement where the drag is being used (in set_vbc.F).
Re: About bottom friction
Also, look at the locations of the stations you are using to evaluate/validate your tidal water levels/elevations and their depths. If you place stations using their (lon,lat) locations and they are excessively close to the permanent (i.e. not wetting/drying) land/sea boundary, you get artificial water levels/elevations due to the bilinear interpolation used in ROMS which assumes (correctly!) that the their values on land are zero. Make sure that you place you stations at sufficiently deep water depths. Just my thoughts on this issue, in case it applies to you.
Re: About bottom friction
I've been trying to implement spatially varying qdrag2 however all my attempts seem to have culminated in the model blowing up at the second timestep:
Essentially, I am trying to specify an area within the model where the quadratic drag coefficient is changed above that of the surrounding qdrag:
This is the original code:
# elif defined UV_QDRAG
DO j=JstrT,JendT
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
And if my domain is a 100 x 100 grid and I want to increase qdrag somewhere centrally:
DO j=JstrT,JendT
DO i=IstrT,IendT
# if j= 49 | 50 | 51 && i = 49 | 50 | 51
cff=1.8_r8*GRID(ng)%h(i,j)*LOG(GRID(ng)%h(i,j))
rdrag2(i,j)=10*(g/(cff*cff))
# endif
END DO
END DO
Or I could write:
# elif defined UV_QDRAG
DO j=JstrT,JendT
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
rdrag2(49:51,49:51)=10*(g/(cff*cff))
# end if
However, neither method seems to work - I'm not sure whether this is due to my grasp of the language or a misunderstanding with how it works..can anybody shed light on this please?
Essentially, I am trying to specify an area within the model where the quadratic drag coefficient is changed above that of the surrounding qdrag:
This is the original code:
# elif defined UV_QDRAG
DO j=JstrT,JendT
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
And if my domain is a 100 x 100 grid and I want to increase qdrag somewhere centrally:
DO j=JstrT,JendT
DO i=IstrT,IendT
# if j= 49 | 50 | 51 && i = 49 | 50 | 51
cff=1.8_r8*GRID(ng)%h(i,j)*LOG(GRID(ng)%h(i,j))
rdrag2(i,j)=10*(g/(cff*cff))
# endif
END DO
END DO
Or I could write:
# elif defined UV_QDRAG
DO j=JstrT,JendT
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
rdrag2(49:51,49:51)=10*(g/(cff*cff))
# end if
However, neither method seems to work - I'm not sure whether this is due to my grasp of the language or a misunderstanding with how it works..can anybody shed light on this please?
Re: About bottom friction
Which version of ROMS are you using? I think the newer versions of ROMS allows you do specify a spatially varying bottom friction within the grid NetCDF file (as an additional field) and thereafter use a CPP option (check /ROMS/Include/cppdefs.h) to bring it into the computation. In this way, you can say generate your spatially varying bottom friction field in Matlab, plot it and make sure its all ok and then write it into the grid.nc file and use it.
Re: About bottom friction
This isn't valid fortran, but you've got the right idea.# if j= 49 | 50 | 51 && i = 49 | 50 | 51
This is going to fail for MPI parallel applications.rdrag2(49:51,49:51)=10*(g/(cff*cff))
Going with the first option in Fortran would look something like:
Code: Select all
if ((j>=49 .and. j<=51) .and. (i>=49 .and. i<=51) then
Re: About bottom friction
Great, thank you all for your help and advice