# 2D and 3D bounday condition

**URL:** <https://nemo-ocean.discourse.group/t/2d-and-3d-bounday-condition/1037>\
**Category:** Uncategorized\
**Created:** [8 July 2026 15:10 UTC](https://nemo-ocean.discourse.group/t/2d-and-3d-bounday-condition/1037 "2026-07-08T15:10:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sennevilles](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/sennevilles/32/11_2.png) [@sennevilles](https://nemo-ocean.discourse.group/u/sennevilles)\
**Post date:** [8 July 2026 15:10 UTC](https://nemo-ocean.discourse.group/t/2d-and-3d-bounday-condition/1037/1 "2026-07-08T15:10:22Z")

</div>

Hi,

I computed open boundary conditions for my child domain (using VVL) from a parent model (also using VVL). I ran a first simulation (simulation 1) using ln\_full\_vel = .true. and providing bn\_u3d and bn\_v3d.

Then, for a second simulation (simulation 2), I decomposed the full BDY currents into their barotropic and baroclinic components, using water level to separate these two parts (because of VVL), to test whether I could reproduce the results of simulation 1.

1. **Simulation 1:** ln\_full\_vel = .true., with bn\_u3d and bn\_v3d provided.
2. **Simulation 2:** ln\_full\_vel = .false., with bn\_u3d, bn\_v3d, bn\_u2d, and bn\_v2d provided, as NEMO would normally separate them.

So far, the results differ significantly between the two simulations.

Does anyone have suggestions or insights on this? My goal is to eventually understand the impact of using currents coming from different baroclinic and barotropic sources at the boundaries.

---

<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:** [17 July 2026 08:36 UTC](https://nemo-ocean.discourse.group/t/2d-and-3d-bounday-condition/1037/2 "2026-07-17T08:36:58Z")

</div>

Hello, can you please give some details about your setup, boundary schemes, etc… ?

---

<div class="post-metadata">

**Author:** ![sennevilles](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/sennevilles/32/11_2.png) [@sennevilles](https://nemo-ocean.discourse.group/u/sennevilles)\
**Post date:** [28 July 2026 12:59 UTC](https://nemo-ocean.discourse.group/t/2d-and-3d-bounday-condition/1037/3 "2026-07-28T12:59:33Z")

</div>

Hi Jérôme,

Sorry for the delay, I was away on summer vacation.

My setup is based on a subset of the CIOPS-East configuration ( [Coastal Ice-Ocean Prediction System for the East Coast of Canada (CIOPS-East) - Open Government Portal](https://ouvert.canada.ca/data/dataset/bfe44cce-a9c4-467f-9172-c8800b32e4ec) ). I extracted the Gulf of St. Lawrence domain, with open boundaries located at Cabot Strait and the Strait of Belle Isle.

The model uses the same grid as CIOPS-East, but over a smaller domain. The open boundary conditions are provided from the hourly CIOPS-East solutions produced by ECCC.

My stable boundary configuration for simulation 1 is shown below:

```auto
!-----------------------------------------------------------------------
&nambdy ! unstructured open boundaries ("key_bdy")
!-----------------------------------------------------------------------
nb_bdy = 2 ! number of open boundary sets
ln_coords_file = .false.,.false., ! =T : read bdy coordinates from file
cn_coords_file = '' ! bdy coordinates files
ln_mask_file = .false. ! =T : read mask from file
cn_mask_file = '' ! name of mask file (if ln_mask_file=.TRUE.)
cn_dyn2d = 'flather','flather' !
nn_dyn2d_dta = 1,1 ! = 0, bdy data are equal to the initial state
cn_dyn3d = 'specified','specified'
nn_dyn3d_dta = 1,1 ! = 0, bdy data are equal to the initial state
cn_tra = 'specified','specified'
nn_tra_dta = 1,1 ! = 0, bdy data are equal to the initial state
cn_ice_lim = 'none','none' !
nn_ice_lim_dta = 0,0 ! = 0, bdy data are equal to the initial state
rn_ice_tem = 270. ! lim3 only: arbitrary temperature of incoming sea ice
rn_ice_sal = 10. ! lim3 only: -- salinity --
rn_ice_age = 30. ! lim3 only: -- age --

ln_tra_dmp =.false.,.false. ! open boudaries conditions for tracers SBD true
ln_dyn3d_dmp =.false.,.false. ! open boundary condition for baroclinic velocities SBD true
rn_time_dmp = 1.,1. ! Damping time scale in days
rn_time_dmp_out = 1.,1. ! Outflow damping time scale SBD 1.
nn_rimwidth = 10,10 ! width of the relaxation zone
ln_vol = .false. ! total volume correction (see nn_volctl parameter)
nn_volctl = 1 ! 1 ==> the total volume is constant

/
!-----------------------------------------------------------------------
&nambdy_index ! structured open boundaries definition ("key_bdy") CABOT S
!-----------------------------------------------------------------------
ctypebdy ='S' ! Open boundary type (W,E,S or N)
nbdyind = 51 ! indice of velocity row or column
nbdybeg = 385 ! indice of segment start
nbdyend = 555 ! indice of segment end
/
!-----------------------------------------------------------------------
&nambdy_index ! structured open boundaries definition ("key_bdy") CABOT E
!-----------------------------------------------------------------------
ctypebdy ='E' ! Open boundary type (W,E,S or N)
nbdyind = 554 ! indice of velocity row or column
nbdybeg = 51 ! indice of segment start
nbdyend = 360 ! indice of segment end
/
!-----------------------------------------------------------------------
&nambdy_dta ! open boundaries - external data ("key_bdy")
!-----------------------------------------------------------------------
! ! file name ! frequency (hours) ! variable ! time interpol. ! clim ! 'daily'/ ! weights ! rotation ! land/sea mask !
! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !
bn_ssh = 'BDY_CIOPS_test2_bc_GSL_s', 1 , '-sossheig' , .true. , .false. , 'daily' , '' , '' , ''
bn_u3d = 'BDY_CIOPS_test2_bc_GSL_s', 1 , '-vozocrtx' , .true. , .false. , 'daily' , '' , '' , ''
bn_v3d = 'BDY_CIOPS_test2_bc_GSL_s', 1 , '-vomecrty' , .true. , .false. , 'daily' , '' , '' , ''
bn_tem = 'BDY_CIOPS_test2_bc_GSL_s', 1 , '-votemper' , .true. , .false. , 'daily' , '' , '' , ''
bn_sal = 'BDY_CIOPS_test2_bc_GSL_s', 1 , '-vosaline' , .true. , .false. , 'daily' , '' , '' , ''
cn_dir = '/home/toto/'
ln_full_vel = .true.
/
!-----------------------------------------------------------------------
&nambdy_dta ! open boundaries - external data ("key_bdy")
!-----------------------------------------------------------------------
! ! file name ! frequency (hours) ! variable ! time interpol. ! clim ! 'daily'/ ! weights ! rotation ! land/sea mask !
! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !
bn_ssh = 'BDY_CIOPS_test2_bc_GSL_e', 1 , '-sossheig' , .true. , .false. , 'daily' , '' , '' , ''
bn_u3d = 'BDY_CIOPS_test2_bc_GSL_e', 1 , '-vozocrtx' , .true. , .false. , 'daily' , '' , '' , ''
bn_v3d = 'BDY_CIOPS_test2_bc_GSL_e', 1 , '-vomecrty' , .true. , .false. , 'daily' , '' , '' , ''
bn_tem = 'BDY_CIOPS_test2_bc_GSL_e', 1 , '-votemper' , .true. , .false. , 'daily' , '' , '' , ''
bn_sal = 'BDY_CIOPS_test2_bc_GSL_e', 1 , '-vosaline' , .true. , .false. , 'daily' , '' , '' , ''
cn_dir = '/home/toto/'
ln_full_vel = .true.
/

```

For the the simulation 2, I provide bn\_u2d and bn\_v2d and ln\_full\_vel = .false..

---

<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:** [28 July 2026 17:42 UTC](https://nemo-ocean.discourse.group/t/2d-and-3d-bounday-condition/1037/4 "2026-07-28T17:42:19Z")

</div>

Hi,

Thanks for the details.

One more question: when you set `ln_full_vel = .false.,do you modify the 3d velocity data so that it holds only baroclinic velocities ?`

---

<div class="post-metadata">

**Author:** ![sennevilles](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/sennevilles/32/11_2.png) [@sennevilles](https://nemo-ocean.discourse.group/u/sennevilles)\
**Post date:** [28 July 2026 17:59 UTC](https://nemo-ocean.discourse.group/t/2d-and-3d-bounday-condition/1037/5 "2026-07-28T17:59:37Z")

</div>

Yes, I followed the way it’s done in the NEMO 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:** [28 July 2026 18:11 UTC](https://nemo-ocean.discourse.group/t/2d-and-3d-bounday-condition/1037/6 "2026-07-28T18:11:10Z")

</div>

ok. I thought that could be the problem since the code does not do it online (it should !).

First, you could import [this change](https://forge.nemo-ocean.eu/nemo/nemo/-/merge_requests/1182/diffs?commit_id=efa7478addbfaff51fb0b953576b09aca478a8b2) in your code (to be sure).

Second, when you say “results differ significantly”, could you expand ?

---

<div class="post-metadata">

**Author:** ![sennevilles](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/sennevilles/32/11_2.png) [@sennevilles](https://nemo-ocean.discourse.group/u/sennevilles)\
**Post date:** [28 July 2026 18:49 UTC](https://nemo-ocean.discourse.group/t/2d-and-3d-bounday-condition/1037/7 "2026-07-28T18:49:16Z")

</div>

OK, I have to look at that, I still use a code based on NEMO 3.6.

I’ll compare the the code and send you an example of the differences.

Thank you,

Simon
