I am looking at the tke in ROMS history output files.
In my_25corstep.F the tke surface boundary conditions are defined for the Nth layer:
Does that N=end in the tke(i,j,end) from his* file or N=end-1???! Set surface and bottom boundary conditions.
!
DO i=Istr,Iend
tke(i,j,N(ng),nnew)=my_B1p2o3*0.5_r8*SQRT((sustr(i,j)+sustr(i+1,j))**2+(svstr(i,j)+svstr(i,j+1))**2)
END DO
I have Uwind Vwind forcing and compute sustr svstr using BULK FLUX parametrization (bulk_flux.F).
Assuming that the tke(i,j,N) from my_25corstep.F appears in a his* file as tke(i,j,end), I computed tke(i,j,end) with bulk_flux.F algorithm. The tke(i,j,end) taken from his* file is approx. 2 orders larger than that computed from U,Vwind by bulk_flux code. See the plot.
So, the questions are:
1. Does the uppermost layer of tke(i,j,end) correspond to the surface (z_w(i,j,end)+zeta(i,j) m), or to the layer one grid point below the surface?
2. If what I am reading from the his* file tke(i,j,end) is the SURFACE boundary condition tke(i,j,N), why is it so different?
Thanks to those who will try to address my questions!