LCOV - code coverage report
Current view: top level - common - mo_clean_up.f90 (source / functions) Hit Total Coverage
Test: mHM coverage Lines: 207 207 100.0 %
Date: 2024-04-30 08:53:32 Functions: 1 1 100.0 %

          Line data    Source code
       1             : !> \file    mo_clean_up.f90
       2             : !> \brief   \copybrief mo_clean_up
       3             : !> \details \copydetails mo_clean_up
       4             : 
       5             : !> \brief   Module to clean up after a mHM run.
       6             : !> \version 0.1
       7             : !> \authors Sebastian Mueller
       8             : !> \date    May 2022
       9             : !> \copyright Copyright 2005-\today, the mHM Developers, Luis Samaniego, Sabine Attinger: All rights reserved.
      10             : !! mHM is released under the LGPLv3+ license \license_note
      11             : !> \ingroup f_common
      12             : module mo_clean_up
      13             : 
      14             :   implicit none
      15             :   private
      16             :   public :: deallocate_global_variables
      17             : 
      18             :   contains
      19             : 
      20             :   !> \brief Deallocate all global variables.
      21          14 :   subroutine deallocate_global_variables()
      22             :     use mo_mhm_cli, only : set_verbosity_level
      23             :     use mo_common_run_variables, only : run_cfg
      24             :     use mo_global_variables, only : &
      25             :       couple_cfg, &
      26             :       meteo_handler, &
      27             :       L1_sm, &
      28             :       L1_sm_mask, &
      29             :       L1_neutronsdata, &
      30             :       L1_neutronsdata_mask, &
      31             :       L1_smObs, &
      32             :       L1_neutronsObs, &
      33             :       L1_etObs, &
      34             :       L1_twsaObs, &
      35             :       BFI_obs, &
      36             :       BFI_qBF_sum, &
      37             :       BFI_qT_sum, &
      38             :       L1_inter, &
      39             :       L1_snowPack, &
      40             :       L1_sealSTW, &
      41             :       L1_soilMoist, &
      42             :       L1_unsatSTW, &
      43             :       L1_satSTW, &
      44             :       L1_neutrons, &
      45             :       L1_pet_calc, &
      46             :       L1_temp_calc, &
      47             :       L1_prec_calc, &
      48             :       L1_aETSoil, &
      49             :       L1_aETCanopy, &
      50             :       L1_aETSealed, &
      51             :       L1_baseflow, &
      52             :       L1_infilSoil, &
      53             :       L1_fastRunoff, &
      54             :       L1_melt, &
      55             :       L1_percol, &
      56             :       L1_preEffect, &
      57             :       L1_rain, &
      58             :       L1_runoffSeal, &
      59             :       L1_slowRunoff, &
      60             :       L1_snow, &
      61             :       L1_Throughfall, &
      62             :       L1_total_runoff, &
      63             :       neutron_integral_AFast
      64             : 
      65             :     use mo_common_variables, only : &
      66             :       resolutionHydrology, &
      67             :       L0_Domain, &
      68             :       mhmFileRestartOut, &
      69             :       mrmFileRestartOut, &
      70             :       dirMorpho, &
      71             :       dirLCover, &
      72             :       dirOut, &
      73             :       fileLatLon, &
      74             :       level0, &
      75             :       level1, &
      76             :       l0_l1_remap, &
      77             :       L0_elev, &
      78             :       L0_LCover, &
      79             :       LCfilename, &
      80             :       LC_year_start, &
      81             :       LC_year_end, &
      82             :       global_parameters, &
      83             :       global_parameters_name, &
      84             :       domainMeta
      85             : 
      86             :     use mo_mpr_global_variables, only : &
      87             :       HorizonDepth_mHM, &
      88             :       GeoUnitList, &
      89             :       GeoUnitKar, &
      90             :       LAIBoundaries, &
      91             :       LAIUnitList, &
      92             :       LAILUT, &
      93             :       LAIPer, &
      94             :       L0_slope_emp, &
      95             :       L0_gridded_LAI, &
      96             :       L0_slope, &
      97             :       L0_asp, &
      98             :       L0_soilId, &
      99             :       L0_geoUnit, &
     100             :       dirgridded_LAI, &
     101             :       L1_fSealed, &
     102             :       L1_alpha, &
     103             :       L1_degDayInc, &
     104             :       L1_degDayMax, &
     105             :       L1_degDayNoPre, &
     106             :       L1_degDay, &
     107             :       L1_karstLoss, &
     108             :       L1_fAsp, &
     109             :       L1_petLAIcorFactor, &
     110             :       L1_HarSamCoeff, &
     111             :       L1_PrieTayAlpha, &
     112             :       L1_aeroResist, &
     113             :       L1_surfResist, &
     114             :       L1_fRoots, &
     115             :       L1_maxInter, &
     116             :       L1_kfastFlow, &
     117             :       L1_kSlowFlow, &
     118             :       L1_kBaseFlow, &
     119             :       L1_kPerco, &
     120             :       L1_soilMoistFC, &
     121             :       L1_soilMoistSat, &
     122             :       L1_soilMoistExp, &
     123             :       L1_jarvis_thresh_c1, &
     124             :       L1_tempThresh, &
     125             :       L1_unsatThresh, &
     126             :       L1_sealedThresh, &
     127             :       L1_wiltingPoint, &
     128             :       soilDB, &
     129             :       L1_No_Count, &
     130             :       L1_bulkDens, &
     131             :       L1_latticeWater, &
     132             :       L1_COSMICL3
     133             :     use mo_mrm_global_variables, only : &
     134             :       dirGauges, &
     135             :       dirTotalRunoff, &
     136             :       dirBankfullRunoff, &
     137             :       level11, &
     138             :       l0_l11_remap, &
     139             :       mRM_runoff, &
     140             :       domain_mrm, &
     141             :       L0_gaugeLoc, &
     142             :       L0_InflowGaugeLoc, &
     143             :       L0_fAcc, &
     144             :       L0_fDir, &
     145             :       L0_draSC, &
     146             :       L0_draCell, &
     147             :       L0_streamNet, &
     148             :       L0_floodPlain, &
     149             :       L0_noutlet, &
     150             :       L0_celerity, &
     151             :       L11_L1_ID, &
     152             :       L1_total_runoff_in, &
     153             :       L11_cellCoor, &
     154             :       L1_L11_ID, &
     155             :       L11_areaCell, &
     156             :       L11_fAcc, &
     157             :       L11_fDir, &
     158             :       L11_nOutlets, &
     159             :       L11_celerity, &
     160             :       L11_meandering, &
     161             :       L11_LinkIn_fAcc, &
     162             :       L11_rowOut, &
     163             :       L11_colOut, &
     164             :       L11_Qmod, &
     165             :       L11_qOUT, &
     166             :       L11_qTIN, &
     167             :       L11_qTR, &
     168             :       L11_fromN, &
     169             :       L11_toN, &
     170             :       L11_netPerm, &
     171             :       L11_fRow, &
     172             :       L11_fCol, &
     173             :       L11_tRow, &
     174             :       L11_tCol, &
     175             :       L11_rOrder, &
     176             :       L11_label, &
     177             :       L11_sink, &
     178             :       L11_length, &
     179             :       L11_aFloodPlain, &
     180             :       L11_slope, &
     181             :       L11_nLinkFracFPimp, &
     182             :       L11_K, &
     183             :       L11_xi, &
     184             :       L11_tsRout, &
     185             :       L11_C1, &
     186             :       L11_C2, &
     187             :       L11_bankfull_runoff_in, &
     188             :       L0_channel_depth, &
     189             :       L0_channel_elevation, &
     190             :       L0_river_head_mon_sum, &
     191             :       gauge, &
     192             :       InflowGauge, &
     193             :       riv_temp_pcs, &
     194             :       mrm_L0_slope => L0_slope
     195             : 
     196             :     use mo_common_mHM_mRM_variables, only : &
     197             :       resolutionRouting, &
     198             :       warmPer, &
     199             :       evalPer, &
     200             :       simPer, &
     201             :       warmingDays, &
     202             :       LCyearId, &
     203             :       mhmFileRestartIn, &
     204             :       mrmFileRestartIn
     205             : 
     206             :     ! mo_global_variables
     207          14 :     if ( allocated(L1_sm) ) deallocate(L1_sm)
     208          14 :     if ( allocated(L1_sm_mask) ) deallocate(L1_sm_mask)
     209          14 :     if ( allocated(L1_neutronsdata) ) deallocate(L1_neutronsdata)
     210          14 :     if ( allocated(L1_neutronsdata_mask) ) deallocate(L1_neutronsdata_mask)
     211          40 :     if ( allocated(L1_smObs) ) deallocate(L1_smObs)
     212          40 :     if ( allocated(L1_neutronsObs) ) deallocate(L1_neutronsObs)
     213          40 :     if ( allocated(L1_etObs) ) deallocate(L1_etObs)
     214          40 :     if ( allocated(L1_twsaObs) ) deallocate(L1_twsaObs)
     215          14 :     if ( allocated(BFI_obs) ) deallocate(BFI_obs)
     216          14 :     if ( allocated(BFI_qBF_sum) ) deallocate(BFI_qBF_sum)
     217          14 :     if ( allocated(BFI_qT_sum) ) deallocate(BFI_qT_sum)
     218          14 :     if ( allocated(L1_inter) ) deallocate(L1_inter)
     219          14 :     if ( allocated(L1_snowPack) ) deallocate(L1_snowPack)
     220          14 :     if ( allocated(L1_sealSTW) ) deallocate(L1_sealSTW)
     221          14 :     if ( allocated(L1_soilMoist) ) deallocate(L1_soilMoist)
     222          14 :     if ( allocated(L1_unsatSTW) ) deallocate(L1_unsatSTW)
     223          14 :     if ( allocated(L1_satSTW) ) deallocate(L1_satSTW)
     224          14 :     if ( allocated(L1_neutrons) ) deallocate(L1_neutrons)
     225          14 :     if ( allocated(L1_pet_calc) ) deallocate(L1_pet_calc)
     226          14 :     if ( allocated(L1_temp_calc) ) deallocate(L1_temp_calc)
     227          14 :     if ( allocated(L1_prec_calc) ) deallocate(L1_prec_calc)
     228          14 :     if ( allocated(L1_aETSoil) ) deallocate(L1_aETSoil)
     229          14 :     if ( allocated(L1_aETCanopy) ) deallocate(L1_aETCanopy)
     230          14 :     if ( allocated(L1_aETSealed) ) deallocate(L1_aETSealed)
     231          14 :     if ( allocated(L1_baseflow) ) deallocate(L1_baseflow)
     232          14 :     if ( allocated(L1_infilSoil) ) deallocate(L1_infilSoil)
     233          14 :     if ( allocated(L1_fastRunoff) ) deallocate(L1_fastRunoff)
     234          14 :     if ( allocated(L1_melt) ) deallocate(L1_melt)
     235          14 :     if ( allocated(L1_percol) ) deallocate(L1_percol)
     236          14 :     if ( allocated(L1_preEffect) ) deallocate(L1_preEffect)
     237          14 :     if ( allocated(L1_rain) ) deallocate(L1_rain)
     238          14 :     if ( allocated(L1_runoffSeal) ) deallocate(L1_runoffSeal)
     239          14 :     if ( allocated(L1_slowRunoff) ) deallocate(L1_slowRunoff)
     240          14 :     if ( allocated(L1_snow) ) deallocate(L1_snow)
     241          14 :     if ( allocated(L1_Throughfall) ) deallocate(L1_Throughfall)
     242          14 :     if ( allocated(L1_total_runoff) ) deallocate(L1_total_runoff)
     243          14 :     if ( allocated(neutron_integral_AFast) ) deallocate(neutron_integral_AFast)
     244             : 
     245             :     ! mo_common_variables
     246          14 :     if ( allocated(resolutionHydrology) ) deallocate(resolutionHydrology)
     247          14 :     if ( allocated(L0_Domain) ) deallocate(L0_Domain)
     248          14 :     if ( allocated(mhmFileRestartOut) ) deallocate(mhmFileRestartOut)
     249          14 :     if ( allocated(mrmFileRestartOut) ) deallocate(mrmFileRestartOut)
     250          14 :     if ( allocated(dirMorpho) ) deallocate(dirMorpho)
     251          14 :     if ( allocated(dirLCover) ) deallocate(dirLCover)
     252          14 :     if ( allocated(dirOut) ) deallocate(dirOut)
     253          14 :     if ( allocated(fileLatLon) ) deallocate(fileLatLon)
     254          40 :     if ( allocated(level0) ) deallocate(level0)
     255          40 :     if ( allocated(level1) ) deallocate(level1)
     256          39 :     if ( allocated(l0_l1_remap) ) deallocate(l0_l1_remap)
     257          14 :     if ( allocated(L0_elev) ) deallocate(L0_elev)
     258          14 :     if ( allocated(L0_LCover) ) deallocate(L0_LCover)
     259          14 :     if ( allocated(LCfilename) ) deallocate(LCfilename)
     260          14 :     if ( allocated(LC_year_start) ) deallocate(LC_year_start)
     261          14 :     if ( allocated(LC_year_end) ) deallocate(LC_year_end)
     262          14 :     if ( allocated(global_parameters) ) deallocate(global_parameters)
     263          14 :     if ( allocated(global_parameters_name) ) deallocate(global_parameters_name)
     264          14 :     if ( allocated(domainMeta%indices) ) deallocate(domainMeta%indices)
     265          14 :     if ( allocated(domainMeta%L0DataFrom) ) deallocate(domainMeta%L0DataFrom)
     266          14 :     if ( allocated(domainMeta%optidata) ) deallocate(domainMeta%optidata)
     267          14 :     if ( allocated(domainMeta%doRouting) ) deallocate(domainMeta%doRouting)
     268             : 
     269             :     ! mo_mpr_global_variables
     270          14 :     if ( allocated(HorizonDepth_mHM) ) deallocate(HorizonDepth_mHM)
     271          14 :     if ( allocated(GeoUnitList) ) deallocate(GeoUnitList)
     272          14 :     if ( allocated(GeoUnitKar) ) deallocate(GeoUnitKar)
     273          14 :     if ( allocated(LAIBoundaries) ) deallocate(LAIBoundaries)
     274          14 :     if ( allocated(LAIUnitList) ) deallocate(LAIUnitList)
     275          14 :     if ( allocated(LAILUT) ) deallocate(LAILUT)
     276          14 :     if ( allocated(LAIPer) ) deallocate(LAIPer)
     277          14 :     if ( allocated(L0_slope_emp) ) deallocate(L0_slope_emp)
     278          14 :     if ( allocated(L0_gridded_LAI) ) deallocate(L0_gridded_LAI)
     279          14 :     if ( allocated(L0_slope) ) deallocate(L0_slope)
     280          14 :     if ( allocated(L0_asp) ) deallocate(L0_asp)
     281          14 :     if ( allocated(L0_soilId) ) deallocate(L0_soilId)
     282          14 :     if ( allocated(L0_geoUnit) ) deallocate(L0_geoUnit)
     283          14 :     if ( allocated(dirgridded_LAI) ) deallocate(dirgridded_LAI)
     284          14 :     if ( allocated(L1_fSealed) ) deallocate(L1_fSealed)
     285          14 :     if ( allocated(L1_alpha) ) deallocate(L1_alpha)
     286          14 :     if ( allocated(L1_degDayInc) ) deallocate(L1_degDayInc)
     287          14 :     if ( allocated(L1_degDayMax) ) deallocate(L1_degDayMax)
     288          14 :     if ( allocated(L1_degDayNoPre) ) deallocate(L1_degDayNoPre)
     289          14 :     if ( allocated(L1_degDay) ) deallocate(L1_degDay)
     290          14 :     if ( allocated(L1_karstLoss) ) deallocate(L1_karstLoss)
     291          14 :     if ( allocated(L1_fAsp) ) deallocate(L1_fAsp)
     292          14 :     if ( allocated(L1_petLAIcorFactor) ) deallocate(L1_petLAIcorFactor)
     293          14 :     if ( allocated(L1_HarSamCoeff) ) deallocate(L1_HarSamCoeff)
     294          14 :     if ( allocated(L1_PrieTayAlpha) ) deallocate(L1_PrieTayAlpha)
     295          14 :     if ( allocated(L1_aeroResist) ) deallocate(L1_aeroResist)
     296          14 :     if ( allocated(L1_surfResist) ) deallocate(L1_surfResist)
     297          14 :     if ( allocated(L1_fRoots) ) deallocate(L1_fRoots)
     298          14 :     if ( allocated(L1_maxInter) ) deallocate(L1_maxInter)
     299          14 :     if ( allocated(L1_kfastFlow) ) deallocate(L1_kfastFlow)
     300          14 :     if ( allocated(L1_kSlowFlow) ) deallocate(L1_kSlowFlow)
     301          14 :     if ( allocated(L1_kBaseFlow) ) deallocate(L1_kBaseFlow)
     302          14 :     if ( allocated(L1_kPerco) ) deallocate(L1_kPerco)
     303          14 :     if ( allocated(L1_soilMoistFC) ) deallocate(L1_soilMoistFC)
     304          14 :     if ( allocated(L1_soilMoistSat) ) deallocate(L1_soilMoistSat)
     305          14 :     if ( allocated(L1_soilMoistExp) ) deallocate(L1_soilMoistExp)
     306          14 :     if ( allocated(L1_jarvis_thresh_c1) ) deallocate(L1_jarvis_thresh_c1)
     307          14 :     if ( allocated(L1_tempThresh) ) deallocate(L1_tempThresh)
     308          14 :     if ( allocated(L1_unsatThresh) ) deallocate(L1_unsatThresh)
     309          14 :     if ( allocated(L1_sealedThresh) ) deallocate(L1_sealedThresh)
     310          14 :     if ( allocated(L1_wiltingPoint) ) deallocate(L1_wiltingPoint)
     311          14 :     if ( allocated(soilDB%id) ) deallocate(soilDB%id)
     312          14 :     if ( allocated(soilDB%nHorizons) ) deallocate(soilDB%nHorizons)
     313          14 :     if ( allocated(soilDB%is_present) ) deallocate(soilDB%is_present)
     314          14 :     if ( allocated(soilDB%UD) ) deallocate(soilDB%UD)
     315          14 :     if ( allocated(soilDB%LD) ) deallocate(soilDB%LD)
     316          14 :     if ( allocated(soilDB%clay) ) deallocate(soilDB%clay)
     317          14 :     if ( allocated(soilDB%sand) ) deallocate(soilDB%sand)
     318          14 :     if ( allocated(soilDB%DbM) ) deallocate(soilDB%DbM)
     319          14 :     if ( allocated(soilDB%depth) ) deallocate(soilDB%depth)
     320          14 :     if ( allocated(soilDB%RZdepth) ) deallocate(soilDB%RZdepth)
     321          14 :     if ( allocated(soilDB%Wd) ) deallocate(soilDB%Wd)
     322          14 :     if ( allocated(soilDB%nTillHorizons) ) deallocate(soilDB%nTillHorizons)
     323          14 :     if ( allocated(soilDB%thetaS_Till) ) deallocate(soilDB%thetaS_Till)
     324          14 :     if ( allocated(soilDB%thetaS) ) deallocate(soilDB%thetaS)
     325          14 :     if ( allocated(soilDB%Db) ) deallocate(soilDB%Db)
     326          14 :     if ( allocated(soilDB%thetaFC_Till) ) deallocate(soilDB%thetaFC_Till)
     327          14 :     if ( allocated(soilDB%thetaFC) ) deallocate(soilDB%thetaFC)
     328          14 :     if ( allocated(soilDB%thetaPW_Till) ) deallocate(soilDB%thetaPW_Till)
     329          14 :     if ( allocated(soilDB%thetaPW) ) deallocate(soilDB%thetaPW)
     330          14 :     if ( allocated(soilDB%Ks) ) deallocate(soilDB%Ks)
     331          14 :     if ( allocated(L1_No_Count) ) deallocate(L1_No_Count)
     332          14 :     if ( allocated(L1_bulkDens) ) deallocate(L1_bulkDens)
     333          14 :     if ( allocated(L1_latticeWater) ) deallocate(L1_latticeWater)
     334          14 :     if ( allocated(L1_COSMICL3) ) deallocate(L1_COSMICL3)
     335             : 
     336             :     ! mo_mrm_global_variables
     337          14 :     if ( allocated(dirGauges) ) deallocate(dirGauges)
     338          14 :     if ( allocated(dirTotalRunoff) ) deallocate(dirTotalRunoff)
     339          14 :     if ( allocated(dirBankfullRunoff) ) deallocate(dirBankfullRunoff)
     340          39 :     if ( allocated(level11) ) deallocate(level11)
     341          39 :     if ( allocated(l0_l11_remap) ) deallocate(l0_l11_remap)
     342          14 :     if ( allocated(mRM_runoff) ) deallocate(mRM_runoff)
     343          40 :     if ( allocated(domain_mrm) ) deallocate(domain_mrm)
     344          14 :     if ( allocated(L0_gaugeLoc) ) deallocate(L0_gaugeLoc)
     345          14 :     if ( allocated(L0_InflowGaugeLoc) ) deallocate(L0_InflowGaugeLoc)
     346          14 :     if ( allocated(L0_fAcc) ) deallocate(L0_fAcc)
     347          14 :     if ( allocated(L0_fDir) ) deallocate(L0_fDir)
     348          14 :     if ( allocated(L0_draSC) ) deallocate(L0_draSC)
     349          14 :     if ( allocated(L0_draCell) ) deallocate(L0_draCell)
     350          14 :     if ( allocated(L0_streamNet) ) deallocate(L0_streamNet)
     351          14 :     if ( allocated(L0_floodPlain) ) deallocate(L0_floodPlain)
     352          14 :     if ( allocated(L0_noutlet) ) deallocate(L0_noutlet)
     353          14 :     if ( allocated(L0_celerity) ) deallocate(L0_celerity)
     354          14 :     if ( allocated(L11_L1_ID) ) deallocate(L11_L1_ID)
     355          14 :     if ( allocated(L1_total_runoff_in) ) deallocate(L1_total_runoff_in)
     356          14 :     if ( allocated(L11_cellCoor) ) deallocate(L11_cellCoor)
     357          14 :     if ( allocated(L1_L11_ID) ) deallocate(L1_L11_ID)
     358          14 :     if ( allocated(L11_areaCell) ) deallocate(L11_areaCell)
     359          14 :     if ( allocated(L11_fAcc) ) deallocate(L11_fAcc)
     360          14 :     if ( allocated(L11_fDir) ) deallocate(L11_fDir)
     361          14 :     if ( allocated(L11_nOutlets) ) deallocate(L11_nOutlets)
     362          14 :     if ( allocated(L11_celerity) ) deallocate(L11_celerity)
     363          14 :     if ( allocated(L11_meandering) ) deallocate(L11_meandering)
     364          14 :     if ( allocated(L11_LinkIn_fAcc) ) deallocate(L11_LinkIn_fAcc)
     365          14 :     if ( allocated(L11_rowOut) ) deallocate(L11_rowOut)
     366          14 :     if ( allocated(L11_colOut) ) deallocate(L11_colOut)
     367          14 :     if ( allocated(L11_Qmod) ) deallocate(L11_Qmod)
     368          14 :     if ( allocated(L11_qOUT) ) deallocate(L11_qOUT)
     369          14 :     if ( allocated(L11_qTIN) ) deallocate(L11_qTIN)
     370          14 :     if ( allocated(L11_qTR) ) deallocate(L11_qTR)
     371          14 :     if ( allocated(L11_fromN) ) deallocate(L11_fromN)
     372          14 :     if ( allocated(L11_toN) ) deallocate(L11_toN)
     373          14 :     if ( allocated(L11_netPerm) ) deallocate(L11_netPerm)
     374          14 :     if ( allocated(L11_fRow) ) deallocate(L11_fRow)
     375          14 :     if ( allocated(L11_fCol) ) deallocate(L11_fCol)
     376          14 :     if ( allocated(L11_tRow) ) deallocate(L11_tRow)
     377          14 :     if ( allocated(L11_tCol) ) deallocate(L11_tCol)
     378          14 :     if ( allocated(L11_rOrder) ) deallocate(L11_rOrder)
     379          14 :     if ( allocated(L11_label) ) deallocate(L11_label)
     380          14 :     if ( allocated(L11_sink) ) deallocate(L11_sink)
     381          14 :     if ( allocated(L11_length) ) deallocate(L11_length)
     382          14 :     if ( allocated(L11_aFloodPlain) ) deallocate(L11_aFloodPlain)
     383          14 :     if ( allocated(L11_slope) ) deallocate(L11_slope)
     384          14 :     if ( allocated(L11_nLinkFracFPimp) ) deallocate(L11_nLinkFracFPimp)
     385          14 :     if ( allocated(L11_K) ) deallocate(L11_K)
     386          14 :     if ( allocated(L11_xi) ) deallocate(L11_xi)
     387          14 :     if ( allocated(L11_tsRout) ) deallocate(L11_tsRout)
     388          14 :     if ( allocated(L11_C1) ) deallocate(L11_C1)
     389          14 :     if ( allocated(L11_C2) ) deallocate(L11_C2)
     390          14 :     if ( allocated(L11_bankfull_runoff_in) ) deallocate(L11_bankfull_runoff_in)
     391          14 :     if ( allocated(L0_channel_depth) ) deallocate(L0_channel_depth)
     392          14 :     if ( allocated(L0_channel_elevation) ) deallocate(L0_channel_elevation)
     393          14 :     if ( allocated(L0_river_head_mon_sum) ) deallocate(L0_river_head_mon_sum)
     394          14 :     if ( allocated(mrm_L0_slope) ) deallocate(mrm_L0_slope)
     395          14 :     if ( allocated(gauge%domainId) ) deallocate(gauge%domainId)
     396          14 :     if ( allocated(gauge%fname) ) deallocate(gauge%fname)
     397          14 :     if ( allocated(gauge%gaugeId) ) deallocate(gauge%gaugeId)
     398          14 :     if ( allocated(gauge%Q) ) deallocate(gauge%Q)
     399          14 :     if ( allocated(gauge%T) ) deallocate(gauge%T)
     400          14 :     if ( allocated(InflowGauge%domainId) ) deallocate(InflowGauge%domainId)
     401          14 :     if ( allocated(InflowGauge%fname) ) deallocate(InflowGauge%fname)
     402          14 :     if ( allocated(InflowGauge%gaugeId) ) deallocate(InflowGauge%gaugeId)
     403          14 :     if ( allocated(InflowGauge%Q) ) deallocate(InflowGauge%Q)
     404          14 :     if ( allocated(InflowGauge%T) ) deallocate(InflowGauge%T)
     405          14 :     call riv_temp_pcs%clean_up()
     406             : 
     407             :     ! mo_common_mHM_mRM_variables
     408          14 :     if ( allocated(resolutionRouting) ) deallocate(resolutionRouting)
     409          14 :     if ( allocated(warmPer) ) deallocate(warmPer)
     410          14 :     if ( allocated(evalPer) ) deallocate(evalPer)
     411          14 :     if ( allocated(simPer) ) deallocate(simPer)
     412          14 :     if ( allocated(warmingDays) ) deallocate(warmingDays)
     413          14 :     if ( allocated(LCyearId) ) deallocate(LCyearId)
     414          14 :     if ( allocated(mhmFileRestartIn) ) deallocate(mhmFileRestartIn)
     415          14 :     if ( allocated(mrmFileRestartIn) ) deallocate(mrmFileRestartIn)
     416             : 
     417             :     ! mo_common_run_variables
     418          14 :     call run_cfg%clean_up()
     419             : 
     420             :     ! meteo handler clean up
     421          14 :     call meteo_handler%clean_up()
     422             : 
     423             :     ! coupling config clean up
     424          14 :     call couple_cfg%clean_up()
     425             : 
     426             :     ! reset verbosity
     427          14 :     call set_verbosity_level()
     428             : 
     429          14 :   end subroutine deallocate_global_variables
     430             : 
     431             : end module mo_clean_up

Generated by: LCOV version 1.16