source: trunk/LMDZ.MARS/libf/phymars/soil_tifeedback.F @ 1047

Last change on this file since 1047 was 1047, checked in by emillour, 11 years ago

Mars GCM:

  • IMPORTANT CHANGE: Removed all reference/use of ngridmx (dimphys.h) in routines (necessary prerequisite to using parallel dynamics); in most cases this just means adding 'ngrid' as routine argument, and making local saved variables allocatable (and allocated at first call). In the process, had to convert many *.h files to equivalent modules: yomaer.h => yomaer_h.F90 , surfdat.h => surfdat_h.F90 , comsaison.h => comsaison_h.F90 , yomlw.h => yomlw_h.F90 , comdiurn.h => comdiurn_h.F90 , dimradmars.h => dimradmars_mod.F90 , comgeomfi.h => comgeomfi_h.F90, comsoil.h => comsoil_h.F90 , slope.h => slope_mod.F90
  • Also updated EOF routines, everything is now in eofdump_mod.F90
  • Removed unused routine lectfux.F (in dyn3d)

EM

  • Property svn:executable set to *
File size: 3.6 KB
Line 
1      SUBROUTINE soil_tifeedback(ngrid,nsoil,icecover,newtherm_i)
2
3      use tracer_mod, only: nqmx, igcm_h2o_ice, rho_ice
4      use comsoil_h, only: layer, inertiedat
5      use surfdat_h, only: watercaptag, inert_h2o_ice
6      IMPLICIT NONE
7
8c=======================================================================
9c   Description :
10c       Surface water ice / Thermal inertia feedback.
11c
12c   When surface water-ice is thick enough, this routine creates a new
13c   soil thermal inertia with three different layers :
14c   - One layer of surface water ice (the thickness is given
15c     by the variable icecover (in kg of ice per m2) and the thermal
16c     inertia is prescribed by inert_h2o_ice (see surfdat_h and inifis));
17c   - A transitional layer of mixed thermal inertia;
18c   - A last layer of regolith below the ice cover whose thermal inertia
19c     is equal to inertiedat.
20c
21c   To use the model :
22c       SET THE tifeedback LOGICAL TO ".true." in callphys.def.
23c
24c   Author: J.-B. Madeleine Mars 2008 - Updated November 2012
25c=======================================================================
26
27#include "dimensions.h"
28#include "dimphys.h"
29!#include "comsoil.h"
30!#include "tracer.h"
31!#include "surfdat.h"
32
33c Local variables
34c ---------------
35
36      INTEGER :: ig                     ! Grid point (ngrid)
37      INTEGER :: ik                     ! Grid point (nsoil)
38      INTEGER :: iref                   ! Ice/Regolith boundary index
39      INTEGER :: ngrid                  ! Number of horizontal grid points
40      INTEGER :: nsoil                  ! Number of soil layers
41      REAL :: icedepth                  ! Ice cover thickness (m)
42
43c Inputs
44c ------
45
46      REAL icecover(ngrid,nqmx)         ! tracer on the surface (kg.m-2)
47                                        ! (iq=igcm_h2o_ice) is surface
48                                        ! water ice
49c Outputs
50c -------
51
52      REAL newtherm_i(ngrid,nsoil)    ! New soil thermal inertia
53
54c Initialization
55c --------------
56
57      newtherm_i(1:ngrid,1:nsoil) = 0
58
59c Creating the new soil thermal inertia table
60c -------------------------------------------
61      DO ig=1,ngrid
62c       Calculating the ice cover thickness
63        icedepth=icecover(ig,igcm_h2o_ice)/rho_ice
64c       If the ice cover is too thick or watercaptag=true,
65c         the entire column is changed :
66        IF ((icedepth.ge.layer(nsoil)).or.(watercaptag(ig))) THEN
67          DO ik=1,nsoil
68               newtherm_i(ig,ik)=inert_h2o_ice
69          ENDDO
70c       We neglect the effect of a very thin ice cover :
71        ELSE IF (icedepth.lt.layer(1)) THEN
72          DO ik=1,nsoil
73               newtherm_i(ig,ik)=inertiedat(ig,ik)
74          ENDDO
75        ELSE
76c         Ice/regolith boundary index :
77          iref=1
78c         Otherwise, we find the ice/regolith boundary:
79          DO ik=1,nsoil-1
80              IF ((icedepth.ge.layer(ik)).and.
81     &        (icedepth.lt.layer(ik+1))) THEN
82                  iref=ik+1
83                  EXIT
84              ENDIF
85          ENDDO
86c         And we change the thermal inertia:
87          DO ik=1,iref-1
88            newtherm_i(ig,ik)=inert_h2o_ice
89          ENDDO
90c         Transition (based on the equations of thermal conduction):
91          newtherm_i(ig,iref)=sqrt( (layer(iref)-layer(iref-1)) /
92     &        ( ((icedepth-layer(iref-1))/inert_h2o_ice**2) +
93     &        ((layer(iref)-icedepth)/inertiedat(ig,ik)**2) ) )
94c         Underlying regolith:
95          DO ik=iref+1,nsoil
96              newtherm_i(ig,ik)=inertiedat(ig,ik)
97          ENDDO
98        ENDIF ! icedepth
99      ENDDO ! ig
100
101c=======================================================================
102      RETURN
103      END
Note: See TracBrowser for help on using the repository browser.