anchor.diff:  ! Inverse scale outputs
                targets = targets * yscale_absmax
   ! Separate out targets into heating and moistening tendencies
  -             tdel(i,j,kx2:kx) = targets(1:kx2)
  -             qdel(i,j,kx2:kx) = targets(kx2 + 1:kx)
  +             tdel(i,j,kx2ind:kx) = targets(1:kx2)
  +             qdel(i,j,kx2ind:kx) = targets(kx2 + 1:2*kx2)
   ! Correct units (nn trained on K/day and g/kg/day rather than K and kg/kg)
                tdel(i,j,:) = tdel(i,j,:) / 3600. / 24.
                qdel(i,j,:) = qdel(i,j,:) / 3600. / 24. / 1000.
  +! Predicted temperature and humidity tendencies, but actually want the delta T and q
  +! So multiply each by the time step
  +             tdel(i,j,:) = tdel(i,j,:) * dt
  +             qdel(i,j,:) = qdel(i,j,:) * dt
   ! If any humidities would become negative set them to zero (and recalc precip)
                do k=1, kx2
                    qnew_tmp = 0.0
  
positive.code:       ix=size(tin,1)
        jx=size(tin,2)
        kx=size(tin,3)
        kx2 = kx / 2
         do i=1,ix
            do j=1,jx
  ! Initialize variables
  
negative.code: !             prob = 0.
               targets = 0.
  ! Temperature and humidity profiles
               tpc = tin(i,j,kx2ind:kx)
               qpc = qin(i,j,kx2ind:kx)
  
  ! Combine tpc and rpc into a vector of levels (2*N_lev)
               features(1:kx2) = tpc
               features(kx2+1:2*kx2) = qpc
  ! Scale inputs
  ! See http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.MinMaxScaler.html#sklearn.preprocessing.MinMaxScaler.get_params for more info about scaling
  !             features = (features - xscale_min) / (xscale_max - xscale_min)
  