Index: /utils/tools/NESTING/README
===================================================================
--- /utils/tools/NESTING/README	(revision 9809)
+++ /utils/tools/NESTING/README	(revision 9809)
@@ -0,0 +1,70 @@
+=============================================================
+How to build a doubly nested configuration such as AGRIF_DEMO
+=============================================================
+
+:::::::::::::::::::::::::::::::::::::::::::::::::
+1) Files needed from root (parent) grid
+:::::::::::::::::::::::::::::::::::::::::::::::::
+- coordinates.nc
+- bathy_meter.nc
+- bathymetry database (For example GEBCO 2014 dataset)
+
+
+:::::::::::::::::::::::::::::::::::::::::::::::::
+2) Compile the tool
+:::::::::::::::::::::::::::::::::::::::::::::::::
+
+$NEMOPATH/NEMOGCM/TOOLS/maketools –n NESTING
+
+It creates 5 executables:
+- agrif_create_coordinates.exe
+- agrif_create_bathy.exe
+- agrif_create_restart.exe
+- agrif_create_restart_trc.exe
+- agrif_create_data.exe
+
+
+:::::::::::::::::::::::::::::::::::::::::::::::::
+3) Create coordinates and bathymetries
+:::::::::::::::::::::::::::::::::::::::::::::::::
+
+a) agrif_create_coordinates.exe namelist_nordic1
+   It creates level 1 child grid coordinates: 1_coordinates.nc
+
+b) agrif_create_bathy.exe namelist_nordic1
+   It creates level 1 child grid bathymetry: 1_bathymeter.nc
+   It updates        parent grid bathymetry: bathy_updated.nc
+
+c) agrif_create_coordinates.exe namelist_nordic2
+   It creates level 2 child grid coordinates: 2_coordinates.nc
+
+d) agrif_create_bathy.exe namelist_nordic2
+   It creates level 2 child grid bathymetry: 2_bathymeter.nc
+   It updates level 1 child grid bathymetry: 1_bathy_updated.nc
+
+e) agrif_create_bathy.exe namelist_nordic1_update
+   It updates        parent grid bathymetry: bathy_updated_parent.nc
+
+Note: This last step takes into account both levels 1 and 2 bathymetries to update the parent grid bathymetry
+      to make sure that volumes match between child grids and parent grid.
+      To only perform an update as in step e), i.e. without interpolation, one has to set in the namelist:
+      - elevation_database = 1_bathy_updated.nc
+      - type_bathy_interp = 2
+
+** Files needed for your model to run:
+   -   bathy_updated_parent.nc  +    coordinates.nc
+   - 1_bathy_updated.nc         +  1_coordinates.nc
+   - 2_bathy_meter.nc           +  2_coordinates.nc
+
+
+:::::::::::::::::::::::::::::::::::::::::::::::::
+4) Create data
+:::::::::::::::::::::::::::::::::::::::::::::::::
+
+a) agrif_create_data.exe namelist_nordic1
+   It creates level 1 child grid data: 1_chlorophyll.nc etc
+
+b) agrif_create_data.exe namelist_nordic2
+   It creates level 2 child grid data: 2_chlorophyll.nc etc
+
+
Index: /utils/tools/NESTING/namelist_nordic1
===================================================================
--- /utils/tools/NESTING/namelist_nordic1	(revision 9809)
+++ /utils/tools/NESTING/namelist_nordic1	(revision 9809)
@@ -0,0 +1,95 @@
+&input_output
+    iom_activated = true 
+/
+
+&coarse_grid_files    
+    parent_coordinate_file = 'coordinates.nc'
+    parent_meshmask_file   = 'meshmask.nc'  
+/    
+    
+&bathymetry    
+    new_topo = true
+    elevation_database = 'GEBCO_2014_2D.nc'
+    elevation_name     = 'elevation'
+    smoothing          = true
+    smoothing_factor   = 0.6
+    npt_connect        = 2      ! default = 3
+    npt_copy           = 2      ! default = 2
+    removeclosedseas   = true
+    type_bathy_interp  = 0 
+    rn_hmin            = -3 
+/   
+
+&nesting    
+    imin = 122
+    imax = 153
+    jmin = 110
+    jmax = 143
+    rho  = 4
+    rhot = 4
+    bathy_update        = true
+    updated_parent_file = 'bathy_updated.nc'				
+/
+
+&vertical_grid    
+    ln_e3_dep = .true.
+    ppkth     = 21.4333619793800
+    ppacr     = 3
+    ppdzmin   = 0
+    pphmax    = 0
+    psur      = -4762.96143546300
+    pa0       = 255.58049070440
+    pa1       = 245.58132232490
+    N         = 31
+    ldbletanh = .FALSE.
+    pa2       = 0
+    ppkth2    = 0
+    ppacr2    = 0
+/    
+    
+&partial_cells    	
+    partial_steps      = true
+    parent_bathy_meter = 'bathy_meter.nc'
+    parent_batmet_name = 'Bathymetry'
+    e3zps_min          = 20.
+    e3zps_rat          = 0.1
+/
+
+&nemo_coarse_grid    
+    jpizoom = 1			
+    jpjzoom = 1			
+/
+&forcing_files		   
+    FLX_FILES = 
+    'data_1m_salinity_nomask.nc',
+    'data_1m_potential_temperature_nomask.nc',
+    'geothermal_heating.nc'
+    'mixing_power_bot.nc',
+    'mixing_power_pyc.nc',
+    'mixing_power_cri.nc',
+    'chlorophyll.nc'
+/
+
+&interp
+    VAR_INTERP =
+    'votemper/bilinear',
+    'vosaline/bilinear',
+    'heatflow/bilinear'
+    'field/bilinear',
+    'field/bilinear',
+    'field/bilinear',
+    'CHLA/bilinear'
+/
+
+&restart
+    restart_file = 'restart.nc'   
+    shlat = 0
+    dimg = false
+    dimg_output_file = 'test_dimg'
+    adatrj = 360.25 
+    interp_type = 'bilinear'
+/ 
+
+&restart_trc
+    restart_trc_file = 'restart_trc.nc'   
+/ 
Index: /utils/tools/NESTING/namelist_nordic1_update
===================================================================
--- /utils/tools/NESTING/namelist_nordic1_update	(revision 9809)
+++ /utils/tools/NESTING/namelist_nordic1_update	(revision 9809)
@@ -0,0 +1,96 @@
+&input_output
+    iom_activated = true 
+/
+
+&coarse_grid_files    
+    parent_coordinate_file = 'coordinates.nc'
+    parent_meshmask_file   = 'meshmask.nc'  
+/    
+    
+&bathymetry    
+    new_topo = true
+    elevation_database = '1_bathy_updated.nc'
+    elevation_name     = 'Bathymetry'
+    smoothing          = true
+    smoothing_factor   = 0.6
+    npt_connect        = 2    
+    npt_copy           = 2 
+    removeclosedseas   = true
+    type_bathy_interp  = 2 
+    rn_hmin            = -3 
+/   
+
+&nesting    
+    imin = 122
+    imax = 153
+    jmin = 110
+    jmax = 143
+    rho  = 4
+    rhot = 4
+    bathy_update = true
+    updated_parent_file = 'bathy_updated_parent.nc'
+/
+
+&vertical_grid    
+    ln_e3_dep = .true.
+    ppkth     = 21.4333619793800
+    ppacr     = 3
+    ppdzmin   = 0
+    pphmax    = 0
+    psur      = -4762.96143546300
+    pa0       = 255.58049070440
+    pa1       = 245.58132232490
+    N         = 31
+    ldbletanh = .FALSE.
+    pa2       = 0
+    ppkth2    = 0
+    ppacr2    = 0
+/    
+    
+&partial_cells    	
+    partial_steps      = true
+    parent_bathy_meter = 'bathy_meter.nc'
+    parent_batmet_name = 'Bathymetry'
+    e3zps_min          = 20.
+    e3zps_rat          = 0.1
+/
+
+&nemo_coarse_grid    
+    jpizoom = 1			
+    jpjzoom = 1			
+/
+
+&forcing_files		   
+    FLX_FILES = 
+    'data_1m_salinity_nomask.nc',
+    'data_1m_potential_temperature_nomask.nc',
+    'geothermal_heating.nc'
+    'mixing_power_bot.nc',
+    'mixing_power_pyc.nc',
+    'mixing_power_cri.nc',
+    'chlorophyll.nc'
+/
+
+&interp
+    VAR_INTERP =
+    'votemper/bilinear',
+    'vosaline/bilinear',
+    'heatflow/bilinear'
+    'field/bilinear',
+    'field/bilinear',
+    'field/bilinear',
+    'CHLA/bilinear'
+/
+
+&restart
+    restart_file = 'restart.nc'   
+    shlat = 0
+    dimg = false
+    dimg_output_file = 'test_dimg'
+    adatrj = 360.25 
+    interp_type = 'bilinear'
+/ 
+
+&restart_trc
+    restart_trc_file = 'restart_trc.nc'   
+/ 
Index: /utils/tools/NESTING/namelist_nordic2
===================================================================
--- /utils/tools/NESTING/namelist_nordic2	(revision 9809)
+++ /utils/tools/NESTING/namelist_nordic2	(revision 9809)
@@ -0,0 +1,96 @@
+&input_output
+    iom_activated = true
+/
+
+&coarse_grid_files    
+    parent_coordinate_file = '1_coordinates.nc'
+    parent_meshmask_file   = '1_meshmask.nc'
+/    
+    
+&bathymetry    
+    new_topo           = true
+    elevation_database = 'GEBCO_2014_2D.nc'
+    elevation_name     = 'elevation'
+    smoothing          = true
+    smoothing_factor   = 0.6
+    npt_connect        = 2 
+    npt_copy           = 2 
+    removeclosedseas   = true
+    type_bathy_interp  = 0 
+    rn_hmin            = -3
+/   
+
+&nesting    
+    imin = 38
+    imax = 80
+    jmin = 71
+    jmax = 111
+    rho  = 3
+    rhot = 3
+    bathy_update = true
+    updated_parent_file = '1_bathy_updated.nc'
+/
+
+&vertical_grid    
+    ln_e3_dep = .true.
+    ppkth     = 21.4333619793800
+    ppacr     = 3
+    ppdzmin   = 0
+    pphmax    = 0
+    psur      = -4762.96143546300
+    pa0       = 255.58049070440
+    pa1       = 245.58132232490
+    N         = 31
+    ldbletanh = .FALSE.
+    pa2       = 0
+    ppkth2    = 0
+    ppacr2    = 0
+/    
+    
+&partial_cells    	
+    partial_steps      = true
+    parent_bathy_meter = '1_bathy_meter.nc'
+    parent_batmet_name = 'Bathymetry'
+    e3zps_min          = 20.
+    e3zps_rat          = 0.1
+/
+
+&nemo_coarse_grid
+    jpizoom = 1
+    jpjzoom = 1
+/
+
+&forcing_files		   
+    FLX_FILES = 
+    '1_data_1m_salinity_nomask.nc',
+    '1_data_1m_potential_temperature_nomask.nc',
+    '1_geothermal_heating.nc'
+    '1_mixing_power_bot.nc',
+    '1_mixing_power_pyc.nc',
+    '1_mixing_power_cri.nc',
+    '1_chlorophyll.nc'
+/
+
+&interp
+    VAR_INTERP =
+    'votemper/bilinear',
+    'vosaline/bilinear',
+    'heatflow/bilinear'
+    'field/bilinear',
+    'field/bilinear',
+    'field/bilinear',
+    'CHLA/bilinear'
+/
+
+&restart
+    restart_file = 'restart.nc'   
+    shlat = 0
+    dimg = false
+    dimg_output_file = 'test_dimg'
+    adatrj = 360.25 
+    interp_type = 'bilinear'
+/ 
+
+&restart_trc
+    restart_trc_file = 'restart_trc.nc'   
+/ 
Index: ils/tools/NESTING/nordic1
===================================================================
--- /utils/tools/NESTING/nordic1	(revision 9808)
+++ 	(revision )
@@ -1,88 +1,0 @@
-&input_output
-    iom_activated = true 
-/
-
-&coarse_grid_files    
-    parent_coordinate_file = 'coordinates.nc'
-    parent_meshmask_file   = 'meshmask.nc'  
-/    
-    
-&bathymetry    
-    new_topo = true
-    elevation_database = 'GEBCO_2014_2D.nc'
-    elevation_name     = 'elevation'
-    smoothing          = true
-    smoothing_factor   = 0.6
-    npt_connect        = 2      ! default = 3
-    npt_copy           = 2      ! default = 2
-    removeclosedseas   = true
-    type_bathy_interp  = 0 
-    rn_hmin            = -3 
-/   
-
-&nesting    
-    imin = 122
-    imax = 153
-    jmin = 110
-    jmax = 143
-    rho  = 4
-    rhot = 4
-    bathy_update        = true
-    updated_parent_file = 'bathy_updated.nc'				
-/
-
-&vertical_grid    
-    ln_e3_dep = .true.
-    ppkth     = 21.4333619793800
-    ppacr     = 3
-    ppdzmin   = 0
-    pphmax    = 0
-    psur      = -4762.96143546300
-    pa0       = 255.58049070440
-    pa1       = 245.58132232490
-    N         = 31
-    ldbletanh = .FALSE.
-    pa2       = 0
-    ppkth2    = 0
-    ppacr2    = 0
-/    
-    
-&partial_cells    	
-    partial_steps      = true
-    parent_bathy_meter = 'bathy_meter.nc'
-    parent_batmet_name = 'Bathymetry'
-    e3zps_min          = 20.
-    e3zps_rat          = 0.1
-/
-
-&nemo_coarse_grid    
-    jpizoom = 1			
-    jpjzoom = 1			
-/
-&forcing_files		   
-    FLX_FILES = 
-    'data_1m_salinity_nomask.nc',
-    'data_1m_potential_temperature_nomask.nc',
-    'geothermal_heating.nc'
-    'chlorophyll.nc'
-/
-
-&interp
-    VAR_INTERP =
-    'votemper/bilinear',
-    'vosaline/bilinear',
-    'heatflow/bilinear'
-    'CHLA/bilinear'
-/
-
-&restart
-    restart_file = 'restart.nc'   
-    shlat = 0
-    dimg = false
-    dimg_output_file = 'test_dimg'
-    adatrj = 360.25 
-    interp_type = 'bilinear'
-/ 
-&restart_trc
-    restart_trc_file = 'restart_trc.nc'   
-/ 
Index: ils/tools/NESTING/nordic2
===================================================================
--- /utils/tools/NESTING/nordic2	(revision 9808)
+++ 	(revision )
@@ -1,88 +1,0 @@
-&input_output
-    iom_activated = true
-/
-
-&coarse_grid_files    
-    parent_coordinate_file = '1_coordinates.nc'
-    parent_meshmask_file   = '1_meshmask.nc'
-/    
-    
-&bathymetry    
-    new_topo           = true
-    elevation_database = 'GEBCO_2014_2D.nc'
-    elevation_name     = 'elevation'
-    smoothing          = true
-    smoothing_factor   = 0.6
-    npt_connect        = 2 
-    npt_copy           = 2 
-    removeclosedseas   = true
-    type_bathy_interp  = 0 
-    rn_hmin            = -3
-/   
-
-&nesting    
-    imin = 38
-    imax = 80
-    jmin = 71
-    jmax = 111
-    rho  = 3
-    rhot = 3
-    bathy_update = true
-    updated_parent_file = '1_bathy_updated.nc'
-/
-
-&vertical_grid    
-    ln_e3_dep = .true.
-    ppkth     = 21.4333619793800
-    ppacr     = 3
-    ppdzmin   = 0
-    pphmax    = 0
-    psur      = -4762.96143546300
-    pa0       = 255.58049070440
-    pa1       = 245.58132232490
-    N         = 31
-    ldbletanh = .FALSE.
-    pa2       = 0
-    ppkth2    = 0
-    ppacr2    = 0
-/    
-    
-&partial_cells    	
-    partial_steps      = true
-    parent_bathy_meter = '1_bathy_meter.nc'
-    parent_batmet_name = 'Bathymetry'
-    e3zps_min          = 20.
-    e3zps_rat          = 0.1
-/
-
-&nemo_coarse_grid
-    jpizoom = 1
-    jpjzoom = 1
-/
-&forcing_files		   
-    FLX_FILES = 
-    '1_data_1m_salinity_nomask.nc',
-    '1_data_1m_potential_temperature_nomask.nc',
-    '1_geothermal_heating.nc'
-    '1_chlorophyll.nc'
-/
-
-&interp
-    VAR_INTERP =
-    'votemper/bilinear',
-    'vosaline/bilinear',
-    'heatflow/bilinear'
-    'CHLA/bilinear'
-/
-
-&restart
-    restart_file = 'restart.nc'   
-    shlat = 0
-    dimg = false
-    dimg_output_file = 'test_dimg'
-    adatrj = 360.25 
-    interp_type = 'bilinear'
-/ 
-&restart_trc
-    restart_trc_file = 'restart_trc.nc'   
-/ 
