Independent routines list

module comMUSTANG.F90

+----------------------+--------------------------------------------------------------------------------------------------+
|   routine            |                                                                                                  |
+----------------------+--------------------------------------------------------------------------------------------------+
| comMUSTANG           |   declaration of all MUSTANG variables                                                           |
|                      |     + decalaration of exchange variables at WS interface (fluxes..)                              |
+----------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_alloc        |   allocation of all MUSTANG variables                                                            |
+----------------------+--------------------------------------------------------------------------------------------------+

module initMUSTANG.F90

+----------------------------------+--------------------------------------------------------------------------------------------------+
|   routine                        |                                                                                                  |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_initialization           |   initialization                                                                                 |
|                                  |     call  MUSTANG_param, MUSTANG_alloc, MUSTANG_init_ws_sand                                     |
|                                  |     +  if key_MUSTANG_flocmod : flocmod_init                                                     |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_init_sediment            |   initialization of sediment layers, output tables ..                                            |
|                                  |     call coupl_conv2MUSTANG, MUSTANG_sedinit (sed_init_fromfile),                                |
|                                  |     call MUSTANG_morphoinit , MUSTANG_init_output, MUSTANG_compatibility                         |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_param                    |   read MUSTANG parameters and options in a namelist file "paraMUSTANG.txt"                       |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_compatibility            |   Check compatibility of options and CPP keys                                                    |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_sedinit                  |   sediment initialization in case the is no recovery init file                                   |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_init_ws_sand             |   setting rates of sand computing                                                                |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_init_hsed                |   Reset the sediment thickness to be consistent with the parameters chosen for the calculations  |
|                                  |   (used only if uniform coverage and if l_init_hsed = T)                                         |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_init_output              |   Calculates according to the user's choice the number of layers of sediment                     |
|                                  |   at the output and allocates the corresponding 3D tables                                        |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_morphoinit               |   Global initialization and memorization of the initial sediment heights,                        |
|                                  |   the height of the invariable base, the uniform morpho indices for each mesh                    |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_morphoinit_mesh          |   Initialization of morpho indices for each mesh if l_morphomesh == .TRUE                        |
+-------------------------------- -+--------------------------------------------------------------------------------------------------+
| flocmod_init                     |   Initialization of floc characteristics (diameter,volume,density,mass) (if key_MUSTANG_flocmod) |
+------------------------------ ---+--------------------------------------------------------------------------------------------------+
| flocmod_kernels                  |   Estimation of the different terms of aggregation and fragmentation (if key_MUSTANG_flocmod)    |
+------------------------------ ---+--------------------------------------------------------------------------------------------------+
| flocmod_agregation_statistics    |   estimation of shear collision or differential settling probabilities (if key_MUSTANG_flocmod)  |
+----------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANGV2_non_cohesive_behaviour |   Initialization of erosion parameters (if key_MUSTANG_V2)                                       |
+----------------------------------+--------------------------------------------------------------------------------------------------+

module sed_MUSTANG.F90

+---------------------------------------+--------------------------------------------------------------------------------------------------+
|   routine                             |                                                                                                  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_update                        |   Global routine calling the others,                                                             |
|                                       |     + u * calculation and at the end: update water flow at the interface                         |
|                                       |     called by the host code at each trannsport time step  (before transport)                     |
|                                       |                                                                                                  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANG_deposition                    |   Global routine calling Deposit-related routines                                                |
|                                       |     called by the host code at each trannsport time step  (after transport)                      |
|                                       |                                                                                                  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_outres                    |   Preparation of the variables to be written in the result files in the sediment.                |
|                                       |   mask imposition, calculation of total thickness, number of levels,                             |
|                                       |   interpolation of thicknesses and concentrations.                                               |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_interpout_dzs             |   Interpolation of layer thicknesses to output reworked layers based on user choice              |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_interpout_cvs             |   Interpolation of concentrations in each layer to output reworked layers                        |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_depflx                    |   Deposit trend for each particulate variable (m/s)                                              |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_sandconcextrap            |   Interpolation of sand concentrations in the bottom water layer according to a Rouse profile    |
|                                       |   and calculation of horizontal flux corrections                                                 |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_erosion                   |   Erosion of surface layers and updated sediment concentrations                                  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_comp_tocr_mixsed          |   Calculates the elements to define the critical shear stress for erosion                        |
|                                       |   and erosion rate of the sand / silt mixture                                                    |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_comp_eros_flx             |   Calculates the erosion flux for a given shear stress                                           |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_effdep                    |   Updated sedimentary column based on the deposit fluxes actually dropped from the water column  |
|                                       |   during the last time step. Taking into account deposits that have slipped from adjacent meshes |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_fusion                    |   Fusion of the layers at the bottom sediment (in case the maximum number of layers is reached)  |
|                                       |   Update layers above.                                                                           |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_slipdepo                  |   Calculates the slippage of deposits if the bottom is very steep                                |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_consol_diff_bioturb       |   Consolidation (compaction), diffusion, bioturbation in sediments.                              |
|                                       |   Can be realized with a time step greater than the transport time step                          |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_split_surflayer           |   split the sediment surface layer if it is too thick to maintain fine discretization            |
|                                       |    (if key_splitlayersurf)                                                                       |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_coefbioturb               |   Calculation of the bioturbation coefficient (biodiffusion) in the sediment                     |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_constitutivrel            |   Consolidation module: calculates the permeability,                                             |
|                                       |    the effective tension and the hydraulic load in the sediment                                  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_morpho                    |   Refreshes bathymetry over time based on changes in sediment height                             |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| flocmod_main                          |   Calculates flocculation processes by aggregation / fragmentation (if key_MUSTANG_flocmod)      |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| flocmod_comp_fsd                      |   Calculates the distribution of floc sizes    (if key_MUSTANG_flocmod)                          |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| flocmod_collfrag                      |   Calculates an additional term of gain and loss due to fragmentation by collision               |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| flocmod_mass_control                  |   Calculates the mass of each mud class after floc. and control the conservativity               |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| flocmod_mass_redistribute             |   Linear distribution of negative masses after flocculation to eliminate                         |
|                                       |    negative values and maintain total mass  (if key_MUSTANG_flocmod)                                     |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANGV2_manage_active_layer         |   Calculation of the thickness and composition of the active layer (if key_MUSTANG_V2)           |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANGV2_fusion_with_poro            |   Fusion of two superficial layers taking into account the calculation of porosity (MUSTANG_V2)  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANGV2_comp_eros_flx_indep         |   Calculation of the independent erosion flux according to sediment classes (if key_MUSTANG_V2)  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANGV2_borne_and_apply_erosion_tot |   Application of erosion on sediments of the active layer (if key_MUSTANG_V2)                    |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANGV2_manage_small_mass_in_ksmax  |   Management of small amounts of material which are then merged into the lower layer (MUSTANG_V2)|
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANGV2_comp_poro_mixsed            |   Estimation of porosity in the case of cohesive / non-cohesive mixed sediment (key_MUSTANG_V2)  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANGV2_eval_bedload                |   Evaluation of bedload (if key_MUSTANG_V2 and key_MUSTANG_bedload)                              |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| MUSTANGV2_bedload_slope               |   Slope effects on bedload (if key_MUSTANG_V2 and key_MUSTANG_bedload)                           |
+---------------------------------------+--------------------------------------------------------------------------------------------------+

Host code dependent routines list

These routines are dependent on the hydrodynamic model with which MUSTANG is coupled. The list of routines presented below corresponds to the MUSTANG coupling with the MARS model. They are part of the module sed_MUSTANG_MARS.F90

+---------------------------------------+--------------------------------------------------------------------------------------------------+
|   routines in sed_MUSTANG_MARS.F90    |                                                                                                  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_MUSTANG_settlveloc                |   Calculation of settling rates in the water column as a function of SPM concentrations          |
|                                       |   in water, reference density, gravity and shear rates.                                          |
|                                       |   The settling rate array corresponds to that used in the host model for the vertical transport  |
|                                       |   of particles. But the settling rate at the point closest to the bottom in water column         |
|                                       |   is kept in memory for MUSTANG                                                                  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_gradvit                           |   Calculation of the shear rate G used for the estimation of settling rates                      |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_skinstress                        |   Calculation of the shear stress at the bottom, according to currents and waves                 |
|                                       |   Shear steresses are estimated at the same point as the the concentrations                      |
|                                       |   Extrapolation at grid limits                                                                   |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
|                                       |                                                                                                  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sedinit_fromfile                      |   Initialization of the sediment by reading a recovery file, saved by outsaverestart             |
|                                       |   during a previous simulation                                                                   |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_outsaverestart                    |   Saving the sediment state in a file that will be used for a future run                         |
|                                       |   (read after by sedinit_fromfile at the beginning of the next run )                             |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
|                                       |                                                                                                  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_obc_corflu                        |   Interpolation of flow corrections at grid boundaries                                           |
|                                       |   Extrapolation of flow corrections for sands in the corners of the grid                         |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_exchange_corflu_MARS              |   MPI exchange of corrections for the transport of sands in limit of 2 processors                |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_exchange_w2s_MARS                 |   MPI exchange of deposition fluxes at the water/sediment interface due to deposits slipping     |
|                                       |   in meshes at the limit of 2 processors (only for particulate variables)                        |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_exchange_s2w_MARS                 |   MPI exchange of erosion fluxes at the water/sediment interface due to lateral erosion          |
|                                       |   in meshes at the limit of 2 processors                                                         |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_exchange_hxe_MARS                 |   MPI exchange of depths and water levels (following morphodynamics) in limit of 2 processors    |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_exchange_maskbedload_MARS         |   with key_MUSTANG_bedload : MPI exchange of masks   on H0                                       |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| sed_exchange_maskxybedload_MARS       |   with key_MUSTANG_bedload : MPI exchange of masks   on hx,hy                                    |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
|                                       |                                                                                                  |
+---------------------------------------+--------------------------------------------------------------------------------------------------+
| flocmod_comp_g                        |   For the case1DVfloc case, reproducing the Verney et al., 2011 experience,                      |
|                                       |   definition of the shear rate G for this experiment as a function of time                       |
|                                       |   (in other cases, it is calculated by sed_gradvit)                                              |
+---------------------------------------+--------------------------------------------------------------------------------------------------+

The second file **sed_outMUSTANG_MARS.F90** :
     * opens the output file,
     * defines the variables to output,
     * calls the MUSTANG subroutine which prepares the tables and interpolates the results according to the user's choice,
     * writes the results