Changeset 3563


Ignore:
Timestamp:
Dec 17, 2024, 5:52:24 PM (5 days ago)
Author:
jbclement
Message:

PEM:
Correction of Norbert Schorghofer's code due to missing initialization and bad shape array as subroutine argument + some cleanings.
JBC

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
4 edited

Legend:

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

    r3532 r3563  
    3737  real(8)  ssi_depth_in, ssi_depth, T1
    3838  real(8), dimension(NP) :: zdepthF, zdepthE, zdepthT, zdepthG
    39   real(8), dimension(NMAX,NP) :: porefill, porefill_in
     39  real(8), dimension(nz,NP) :: porefill, porefill_in
    4040  real(8), dimension(nz) :: Tb
    4141  real(8), dimension(NP) :: Tmean1, Tmean3, avrho1
     
    152152  !print *,'Zt0=  ',ZdepthT
    153153     call icelayer_mars(timestep,nz,NP,thIn,rhoc,z,porosity,pfrost,Tb,zdepthF, &
    154           & zdepthE,porefill(1:nz,:),Tmean1,Tmean3,zdepthG, &
     154          & zdepthE,porefill,Tmean1,Tmean3,zdepthG, &
    155155          & albedo,p0,icefrac,zdepthT,avrho1, &
    156156          & avrho1prescribed)
  • trunk/LMDZ.COMMON/libf/evolution/NS_fast_subs_mars.F90

    r3538 r3563  
    4949  real(8), SAVE :: avdrho_old(100), zdepth_old(100)  ! NP<=100
    5050  logical mode2
     51
     52  avdrho_old = 1. ! initialization
    5153
    5254  !$omp parallel &
  • trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r3556 r3563  
    525525== 17/12/2024 == JBC
    526526As intended, years computed by the PEM runs are now the only ones to be counted for the duration of the PEM simulation. The possibility to count in addition years computed by the PCM runs is left as an option of "launchPEM.sh" with the variable 'counting' (0 = "only PEM runs count"; any other values = "PCM runs are taken into account") + several small corrections/improvements in the launching scripts.
     527
     528== 17/12/2024 == JBC
     529Correction of Norbert Schorghofer's code due to missing initialization and bad shape array as subroutine argument + some cleanings.
  • trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90

    r3537 r3563  
    264264                write(*,*)'PEM settings: failed loading <tsoil_PEM_slope'//num//'>'
    265265                write(*,*)'will reconstruct the values of Tsoil'
    266 !                do ig = 1,ngrid
    267 !                    kcond = (TI_PEM(ig,index_breccia+1,islope)*TI_PEM(ig,index_breccia+1,islope))/volcapa
    268 !                    tsoil_PEM(ig,index_breccia+1,islope) = tsoil_PEM(ig,index_breccia,islope) + fluxgeo/kcond*(mlayer_PEM(index_breccia)-mlayer_PEM(index_breccia-1))
    269 !                    do iloop=index_breccia+2,index_bedrock
    270 !                        kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa
    271 !                        tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,index_breccia+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(index_breccia))
    272 !                    enddo
    273 !                    kcond = (TI_PEM(ig,index_bedrock+1,islope)*TI_PEM(ig,index_bedrock+1,islope))/volcapa
    274 !                    tsoil_PEM(ig,index_bedrock+1,islope) = tsoil_PEM(ig,index_bedrock,islope) + fluxgeo/kcond*(mlayer_PEM(index_bedrock)-mlayer_PEM(index_bedrock-1))
    275 !
    276 !                    do iloop=index_bedrock+2,nsoil_PEM
    277 !                        kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa
    278 !                        tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,index_bedrock+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(index_bedrock))
    279 !                    enddo
    280 !                enddo
    281266                call ini_tsoil_pem(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_avg_yr2(:,islope),tsoil_PEM(:,:,islope))
    282267                call compute_tsoil_pem(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_avg_yr2(:,islope),tsoil_PEM(:,:,islope))
     
    452437!b) Soil temperature
    453438        do islope = 1,nslope
    454 !            do ig = 1,ngrid
    455 !                kcond = (TI_PEM(ig,index_breccia+1,islope)*TI_PEM(ig,index_breccia+1,islope))/volcapa
    456 !                tsoil_PEM(ig,index_breccia+1,islope) = tsoil_PEM(ig,index_breccia,islope) + fluxgeo/kcond*(mlayer_PEM(index_breccia)-mlayer_PEM(index_breccia-1))
    457 !
    458 !                do iloop=index_breccia+2,index_bedrock
    459 !                    kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa
    460 !                    tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,index_breccia+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(index_breccia))
    461 !                enddo
    462 !                kcond = (TI_PEM(ig,index_bedrock+1,islope)*TI_PEM(ig,index_bedrock+1,islope))/volcapa
    463 !                tsoil_PEM(ig,index_bedrock+1,islope) = tsoil_PEM(ig,index_bedrock,islope) + fluxgeo/kcond*(mlayer_PEM(index_bedrock)-mlayer_PEM(index_bedrock-1))
    464 !
    465 !                do iloop=index_bedrock+2,nsoil_PEM
    466 !                    kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa
    467 !                    tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,index_bedrock+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(index_bedrock))
    468 !                enddo
    469 !            enddo
    470439            call ini_tsoil_pem(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_avg_yr2(:,islope),tsoil_PEM(:,:,islope))
    471440            call compute_tsoil_pem(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_avg_yr2(:,islope),tsoil_PEM(:,:,islope))
Note: See TracChangeset for help on using the changeset viewer.