Ignore:
Timestamp:
Mar 4, 2024, 11:03:35 AM (10 months ago)
Author:
llange
Message:

Mars PCM

  • Fixing bug in initestphys and waterice_tifeedback: when changing the soil

thermal properties to account for the high thermal inertia of subsurface ice,
the wrong layer was considered as 'mixed' (it was the layer after the correct
one which was modified).

LL

Location:
trunk/LMDZ.MARS/libf/phymars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90

    r3249 r3250  
    678678            do isoil = 1,nsoil
    679679                if ((ice_depth >= layer(isoil)) .and. (ice_depth < layer(isoil + 1))) then
    680                     iref = isoil + 1
     680                    iref = isoil
    681681                    exit
    682682                endif
     
    685685            inertiedat(1,:iref - 1) = inertiedat(1,1)
    686686            ! We compute the transition in layer(iref)
    687             inertiedat(1,iref) = sqrt((layer(iref) - layer(iref - 1))/(((ice_depth - layer(iref - 1))/inertiedat(1,1)**2) + ((layer(iref) - ice_depth)/inertieice**2)))
     687            inertiedat(1,iref) = sqrt((layer(iref+1) - layer(iref))/(((ice_depth - layer(iref))/inertiedat(1,1)**2) + ((layer(iref+1) - ice_depth)/inertieice**2)))
    688688            ! Finally, we compute the underlying ice:
    689689            inertiedat(1,iref + 1:) = inertieice
  • trunk/LMDZ.MARS/libf/phymars/waterice_tifeedback_mod.F90

    r3230 r3250  
    107107              DO ik=1,nsoil-1
    108108                 IF ((icedepth.ge.layer(ik)).and.icedepth.lt.layer(ik+1)) THEN
    109                     iref=ik+1
     109                    iref=ik
    110110                 EXIT
    111111                 ENDIF
     
    116116              ENDDO
    117117!             Transition (based on the equations of thermal conduction):
    118               newtherm_i(ig,iref,islope)=sqrt( (layer(iref)-layer(iref-1))/(((icedepth-layer(iref-1))/inert_h2o_ice**2) + &
    119               ((layer(iref)-icedepth)/inertiedat(ig,ik)**2) ) )
     118              newtherm_i(ig,iref,islope)=sqrt( (layer(iref+1)-layer(iref))/(((icedepth-layer(iref))/inert_h2o_ice**2) + &
     119              ((layer(iref+1)-icedepth)/inertiedat(ig,ik)**2) ) )
    120120!              Underlying regolith:
    121121              DO ik=iref+1,nsoil
Note: See TracChangeset for help on using the changeset viewer.