Ignore:
Timestamp:
Mar 10, 2026, 10:58:47 PM (5 weeks ago)
Author:
tbertrand
Message:

Pluto PCM:
Some fixing for the paleo mode
TB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/phypluto/spreadglacier_paleo.F90

    r4040 r4119  
    4848      REAL tgla(ngrid),tbase(ngrid)   !temperature at the base of glacier different of ptsurf
    4949      REAL :: zdqsurf(ngrid)   ! tendency of qsurf
     50      REAL :: diff(ngrid)   ! height difference (topography+ice layer) between two adjacent points
    5051      REAL massflow  ! function
    51       REAL hlim,qlim,difflim,diff,stock,H0,totmasstmp
    52       INTEGER compt !compteur
     52      REAL hlim,qlim,difflim,stock,H0,totmasstmp
     53      INTEGER compt,nbedge
    5354      INTEGER slid ! option slid 0 or 1
    5455      INTEGER :: edge(4) ! index of the adjecent points, N,S,E,W
     
    6364      difflim=0.5 ! limit height (m) between two adjacent point to start spreading the glacier
    6465      zdqsurf(:)=0.
     66
     67      ! We set the number of edges to make it applicable for 1D case
     68      IF (iim.eq.1) THEN
     69         nbedge=2   ! 1D Case: Only check North/South
     70      ELSE
     71         nbedge=4   ! 3D Cse: Check N,S,E,W
     72      ENDIF
     73
    6574!--------------- Dimensions -------------------------------------
    6675     
     
    7382      qlim=hlim*1000. ! kg
    7483      !! Security for not depleted all ice too fast in one timestep
    75       secu=4
    76 
     84      secu=2
     85 
    7786      !*************************************
    7887      ! Loop over all points
    7988      !*************************************
    8089      DO ig=1,ngrid
    81          !if (ig.eq.ngrid) then
    82          !  print*, 'qpole=',pqsurf(ig,igcm_n2),qlim
    83          !endif
    8490
    8591         !*************************************
    8692         ! if significant amount of ice, where qsurf > qlim
    8793         !*************************************
     94
    8895         IF (pqsurf(ig,igcm_n2).gt.qlim) THEN
    8996
     
    94101              tgla(ig)=ptsurf(ig)
    95102              ! temperature at the base (we neglect convection)
    96               tbase(ig)=tgla(ig)+20.*pqsurf(ig,igcm_n2)/1.e6 ! Umurhan et al.
    97               if (tbase(ig).gt.63.) then 
     103              ! tbase(ig)=tgla(ig)+20.*pqsurf(ig,igcm_n2)/1.e6 ! Umurhan et al.
     104
     105              ! DEBUG test: paleo simulation without basal melting
     106              tbase(ig) = tgla(ig)
     107
     108              if (tbase(ig).gt.63.) then
    98109                 slid=1   ! activate slide
    99110              else
     
    150161
    151162              masstmp(:)=0. ! mass to be transferred
     163              diff(:)=0. ! height difference between adjacent points (m)
    152164              totmasstmp=0. ! total mass to be transferred
    153165              H0=phisfi0(ig)/g+pqsurf(ig,igcm_n2)/1000. ! height of ice at ig (m)
     
    161173                 !! 1) Compute Diff H0-H1 and mass to be transferred for each adjacent point
    162174                 DO i=inddeb,indfin
    163                     diff=H0-(phisfi0(i)/g+pqsurf(i,igcm_n2)/1000.)  ! Height difference between ig and adjacent points (m)
    164                     if (diff.gt.difflim) then
    165                      masstmp(i)=massflow(ig,i,tgla(ig),diff,pqsurf(ig,igcm_n2),timstep,slid) ! Mass to be transferred (kg/m2/s)
     175                    diff(i)=H0-(phisfi0(i)/g+pqsurf(i,igcm_n2)/1000.)  ! Height difference between ig and adjacent points (m)
     176                    if (diff(i).gt.difflim) then
     177                     masstmp(i)=massflow(ig,i,tgla(ig),diff(i),pqsurf(ig,igcm_n2),timstep,slid) ! Mass to be transferred (kg/m2/s)
    166178                    else
    167179                     masstmp(i)=0.
     
    171183                 if (totmasstmp.gt.0.) then
    172184                   !! 2) Available mass to be transferred
    173                    stock=maxval(masstmp(:))/secu ! kg/m2/s
     185                   stock=min(maxval(diff(:)*1000./timstep),maxval(masstmp(:))/secu) ! kg/m2/s
    174186                   !! 3) Real amounts of ice to be transferred :
    175187                   masstmp(:)=masstmp(:)/totmasstmp*stock*cell_area(ig)/cell_area(inddeb)  !kg/m2/s   all area around the pole are the same
     
    217229
    218230                 !! 1) Compute Diff H0-H1 and mass to be transferred for each adjacent point
    219                  DO compt=1,4
     231                 DO compt=1,nbedge
    220232                    i=edge(compt)
    221                     diff=H0-(phisfi0(i)/g+pqsurf(i,igcm_n2)/1000.)  ! (m)
    222                     if (diff.gt.difflim) then
    223                      masstmp(i)=massflow(ig,i,tgla(ig),diff,pqsurf(ig,igcm_n2),timstep,slid)
     233                    diff(i)=H0-(phisfi0(i)/g+pqsurf(i,igcm_n2)/1000.)  ! (m)
     234
     235
     236                    if (diff(i).gt.difflim) then
     237                     masstmp(i)=massflow(ig,i,tgla(ig),diff(i),pqsurf(ig,igcm_n2),timstep,slid)
     238                   
     239
    224240                    else
    225241                     masstmp(i)=0.
     
    229245                 if (totmasstmp.gt.0) then
    230246                   !! 2) Available mass to be transferred
    231                    stock=maxval(masstmp(:))/secu ! kg/m2/s
     247                   stock=min(maxval(diff(:)*1000./timstep),maxval(masstmp(:))/secu) ! kg/m2/s
    232248                   !! 3) Real amounts of ice to be transferred :
    233                    DO compt=1,4
     249                   DO compt=1,nbedge
    234250                    i=edge(compt)
    235251                    masstmp(i)=masstmp(i)/totmasstmp*stock*cell_area(ig)/cell_area(i)  !kg/m2/s
     
    246262                     pqsurf(ig,igcm_ch4_ice)=pqsurf(ig,igcm_ch4_ice)+dqch4
    247263                     !! add CH4
    248                      DO compt=1,4
     264                     DO compt=1,nbedge
    249265                       i=edge(compt)
    250266                       pqsurf(i,igcm_ch4_ice)=pqsurf(i,igcm_ch4_ice)-masstmp(i)/stock*dqch4
     
    257273                     pqsurf(ig,igcm_co_ice)=pqsurf(ig,igcm_co_ice)+dqco
    258274                     !! add CO
    259                      DO compt=1,4
     275                     DO compt=1,nbedge
    260276                       i=edge(compt)
    261277                       pqsurf(i,igcm_co_ice)=pqsurf(i,igcm_co_ice)-masstmp(i)/stock*dqco
     
    265281                   ! Add N2
    266282                   totmasstmp=0.
    267                    DO compt=1,4
     283                   DO compt=1,nbedge
    268284                       i=edge(compt)
    269285                       pqsurf(i,igcm_n2)=pqsurf(i,igcm_n2)+masstmp(i)*timstep
     
    285301               
    286302      ENDDO  ! ig
     303
    287304
    288305      end subroutine spreadglacier_paleo
Note: See TracChangeset for help on using the changeset viewer.