Ignore:
Timestamp:
Dec 22, 2022, 5:43:14 PM (2 years ago)
Author:
llange
Message:

PEM
Documentation of the main subroutines, and variables.
Unused programs have been removed.
LL

File:
1 edited

Legend:

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

    r2849 r2855  
    11   SUBROUTINE computeice_table(ngrid,nslope,nsoil_PEM,rhowatersurf_ave,rhowatersoil_ave,ice_table)
     2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     3!!!
     4!!! Purpose: Compute the ice table depth knowing the yearly average water
     5!!! density at the surface and at depth.
     6!!! Computations are made following the methods in Schorgofer et al., 2005
     7!!!
     8!!! Author: LL
     9!!!
     10!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     11
    212#ifndef CPP_STD
    3     USE comsoil_h, only:  inertiedat, volcapa
    4     USE vertical_layers_mod, ONLY: ap,bp
    5     USE comsoil_h_PEM, only: layer_PEM
     13    USE comsoil_h_PEM, only: layer_PEM                             ! Depth of the vertical grid
    614    implicit none
    715
    8     integer,intent(in) :: ngrid,nslope,nsoil_PEM
    9     real,intent(in) :: rhowatersurf_ave(ngrid,nslope)    ! surface temperature, timeseries [K]
    10     real,intent(in) :: rhowatersoil_ave(ngrid,nsoil_PEM,nslope)    ! soil water density, yearly average [kg/m^3]
    11     real,intent(inout) :: ice_table(ngrid,nslope)                 ! ice table [m]
    12     real :: z1,z2
    13     integer ig, islope,isoil
    14     real :: diff_rho(nsoil_PEM)                    ! difference of vapor content
     16    integer,intent(in) :: ngrid,nslope,nsoil_PEM                   ! Size of the physical grid, number of subslope, number of soil layer in the PEM
     17    real,intent(in) :: rhowatersurf_ave(ngrid,nslope)              ! Water density at the surface, yearly averaged [kg/m^3]
     18    real,intent(in) :: rhowatersoil_ave(ngrid,nsoil_PEM,nslope)    ! Water density at depth, computed from clapeyron law's (Murchy and Koop 2005), yearly averaged [kg/m^3]
     19    real,intent(inout) :: ice_table(ngrid,nslope)                  ! ice table depth [m]
     20    real :: z1,z2                                                  ! intermediate variables used when doing a linear interpolation between two depths to find the root
     21    integer ig, islope,isoil                                       ! loop variables
     22    real :: diff_rho(nsoil_PEM)                                    ! difference of water vapor density between the surface and at depth [kg/m^3]
    1523
    1624
     
    2432         enddo
    2533
    26          if(diff_rho(1) > 0) then
     34         if(diff_rho(1) > 0) then                                   ! ice is at the surface
    2735           ice_table(ig,islope) = 0.
    2836         else
    29            do isoil = 1,nsoil_PEM -1
     37           do isoil = 1,nsoil_PEM -1                                ! general case, we find the ice table depth by doing a linear approximation between the two depth, and then solve the first degree equation to find the root
    3038             if((diff_rho(isoil).lt.0).and.(diff_rho(isoil+1).gt.0.)) then
    3139               z1 = (diff_rho(isoil) - diff_rho(isoil+1))/(layer_PEM(isoil) - layer_PEM(isoil+1))
     
    3846        enddo
    3947      enddo
    40 
    41    
    42 
    4348!=======================================================================
    4449      RETURN
    45 
    4650#endif
    4751      END
Note: See TracChangeset for help on using the changeset viewer.