Ignore:
Timestamp:
Nov 17, 2023, 1:15:00 PM (14 months ago)
Author:
jbclement
Message:

Mars PCM:
Correction of a bug related to r3126: 'choice_ads' did not have a default value which made the model crash. 'choice_ads = 0' is the default value (no adsorption).
JBC

Location:
trunk/LMDZ.MARS/libf/phymars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/conf_phys.F

    r3126 r3128  
    10101010
    10111011! Adsorption
    1012          adsorption_soil = .false.
     1012         adsorption_soil = .false. ! default value
    10131013         call getin_p("adsorption_soil",adsorption_soil)
    10141014         if (adsorption_soil .and. (.not. water)) then
     
    10181018         endif 
    10191019
    1020          if(adsorption_soil) choice_ads = 1
     1020         choice_ads = 0 ! default value (no adsorption)
     1021         if (adsorption_soil) choice_ads = 1
    10211022         call getin_p("choice_ads",choice_ads)
    10221023           
  • trunk/LMDZ.MARS/libf/phymars/soilwater.F90

    r3126 r3128  
    1 
    21subroutine soilwater(ngrid, nlayer, nq, nsoil, nqsoil, ptsrf,tsoil, ptimestep,  &
    32      exchange, qsat_surf, pq, pa, pb, pc, pd, pdqsdifpot, pqsurf,  &
     
    375374                              endif
    376375
    377                               if(choice_ads .ne. 3) adswater(ig, ik) = min(Ka(ig, ik) / Kd(ig, ik) * znsoil(ig, ik), adswater_sat)
     376                              if(choice_ads .ne. 0) adswater(ig, ik) = min(Ka(ig, ik) / Kd(ig, ik) * znsoil(ig, ik), adswater_sat)
    378377                             
    379378                        else  ! in 3D simulations initialisation happens with newstart.F
     
    383382                        endif
    384383
    385                         if (choice_ads.eq.3) then ! no adsorption
     384                        if (choice_ads.eq.0) then ! no adsorption
    386385
    387386                               Ka(:, :) = 0.
     
    601600                  ! calculate the amount of water vapor at adorption saturation
    602601                 
    603                   if (choice_ads.ne.3) nsat(ig, ik) = adswater_sat * Kd(ig, ik) / Ka(ig, ik)
     602                  if (choice_ads.ne.0) nsat(ig, ik) = adswater_sat * Kd(ig, ik) / Ka(ig, ik)
    604603
    605604                  ! calculate C, E, and F coefficients for later calculations
     
    12991298                 
    13001299                  ! calculate how close the water vapor content is to saturizing the adsorbed water
    1301                   if (choice_ads.ne.3) preduite(ig, ik) = znsoil(ig, ik) / nsat(ig, ik)
     1300                  if (choice_ads.ne.0) preduite(ig, ik) = znsoil(ig, ik) / nsat(ig, ik)
    13021301                 
    13031302                  ! write the results to the return variable
Note: See TracChangeset for help on using the changeset viewer.