# New regional configuration setup: open boundaries

**URL:** https://nemo-ocean.discourse.group/t/new-regional-configuration-setup-open-boundaries/37
**Category:** Regional
**Tags:** BDY
**Created:** [8 June 2021 11:23 UTC](https://nemo-ocean.discourse.group/t/new-regional-configuration-setup-open-boundaries/37 "2021-06-08T11:23:49Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![jchanut](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/jchanut/32/9_2.png) [@jchanut](https://nemo-ocean.discourse.group/u/jchanut)
#### Post date: [20 October 2021 14:53 UTC](https://nemo-ocean.discourse.group/t/new-regional-configuration-setup-open-boundaries/37/21 "2021-10-20T14:53:23Z")

</div>

> [@Franziska](#):
>
> Other than expected from your ncdumps here, I had to change the order of dimensions for the western boundary to time,depth,x,y

Yes, you are right, the ncdump is wrong ! It does not agree with what I wrote and with the code (_fldread.F90_):

```fortran
     !!---------------------------------------------------------------------
     !! ***ROUTINE fld_map_core***
     !!----------------------------------------------------------------------
      !
      ! structured BDY with rimwidth > 1 : idim_read(2) == rimwidth /= 1
      ! structured BDY with rimwidth == 1 or unstructured BDY: idim_read(2) == 1
      !
      IF( idim_read(2) > 1 ) THEN ! structured BDY with rimwidth > 1  
         DO jk = 1, idim_bdy(3)
            DO jb = 1, idim_bdy(1)
               im1 = kmap(jb) - 1
               jj = im1 / idim_read(1) + 1
               ji = MOD( im1, idim_read(1) ) + 1
               pdta_bdy(jb,1,jk) = pdta_read(ji,jj,jk)
            END DO
         END DO
      ELSE
         ! ...
      ENDIF

```

Taking the same example, but presumably at the right place this time in the operational repository, here is what we get for the western boundary (along boundary dimension “Y” first):

```c
netcdf NEATL36_obcdta_west_y2017m04d30 {
dimensions:
	Y = 1874 ;
	X = 30 ;
	Z = 50 ;
	T = UNLIMITED ; // (1 currently)
variables:
	int Y(Y) ;
		Y:standard_name = "projection_y_coordinate" ;
		Y:units = "1" ;
		Y:axis = "Y" ;
		Y:grid_point = "T" ;
	int X(X) ;
		X:standard_name = "projection_x_coordinate" ;
		X:units = "1" ;
		X:axis = "X" ;
		X:grid_point = "T" ;
	int Z(Z) ;
		Z:standard_name = "projection_z_coordinate" ;
		Z:units = "1" ;
		Z:axis = "Z" ;
		Z:grid_point = "T" ;
	int T(T) ;
		T:standard_name = "projection_t_coordinate" ;
		T:units = "1" ;
		T:axis = "T" ;
		T:grid_point = "T" ;
	float deptht(Z) ;
		deptht:units = "m" ;
		deptht:positive = "down" ;
		deptht:long_name = "Vertical T levels" ;
		deptht:standard_name = "depth" ;
		deptht:axis = "Z" ;
		deptht:associate = "Z" ;
		deptht:grid_point = "T" ;
		deptht:_FillValue = 0.f ;
	float time_counter(T) ;
		time_counter:calendar = "gregorian" ;
		time_counter:standard_name = "time" ;
		time_counter:long_name = "Time axis" ;
		time_counter:axis = "T" ;
		time_counter:units = "seconds since 2006-10-11 00:00:00" ;
		time_counter:time_origin = "2006-OCT-11 00:00:00" ;
		time_counter:associate = "T" ;
		time_counter:grid_point = "T" ;
		time_counter:_FillValue = 0.f ;
	double nav_lon(X, Y) ;
		nav_lon:_FillValue = 1.e+20 ;
		nav_lon:long_name = "Longitude_T" ;
		nav_lon:units = "degrees_east" ;
		nav_lon:associate = "Y X" ;
		nav_lon:grid_point = "T" ;
	double nav_lat(X, Y) ;
		nav_lat:_FillValue = 1.e+20 ;
		nav_lat:long_name = "Latitude_T" ;
		nav_lat:units = "degrees_north" ;
		nav_lat:associate = "Y X" ;
		nav_lat:grid_point = "T" ;
	float sossheig(T, X, Y) ;
		sossheig:units = "m" ;
		sossheig:add_offset = 0.f ;
		sossheig:scale_factor = 1.f ;
		sossheig:long_name = "Sea Surface Height" ;
		sossheig:short_name = "sossheig" ;
		sossheig:online_operation = "N/A" ;
		sossheig:interval_operation = 86400 ;
		sossheig:interval_write = 86400 ;
		sossheig:coordinates = "nav_lon nav_lat" ;
		sossheig:standard_name = "sea_surface_height" ;
		sossheig:associate = "T Y X" ;
		sossheig:grid_point = "T" ;
		sossheig:extrapolation = "dist_weight" ;
		sossheig:interpolation = "cubic" ;
		sossheig:src_file = "PSY4V3R1_1dAV_20170430_20170501_grid2D_R20170510.nc" ;
		sossheig:src_i_indices = 3207, 3218 ;
		sossheig:src_j_indices = 1820, 2446 ;
		sossheig:refinment_factor = 3, 3 ;
		sossheig:_FillValue = 0.f ;
	float vomecrty(T, Z, X, Y) ;
		vomecrty:units = "m s-1" ;
		vomecrty:add_offset = 0.f ;
		vomecrty:scale_factor = 1.f ;
		vomecrty:long_name = "Meridional velocity" ;
		vomecrty:standard_name = "sea_water_y_velocity" ;
		vomecrty:short_name = "vomecrty" ;
		vomecrty:online_operation = "N/A" ;
		vomecrty:interval_operation = 86400 ;
		vomecrty:interval_write = 86400 ;
		vomecrty:coordinates = "nav_lon nav_lat" ;
		vomecrty:associate = "T Z Y X" ;
		vomecrty:grid_point = "V" ;
		vomecrty:extrapolation = "dist_weight" ;
		vomecrty:interpolation = "cubic" ;
		vomecrty:src_file = "PSY4V3R1_1dAV_20170430_20170501_gridV_R20170510.nc" ;
		vomecrty:src_i_indices = 3207, 3218 ;
		vomecrty:src_j_indices = 1820, 2446 ;
		vomecrty:refinment_factor = 3, 3 ;
		vomecrty:_FillValue = 0.f ;
	float vozocrtx(T, Z, X, Y) ;
		vozocrtx:units = "m s-1" ;
		vozocrtx:add_offset = 0.f ;
		vozocrtx:scale_factor = 1.f ;
		vozocrtx:long_name = "Zonal velocity" ;
		vozocrtx:standard_name = "sea_water_x_velocity" ;
		vozocrtx:short_name = "vozocrtx" ;
		vozocrtx:online_operation = "N/A" ;
		vozocrtx:interval_operation = 86400 ;
		vozocrtx:interval_write = 86400 ;
		vozocrtx:coordinates = "nav_lon nav_lat" ;
		vozocrtx:associate = "T Z Y X" ;
		vozocrtx:grid_point = "U" ;
		vozocrtx:extrapolation = "dist_weight" ;
		vozocrtx:interpolation = "cubic" ;
		vozocrtx:src_file = "PSY4V3R1_1dAV_20170430_20170501_gridU_R20170510.nc" ;
		vozocrtx:src_i_indices = 3207, 3218 ;
		vozocrtx:src_j_indices = 1820, 2446 ;
		vozocrtx:refinment_factor = 3, 3 ;
		vozocrtx:_FillValue = 0.f ;
	float vosaline(T, Z, X, Y) ;
		vosaline:units = "PSU" ;
		vosaline:add_offset = 0.f ;
		vosaline:scale_factor = 1.f ;
		vosaline:long_name = "Salinity" ;
		vosaline:standard_name = "sea_water_salinity" ;
		vosaline:short_name = "vosaline" ;
		vosaline:online_operation = "N/A" ;
		vosaline:interval_operation = 86400 ;
		vosaline:interval_write = 86400 ;
		vosaline:coordinates = "nav_lon nav_lat" ;
		vosaline:associate = "T Z Y X" ;
		vosaline:grid_point = "T" ;
		vosaline:extrapolation = "dist_weight" ;
		vosaline:interpolation = "cubic" ;
		vosaline:src_file = "PSY4V3R1_1dAV_20170430_20170501_gridS_R20170510.nc" ;
		vosaline:src_i_indices = 3207, 3218 ;
		vosaline:src_j_indices = 1820, 2446 ;
		vosaline:refinment_factor = 3, 3 ;
		vosaline:_FillValue = 0.f ;
	float votemper(T, Z, X, Y) ;
		votemper:units = "degree_Celsius" ;
		votemper:add_offset = 0.f ;
		votemper:scale_factor = 1.f ;
		votemper:long_name = "Temperature" ;
		votemper:standard_name = "sea_water_potential_temperature" ;
		votemper:short_name = "votemper" ;
		votemper:online_operation = "N/A" ;
		votemper:interval_operation = 86400 ;
		votemper:interval_write = 86400 ;
		votemper:coordinates = "nav_lon nav_lat" ;
		votemper:associate = "T Z Y X" ;
		votemper:grid_point = "T" ;
		votemper:extrapolation = "dist_weight" ;
		votemper:interpolation = "cubic" ;
		votemper:src_file = "PSY4V3R1_1dAV_20170430_20170501_gridT_R20170510.nc" ;
		votemper:src_i_indices = 3207, 3218 ;
		votemper:src_j_indices = 1820, 2446 ;
		votemper:refinment_factor = 3, 3 ;
		votemper:_FillValue = 0.f ;

// global attributes:
		:Conventions = "CF-1.5" ;
		:Grid = "ARAKAWA-C" ;
		:periodicity = 0. ;
		:Created_by = "SIREN create_boundary" ;
		:Creation_date = "2017-05-08 10:46:22" ;
		:bdy_ind = 2. ;
		:bdy_width = 30. ;
		:bdy_deb = 2. ;
		:bdy_end = 1875. ;
}

```

and the eastern:

```c-like
netcdf NEATL36_obcdta_east_2_y2017m04d30 {
dimensions:
	Y = 73 ;
	X = 15 ;
	Z = 50 ;
	T = UNLIMITED ; // (1 currently)
variables:
	int Y(Y) ;
		Y:standard_name = "projection_y_coordinate" ;
		Y:units = "1" ;
		Y:axis = "Y" ;
		Y:grid_point = "T" ;
	int X(X) ;
		X:standard_name = "projection_x_coordinate" ;
		X:units = "1" ;
		X:axis = "X" ;
		X:grid_point = "T" ;
	int Z(Z) ;
		Z:standard_name = "projection_z_coordinate" ;
		Z:units = "1" ;
		Z:axis = "Z" ;
		Z:grid_point = "T" ;
	int T(T) ;
		T:standard_name = "projection_t_coordinate" ;
		T:units = "1" ;
		T:axis = "T" ;
		T:grid_point = "T" ;
	float deptht(Z) ;
		deptht:units = "m" ;
		deptht:positive = "down" ;
		deptht:long_name = "Vertical T levels" ;
		deptht:standard_name = "depth" ;
		deptht:axis = "Z" ;
		deptht:associate = "Z" ;
		deptht:grid_point = "T" ;
		deptht:_FillValue = 0.f ;
	float time_counter(T) ;
		time_counter:calendar = "gregorian" ;
		time_counter:standard_name = "time" ;
		time_counter:long_name = "Time axis" ;
		time_counter:axis = "T" ;
		time_counter:units = "seconds since 2006-10-11 00:00:00" ;
		time_counter:time_origin = "2006-OCT-11 00:00:00" ;
		time_counter:associate = "T" ;
		time_counter:grid_point = "T" ;
		time_counter:_FillValue = 0.f ;
	double nav_lon(X, Y) ;
		nav_lon:_FillValue = 1.e+20 ;
		nav_lon:long_name = "Longitude_T" ;
		nav_lon:units = "degrees_east" ;
		nav_lon:associate = "Y X" ;
		nav_lon:grid_point = "T" ;
	double nav_lat(X, Y) ;
		nav_lat:_FillValue = 1.e+20 ;
		nav_lat:long_name = "Latitude_T" ;
		nav_lat:units = "degrees_north" ;
		nav_lat:associate = "Y X" ;
		nav_lat:grid_point = "T" ;
	float sossheig(T, X, Y) ;
		sossheig:units = "m" ;
		sossheig:add_offset = 0.f ;
		sossheig:scale_factor = 1.f ;
		sossheig:long_name = "Sea Surface Height" ;
		sossheig:short_name = "sossheig" ;
		sossheig:online_operation = "N/A" ;
		sossheig:interval_operation = 86400 ;
		sossheig:interval_write = 86400 ;
		sossheig:coordinates = "nav_lon nav_lat" ;
		sossheig:standard_name = "sea_surface_height" ;
		sossheig:associate = "T Y X" ;
		sossheig:grid_point = "T" ;
		sossheig:extrapolation = "dist_weight" ;
		sossheig:interpolation = "cubic" ;
		sossheig:src_file = "PSY4V3R1_1dAV_20170430_20170501_grid2D_R20170510.nc" ;
		sossheig:src_i_indices = 3565, 3571 ;
		sossheig:src_j_indices = 2310, 2337 ;
		sossheig:refinment_factor = 3, 3 ;
		sossheig:_FillValue = 0.f ;
	float vomecrty(T, Z, X, Y) ;
		vomecrty:units = "m s-1" ;
		vomecrty:add_offset = 0.f ;
		vomecrty:scale_factor = 1.f ;
		vomecrty:long_name = "Meridional velocity" ;
		vomecrty:standard_name = "sea_water_y_velocity" ;
		vomecrty:short_name = "vomecrty" ;
		vomecrty:online_operation = "N/A" ;
		vomecrty:interval_operation = 86400 ;
		vomecrty:interval_write = 86400 ;
		vomecrty:coordinates = "nav_lon nav_lat" ;
		vomecrty:associate = "T Z Y X" ;
		vomecrty:grid_point = "V" ;
		vomecrty:extrapolation = "dist_weight" ;
		vomecrty:interpolation = "cubic" ;
		vomecrty:src_file = "PSY4V3R1_1dAV_20170430_20170501_gridV_R20170510.nc" ;
		vomecrty:src_i_indices = 3565, 3571 ;
		vomecrty:src_j_indices = 2310, 2337 ;
		vomecrty:refinment_factor = 3, 3 ;
		vomecrty:_FillValue = 0.f ;
	float vozocrtx(T, Z, X, Y) ;
		vozocrtx:units = "m s-1" ;
		vozocrtx:add_offset = 0.f ;
		vozocrtx:scale_factor = 1.f ;
		vozocrtx:long_name = "Zonal velocity" ;
		vozocrtx:standard_name = "sea_water_x_velocity" ;
		vozocrtx:short_name = "vozocrtx" ;
		vozocrtx:online_operation = "N/A" ;
		vozocrtx:interval_operation = 86400 ;
		vozocrtx:interval_write = 86400 ;
		vozocrtx:coordinates = "nav_lon nav_lat" ;
		vozocrtx:associate = "T Z Y X" ;
		vozocrtx:grid_point = "U" ;
		vozocrtx:extrapolation = "dist_weight" ;
		vozocrtx:interpolation = "cubic" ;
		vozocrtx:src_file = "PSY4V3R1_1dAV_20170430_20170501_gridU_R20170510.nc" ;
		vozocrtx:src_i_indices = 3564, 3570 ;
		vozocrtx:src_j_indices = 2310, 2337 ;
		vozocrtx:refinment_factor = 3, 3 ;
		vozocrtx:_FillValue = 0.f ;
	float vosaline(T, Z, X, Y) ;
		vosaline:units = "PSU" ;
		vosaline:add_offset = 0.f ;
		vosaline:scale_factor = 1.f ;
		vosaline:long_name = "Salinity" ;
		vosaline:standard_name = "sea_water_salinity" ;
		vosaline:short_name = "vosaline" ;
		vosaline:online_operation = "N/A" ;
		vosaline:interval_operation = 86400 ;
		vosaline:interval_write = 86400 ;
		vosaline:coordinates = "nav_lon nav_lat" ;
		vosaline:associate = "T Z Y X" ;
		vosaline:grid_point = "T" ;
		vosaline:extrapolation = "dist_weight" ;
		vosaline:interpolation = "cubic" ;
		vosaline:src_file = "PSY4V3R1_1dAV_20170430_20170501_gridS_R20170510.nc" ;
		vosaline:src_i_indices = 3565, 3571 ;
		vosaline:src_j_indices = 2310, 2337 ;
		vosaline:refinment_factor = 3, 3 ;
		vosaline:_FillValue = 0.f ;
	float votemper(T, Z, X, Y) ;
		votemper:units = "degree_Celsius" ;
		votemper:add_offset = 0.f ;
		votemper:scale_factor = 1.f ;
		votemper:long_name = "Temperature" ;
		votemper:standard_name = "sea_water_potential_temperature" ;
		votemper:short_name = "votemper" ;
		votemper:online_operation = "N/A" ;
		votemper:interval_operation = 86400 ;
		votemper:interval_write = 86400 ;
		votemper:coordinates = "nav_lon nav_lat" ;
		votemper:associate = "T Z Y X" ;
		votemper:grid_point = "T" ;
		votemper:extrapolation = "dist_weight" ;
		votemper:interpolation = "cubic" ;
		votemper:src_file = "PSY4V3R1_1dAV_20170430_20170501_gridT_R20170510.nc" ;
		votemper:src_i_indices = 3565, 3571 ;
		votemper:src_j_indices = 2310, 2337 ;
		votemper:refinment_factor = 3, 3 ;
		votemper:_FillValue = 0.f ;

// global attributes:
		:Conventions = "CF-1.5" ;
		:Grid = "ARAKAWA-C" ;
		:periodicity = 0. ;
		:Created_by = "SIREN create_boundary" ;
		:Creation_date = "2017-05-08 10:46:21" ;
		:bdy_ind = 1091. ;
		:bdy_width = 15. ;
		:bdy_deb = 1476. ;
		:bdy_end = 1548. ;
}

```

---

<div class="post-metadata">

### Author: ![jchanut](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/jchanut/32/9_2.png) [@jchanut](https://nemo-ocean.discourse.group/u/jchanut)
#### Post date: [20 October 2021 14:56 UTC](https://nemo-ocean.discourse.group/t/new-regional-configuration-setup-open-boundaries/37/22 "2021-10-20T14:56:08Z")

</div>

> [@Franziska](#):
>
> Are there any changes in respect from 4.0.5 to 4.2\_RC?

My first guess is “no”

---

<div class="post-metadata">

### Author: ![Franziska](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Franziska](https://nemo-ocean.discourse.group/u/Franziska)
#### Post date: [21 October 2021 09:36 UTC](https://nemo-ocean.discourse.group/t/new-regional-configuration-setup-open-boundaries/37/23 "2021-10-21T09:36:58Z")

</div>

Thank you Jérôme!  
And sorry for bothering again [I just want to make sure I really apply the correct data-structure, to exclude this from the list of possible issues for some spurious signals I see evolving from the boundaries]:  
From your new ncdumps I read cross boundary dimension (X) first: e.g. `votemper(T, Z, X, Y)`  
This is what seems to work in my case as well.  
I have to admit that it’s pretty hard for me to follow the definition of these fields through the code.

---

<div class="post-metadata">

### Author: ![jchanut](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/jchanut/32/9_2.png) [@jchanut](https://nemo-ocean.discourse.group/u/jchanut)
#### Post date: [21 October 2021 10:24 UTC](https://nemo-ocean.discourse.group/t/new-regional-configuration-setup-open-boundaries/37/24 "2021-10-21T10:24:15Z")

</div>

No problem Franziska. This is far from being clear…

> [@Franziska](#):
>
> From your new ncdumps I read cross boundary dimension (X) first: e.g. `votemper(T, Z, X, Y)`

I don’t get your point. These are East and West segments: 1st dimension of arrays (and in the definition of dimensions in the netcdf file, that’s important) is the along boundary direction, e.g. Y here (len=1874). X (len=30=max size of the relaxation zone) is the cross boundary direction. You may have been confused by the names “X”, “Y” but that doesn’t matter.

---

<div class="post-metadata">

### Author: ![Franziska](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Franziska](https://nemo-ocean.discourse.group/u/Franziska)
#### Post date: [21 October 2021 10:37 UTC](https://nemo-ocean.discourse.group/t/new-regional-configuration-setup-open-boundaries/37/25 "2021-10-21T10:37:29Z")

</div>

🤔  
To my understanding and what I see from testing different options it’s not the order in which dimensions occur in the file but in which they occur in the variables.  
Here are two of my boundary data sets:

southern (northern is similar although sorted in reverse order along geographical latitude)

```c
netcdf boundary_fields_l120_south_10_grid_U_y2015 {
dimensions:
        depth = 120 ;
        time = UNLIMITED ; // (365 currently)
        y = 9 ;
        x = 917 ;
variables:
        float depth(depth) ;
                depth:_FillValue = NaNf ;
        int64 time(time) ;
                time:long_name = "Time (hours since 1950-01-01)" ;
                time:standard_name = "time" ;
                time:axis = "T" ;
                time:_ChunkSizes = 1 ;
                time:_CoordinateAxisType = "Time" ;
                time:units = "days since 2015-01-01 12:00:00" ;
                time:calendar = "proleptic_gregorian" ;
        double uo(time, depth, y, x) ;
                uo:_FillValue = -9999. ;
                uo:long_name = "Eastward velocity" ;
                uo:standard_name = "eastward_sea_water_velocity" ;
                uo:units = "m s-1" ;
                uo:unit_long = "Meters per second" ;
                uo:cell_methods = "area: mean" ;
                uo:_ChunkSizes = 1, 7, 341, 720 ;
        double x(x) ;
                x:_FillValue = NaN ;
        double y(y) ;
                y:_FillValue = NaN ;

```

and western

```c-like
netcdf boundary_fields_l120_west_10_grid_U_y2015 {
dimensions:
        depth = 120 ;
        time = UNLIMITED ; // (365 currently)
        x = 9 ;
        y = 737 ;
variables:
        float depth(depth) ;
                depth:_FillValue = NaNf ;
        int64 time(time) ;
                time:long_name = "Time (hours since 1950-01-01)" ;
                time:standard_name = "time" ;
                time:axis = "T" ;
                time:_ChunkSizes = 1 ;
                time:_CoordinateAxisType = "Time" ;
                time:units = "days since 2015-01-01 12:00:00" ;
                time:calendar = "proleptic_gregorian" ;
        double uo(time, depth, x, y) ;
                uo:_FillValue = -9999. ;
                uo:long_name = "Eastward velocity" ;
                uo:standard_name = "eastward_sea_water_velocity" ;
                uo:units = "m s-1" ;
                uo:unit_long = "Meters per second" ;
                uo:cell_methods = "area: mean" ;
                uo:_ChunkSizes = 1, 7, 341, 720 ;
        double x(x) ;
                x:_FillValue = NaN ;
        double y(y) ;
                y:_FillValue = NaN ;

```

x always referring to “longitude”, y referring to “latitude”

[Previous page](https://nemo-ocean.discourse.group/t/new-regional-configuration-setup-open-boundaries/37.md?page=1)
