# GLS bug in -b main (Missing Validation / Incomplete Input Checking)

**URL:** <https://nemo-ocean.discourse.group/t/gls-bug-in-b-main-missing-validation-incomplete-input-checking/1006>\
**Category:** Uncategorized\
**Created:** [20 March 2026 10:59 UTC](https://nemo-ocean.discourse.group/t/gls-bug-in-b-main-missing-validation-incomplete-input-checking/1006 "2026-03-20T10:59:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GODZILLA](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/godzilla/32/317_2.png) [@GODZILLA](https://nemo-ocean.discourse.group/u/GODZILLA)\
**Post date:** [20 March 2026 10:59 UTC](https://nemo-ocean.discourse.group/t/gls-bug-in-b-main-missing-validation-incomplete-input-checking/1006/1 "2026-03-20T10:59:28Z")

</div>

Dear all,  
I working before on FVCOM/ADCIRC model. currently i have some planning to run NEMO model for Project work (NEMO+some BGC). Before starting the simulation i compile and run (small test with a few little steps). Then i understand before running a model i need to read the code. just started with GLS one. seen there may be need to change :  
example below.

> **[src/OCE/ZDF/zdfgls.F90 · main · NEMO Workspace / Nemo · GitLab](https://forge.nemo-ocean.eu/nemo/nemo/-/blob/main/src/OCE/ZDF/zdfgls.F90?ref_type=heads#L956-L957)**
>
> Official repository for the NEMO (Nucleus for European Modelling of the Ocean) model. For accompanying information please refer to the project wiki.

```auto
  IF( nn_bc_surf < 0 .OR. nn_bc_surf > 1 ) CALL ctl_stop( 'zdf_gls_init: bad flag: nn_bc_surf is 0 or 1' )
  IF( nn_bc_surf < 0 .OR. nn_bc_surf > 1 ) CALL ctl_stop( 'zdf_gls_init: bad flag: nn_bc_surf is 0 or 1' )

```

to

```auto
 IF( nn_bc_surf < 0 .OR. nn_bc_surf > 1 ) CALL ctl_stop( 'zdf_gls_init: bad flag: nn_bc_surf is 0 or 1' )
 IF( nn_bc_bot < 0 .OR. nn_bc_bot > 1 ) CALL ctl_stop( 'zdf_gls_init: bad flag: nn_bc_bot is 0 or 1' )

```

I will go deep and check the necessary code needed for my simulation.

Thank you!  
**-_\*.\*_-**

---

<div class="post-metadata">

**Author:** ![dupontf](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dupontf](https://nemo-ocean.discourse.group/u/dupontf)\
**Post date:** [4 May 2026 18:42 UTC](https://nemo-ocean.discourse.group/t/gls-bug-in-b-main-missing-validation-incomplete-input-checking/1006/2 "2026-05-04T18:42:46Z")

</div>

sounds valid indeed!
