Ignore:
Timestamp:
Apr 26, 2023, 11:29:35 AM (20 months ago)
Author:
llange
Message:

Mars PCM
Following r-2942: Fix a bug in the 1D: inertiesoil was not written in
the startfile
I introduce the possibility to prescribe subsurface ice (when no
startfi file): In the callphys.def, set subsurface_ice_depth to the
depth where you want ice (set value <0 for no ice). It will assign for
these depth a thermal inertia of 2100.
LL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F

    r2942 r2947  
    158158      LOGICAL :: found
    159159      REAL albedo_read(1,2,1)      ! surface albedo
     160
     161c   LL: Possibility to add subsurface ice
     162      REAL :: ice_depth            ! depth of the ice table, ice_depth < 0. means no ice
     163      REAL :: inertieice = 2100.   ! ice thermal inertia
     164      integer :: iref
     165 
    160166c=======================================================================
    161167
     
    528534      write(*,*) " inertia = ",inertiedat(1,1)
    529535
     536      ice_depth = -1 ! default value: no ice
     537      CALL getin("subsurface_ice_depth",ice_depth)
     538
    530539      z0(1)=z0_default ! default value for roughness
    531540      write(*,*) 'Surface roughness length z0 (m)?'
     
    690699! ------------------------------------------
    691700      volcapa=1.e6 ! volumetric heat capacity
     701
    692702      if(.not. startfile_1D ) then
    693       DO isoil=1,nsoil
    694          inertiedat(1,isoil)=inertiedat(1,1) ! soil thermal inertia
     703
     704! Initialize depths
     705! -----------------
     706       do isoil=1,nsoil
     707         layer(isoil)=2.e-4*(2.**(isoil-1)) ! layer depth
     708       enddo
     709
     710! Creating the new soil inertia table if there is subsurface ice :
     711       IF (ice_depth.gt.0) THEN
     712         iref = 1 ! ice/regolith boundary index
     713           IF (ice_depth.lt.layer(1)) THEN
     714             inertiedat(1,1) = sqrt( layer(1) /
     715     &        ( (ice_depth/inertiedat(1,1)**2) +
     716     &        ((layer(1)-ice_depth)/inertieice**2) ) )
     717             DO isoil=1,nsoil
     718              inertiedat(1,isoil) = inertieice
     719             ENDDO   
     720           ELSE ! searching for the ice/regolith boundary :
     721           DO isoil=1,nsoil
     722            IF ((ice_depth.ge.layer(isoil)).and.
     723     &         (ice_depth.lt.layer(isoil+1))) THEN
     724                  iref=isoil+1
     725                  EXIT
     726            ENDIF
     727           ENDDO
     728!         We then change the soil inertia table :
     729           DO isoil=1,iref-1
     730            inertiedat(1,isoil) = inertiedat(1,1)
     731           ENDDO
     732!         We compute the transition in layer(iref)
     733           inertiedat(1,iref) = sqrt( (layer(iref)-layer(iref-1)) /
     734     &          ( ((ice_depth-layer(iref-1))/inertiedat(1,1)**2) +
     735     &          ((layer(iref)-ice_depth)/inertieice**2) ) )
     736!         Finally, we compute the underlying ice :
     737           DO isoil=iref+1,nsoil
     738            inertiedat(1,isoil) = inertieice
     739           ENDDO
     740         ENDIF ! (ice_depth.lt.layer(1))     
     741       ELSE ! ice_depth <0 all is set to surface thermal inertia
     742         DO isoil=1,nsoil
     743           inertiedat(1,isoil)=inertiedat(1,1) ! soil thermal inertia
     744         ENDDO
     745       ENDIF ! ice_depth.gt.0
     746
     747       inertiesoil(1,:,1) = inertiedat(1,:)
     748
     749       DO isoil = 1,nsoil
    695750         tsoil(isoil)=tsurf(1)  ! soil temperature
    696       ENDDO
     751       ENDDO
     752
    697753      endif !(.not. startfile_1D )
    698754
     
    789845      call physdem1("startfi.nc",nsoilmx,ngrid,llm,nq,
    790846     &              dtphys,time,
    791      &              tsurf,tsoil,albedo,emis,q2,qsurf,tauscaling,
     847     &              tsurf,tsoil,inertiesoil,albedo,emis,
     848     &              q2,qsurf,tauscaling,
    792849     &              totcloudfrac,wstar,watercap)
    793850      endif !(.not. startfile_1D )
Note: See TracChangeset for help on using the changeset viewer.