Hi all,
I am now using ROMS to do some preliminary tests. I found a problem with vertical diffusion in a very simple experiment.
I started from a simple domain (a cube) with constant temperature and no salinity, nor flow. This is clearly steady and nothing happens. Then I added a constant positive surface net heat flux, homogeneous over the domain, with a constant diffusion coefficient. I should simply see a (diffusive) heat flux from the top layers downwards. Here is the problem: some layers at first get actually a decrease in temperature (this reduction is not big, but it's there, and physically it does not make sense), despite the positive heat flux from the top. Clearly, the problem is in the vertical diffusive flux, because there is no other term in the heat equation.
Looking into the code, it seems to me that the problem is the fact that the vertical derivative at the top layer is set to be zero (subroutine “step3d_t_tile”), while it should not be zero if there is a surface heat flux. The problem is then that when it computes the second order derivative, proportional to (T'(k)-T'(k-1) ) where T' is the first order derivative and k refers to the layer considered, it finds a negative value (which means UPWARD flux, while in this configuration I should only have downward flux).
Does anybody know the answer?
BTW: Could anybody tell me how to upload the figures?
Thanks a lot,
Wei
Vertical diffusion
- arango
- Site Admin
- Posts: 1364
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
How are you specifying the surface net heat flux? Are you using an analytical expression in ana_stflux.h? If so, you need to do in terms of kinematic flux with Celsius m/s units. That is, you need 1/(rho0*Cp) if your surface forcing is in W/m2.
Yes, that's correct. However, you are looking in the wrong place. The surface and bottom boundary conditions for tracers are applied in the predictor step in routine pre_step3d.F.Looking into the code, it seems to me that the problem is the fact that the vertical derivative at the top layer is set to be zero (subroutine “step3d_t_tile”), while it should not be zero if there is a surface heat flux...
Thank you so much for your quick responses!
It's true that the surface boundary conditions for tracers are applied in pre_step3d.F. But the calculation of vertical diffusion and thus the calculation of temperatures in different vertical layers are carried out in step3d_t.F.
Thanks again!
Wei
Yes, I activated SPLINES. I will try the experiment without SPLINES.jcwarner wrote:do you have splines activated?
if so, try it without splines.
I define the surface net heat flux as 5.88e-5 degC m/s, which is equivalent to about 240 W/m2.arango wrote:How are you specifying the surface net heat flux? Are you using an analytical expression in ana_stflux.h? If so, you need to do in terms of kinematic flux with Celsius m/s units. That is, you need 1/(rho0*Cp) if your surface forcing is in W/m2.
Yes, that's correct. However, you are looking in the wrong place. The surface and bottom boundary conditions for tracers are applied in the predictor step in routine pre_step3d.F.Looking into the code, it seems to me that the problem is the fact that the vertical derivative at the top layer is set to be zero (subroutine “step3d_t_tile”), while it should not be zero if there is a surface heat flux...
It's true that the surface boundary conditions for tracers are applied in pre_step3d.F. But the calculation of vertical diffusion and thus the calculation of temperatures in different vertical layers are carried out in step3d_t.F.
Thanks again!
Wei