Ignore:
Timestamp:
Mar 4, 2024, 11:03:35 AM (16 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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.