Static files description

  1. Accueil
  2. Static files description
Variables description
3 types of variables:
Scale factors
The 'size' of
grid cells
Coordinates
The positions of the
grid cells
Mask
Distinction between
land and ocean
Available files and variables
Product on standard grid (PGS):
« XXX_coordinates.nc »
Scales factors variables: e1t, e2t, e3t
Coordinate variables: longitude, latitude, depth
« XXX_mask_bathy.nc »
Land-ocean mask: mask
NEMO ocean code reference manual
Product on native grid (PGN):
« mesh_hgr.nc » (horizontal)
Scales factors variables: e1t, e2t, e1u, e2u...
Coordinate variables: glamt, gphit, glamu...
« mesh_zgr.nc » (vertical)
Scales factors variables: e3t...
Coordinate variables: gdept, gdepw...
« mask.nc »
Land-ocean mask: tmask, umask, vmask
Horizontal grid cell description
Product on standard grid (PGS):
Arakawa A-grid
Image
The variables are all centered on the grid cell center
Product on native grid (PGN):
Arakawa C-grid
Image
The variables are not all centered on the grid cell center
T: temperature, salinity, sea ice parameters
U: zonal velocity V: meridional velocity
Horizontal coordinates
Product on standard grid (PGS):
Image
One set of longitudes/latitudes for grid cells center
Product on native grid (PGN):
Image
3 sets of longitudes/latitudes
Horizontal scale factors
Product on standard grid (PGS):
Image
Product on native grid (PGN):
Image
Scale factors: « enx »
where: n=1 for a size in the zonal direction
n=2 for a size in the meridional direction
where: x=T,U,V : the interval is centered on 'x'
Vertical Z-grid description
Depth
T: cells center
W: cells interfaces
Image
Scale factors
E3: 3 for Z direction
W for centered on W
T for centered on T
Image
Be careful:

In NEMO OGCM, depth are defined with an analytical function and vertical scale factors are defined with its derived function.

That's why:
e3t(k) =/ gdepw(k+1) - gdepw(k)
AND
e3w(k) =/ gdept(k+1) - gdept(k)
Vertical Z-grid
Product on standard grid (PGS):
Uses a Z vertical grid
Image
All the points have the same vertical grid
Product on native grid (PGN):
Uses a ZPS vertical grid
Image
All the points have the same vertical grid
BUT
The last ocean level is adapted to the bathymetrie so its thickness is different compared to the others at the same level
Vertical scale factor or depth reconstruction: Z vertical grid (PGS) case
e3t are 3D
scale factors
depth are the
1D vertical depths
at T points
All the points have the same vertical grid
So the 1D vertical depth profile can be applied for all points from horizontal grid to reconstruct 3D depth.
Example:

Domain size: jpi, jpj, jpk (X, Y, Z directions)
- Read depth in static file: 1D vertical scale factor profile
- Declare a 3D array for vertical scale factors: depth3d(jpi,jpj,jpk)
Implementation:

DO ji=1, jpi ! Loop in X direction
DO ji=1, jpi ! Loop in Y direction
Apply the 1d profile
depth3d(ji,jj,1:jpk)
END DO
END DO
Vertical scale factor or depth reconstruction: ZPS vertical grid (PGN) case
e3t_1d and
e3w_1d:
The 1D vertical scale factors at T and W points
gdept_1d and
gdepw_1d:
The 1D vertical depths at T and W points
mbathy:
An horizontal 2D array containing the last ocean level at each point of the horizontal grid
e3t_ps, e3w_ps:
Horizontal 2D arrays containing the scale factors at the last ocean level for each point of the horizontal grid
hdept, hdepw:
Horizontal 2D arrays containing the depth at the last ocean level for each point of the horizontal grid
All the points don't have the same vertical grid
The 1D vertical scare factors profile and depth are applied for all points from horizontal grid to reconstruct 3D scale factors and depth
AND we apply a correction to the last ocean (identified by mbathy) with the e3t_ps, e3w_ps, hdept, hdepw.
Example:

Domain size: jpi, jpj, jpk (X, Y, Z directions)
- Read e3t_1d in static file: 1D vertical scale factor profile
- Read mbathy: the last ocean cell level
- Declare a 3D array for vertical scale factors: e3t(jpi,jpj,jpk)
Implementation:

DO ji=1, jpi ! Loop in X direction
DO ji=1, jpi ! Loop in Y direction
e3t(ji,jj,1:jpk)=e3t_1d(1:jpk). Apply the 1d profile
e3w(ji,jj,1:jpk)=ewt_1d(1:jpk). Apply the 1d profile
ik=mbathy(ji,jj) Last ocean cell level
IF(ik .GE. 1)THEN where we are on ocean and not on land
e3t(ji,jj,ik)=e3t_ps(ji,jj) apply the correction
e3w(ji,jj,ik+1)=e3t_ps(ji,jj) apply the correction
END IF
END DO
END DO
Mask
For PGS (A-grid), the mask (var=???????) is the same for all variables
For PGN (C-grid), mask is not the same for all variables:
Image
The u and v mask can be seen as a « wall » between the ocean and land.
The value is computed as :
U(i,j) = T(i,j) * T(i+1,j)
V(i,j) = T(i,j) * T(i,j+1)
Image
Legend: 0 = land; 1 = ocean
Menu