Ignore:
Timestamp:
Apr 19, 2024, 7:17:31 PM (7 months ago)
Author:
jbclement
Message:

PEM:
Few small corrections to make the PEM work in 3D, in particular concerning the initialization of the planet type and the evolution of ice with slopes.
JBC

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

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r3300 r3308  
    277277== 15/04/2024 == JBC
    278278Update of "output_layering.py" in the deftank.
     279
     280== 19/04/2024 == JBC
     281Few small corrections to make the PEM work in 3D, in particular concerning the initialization of the planet type and the evolution of ice with slopes.
  • trunk/LMDZ.COMMON/libf/evolution/deftank/run_PEM.def

    r3256 r3308  
    1 #
    2 #-------------------------------------
    3 # Run control parameters for the PEM
    4 #-------------------------------------
     1#------------------------------------#
     2# Run control parameters for the PEM #
     3#------------------------------------#
     4
     5#---------- Planet type ----------#
     6planet_type=mars
    57
    68#---------- Output parameters ----------#
  • trunk/LMDZ.COMMON/libf/evolution/evol_ice_mod.F90

    r3206 r3308  
    2828
    2929!   local:
    30 !   ----
     30!   ------
    3131
    3232!=======================================================================
     
    105105        enddo
    106106    enddo
    107     ! We adapt the tendencies to conserve h2o and do only exchange between grid points
    108     if (neg_tend > pos_tend .and. pos_tend > 0.) then ! More sublimation on the planet than condensation
    109         where (tend_h2o_ice < 0.) ! We lower the sublimating rate by a coefficient
    110             new_tendencies = tend_h2o_ice*pos_tend/neg_tend
    111         elsewhere ! We don't change the condensing rate
    112             new_tendencies = tend_h2o_ice
    113         end where
    114     else if (neg_tend < pos_tend .and. neg_tend > 0.) then ! More condensation on the planet than sublimation
    115         where (tend_h2o_ice < 0.) ! We don't change the sublimating rate
    116             new_tendencies = tend_h2o_ice
    117         elsewhere ! We lower the condensing rate by a coefficient
    118             new_tendencies = tend_h2o_ice*neg_tend/pos_tend
    119         end where
    120     else if (abs(pos_tend) < 1.e-10 .or. abs(neg_tend) == 1.e-10) then
    121         write(*,*) "Reason of stopping: there is no sublimating or condensing h20 ice!"
     107
     108    if (abs(pos_tend) < 1.e-10 .or. abs(neg_tend) < 1.e-10) then
     109        write(*,*) "Reason of stopping: there is no sublimating or condensing h2o ice!"
    122110        write(*,*) "Tendencies on ice sublimating =", neg_tend
    123111        write(*,*) "Tendencies on ice increasing =", pos_tend
     
    125113        stopPEM = 2
    126114        new_tendencies = 0.
     115    else
     116        ! We adapt the tendencies to conserve h2o and do only exchange between grid points
     117        if (neg_tend > pos_tend .and. pos_tend > 0.) then ! More sublimation on the planet than condensation
     118            where (tend_h2o_ice < 0.) ! We lower the sublimating rate by a coefficient
     119                new_tendencies = tend_h2o_ice*pos_tend/neg_tend
     120            elsewhere ! We don't change the condensing rate
     121                new_tendencies = tend_h2o_ice
     122            end where
     123        else if (neg_tend < pos_tend .and. neg_tend > 0.) then ! More condensation on the planet than sublimation
     124            where (tend_h2o_ice < 0.) ! We don't change the sublimating rate
     125                new_tendencies = tend_h2o_ice
     126            elsewhere ! We lower the condensing rate by a coefficient
     127                new_tendencies = tend_h2o_ice*neg_tend/pos_tend
     128            end where
     129        endif
    127130    endif
    128131
     
    150153    endif
    151154    ! In the place of accumulation of ice, we remove a bit of ice in order to conserve h2o
    152     where (new_tendencies > 0.) h2o_ice = h2o_ice - new_tendencies*real_coefficient*dt_pem*cos(def_slope_mean(islope)*pi/180.)
     155    do islope = 1,nslope
     156        do i = 1,ngrid
     157             if (new_tendencies(i,islope) > 0.) h2o_ice(i,islope) = h2o_ice(i,islope) - new_tendencies(i,islope)*real_coefficient*dt_pem*cos(def_slope_mean(islope)*pi/180.)
     158        enddo
     159     enddo
    153160else ! ngrid == 1, i.e. in 1D
    154161    h2o_ice = h2o_ice + tend_h2o_ice*dt_pem
  • trunk/LMDZ.COMMON/libf/evolution/glaciers_mod.F90

    r3256 r3308  
    55
    66! Flags for ice management
    7 logical :: h2oice_flow ! True by default, to compute H2O ice flow. Read in "run_PEM.def"
    8 logical :: co2ice_flow ! True by default, to compute CO2 ice flow. Read in "run_PEM.def"
     7logical :: h2oice_flow  ! True by default, to compute H2O ice flow. Read in "run_PEM.def"
     8logical :: co2ice_flow  ! True by default, to compute CO2 ice flow. Read in "run_PEM.def"
    99logical :: metam_h2oice ! False by default, to compute H2O ice metamorphism. Read in "run_PEM.def"
    1010logical :: metam_co2ice ! False by default, to compute CO2 ice metamorphism. Read in "run_PEM.def"
  • trunk/LMDZ.COMMON/libf/evolution/layering_mod.F90

    r3297 r3308  
    536536
    537537!------ Sublimation of CO2 ice + Condensation of H2O ice
    538     else if (htend_co2ice < 0. .and. htend_h2oice >= 0. ) then
     538    else if (htend_co2ice < 0. .and. htend_h2oice > 0.) then
    539539        write(*,'(a)') ' Stratification -> Sublimation of CO2 ice + Condensation of H2O ice'
    540540        ! CO2 ice sublimation in the considered stratum + New stratum for dust lag
     
    577577
    578578!------ Sublimation of CO2 ice + H2O ice
    579     else if (htend_co2ice < 0. .and. htend_h2oice < 0.) then
     579    else if ((htend_co2ice <= 0. .and. htend_h2oice < 0.) .or. (htend_co2ice < 0. .and. htend_h2oice <= 0.)) then
    580580        write(*,'(a)') ' Stratification -> Sublimation of CO2 and H2O ice'
    581581        ! CO2 ice sublimation in the considered stratum + New stratum for dust lag
     
    633633
    634634!------ Condensation of CO2 ice + Sublimation of H2O ice
    635     else if (htend_co2ice >= 0. .and. htend_h2oice < 0.) then
     635    else if (htend_co2ice > 0. .and. htend_h2oice < 0.) then
    636636        error stop 'Impossible situation: CO2 ice condensation + H2O ice sublimation!'
    637637    endif
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3297 r3308  
    351351    status = nf90_close(ncid)
    352352
    353     call iniphysiq(iim,jjm,llm,(jjm-1)*iim+2,comm_lmdz,daysec,day_ini,dtphys/nsplit_phys,rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp,iflag_phys)
     353    call iniphysiq('startfi_evol.nc',iim,jjm,llm,(jjm-1)*iim+2,comm_lmdz,daysec,day_ini,dtphys/nsplit_phys,rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp,iflag_phys)
    354354#else
    355355    ps_start_PCM(1) = ps(1)
     
    998998    ! H2O ice metamorphism
    999999    if (metam_h2oice .and. sum(qsurf(ig,igcm_h2o_ice,:)*subslope_dist(ig,:)/cos(pi*def_slope_mean(:)/180.)) > metam_h2oice_threshold) then
    1000         h2o_ice(ig,:) = h2o_ice(ig,:) + qsurf(ig,igcm_h2o_ice,:) - metam_h2oice_threshold/subslope_dist(ig,:)*cos(pi*def_slope_mean(:)*180.)
    1001         qsurf(ig,igcm_h2o_ice,:) = metam_h2oice_threshold/subslope_dist(ig,:)*cos(pi*def_slope_mean(:)*180.)
     1000        h2o_ice(ig,:) = h2o_ice(ig,:) + qsurf(ig,igcm_h2o_ice,:) - metam_h2oice_threshold
     1001        qsurf(ig,igcm_h2o_ice,:) = metam_h2oice_threshold
    10021002    endif
    10031003
     
    10151015    ! CO2 ice metamorphism
    10161016    if (metam_co2ice .and. sum(qsurf(ig,igcm_co2,:)*subslope_dist(ig,:)/cos(pi*def_slope_mean(:)/180.)) > metam_co2ice_threshold) then
    1017         perennial_co2ice(ig,:) = perennial_co2ice(ig,:) + qsurf(ig,igcm_co2,:) - metam_co2ice_threshold/subslope_dist(ig,:)*cos(pi*def_slope_mean(:)*180.)
    1018         qsurf(ig,igcm_co2,:) = metam_co2ice_threshold/subslope_dist(ig,:)*cos(pi*def_slope_mean(:)*180.)
     1017        perennial_co2ice(ig,:) = perennial_co2ice(ig,:) + qsurf(ig,igcm_co2,:) - metam_co2ice_threshold
     1018        qsurf(ig,igcm_co2,:) = metam_co2ice_threshold
    10191019    endif
    10201020enddo
  • trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90

    r3297 r3308  
    158158        write(*,*)'with default value ''ini_huge_h2oice'''
    159159        do ig = 1,ngrid
    160             if (watercaptag(ig)) h2o_ice(ig,:) = ini_huge_h2oice/subslope_dist(ig,:)*cos(pi*def_slope_mean(:)*180.)
     160            if (watercaptag(ig)) h2o_ice(ig,:) = ini_huge_h2oice
    161161        enddo
    162162    else
     
    358358
    359359    ! Stratification (layerings)
    360     write(*,*)'So the stratification (layerings) is initialized with nothing more than the 3 sub-surface strata.'
     360    write(*,*)'So the stratification (layerings) is initialized with only the 3 sub-surface strata.'
    361361    nb_str_max = 3
    362362
     
    365365    write(*,*)'So ''h2o_ice'' is initialized with default value ''ini_huge_h2oice'' where ''watercaptag'' is true.'
    366366    do ig = 1,ngrid
    367         if (watercaptag(ig)) h2o_ice(ig,:) = ini_huge_h2oice/subslope_dist(ig,:)*cos(pi*def_slope_mean(:)*180.)
     367        if (watercaptag(ig)) h2o_ice(ig,:) = ini_huge_h2oice
    368368    enddo
    369369
Note: See TracChangeset for help on using the changeset viewer.