anchor.diff:            !Current highest surface pressure is 1030 hPa.
             IF (local_srf(1) .GT. MAXVAL(re_srf)) local_srf(1) = MAXVAL(re_srf)
             !Bringing clouds heights to highest available pressure if needed. We avoid extrapolation
  -          !Current highest cloud pressure is 1000 hPa.
  +          !Current highest cloud pressure is 1030 hPa.
             IF ( local_cld(1) .GT. MAXVAL(re_cld) ) local_cld(1) = MAXVAL(re_cld)
  +          !Be sure that clouds are below lower cloud pressure. (Ap, Bp calculation
  +          !of pressures above 350 hPa breaks down). Current lowest pressure 350 hPa ~8 km
  +          IF ( local_cld(1) .LT. MINVAL(re_cld) ) local_cld(1) = MINVAL(re_cld)
             !Be sure that clouds are above or at the surface.
             IF ( local_cld(1) .GT. local_srf(1) ) local_cld(1) = local_srf(1)
   
  
positive.code:        wav_dim, wav_maxdim
    INTEGER(HSIZE_T), DIMENSION(2) :: Sb_clr_dim, Sb_clr_maxdim, &
         alt_lev_dim, alt_lev_maxdim, &
         alt_lay_dim, alt_lay_maxdim
    INTEGER(HSIZE_T), DIMENSION(3) :: Sb_cld_dim, Sb_cld_maxdim, &
         air_dim, air_maxdim, tem_dim, tem_maxdim
    INTEGER(HSIZE_T), DIMENSION(4) :: I0_clr_dim,  I0_clr_maxdim
    INTEGER(HSIZE_T), DIMENSION(5) :: I0_cld_dim,  I0_cld_maxdim
    INTEGER(HSIZE_T), DIMENSION(6) :: dI0_clr_dim,  dI0_clr_maxdim, &
         dI0_cld_dim, dI0_cld_maxdim
  
    ! ---------
    ! PCF stuff
  
negative.code:                            linInterpol(INT(alb_dim(1),KIND=i4), re_alb, &
                             sw_clear_5D(srf_dim(1)+1-isrf,ialt,1:alb_dim(1),vza_dim(1)+1-ivza,sza_dim(1)+1-isza), &
                             local_alb(1), status=status)
                     END DO
                     ! --------------------------------------
                     ! Cloud sky
                     ! --------------------------------------
                     DO icld = 1, clp_dim(1)
                        sw_cloud_4D(ialt,clp_dim(1)+1-icld,vza_dim(1)+1-ivza,sza_dim(1)+1-isza) = &
                             REAL( lut_dI0_cld(toms_idx,ialt,icld,ivza,isza), KIND=r8 ) + &
                             REAL( lut_dI1_cld(toms_idx,ialt,icld,ivza,isza), KIND=r8 ) * cos( local_raa(1) ) + &
                             REAL( lut_dI2_cld(toms_idx,ialt,icld,ivza,isza), KIND=r8 ) * cos(2.0_r8 * local_raa(1) )
                     END DO
                     ! -------------------------------------
                     ! Interpolate to local surface pressure
                     ! If cloud pressure is greater than
                     ! surface pressure then cloud SW are to
                     ! be cero.
                     ! -------------------------------------
                  CALL ezspline_1d_interpolation (INT(srf_dim(1),KIND=i4), re_srf, &
                       sw_clear_4D(1:srf_dim(1),ialt,vza_dim(1)+1-ivza,sza_dim(1)+1-isza), &
                       one, local_srf(1), &
                       sw_clear_3D(ialt,vza_dim(1)+1-ivza,sza_dim(1)+1-isza), status)
                  CALL ezspline_1d_interpolation (INT(clp_dim(1),KIND=i4), re_cld, &
                       sw_cloud_4D(ialt,1:clp_dim(1),vza_dim(1)+1-ivza,sza_dim(1)+1-isza), &
                       one, local_cld(1), &
                       sw_cloud_3D(ialt,vza_dim(1)+1-ivza,sza_dim(1)+1-isza), status)
                  END DO ! End VZA loop
                  ! ------------------------
                  ! Interpolate to local VZA
  