New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#1839 (Changes to makenemo to support configurations in subdirectories of CONFIG) – NEMO

Opened 8 years ago

Closed 8 years ago

#1839 closed Enhancement (fixed)

Changes to makenemo to support configurations in subdirectories of CONFIG

Reported by: acc Owned by: nemo
Priority: low Milestone:
Component: OCE Version: v3.6
Severity: Keywords:
Cc:

Description

Context

Minor changes to makenemo are required to allow some configurations to reside in subdirectories of the CONFIG directory. The intention is to allow additional groupings of configurations without cluttering the CONFIG directory and maintaining a clear distinction between supported reference configurations and other demonstrators such as the new, idealised test case configurations.

Changes

A new option will be added to makenemo to name an alternative subdirectory of CONFIG. This subdirectory must exist and must be populated with its own cfg.txt file listing the configurations that it contains. For example, consider the following:

ls -R CONFIG/TEST_CASES
WAD     cfg.txt

CONFIG/TEST_CASES/WAD:
EXP00           MY_SRC          cpp_WAD.fcm

CONFIG/TEST_CASES/WAD/EXP00:
domain_def.xml  field_def.xml   iodef.xml       namelist_cfg    namelist_ref

CONFIG/TEST_CASES/WAD/MY_SRC:
usrdef_hgr.F90          usrdef_sbc.F90
usrdef_istate.F90       usrdef_zgr.F90
usrdef_nam.F90

where the cfg.txt file contains details of the configurations at this level only, i.e:

cat CONFIG/TEST_CASES/cfg.txt 
WAD OPA_SRC

and any relative links to SHARED include the extra step up, i.e:

ls -l CONFIG/TEST_CASES/WAD/EXP00/
total 376
lrwxr-xr-x  1 acc  staff      30  2 Feb 17:03 domain_def.xml -> ../../../SHARED/domain_def.xml
-rw-r--r--  1 acc  staff  141364  2 Feb 17:00 field_def.xml
-rw-r--r--  1 acc  staff    9198  2 Feb 17:00 iodef.xml
-rw-r--r--  1 acc  staff   27270  2 Feb 17:00 namelist_cfg
lrwxr-xr-x  1 acc  staff      28  2 Feb 17:03 namelist_ref -> ../../../SHARED/namelist_ref

then, with the proposed changes, a command such as:

./makenemo -a TEST_CASES -n WAD2 -r WAD -m macport_osx -j 4

will build a new WAD2 configuration inside the TEST_CASES subdirectory based on WAD.

Note that ./makenemo -h will not list the configurations available in the subdirectories in the general help response but a targeted request such as:

./makenemo -n help -a TEST_CASES
Available configurations :
WAD OPA_SRC

Available unsupported (external) configurations :

will.

Commit History (1)

ChangesetAuthorTimeChangeLog
7633acc2017-02-03T13:06:21+01:00

Branch 2016/dev_merge_2016. Changes to makenemo to support configurations in subdirectories of CONFIG. See #1839; added new -a option to makenemo which takes the name of a subdirectory of CONFIG as its argument. Subdirectories will be created later and some configurations moved to use this facility and tidy CONFIG in the process

Change History (1)

comment:1 Changed 8 years ago by acc

  • Resolution set to fixed
  • Status changed from new to closed

Changes to makenemo submitted at Changset [7633]

Note: See TracTickets for help on using tickets.