LCOV - code coverage report
Current view: top level - cicecore/cicedyn/analysis - ice_history_mechred.F90 (source / functions) Hit Total Coverage
Test: 231018-211459:8916b9ff2c:1:quick Lines: 94 151 62.25 %
Date: 2023-10-18 15:30:36 Functions: 3 3 100.00 %

          Line data    Source code
       1             : !=======================================================================
       2             : 
       3             : ! Mechanical redistribution history output
       4             : !
       5             : ! 2012 Elizabeth Hunke split code from ice_history.F90
       6             : 
       7             :       module ice_history_mechred
       8             : 
       9             :       use ice_kinds_mod
      10             :       use ice_domain_size, only: max_nstrm
      11             :       use ice_constants, only: c0, c1, c100, mps_to_cmpdy
      12             :       use ice_fileunits, only: nu_nml, nml_filename, &
      13             :           get_fileunit, release_fileunit
      14             :       use ice_fileunits, only: nu_diag
      15             :       use ice_exit, only: abort_ice
      16             :       use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted
      17             :       use icepack_intfc, only: icepack_query_parameters, &
      18             :           icepack_query_tracer_flags, icepack_query_tracer_indices
      19             : 
      20             :       implicit none
      21             :       private
      22             :       public :: accum_hist_mechred, init_hist_mechred_2D, init_hist_mechred_3Dc
      23             : 
      24             :       !---------------------------------------------------------------
      25             :       ! flags: write to output file if true or histfreq value
      26             :       !---------------------------------------------------------------
      27             : 
      28             :       character (len=max_nstrm), public :: &
      29             :            f_ardg      = 'm', f_vrdg       = 'm', &   ! LCOV_EXCL_LINE
      30             :            f_alvl      = 'm', f_vlvl       = 'm', &   ! LCOV_EXCL_LINE
      31             :            f_dardg1dt  = 'm', f_dardg2dt   = 'm', &   ! LCOV_EXCL_LINE
      32             :            f_dvirdgdt  = 'm', f_opening    = 'm', &   ! LCOV_EXCL_LINE
      33             :            f_ardgn     = 'x', f_vrdgn      = 'x', &   ! LCOV_EXCL_LINE
      34             :            f_dardg1ndt = 'x', f_dardg2ndt  = 'x', &   ! LCOV_EXCL_LINE
      35             :            f_dvirdgndt = 'x', &   ! LCOV_EXCL_LINE
      36             :            f_aparticn  = 'x', f_krdgn      = 'x', &   ! LCOV_EXCL_LINE
      37             :            f_aredistn  = 'x', f_vredistn   = 'x', &   ! LCOV_EXCL_LINE
      38             :            f_araftn    = 'x', f_vraftn     = 'x'
      39             : 
      40             :       !---------------------------------------------------------------
      41             :       ! namelist variables
      42             :       !---------------------------------------------------------------
      43             : 
      44             :       namelist / icefields_mechred_nml /     &
      45             :            f_ardg,      f_vrdg     , &   ! LCOV_EXCL_LINE
      46             :            f_alvl,      f_vlvl     , &   ! LCOV_EXCL_LINE
      47             :            f_dardg1dt,  f_dardg2dt , &   ! LCOV_EXCL_LINE
      48             :            f_dvirdgdt,  f_opening  , &   ! LCOV_EXCL_LINE
      49             :            f_ardgn,     f_vrdgn    , &   ! LCOV_EXCL_LINE
      50             :            f_dardg1ndt, f_dardg2ndt, &   ! LCOV_EXCL_LINE
      51             :            f_dvirdgndt, &   ! LCOV_EXCL_LINE
      52             :            f_aparticn,  f_krdgn    , &   ! LCOV_EXCL_LINE
      53             :            f_aredistn,  f_vredistn , &   ! LCOV_EXCL_LINE
      54             :            f_araftn,    f_vraftn
      55             : 
      56             :       !---------------------------------------------------------------
      57             :       ! field indices
      58             :       !---------------------------------------------------------------
      59             : 
      60             :       integer (kind=int_kind), dimension(max_nstrm) :: &
      61             :            n_ardg       , n_vrdg       , &   ! LCOV_EXCL_LINE
      62             :            n_alvl       , n_vlvl       , &   ! LCOV_EXCL_LINE
      63             :            n_dardg1dt   , n_dardg2dt   , &   ! LCOV_EXCL_LINE
      64             :            n_dvirdgdt   , n_opening    , &   ! LCOV_EXCL_LINE
      65             :            n_ardgn      , n_vrdgn      , &   ! LCOV_EXCL_LINE
      66             :            n_dardg1ndt  , n_dardg2ndt  , &   ! LCOV_EXCL_LINE
      67             :            n_dvirdgndt  , &   ! LCOV_EXCL_LINE
      68             :            n_aparticn   , n_krdgn      , &   ! LCOV_EXCL_LINE
      69             :            n_aredistn   , n_vredistn   , &   ! LCOV_EXCL_LINE
      70             :            n_araftn     , n_vraftn
      71             : 
      72             : !=======================================================================
      73             : 
      74             :       contains
      75             : 
      76             : !=======================================================================
      77             : 
      78             : ! Initialize history files
      79             : ! authors Elizabeth C. Hunke, LANL
      80             : 
      81          37 :       subroutine init_hist_mechred_2D
      82             : 
      83             :       use ice_broadcast, only: broadcast_scalar
      84             :       use ice_calendar, only: nstreams, histfreq
      85             :       use ice_communicate, only: my_task, master_task
      86             :       use ice_history_shared, only: tstr2D, tcstr, define_hist_field
      87             :       use ice_fileunits, only: goto_nml
      88             : 
      89             :       integer (kind=int_kind) :: ns
      90             :       integer (kind=int_kind) :: nml_error ! namelist i/o error flag
      91           8 :       real    (kind=dbl_kind) :: secday
      92             :       logical (kind=log_kind) :: tr_lvl
      93             :       character(len=char_len_long) :: tmpstr2 ! for namelist check
      94             :       character(len=char_len)      :: nml_name ! for namelist check
      95             : 
      96             :       character(len=*), parameter :: subname = '(init_hist_mechred_2D)'
      97             : 
      98          37 :       call icepack_query_parameters(secday_out=secday)
      99          37 :       call icepack_query_tracer_flags(tr_lvl_out=tr_lvl)
     100          37 :       call icepack_warnings_flush(nu_diag)
     101          37 :       if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
     102           0 :          file=__FILE__, line=__LINE__)
     103             : 
     104             :       !-----------------------------------------------------------------
     105             :       ! read namelist
     106             :       !-----------------------------------------------------------------
     107             : 
     108          37 :       if (my_task == master_task) then
     109           7 :          nml_name = 'icefields_mechred_nml'
     110           7 :          write(nu_diag,*) subname,' Reading ', trim(nml_name)
     111             : 
     112             :          ! open namelist file
     113           7 :          call get_fileunit(nu_nml)
     114           7 :          open (nu_nml, file=trim(nml_filename), status='old',iostat=nml_error)
     115           7 :          if (nml_error /= 0) then
     116             :             call abort_ice(subname//'ERROR: '//trim(nml_name)//' open file '// &
     117             :                trim(nml_filename), &   ! LCOV_EXCL_LINE
     118           0 :                file=__FILE__, line=__LINE__)
     119             :          endif
     120             : 
     121             :          ! goto this namelist in file
     122           7 :          call goto_nml(nu_nml,trim(nml_name),nml_error)
     123           7 :          if (nml_error /= 0) then
     124             :             call abort_ice(subname//'ERROR: searching for '// trim(nml_name), &
     125           0 :                file=__FILE__, line=__LINE__)
     126             :          endif
     127             : 
     128             :          ! read namelist
     129           7 :          nml_error =  1
     130          14 :          do while (nml_error > 0)
     131           7 :             read(nu_nml, nml=icefields_mechred_nml,iostat=nml_error)
     132             :             ! check if error
     133           7 :             if (nml_error /= 0) then
     134             :                ! backspace and re-read erroneous line
     135           0 :                backspace(nu_nml)
     136           0 :                read(nu_nml,fmt='(A)') tmpstr2
     137             :                call abort_ice(subname//'ERROR: ' // trim(nml_name) // ' reading ' // &
     138           0 :                     trim(tmpstr2), file=__FILE__, line=__LINE__)
     139             :             endif
     140             :          end do
     141             : 
     142           7 :          close(nu_nml)
     143           7 :          call release_fileunit(nu_nml)
     144             :       endif
     145             : 
     146          37 :       if (.not. tr_lvl) then
     147           0 :          f_ardg = 'x'
     148           0 :          f_vrdg = 'x'
     149           0 :          f_alvl = 'x'
     150           0 :          f_vlvl = 'x'
     151           0 :          f_ardgn = 'x'
     152           0 :          f_vrdgn = 'x'
     153           0 :          f_araftn = 'x'
     154           0 :          f_vraftn = 'x'
     155             :       endif
     156          37 :       if (f_araftn /= 'x' .or. f_vraftn /= 'x') f_ardgn = f_araftn
     157             : 
     158          37 :       call broadcast_scalar (f_ardg, master_task)
     159          37 :       call broadcast_scalar (f_vrdg, master_task)
     160          37 :       call broadcast_scalar (f_alvl, master_task)
     161          37 :       call broadcast_scalar (f_vlvl, master_task)
     162          37 :       call broadcast_scalar (f_dardg1dt, master_task)
     163          37 :       call broadcast_scalar (f_dardg2dt, master_task)
     164          37 :       call broadcast_scalar (f_dvirdgdt, master_task)
     165          37 :       call broadcast_scalar (f_opening, master_task)
     166          37 :       call broadcast_scalar (f_ardgn, master_task)
     167          37 :       call broadcast_scalar (f_vrdgn, master_task)
     168          37 :       call broadcast_scalar (f_dardg1ndt, master_task)
     169          37 :       call broadcast_scalar (f_dardg2ndt, master_task)
     170          37 :       call broadcast_scalar (f_dvirdgndt, master_task)
     171          37 :       call broadcast_scalar (f_krdgn, master_task)
     172          37 :       call broadcast_scalar (f_aparticn, master_task)
     173          37 :       call broadcast_scalar (f_aredistn, master_task)
     174          37 :       call broadcast_scalar (f_vredistn, master_task)
     175          37 :       call broadcast_scalar (f_araftn, master_task)
     176          37 :       call broadcast_scalar (f_vraftn, master_task)
     177             : 
     178             :       ! 2D variables
     179             : 
     180          74 :       do ns = 1, nstreams
     181          74 :       if (histfreq(ns) /= 'x') then
     182             : 
     183          37 :       if (f_alvl(1:1) /= 'x') &
     184             :          call define_hist_field(n_alvl,"alvl","1",tstr2D, tcstr, &   ! LCOV_EXCL_LINE
     185             :              "level ice area fraction",                            &   ! LCOV_EXCL_LINE
     186             :              "none", c1, c0,                                       &   ! LCOV_EXCL_LINE
     187          37 :              ns, f_alvl)
     188          37 :       if (f_vlvl(1:1) /= 'x') &
     189             :          call define_hist_field(n_vlvl,"vlvl","m",tstr2D, tcstr, &   ! LCOV_EXCL_LINE
     190             :              "level ice volume",                           &   ! LCOV_EXCL_LINE
     191             :              "grid cell mean level ice thickness", c1, c0, &   ! LCOV_EXCL_LINE
     192          37 :              ns, f_vlvl)
     193          37 :       if (f_ardg(1:1) /= 'x') &
     194             :          call define_hist_field(n_ardg,"ardg","1",tstr2D, tcstr, &   ! LCOV_EXCL_LINE
     195             :              "ridged ice area fraction",                           &   ! LCOV_EXCL_LINE
     196             :              "none", c1, c0,                                       &   ! LCOV_EXCL_LINE
     197          37 :              ns, f_ardg)
     198          37 :       if (f_vrdg(1:1) /= 'x') &
     199             :          call define_hist_field(n_vrdg,"vrdg","m",tstr2D, tcstr, &   ! LCOV_EXCL_LINE
     200             :              "ridged ice volume",                          &   ! LCOV_EXCL_LINE
     201             :              "grid cell mean level ridged thickness", c1, c0, &   ! LCOV_EXCL_LINE
     202          37 :              ns, f_vrdg)
     203             : 
     204          37 :       if (f_dardg1dt(1:1) /= 'x') &
     205             :          call define_hist_field(n_dardg1dt,"dardg1dt","%/day",tstr2D, tcstr, &   ! LCOV_EXCL_LINE
     206             :              "ice area ridging rate",                                      &   ! LCOV_EXCL_LINE
     207             :              "none", secday*c100, c0,                                      &   ! LCOV_EXCL_LINE
     208           0 :              ns, f_dardg1dt)
     209             : 
     210          37 :       if (f_dardg2dt(1:1) /= 'x') &
     211             :          call define_hist_field(n_dardg2dt,"dardg2dt","%/day",tstr2D, tcstr, &   ! LCOV_EXCL_LINE
     212             :              "ridge area formation rate",                                  &   ! LCOV_EXCL_LINE
     213             :              "none", secday*c100, c0,                                      &   ! LCOV_EXCL_LINE
     214           0 :              ns, f_dardg2dt)
     215             : 
     216          37 :       if (f_dvirdgdt(1:1) /= 'x') &
     217             :          call define_hist_field(n_dvirdgdt,"dvirdgdt","cm/day",tstr2D, tcstr, &   ! LCOV_EXCL_LINE
     218             :              "ice volume ridging rate",                                     &   ! LCOV_EXCL_LINE
     219             :              "none", mps_to_cmpdy, c0,                                      &   ! LCOV_EXCL_LINE
     220           0 :              ns, f_dvirdgdt)
     221             : 
     222          37 :       if (f_opening(1:1) /= 'x') &
     223             :          call define_hist_field(n_opening,"opening","%/day",tstr2D, tcstr, &   ! LCOV_EXCL_LINE
     224             :              "lead area opening rate",                                   &   ! LCOV_EXCL_LINE
     225             :              "none", secday*c100, c0,                                    &   ! LCOV_EXCL_LINE
     226           0 :              ns, f_opening)
     227             : 
     228             :       endif ! histfreq(ns) /= 'x'
     229             :       enddo ! nstreams
     230             : 
     231          37 :       end subroutine init_hist_mechred_2D
     232             : 
     233             : !=======================================================================
     234             : 
     235          37 :       subroutine init_hist_mechred_3Dc
     236             : 
     237             :       use ice_calendar, only: nstreams, histfreq
     238             :       use ice_history_shared, only: tstr3Dc, tcstr, define_hist_field
     239             : 
     240             :       integer (kind=int_kind) :: ns
     241           8 :       real (kind=dbl_kind) :: secday
     242             :       character(len=*), parameter :: subname = '(init_hist_mechred_3Dc)'
     243             : 
     244             :       !-----------------------------------------------------------------
     245             :       ! 3D (category) variables must be looped separately
     246             :       !-----------------------------------------------------------------
     247             : 
     248          37 :       call icepack_query_parameters(secday_out=secday)
     249          37 :       call icepack_warnings_flush(nu_diag)
     250          37 :       if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
     251           0 :          file=__FILE__, line=__LINE__)
     252             : 
     253          74 :       do ns = 1, nstreams
     254          74 :       if (histfreq(ns) /= 'x') then
     255             : 
     256          37 :        if (f_ardgn(1:1) /= 'x') &
     257             :            call define_hist_field(n_ardgn,"ardgn","1",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     258             :              "ridged ice area fraction, category",                 &   ! LCOV_EXCL_LINE
     259             :              "none", c1, c0,                                       &   ! LCOV_EXCL_LINE
     260           0 :              ns, f_ardgn)
     261             : 
     262          37 :        if (f_vrdgn(1:1) /= 'x') &
     263             :            call define_hist_field(n_vrdgn,"vrdgn","m",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     264             :              "ridged ice volume, category",                &   ! LCOV_EXCL_LINE
     265             :              "grid cell mean ridged ice thickness", c1, c0, &   ! LCOV_EXCL_LINE
     266           0 :              ns, f_vrdgn)
     267             : 
     268          37 :        if (f_dardg1ndt(1:1) /= 'x') &
     269             :            call define_hist_field(n_dardg1ndt,"dardg1ndt","%/day",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     270             :              "ice area ridging rate, category",                            &   ! LCOV_EXCL_LINE
     271             :              "none", secday*c100, c0,                                      &   ! LCOV_EXCL_LINE
     272           0 :              ns, f_dardg1ndt)
     273             : 
     274          37 :        if (f_dardg2ndt(1:1) /= 'x') &
     275             :            call define_hist_field(n_dardg2ndt,"dardg2ndt","%/day",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     276             :              "ridge area formation rate, category",                        &   ! LCOV_EXCL_LINE
     277             :              "none", secday*c100, c0,                                      &   ! LCOV_EXCL_LINE
     278           0 :              ns, f_dardg2ndt)
     279             : 
     280          37 :        if (f_dvirdgndt(1:1) /= 'x') &
     281             :           call define_hist_field(n_dvirdgndt,"dvirdgndt","cm/day",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     282             :              "ice volume ridging rate, category",                          &   ! LCOV_EXCL_LINE
     283             :              "none", mps_to_cmpdy, c0,                                     &   ! LCOV_EXCL_LINE
     284           0 :              ns, f_dvirdgndt)
     285             : 
     286          37 :        if (f_krdgn(1:1) /= 'x') &
     287             :            call define_hist_field(n_krdgn,"krdgn","1",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     288             :              "ridging thickness factor, category",                    &   ! LCOV_EXCL_LINE
     289             :              "mean ridge thickness/thickness of ridging ice", c1, c0, &   ! LCOV_EXCL_LINE
     290           0 :              ns, f_krdgn)
     291             : 
     292          37 :        if (f_aparticn(1:1) /= 'x') &
     293             :            call define_hist_field(n_aparticn,"aparticn","1",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     294             :              "ridging ice participation function, category",       &   ! LCOV_EXCL_LINE
     295             :              "fraction of new ridge area added to cat", c1, c0,    &   ! LCOV_EXCL_LINE
     296           0 :              ns, f_aparticn)
     297             : 
     298          37 :        if (f_aredistn(1:1) /= 'x') &
     299             :            call define_hist_field(n_aredistn,"aredistn","1",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     300             :              "ridging ice area redistribution function, category",   &   ! LCOV_EXCL_LINE
     301             :              "fraction of new ridge volume added to cat", c1, c0,    &   ! LCOV_EXCL_LINE
     302           0 :              ns, f_aredistn)
     303             : 
     304          37 :        if (f_vredistn(1:1) /= 'x') &
     305             :            call define_hist_field(n_vredistn,"vredistn","1",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     306             :              "ridging ice volume redistribution function, category",       &   ! LCOV_EXCL_LINE
     307             :              "none", c1, c0,                                       &   ! LCOV_EXCL_LINE
     308           0 :              ns, f_vredistn)
     309             : 
     310          37 :        if (f_araftn(1:1) /= 'x') &
     311             :            call define_hist_field(n_araftn,"araftn","1",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     312             :              "rafted ice area fraction, category",                 &   ! LCOV_EXCL_LINE
     313             :              "none", c1, c0,                                       &   ! LCOV_EXCL_LINE
     314           0 :              ns, f_araftn)
     315             : 
     316          37 :        if (f_vraftn(1:1) /= 'x') &
     317             :            call define_hist_field(n_vraftn,"vraftn","1",tstr3Dc, tcstr, &   ! LCOV_EXCL_LINE
     318             :              "rafted ice volume, category",                 &   ! LCOV_EXCL_LINE
     319             :              "none", c1, c0,                                       &   ! LCOV_EXCL_LINE
     320           0 :              ns, f_vraftn)
     321             : 
     322             :       endif ! histfreq(ns) /= 'x'
     323             :       enddo ! ns
     324             : 
     325          37 :       end subroutine init_hist_mechred_3Dc
     326             : 
     327             : !=======================================================================
     328             : 
     329             : ! accumulate average ice quantities or snapshots
     330             : ! author:   Elizabeth C. Hunke, LANL
     331             : 
     332       23104 :       subroutine accum_hist_mechred (iblk)
     333             : 
     334             :       use ice_history_shared, only: n2D, a2D, a3Dc, ncat_hist, &
     335             :           accum_hist_field
     336             :       use ice_state, only: aice, vice, trcr, aicen, vicen, trcrn
     337             :       use ice_flux, only: dardg1dt, dardg2dt, dvirdgdt, dardg1ndt,&
     338             :           dardg2ndt, dvirdgndt, krdgn, aparticn, aredistn, vredistn, &   ! LCOV_EXCL_LINE
     339             :           araftn, vraftn, opening
     340             : 
     341             :       integer (kind=int_kind), intent(in) :: &
     342             :            iblk                 ! block index
     343             : 
     344             :       ! local variables
     345             : 
     346             :       integer (kind=int_kind) :: &
     347             :            nt_alvl, nt_vlvl
     348             :       character(len=*), parameter :: subname = '(accum_hist_mechred)'
     349             : 
     350       23104 :       call icepack_query_tracer_indices(nt_alvl_out=nt_alvl, nt_vlvl_out=nt_vlvl)
     351       23104 :       call icepack_warnings_flush(nu_diag)
     352       23104 :       if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
     353           0 :          file=__FILE__, line=__LINE__)
     354             : 
     355             :       !---------------------------------------------------------------
     356             :       ! increment field
     357             :       !---------------------------------------------------------------
     358             : 
     359             :          ! 2D fields
     360       23104 :          if (allocated(a2D)) then
     361             : 
     362       23104 :          if (f_alvl(1:1)/= 'x') &
     363             :              call accum_hist_field(n_alvl,   iblk, &   ! LCOV_EXCL_LINE
     364    16297970 :                                    aice(:,:,iblk) * trcr(:,:,nt_alvl,iblk), a2D)
     365       23104 :          if (f_vlvl(1:1)/= 'x') &
     366             :              call accum_hist_field(n_vlvl,   iblk, &   ! LCOV_EXCL_LINE
     367    16297970 :                                    vice(:,:,iblk) * trcr(:,:,nt_vlvl,iblk), a2D)
     368       23104 :          if (f_ardg(1:1)/= 'x') &
     369             :              call accum_hist_field(n_ardg,   iblk, &   ! LCOV_EXCL_LINE
     370    16297970 :                              aice(:,:,iblk) * (c1 - trcr(:,:,nt_alvl,iblk)), a2D)
     371       23104 :          if (f_vrdg(1:1)/= 'x') &
     372             :              call accum_hist_field(n_vrdg,   iblk, &   ! LCOV_EXCL_LINE
     373    16297970 :                              vice(:,:,iblk) * (c1 - trcr(:,:,nt_vlvl,iblk)), a2D)
     374       23104 :          if (f_dardg1dt(1:1)/= 'x') &
     375           0 :              call accum_hist_field(n_dardg1dt,iblk, dardg1dt(:,:,iblk), a2D)
     376       23104 :          if (f_dardg2dt(1:1)/= 'x') &
     377           0 :              call accum_hist_field(n_dardg2dt,iblk, dardg2dt(:,:,iblk), a2D)
     378       23104 :          if (f_dvirdgdt(1:1)/= 'x') &
     379           0 :              call accum_hist_field(n_dvirdgdt,iblk, dvirdgdt(:,:,iblk), a2D)
     380       23104 :          if (f_opening(1:1) /= 'x') &
     381           0 :              call accum_hist_field(n_opening, iblk, opening(:,:,iblk), a2D)
     382             : 
     383             :          endif ! allocated(a2D)
     384             : 
     385             :          ! 3D category fields
     386       23104 :          if (allocated(a3Dc)) then
     387             : 
     388           0 :          if (f_ardgn(1:1)/= 'x') &
     389             :              call accum_hist_field(n_ardgn-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     390             :                                    aicen(:,:,1:ncat_hist,iblk) &   ! LCOV_EXCL_LINE
     391           0 :                                  * (c1 - trcrn(:,:,nt_alvl,1:ncat_hist,iblk)), a3Dc)
     392           0 :          if (f_vrdgn(1:1)/= 'x') &
     393             :              call accum_hist_field(n_vrdgn-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     394             :                                    vicen(:,:,1:ncat_hist,iblk) &   ! LCOV_EXCL_LINE
     395           0 :                                  * (c1 - trcrn(:,:,nt_vlvl,1:ncat_hist,iblk)), a3Dc)
     396           0 :          if (f_dardg1ndt(1:1)/= 'x') &
     397             :              call accum_hist_field(n_dardg1ndt-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     398           0 :                                    dardg1ndt(:,:,1:ncat_hist,iblk), a3Dc)
     399           0 :          if (f_dardg2ndt(1:1)/= 'x') &
     400             :              call accum_hist_field(n_dardg2ndt-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     401           0 :                                    dardg2ndt(:,:,1:ncat_hist,iblk), a3Dc)
     402           0 :          if (f_dvirdgndt(1:1)/= 'x') &
     403             :              call accum_hist_field(n_dvirdgndt-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     404           0 :                                    dvirdgndt(:,:,1:ncat_hist,iblk), a3Dc)
     405           0 :          if (f_krdgn(1:1)/= 'x') &
     406             :              call accum_hist_field(n_krdgn-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     407           0 :                                    krdgn(:,:,1:ncat_hist,iblk), a3Dc)
     408           0 :          if (f_aparticn(1:1)/= 'x') &
     409             :              call accum_hist_field(n_aparticn-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     410           0 :                                    aparticn(:,:,1:ncat_hist,iblk), a3Dc)
     411           0 :          if (f_aredistn(1:1)/= 'x') &
     412             :              call accum_hist_field(n_aredistn-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     413           0 :                                    aredistn(:,:,1:ncat_hist,iblk), a3Dc)
     414           0 :          if (f_vredistn(1:1)/= 'x') &
     415             :              call accum_hist_field(n_vredistn-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     416           0 :                                    vredistn(:,:,1:ncat_hist,iblk), a3Dc)
     417           0 :          if (f_araftn(1:1)/= 'x') &
     418             :              call accum_hist_field(n_araftn-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     419           0 :                                    araftn(:,:,1:ncat_hist,iblk), a3Dc)
     420           0 :          if (f_vraftn(1:1)/= 'x') &
     421             :              call accum_hist_field(n_vraftn-n2D, iblk, ncat_hist, &   ! LCOV_EXCL_LINE
     422           0 :                                    vraftn(:,:,1:ncat_hist,iblk), a3Dc)
     423             :          endif ! allocated(a3Dc)
     424             : 
     425       23104 :       end subroutine accum_hist_mechred
     426             : 
     427             : !=======================================================================
     428             : 
     429             :       end module ice_history_mechred
     430             : 
     431             : !=======================================================================

Generated by: LCOV version 1.14-6-g40580cd