Ignore:
Timestamp:
Nov 20, 2024, 3:53:19 PM (3 days ago)
Author:
jbclement
Message:

PEM:

  • Removing redundant Norbert Schorghofer's subroutines/parameters (follow-up of r3526);
  • Making all Norbert Schorghofer's subroutines with modern explicit interface via modules;
  • Cleaning of "glaciers_mod.F90";
  • Optimization for the computation of ice density according to temperature by using a function.

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/NS_fast_subs_univ.F90

    r3526 r3527  
     1MODULE fast_subs_univ
     2
     3implicit none
     4
     5CONTAINS
     6
    17!*****************************************************
    28! Commonly used subroutines for fast method
     
    1925!  this is not the true (final) equilibrium depth
    2026!***********************************************************************
    21   use allinterfaces, except_this_one => equildepth
    2227  implicit none
    2328  integer, intent(IN) :: nz
     
    5459!  B = Diff*bigstep/(porosity*icedensity)  [SI units]
    5560!***********************************************************************
    56   use allinterfaces, except_this_one => depths_avmeth
    5761  use math_mod, only: deriv2_simple, deriv1_onesided, deriv1, colint
     62  use ice_table_mod, only: constriction
    5863  implicit none
    5964  integer, intent(IN) :: nz, typeT
     
    178183
    179184
    180 pure function constriction(porefill)
    181 ! specify constriction function here, 0<=eta<=1
    182   implicit none
    183   real(8), intent(IN) :: porefill
    184   real(8) eta, constriction
    185   if (porefill<=0.) eta = 1.
    186   if (porefill>0. .and. porefill<1.) then
    187      ! eta = 1.
    188      ! eta = 1-porefill
    189      eta = (1-porefill)**2  ! Hudson et al., JGR, 2009
    190   endif
    191   if (porefill>=1.) eta = 0.
    192   constriction = eta
    193 end function constriction
    194 
    195 
    196 
    197185pure subroutine icechanges(nz,z,typeF,avdrho,avdrhoP,ypp, &
    198186     & Diff,porosity,icefrac,bigstep,zdepthT,porefill,typeG)
     
    202190! a crucial subroutine
    203191!***********************************************************
    204   use miscparameters, only : icedensity
    205   use allinterfaces, except_this_one => icechanges
    206192  use math_mod, only: colint
     193  use ice_table_mod, only: rho_ice
    207194  implicit none
    208195  integer, intent(IN) :: nz, typeF, typeG
     
    213200  real(8) B, beta, integ
    214201
    215   B = Diff*bigstep*86400.*365.24/(porosity*icedensity)
     202  B = Diff*bigstep*86400.*365.24/(porosity*927.)
     203  !B = Diff*bigstep*86400.*365.24/(porosity*rho_ice(T,'h2o'))
    216204
    217205  ! advance ice table, avdrho>0 is retreat
     
    232220     if (typeP==typeT) then   ! new 2011-09-01
    233221        beta = (1-icefrac)/(1-porosity)/icefrac
    234         beta = Diff*bigstep*beta*86400*365.24/icedensity
     222        beta = Diff*bigstep*beta*86400*365.24/927.
     223        !beta = Diff*bigstep*beta*86400*365.24/rho_ice(T,'h2o')
    235224        zdepthT = sqrt(2*beta*avdrho*18./8314. + zdepthT**2)
    236225     endif
     
    283272  end if
    284273end subroutine icechanges
     274
     275END MODULE fast_subs_univ
Note: See TracChangeset for help on using the changeset viewer.