Omega confusion

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Omega confusion

#1 Unread post by m.hadfield »

A forum post early last year called "units of omega" mentioned some confusion about the units of the netCDF output variable omega and appeared to clear it up, however it's more complicated and confusing than implied there.

To recap, the vertical fluid velocity in s coordinates, ds/dt, is conventionally called omega and has units s^-1. However the ROMS vertical velocity variable, which typically appears in the code as ocean(ng)%W, is scaled as described in mod_ocean.F as

Code: Select all

!  W            S-coordinate (omega*Hz/mn) vertical velocity (m3/s).   !
As I understand it, it's the volume flux through the upper/lower faces of the grid cells, and it has units m3/s as it says in the code.

For output to history files, as the netCDF variable "omega", ocean(ng)%W is scaled by subroutine scale_omega in omega.F. The metadata says, correctly, that the result has units of m/s:

Code: Select all

        float omega(ocean_time, s_w, eta_rho, xi_rho) ;
                omega:long_name = "S-coordinate vertical momentum component" ;
                omega:units = "meter second-1" ;
                omega:time = "ocean_time" ;
                omega:coordinates = "x_rho y_rho s_w ocean_time" ;
                omega:field = "omega, scalar, series" ;
All good so far.

For output to averages files, a variable AVERAGE(ng)%avgw3d is defined in mod_average.F. The file header describes this variable as

Code: Select all

!  avgw3d     S-coordinate [omega*Hz/mn] vertical velocity (m3/s).     !
but it's clear from the relevant code in set_avg.F that it's actually scaled to m/s:

Code: Select all

        IF (Aout(idOvel,ng)) THEN
          DO k=0,N(ng)
            DO j=JstrR,JendR
              DO i=IstrR,IendR
                AVERAGE(ng)%avgw3d(i,j,k)=AVERAGE(ng)%avgw3d(i,j,k)+    &
     &                                    OCEAN(ng)%W(i,j,k)*           &
     &                                    GRID(ng)%pm(i,j)*             &
     &                                    GRID(ng)%pn(i,j)
              END DO
            END DO
          END DO
        END IF
This is written to the averages file without further scaling. However the metadata in the averages file says, incorrectly, that it's in m3/s:

Code: Select all

        float omega(ocean_time, s_w, eta_rho, xi_rho) ;
                omega:long_name = "time-averaged S-coordinate vertical momentum
component" ;
                omega:units = "meter3 second-1" ;
                omega:time = "ocean_time" ;
                omega:coordinates = "x_rho y_rho s_w ocean_time" ;
                omega:field = "omega, scalar, series" ;
For output to station files (see wrt_station.F) no scaling is done:

Code: Select all

!
!  Write S-coordinate "omega" vertical velocity (m3/s).
!
      IF (Sout(idOvel,ng)) THEN
        scale=1.0_r8
        CALL extract_sta3d (ng, iNLM, Cgrid, idOvel, w3dvar,            &
     &                      LBi, UBi, LBj, UBj, 0, N(ng),               &
     &                      scale, OCEAN(ng)%W,                         &
     &                      NposW, XposW, YposW, ZposW, rsta)
        CALL netcdf_put_fvar (ng, iNLM, STAname(ng),                    &
     &                        TRIM(Vname(1,idOvel)), rsta,              &
     &                        (/1,1,tSTAindx(ng)/),                     &
     &                        (/N(ng)+1,Nstation(ng),1/),               &
     &                        ncid = ncSTAid(ng),                       &
     &                        varid = staVid(idOvel,ng))
        IF (exit_flag.ne.NoError) RETURN
      END IF

The metadata says, correctly, that it's in m3/s:

Code: Select all

        float omega(ocean_time, station, s_w) ;
                omega:long_name = "S-coordinate vertical momentum component" ;
                omega:units = "meter3 second-1" ;
                omega:time = "ocean_time" ;
                omega:field = "omega, scalar, series" ;
But it's numerically quite different from the variable of the same name in the history and averages files.

So, I'm glad I could clear that up :wink:. But the fact that I've put this post in "ROMS Bugs" indicates that I think the inconsistencies need to be ironed out.

kthyng
Posts: 12
Joined: Fri Oct 19, 2007 1:04 am
Location: Texas A&M

Re: Omega confusion

#2 Unread post by kthyng »

This post has been really useful for me, but I do have a clarification question relating to this and some of the documentation.

The equations at various places (http://marine.rutgers.edu/po/documentat ... ate_system, for example) show that the vertical velocity, w, is:
w = dz/dt + u*dz/dx + v*dz/dy + Omega*Hz, where I believe that Hz ends up being a length scale.

However, omega, when output in an ocean_his.nc file, is in units of m/s, as is w. Does this mean that the output from the model for the vertical velocity in sigma coordinates is already multiplied by this Hz factor?

Thanks for any help on this!

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: Omega confusion

#3 Unread post by m.hadfield »

kthyng wrote:However, omega, when output in an ocean_his.nc file, is in units of m/s, as is w. Does this mean that the output from the model for the vertical velocity in sigma coordinates is already multiplied by this Hz factor?
Yes, I think that is the case. You should be able to verify this for yourself by reading the first post in this thread and examining subroutine scale_omega in omega.F.

kthyng
Posts: 12
Joined: Fri Oct 19, 2007 1:04 am
Location: Texas A&M

Re: Omega confusion

#4 Unread post by kthyng »

With some sleuthing around, I do think this is the case.

I will just state it again for clarity:

Omega, the sigma-coordinate vertical velocity, that is output in ocean_his.nc files is in m/s and has already been multiplied by the Hz factor that is written out in ROMS documentation.

Thanks for your direction!

Post Reply