# How to make AMM12 compliant with AGRIF

**URL:** <https://nemo-ocean.discourse.group/t/how-to-make-amm12-compliant-with-agrif/334>\
**Category:** Regional\
**Tags:** AGRIF\
**Created:** [20 July 2022 10:55 UTC](https://nemo-ocean.discourse.group/t/how-to-make-amm12-compliant-with-agrif/334 "2022-07-20T10:55:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m-n-o](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/m-n-o/32/101_2.png) [@m-n-o](https://nemo-ocean.discourse.group/u/m-n-o)\
**Post date:** [20 July 2022 10:55 UTC](https://nemo-ocean.discourse.group/t/how-to-make-amm12-compliant-with-agrif/334/1 "2022-07-20T10:55:33Z")

</div>

Hi.  
I’m trying to compile configuration, referenced to AMM12 with AGRIF via command

```shell
$ ./makenemo -m 'gfortran_test' -r 'AMM12' -n 'Nesting_test' add_key 'key_agrif'

```

Configuration building process is failed with an error:

```nohighlight
->Parse configuration: start
Config file (bld): /home/hydmet/Build_NEMO/nemo_4.2.0/mk/bld_preproagr.cfg
Config file (bld): /home/hydmet/Build_NEMO/nemo_4.2.0/mk/arch_nemo.fcm
Config file (bld): /home/hydmet/Build_NEMO/nemo_4.2.0/mk/cpp.fcm
ERROR: /home/hydmet/Build_NEMO/nemo_4.2.0/mk/bld_preproagr.cfg: LINE 35:
      bld::pp::nemo/agrif2model: invalid sub-package in declaration.
ERROR: /home/hydmet/Build_NEMO/nemo_4.2.0/mk/bld_preproagr.cfg: LINE 83:
      bld::src_type::nemo/agrif2model.F90: invalid sub-package in declaration.
->Parse configuration: 0 second
->TOTAL: 0 second
Build failed on Wed Jul 20 10:38:19 2022.

```

Configuration AMM12 without AGRIF had compiled successfully.  
Please, help to fix it. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![lambertn](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/lambertn/32/13_2.png) [@lambertn](https://nemo-ocean.discourse.group/u/lambertn)\
**Post date:** [22 July 2022 15:43 UTC](https://nemo-ocean.discourse.group/t/how-to-make-amm12-compliant-with-agrif/334/2 "2022-07-22T15:43:26Z")

</div>

`AMM12` is not “made” for AGRIF. To change that, you can change the file _ref\_cfgs.txt_ by adding `NST` in the line of `AMM12` like this :

```
AMM12 OCE NST

```

Or you can use another reference configuration that include AGRIF by default (e.g. `AGRIF_DEMO`).

---

<div class="post-metadata">

**Author:** ![m-n-o](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/m-n-o/32/101_2.png) [@m-n-o](https://nemo-ocean.discourse.group/u/m-n-o)\
**Post date:** [25 July 2022 12:58 UTC](https://nemo-ocean.discourse.group/t/how-to-make-amm12-compliant-with-agrif/334/3 "2022-07-25T12:58:48Z")

</div>

Thanks for answer, Nicolas.  
I already changed reference configuration and compiled it, but your comment about AMM12 may be useful later.
