Ignore:
Timestamp:
Sep 11, 2024, 4:27:07 PM (9 days ago)
Author:
abarral
Message:

Replace REPROBUS CPP KEY by logical using handmade wonky wrapper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad/radiation/radiation_spartacus_sw.F90

    r5159 r5185  
    493493          end if
    494494
    495           if (config%do_3d_effects .and. &
    496                &  allocated(cloud%inv_cloud_effective_size) .and. &
    497                &  .not. (nreg == 2 .and. cloud%fraction(jcol,jlev) &
     495          if (config%do_3d_effects .AND. &
     496               &  allocated(cloud%inv_cloud_effective_size) .AND. &
     497               &  .not. (nreg == 2 .AND. cloud%fraction(jcol,jlev) &
    498498               &  > 1.0-config%cloud_fraction_threshold)) then
    499499            if (cloud%inv_cloud_effective_size(jcol,jlev) > 0.0_jprb) then
     
    662662            ! 3D effects for any further g-points
    663663            if (ng3D == ng &
    664                  &  .and. od_region(jg,1) > config%max_gas_od_3D) then
     664                 &  .AND. od_region(jg,1) > config%max_gas_od_3D) then
    665665              ng3D = jg-1
    666666            end if
     
    935935        if ((config%i_3d_sw_entrapment == IEntrapmentExplicitNonFractal &
    936936             &  .or. config%i_3d_sw_entrapment == IEntrapmentExplicit) &
    937              &  .and. jlev >= i_cloud_top) then
     937             &  .AND. jlev >= i_cloud_top) then
    938938#else
    939939        if (config%i_3d_sw_entrapment == IEntrapmentExplicitNonFractal &
     
    969969        ! Account for cloud overlap when converting albedo and source
    970970        ! below a layer interface to the equivalent values just above
    971         if (is_clear_sky_layer(jlev) .and. is_clear_sky_layer(jlev-1)) then
     971        if (is_clear_sky_layer(jlev) .AND. is_clear_sky_layer(jlev-1)) then
    972972          ! If both layers are cloud free, this is trivial...
    973973          total_albedo(:,:,:,jlev) = 0.0_jprb
     
    12171217                       &  / max(config%cloud_fraction_threshold, region_fracs(jreg,jlev,jcol))
    12181218                  DO jreg4 = 1,nreg ! VIA first lower region (jreg2 is second lower region)
    1219                     if (.not. (jreg4 == jreg .and. jreg4 /= jreg2)) then
     1219                    if (.not. (jreg4 == jreg .AND. jreg4 /= jreg2)) then
    12201220                      albedo_part(:,jreg3,jreg) = albedo_part(:,jreg3,jreg) + entrapment(:,jreg3,jreg) &
    12211221                           &  * v_matrix(jreg4,jreg,jlev,jcol) * total_albedo_below(:,jreg2,jreg4)
     
    13051305                       &  / max(config%cloud_fraction_threshold, region_fracs(jreg,jlev,jcol))
    13061306                  DO jreg4 = 1,nreg
    1307                     if (.not. (jreg4 == jreg .and. jreg4 /= jreg2)) then
     1307                    if (.not. (jreg4 == jreg .AND. jreg4 /= jreg2)) then
    13081308                     albedo_part(:,jreg3,jreg) = albedo_part(:,jreg3,jreg) + entrapment(:,jreg3,jreg) &
    13091309                           &  * v_matrix(jreg4,jreg,jlev,jcol) * total_albedo_below_direct(:,jreg2,jreg4)
     
    13291329        if ((config%i_3d_sw_entrapment == IEntrapmentExplicitNonFractal &
    13301330             &  .or. config%i_3d_sw_entrapment == IEntrapmentExplicit) &
    1331              &  .and. .not. (is_clear_sky_layer(jlev) .and. is_clear_sky_layer(jlev-1))) then
     1331             &  .AND. .not. (is_clear_sky_layer(jlev) .AND. is_clear_sky_layer(jlev-1))) then
    13321332          ! Horizontal migration distances are averaged when
    13331333          ! applying overlap rules, so equation is
     
    15251525        ! Account for overlap rules in translating fluxes just above
    15261526        ! a layer interface to the values just below
    1527         if (is_clear_sky_layer(jlev) .and. is_clear_sky_layer(jlev+1)) then
     1527        if (is_clear_sky_layer(jlev) .AND. is_clear_sky_layer(jlev+1)) then
    15281528          ! Regions in current layer map directly on to regions in
    15291529          ! layer below
Note: See TracChangeset for help on using the changeset viewer.