Changeset 3333


Ignore:
Timestamp:
May 17, 2024, 11:30:17 AM (7 months ago)
Author:
llange
Message:

Mars PCM
Fixing a bug in vdif_cd: a "residual", used as criterion to enter an iterative loop, was wrongly initialized. Hence, for some points, the algorithm does not go into the loop, and a wrong value of Cd, Ch was computed.
Also some cleaning/small fixing with save variables with OMP.

LL

Location:
trunk/LMDZ.MARS
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/changelog.txt

    r3325 r3333  
    46304630Some modifications in vdifc and pbl_parameters to include the effect of water buoyoncy on the sublimation of water ice.
    46314631Note: it only works with paleoclimate = .true. (since the model is not tuned with that ...).
     4632
     4633== 17/05/2024 == LL
     4634Fixing a bug in vdif_cd: a "residual", used as criterion to enter an iterative loop, was wrongly initialized. Hence, for some points, the algorithm does not go into the loop, and a wrong value of Cd, Ch was computed.
     4635Also some cleaning/small fixing with save variables with OMP.
  • trunk/LMDZ.MARS/libf/phymars/conf_phys.F

    r3325 r3333  
    376376         write(*,*)"albedo_perennialco2 = ",albedo_perennialco2
    377377
    378          write(*,*)"Using lag layer??"
    379          lag_layer=.false.
     378         write(*,*)"Include water buoyancy effect??"
     379         include_waterbuoyancy=.false.
    380380         call getin_p("include_waterbuoyancy",include_waterbuoyancy)
    381381         write(*,*) "include_waterbuoyancy = ", include_waterbuoyancy
  • trunk/LMDZ.MARS/libf/phymars/paleoclimate_mod.F90

    r3325 r3333  
    2020    real,    save                              :: albedo_perennialco2     ! Albedo for perennial co2 ice [1]
    2121    logical, save                              :: lag_layer               ! Does lag layer is present?
    22     logical, save                              :: include_waterbuoyancy    ! Include the effect of water buoyancy when computing the sublimation of water ice ?
    23 !$OMP THREADPRIVATE(h2o_ice_depth,d_coef,lag_co2_ice,albedo_perennialco2,include_waterbuoyancy)
     22    logical, save                              :: include_waterbuoyancy   ! Include the effect of water buoyancy when computing the sublimation of water ice ?
     23!$OMP THREADPRIVATE(h2o_ice_depth,lag_co2_ice,d_coef,albedo_perennialco2,lag_layer,include_waterbuoyancy)
    2424
    2525!=======================================================================
  • trunk/LMDZ.MARS/libf/phymars/vdif_cd_mod.F90

    r3325 r3333  
    157157      pcdh(:,:) = 0.
    158158      z0t(:,:) = 0.
     159      fm(:,:) = 0.
     160      fh(:,:) = 0.
    159161      f_ri_cd_min = 0.01
    160162! this formulation assumes alphah=1., implying betah=betam
     
    203205            DO ig=1,ngrid
    204206               ite = 0.
    205                residual = abs(pz0tcomp(ig)-pz0t)
     207               residual = 100*tol_iter*pz0(ig)
    206208               z1z0=pz(ig,1)/pz0(ig)
    207209               cdn(ig)=karman/log(z1z0)
    208210               cdn(ig)=cdn(ig)*cdn(ig)
    209            
    210211               DO WHILE((residual .gt. tol_iter*pz0(ig)) .and.  (ite .lt. itemax))
    211212! Computations of z0T; iterated until z0T converges 
     
    225226                      rib_dry(ig,islope) = ric_colaitis
    226227                   ENDIF
    227        
    228228! Compute the stability functions fm; fh depending on the stability of the surface layer
    229229
Note: See TracChangeset for help on using the changeset viewer.