[7421] | 1 | ================================ |
---|
| 2 | = HOW TO COMPILE |
---|
| 3 | ================================ |
---|
[6956] | 4 | The DOMAINcfg tool can be compiled using the maketools script in the NEMOGCM/TOOLS directory as follows: |
---|
| 5 | ::::::::::::::::::::::::::::::::: |
---|
| 6 | ./maketools -m $ARCH -n DOMAINcfg |
---|
| 7 | ::::::::::::::::::::::::::::::::: |
---|
| 8 | where $ARCH indicates the arch file to be used from the directory NEMOGCM/ARCH. |
---|
[6955] | 9 | |
---|
[6956] | 10 | DOMAINcfg compiled will create "make_domain_cfg.exe" executable script (the main routine of this tool is make_domain_cfg.f90) |
---|
[7108] | 11 | |
---|
[7421] | 12 | ================================ |
---|
| 13 | = HOW TO RUN |
---|
| 14 | ================================ |
---|
| 15 | just run : |
---|
| 16 | ::::::::::::::::::::::::::::::::::::::::::::::::: |
---|
[7828] | 17 | mpirun -np 1 ./make_domain_cfg.exe |
---|
[7421] | 18 | ::::::::::::::::::::::::::::::::::::::::::::::::: |
---|
| 19 | NOTA: it can be run in multiproc mode, but in output there will be domain_cfg_00xx.nc files |
---|
| 20 | |
---|
| 21 | ================================ |
---|
| 22 | = HOW TO USE |
---|
| 23 | ================================ |
---|
| 24 | 1) copy in DOMAINcfg directory namelist_cfg all settings (that you had in 3.6_stable) of the configuration for which you want prepare domain_cfg.nc file |
---|
[9079] | 25 | IMPORTANT : keep the namelist_ref committed inchanged. !!! |
---|
[7421] | 26 | |
---|
[11628] | 27 | NEW OPTION: |
---|
| 28 | * ln_e3_dep |
---|
[7421] | 29 | till nemo_v3.6_stable e3 were done like an analytical derivative of depth function |
---|
| 30 | now e3=dk[depth] in discret sens |
---|
| 31 | |
---|
| 32 | If you want to create same e3[tuvw] like 3.6 you've to use "ln_e3_dep=.false." |
---|
| 33 | |
---|
| 34 | ln_e3_dep = .true. ! =T : e3=dk[depth] in discret sens. |
---|
| 35 | ! ! ===>>> will become the only possibility in v4.0 |
---|
| 36 | ! ! =F : e3 analytical derivative of depth function |
---|
| 37 | ! ! only there for backward compatibility test with v3.6 |
---|
| 38 | ! |
---|
| 39 | |
---|
[11628] | 40 | * ln_domclo |
---|
| 41 | The definition of closed sea are now integrated into ./make_domain_cfg.exe. The need on an external python script and hard coded indices has been removed. |
---|
| 42 | ln_domclo=T will generate the masks needed to mask or correct |
---|
| 43 | the fwf unbalance over closed sea. If non defined closed sea are detected, a mask containing this will also be generated. |
---|
| 44 | The detection of the lake is done using a lat/lon seed and a flood filling algorithm (the default namelist should work for any resolution). |
---|
| 45 | The definition of the target area is done by defining a lat/lon position center, then all wet points at a defined distance of it will be selected. |
---|
| 46 | Options are available to select only coastal points if needed. |
---|
[11659] | 47 | For each lake, name, lon_src, lat_src, lon_trg, lat_trg, river mouth area, correction scheme, radius trg, id trg need to be defined. |
---|
| 48 | * lon/lat_src/trg are the seed location of the closed sea (src) and its river outflow (trg). |
---|
| 49 | * river mouth area is to defined is you spread the closed sea emp correction locally (circle with raduis 'radius trg' in m) |
---|
| 50 | or along the coast point into a circle with raduis 'radius trg' (in m) |
---|
| 51 | or globally (open sea mask) |
---|
| 52 | * correction scheme defined how you want to spread the closed sea correction |
---|
| 53 | * glo : as emp globally |
---|
| 54 | * rnf : as a runoff for the net precip and on emp for net evaporation case locally or along the coast |
---|
| 55 | * emp : as emp locally or along the coast |
---|
| 56 | * id trg is a integer used to defined group of closed sea and their river outflow (for example all the great lake and the St Laurent outflow). |
---|
[11628] | 57 | |
---|
[13390] | 58 | |
---|
[7421] | 59 | 2) copy in DOMAINcfg directory same input files (of related configuration) required in v3.6_stable. |
---|
| 60 | |
---|
| 61 | DOMAINcfg package is EXACTLY what does exist in NEMO version 3.6 to define a model domain (both domain related namelist and initialization). |
---|
| 62 | DOMAINcfg tool creates a netcdf file "domain_cfg.nc" containing all the ocean domain informations required to define an ocean configuration, |
---|
| 63 | these files are : |
---|
| 64 | |
---|
| 65 | domain size |
---|
| 66 | domain characteristics (periodic) |
---|
| 67 | horizontal mesh |
---|
| 68 | Coriolis parameter |
---|
| 69 | depth and vertical scale factors |
---|
| 70 | |
---|
[6984] | 71 | FOR EXAMPLE |
---|
| 72 | - for AMM12 : |
---|
| 73 | coordinates.nc |
---|
| 74 | bathy_meter.nc |
---|
| 75 | bathy_level.nc |
---|
| 76 | amm12_rivers.nc |
---|
| 77 | coordinates.bdy.nc |
---|
| 78 | amm12_restart_oce.nc |
---|
| 79 | directories: bdydta/ |
---|
| 80 | fluxes/ |
---|
| 81 | - for ORCA2 : |
---|
| 82 | coordinates.nc |
---|
| 83 | bathy_meter.nc |
---|
| 84 | bathy_level.nc |
---|
| 85 | domain_def.xml |
---|
| 86 | field_def.xml |
---|
| 87 | iodef.xml |
---|
[13390] | 88 | |
---|
| 89 | |
---|
| 90 | ============================================================== |
---|
| 91 | = How to keep track of the parameter used to generate the file |
---|
| 92 | ============================================================== |
---|
| 93 | To do so, you need to fill the namelist_cfg with the input file name used in |
---|
| 94 | cn_fcoord, cn_topo, cn_fisfd and the associated variable name (see namelist ref for the extensive list). |
---|
| 95 | Once you generate the domain_cfg.nc file you can run the dom_doc.exe tools available. |
---|
| 96 | |
---|
| 97 | .. code-block:: console |
---|
| 98 | |
---|
| 99 | $ ./dom_doc.exe -h |
---|
| 100 | usage : dom_doc -n NAMELIST-file |
---|
| 101 | -d DOMAIN_CFG-file |
---|
| 102 | |
---|
| 103 | PURPOSE : |
---|
| 104 | Add information in the domain_cfg.nc file after its creation for |
---|
| 105 | NEMO4. The additional information consists in a new netcdf variable |
---|
| 106 | called namelist_cfg, holding the content of the used namelist_cfg. |
---|
| 107 | |
---|
| 108 | ARGUMENTS : |
---|
| 109 | -n NAMELIST-file : name of the namelist_cfg. file required |
---|
| 110 | -d DOMAIN_CFG-file : name of the domain_cfg file to document. file required |
---|
| 111 | |
---|
| 112 | OUTPUT : |
---|
| 113 | input DOMAIN_CFG-file is modified on output. |
---|
| 114 | |
---|
| 115 | This will add a variable namelist_cfg into the netcdf. |
---|
| 116 | |
---|
| 117 | To extract the namelist again, simply run the available script xtrac_namelist.bash |
---|
| 118 | :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
---|
| 119 | ./xtrac_namelist.bash input_domain_cfg_file.nc output_namelist_cfg |
---|
| 120 | :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
---|