Ignore:
Timestamp:
Sep 11, 2024, 4:27:07 PM (3 months 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.v1.5.1/radiation_spartacus_sw.F90

    r5159 r5185  
    494494          end if
    495495
    496           if (config%do_3d_effects .and. &
    497                &  allocated(cloud%inv_cloud_effective_size) .and. &
    498                &  .not. (nreg == 2 .and. cloud%fraction(jcol,jlev) &
     496          if (config%do_3d_effects .AND. &
     497               &  allocated(cloud%inv_cloud_effective_size) .AND. &
     498               &  .not. (nreg == 2 .AND. cloud%fraction(jcol,jlev) &
    499499               &  > 1.0-config%cloud_fraction_threshold)) then
    500500            if (cloud%inv_cloud_effective_size(jcol,jlev) > 0.0_jprb) then
     
    663663            ! 3D effects for any further g-points
    664664            if (ng3D == ng &
    665                  &  .and. od_region(jg,1) > config%max_gas_od_3D) then
     665                 &  .AND. od_region(jg,1) > config%max_gas_od_3D) then
    666666              ng3D = jg-1
    667667            end if
     
    936936        if ((config%i_3d_sw_entrapment == IEntrapmentExplicitNonFractal &
    937937             &  .or. config%i_3d_sw_entrapment == IEntrapmentExplicit) &
    938              &  .and. jlev >= i_cloud_top) then
     938             &  .AND. jlev >= i_cloud_top) then
    939939#else
    940940        if (config%i_3d_sw_entrapment == IEntrapmentExplicitNonFractal &
     
    970970        ! Account for cloud overlap when converting albedo and source
    971971        ! below a layer interface to the equivalent values just above
    972         if (is_clear_sky_layer(jlev) .and. is_clear_sky_layer(jlev-1)) then
     972        if (is_clear_sky_layer(jlev) .AND. is_clear_sky_layer(jlev-1)) then
    973973          ! If both layers are cloud free, this is trivial...
    974974          total_albedo(:,:,:,jlev) = 0.0_jprb
     
    12181218                       &  / max(config%cloud_fraction_threshold, region_fracs(jreg,jlev,jcol))
    12191219                  DO jreg4 = 1,nreg ! VIA first lower region (jreg2 is second lower region)
    1220                     if (.not. (jreg4 == jreg .and. jreg4 /= jreg2)) then
     1220                    if (.not. (jreg4 == jreg .AND. jreg4 /= jreg2)) then
    12211221                      albedo_part(:,jreg3,jreg) = albedo_part(:,jreg3,jreg) + entrapment(:,jreg3,jreg) &
    12221222                           &  * v_matrix(jreg4,jreg,jlev,jcol) * total_albedo_below(:,jreg2,jreg4)
     
    13061306                       &  / max(config%cloud_fraction_threshold, region_fracs(jreg,jlev,jcol))
    13071307                  DO jreg4 = 1,nreg
    1308                     if (.not. (jreg4 == jreg .and. jreg4 /= jreg2)) then
     1308                    if (.not. (jreg4 == jreg .AND. jreg4 /= jreg2)) then
    13091309                     albedo_part(:,jreg3,jreg) = albedo_part(:,jreg3,jreg) + entrapment(:,jreg3,jreg) &
    13101310                           &  * v_matrix(jreg4,jreg,jlev,jcol) * total_albedo_below_direct(:,jreg2,jreg4)
     
    13301330        if ((config%i_3d_sw_entrapment == IEntrapmentExplicitNonFractal &
    13311331             &  .or. config%i_3d_sw_entrapment == IEntrapmentExplicit) &
    1332              &  .and. .not. (is_clear_sky_layer(jlev) .and. is_clear_sky_layer(jlev-1))) then
     1332             &  .AND. .not. (is_clear_sky_layer(jlev) .AND. is_clear_sky_layer(jlev-1))) then
    13331333          ! Horizontal migration distances are averaged when
    13341334          ! applying overlap rules, so equation is
     
    15261526        ! Account for overlap rules in translating fluxes just above
    15271527        ! a layer interface to the values just below
    1528         if (is_clear_sky_layer(jlev) .and. is_clear_sky_layer(jlev+1)) then
     1528        if (is_clear_sky_layer(jlev) .AND. is_clear_sky_layer(jlev+1)) then
    15291529          ! Regions in current layer map directly on to regions in
    15301530          ! layer below
Note: See TracChangeset for help on using the changeset viewer.