Ignore:
Timestamp:
Dec 8, 2025, 11:27:43 AM (7 days ago)
Author:
jbclement
Message:

PEM:

  • Removing completely the ice metamorphism computed by a threshold at the end of the PCM (which was commented).
  • Addition of a module "metamorphism" to compute the PCM frost at the PEM beginning and give it back to the PCM at the PEM end. The frost is considered as the ice given by the PCM "startfi.nc" which is above the yearly minimum. Thereby, metamorphism is performed through this operation.
  • Ice reservoirs representation in the PEM is modernized.

JBC

File:
1 edited

Legend:

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

    r3981 r3983  
    2525use glaciers_mod,               only: rho_co2ice, rho_h2oice
    2626use comcstfi_h,                 only: r, mugaz, pi
    27 use surfdat_h,                  only: watercaptag, perennial_co2ice
     27use surfdat_h,                  only: watercaptag, perennial_co2ice, qsurf
     28use metamorphism,               only: frost4PCM, iPCM_h2ofrost, iPCM_co2frost
    2829
    2930implicit none
     
    8081!!!        4. Mass of CO2 & H2O adsorbed
    8182!!!
    82 !!! /!\ This order must be respected !
     83!!! /!\ This order must be respected!
    8384!!! Author: LL
    8485!!!
     
    102103
    103104!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    104     ! h2o ice
    105     h2o_ice = 0.
     105    ! H2O ice
     106    h2o_ice(:,:) = 0.
    106107    call get_field("h2o_ice",h2o_ice,found)
    107108    if (.not. found) then
     
    110111        write(*,*)'with default value ''ini_huge_h2oice'''
    111112        do ig = 1,ngrid
    112             if (watercaptag(ig)) h2o_ice(ig,:) = ini_huge_h2oice
     113            if (watercaptag(ig)) h2o_ice(ig,:) = ini_huge_h2oice + qsurf(ig,iPCM_h2ofrost,:) - frost4PCM(ig,:)%h2o
    113114        enddo
    114115    endif
    115116
    116     ! co2 ice
    117     co2_ice = 0.
     117    ! CO2 ice
     118    co2_ice(:,:) = 0.
    118119    call get_field("co2_ice",co2_ice,found)
    119120    if (.not. found) then
    120121        write(*,*)'Pemetat0: failed loading <co2_ice>'
    121122        write(*,*)'will reconstruct the values from perennial_co2ice'
    122         co2_ice = perennial_co2ice
     123        co2_ice(:,:) = perennial_co2ice(:,:) + qsurf(:,iPCM_co2frost,:) - frost4PCM(:,:)%co2
    123124    endif
    124125
     
    208209                        delta = depth_breccia
    209210                        TI_PEM(ig,index_breccia + 1,islope) = sqrt((layer_PEM(index_breccia + 1) - layer_PEM(index_breccia))/ &
    210                                                                   (((delta - layer_PEM(index_breccia))/(TI_PEM(ig,index_breccia,islope)**2)) + &
    211                                                                   ((layer_PEM(index_breccia + 1) - delta)/(TI_breccia**2))))
    212                         do iloop=index_breccia + 2,index_bedrock
     211                                                                   (((delta - layer_PEM(index_breccia))/(TI_PEM(ig,index_breccia,islope)**2)) + &
     212                                                                   ((layer_PEM(index_breccia + 1) - delta)/(TI_breccia**2))))
     213                        do iloop = index_breccia + 2,index_bedrock
    213214                            TI_PEM(ig,iloop,islope) = TI_breccia
    214215                        enddo
     
    246247            do ig = 1,ngrid
    247248                if (inertiedat_PEM(ig,index_breccia) < TI_breccia) then
    248                     inertiedat_PEM(ig,index_breccia + 1) = sqrt((layer_PEM(index_breccia+1)-layer_PEM(index_breccia))/ &
    249                                                               (((delta-layer_PEM(index_breccia))/(inertiedat(ig,index_breccia)**2)) + &
    250                                                               ((layer_PEM(index_breccia+1)-delta)/(TI_breccia**2))))
     249                    inertiedat_PEM(ig,index_breccia + 1) = sqrt((layer_PEM(index_breccia + 1) - layer_PEM(index_breccia))/ &
     250                                                                (((delta - layer_PEM(index_breccia))/(inertiedat(ig,index_breccia)**2)) + &
     251                                                                ((layer_PEM(index_breccia + 1) - delta)/(TI_breccia**2))))
    251252
    252253                    do iloop = index_breccia + 2,index_bedrock
     
    254255                    enddo
    255256                else
    256                     do iloop=index_breccia + 1,index_bedrock
     257                    do iloop = index_breccia + 1,index_bedrock
    257258                        inertiedat_PEM(ig,iloop) = inertiedat_PEM(ig,nsoil_PCM)
    258259                    enddo
     
    263264            delta = depth_bedrock
    264265            do ig = 1,ngrid
    265                 inertiedat_PEM(ig,index_bedrock + 1) = sqrt((layer_PEM(index_bedrock+1)-layer_PEM(index_bedrock))/ &
    266                                                            (((delta-layer_PEM(index_bedrock))/(inertiedat_PEM(ig,index_bedrock)**2))+ &
    267                                                            ((layer_PEM(index_bedrock+1)-delta)/(TI_bedrock**2))))
    268             enddo
    269 
    270             do iloop = index_bedrock + 2, nsoil_PEM
     266                inertiedat_PEM(ig,index_bedrock + 1) = sqrt((layer_PEM(index_bedrock + 1) - layer_PEM(index_bedrock))/ &
     267                                                            (((delta - layer_PEM(index_bedrock))/(inertiedat_PEM(ig,index_bedrock)**2))+ &
     268                                                            ((layer_PEM(index_bedrock + 1) - delta)/(TI_bedrock**2))))
     269            enddo
     270
     271            do iloop = index_bedrock + 2,nsoil_PEM
    271272                do ig = 1,ngrid
    272273                    inertiedat_PEM(ig,iloop) = TI_bedrock
     
    365366
    366367    ! h2o ice
    367     h2o_ice = 0.
     368    h2o_ice(:,:) = 0.
    368369    write(*,*)'So ''h2o_ice'' is initialized with default value ''ini_huge_h2oice'' where ''watercaptag'' is true.'
    369370    do ig = 1,ngrid
    370         if (watercaptag(ig)) h2o_ice(ig,:) = ini_huge_h2oice
     371        if (watercaptag(ig)) h2o_ice(ig,:) = ini_huge_h2oice + qsurf(ig,iPCM_h2ofrost,:) - frost4PCM(ig,:)%h2o
    371372    enddo
    372373
    373374    ! co2 ice
    374375    write(*,*)'So ''co2_ice'' is initialized with ''perennial_co2ice'' found in the PCM.'
    375     co2_ice = perennial_co2ice
     376    co2_ice(:,:) = perennial_co2ice(:,:) + qsurf(:,iPCM_co2frost,:) - frost4PCM(:,:)%co2
    376377
    377378    ! Layerings
Note: See TracChangeset for help on using the changeset viewer.