# Error compiling nemo: error #6404... must have an explicit type

**URL:** https://nemo-ocean.discourse.group/t/error-compiling-nemo-error-6404-must-have-an-explicit-type/473
**Category:** v4.0.x
**Created:** [5 April 2023 16:45 UTC](https://nemo-ocean.discourse.group/t/error-compiling-nemo-error-6404-must-have-an-explicit-type/473 "2023-04-05T16:45:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tmwilder](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/tmwilder/32/120_2.png) [@tmwilder](https://nemo-ocean.discourse.group/u/tmwilder)
#### Post date: [5 April 2023 16:45 UTC](https://nemo-ocean.discourse.group/t/error-compiling-nemo-error-6404-must-have-an-explicit-type/473/1 "2023-04-05T16:45:08Z")

</div>

I am trying to compute an additional term (`nmlnqg`) in `zdfmxl.F90` and use it in `ldfdyn.F90`, however I am receiving the following error when trying to compile

```auto
BLD/ppsrc/nemo/ldfdyn.f90(717): error #6404: This name does not have a type, and must have an explicit type. [NMLNQG]
                     IF( jk <= nmlnqg(ji,jj) ) mld_qg(ji,jj) = mld_qg(ji,jj) + e3w_n(ji,jj,jk)
-------------------------------^

```

The above line from `ldfdyn.F90` is code I have written and is the first instance of `nmlnqg` in the ldfdyn module.

I am essentially computing the mixed layer depth with an alternative density criterion. I have set `USE zdfmxl` in `ldfdyn.F90` and have previously made use of the original `nmln` term with no error. I have mirrored the implementation of `nmlnqg` with `nmln`. I have used the `grep` command to look at the implementation of the original `nmln`, but I cannot see anything that I am missing to make this work.

Could anyone point me in the right direction?

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [11 April 2023 07:18 UTC](https://nemo-ocean.discourse.group/t/error-compiling-nemo-error-6404-must-have-an-explicit-type/473/2 "2023-04-11T07:18:52Z")

</div>

Hei,

But is the new variable declared somewhere ?

---

<div class="post-metadata">

### Author: ![tmwilder](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/tmwilder/32/120_2.png) [@tmwilder](https://nemo-ocean.discourse.group/u/tmwilder)
#### Post date: [14 April 2023 11:04 UTC](https://nemo-ocean.discourse.group/t/error-compiling-nemo-error-6404-must-have-an-explicit-type/473/3 "2023-04-14T11:04:08Z")

</div>

I’ve decided to take a different approach for now and calculate this in another routine. I can imagine I’ll come back to this later to tidy up some code. Cheers for now.
