anchor.diff:                                       ps,         &  ! [OUT] Surface Pressure (Pa)
                                        rho(k),     &  ! [OUT] density (kg m^-3)
                                        q(k)        )  ! [OUT] water vapor mixing ratio (kg/kg)
  +
  +          q(k) = max( q(k), 0.0D0 ) ! fix negative value
          enddo
   
          ! Re-Evaluation of temperature from virtual temperature
  
positive.code:                                rho(k),    &  ! [OUT] density (kg m^-3)
                                 q(k),      &  ! [OUT] water vapor mixing ratio (kg/kg)
                                 pert       )  ! [IN ] perturbation switch
         enddo
  
         ! Re-Evaluation of temperature from virtual temperature
  
negative.code:                                       ps,        &  ! [OUT] Surface Pressure (Pa)
                                        rho(k),    &  ! [OUT] density (kg m^-3)
                                        q(k)       )  ! [OUT] water vapor mixing ratio (kg/kg)
  
            q(k) = max( q(k), 0.0D0 ) ! fix negative value
         enddo
  
         ! Re-Evaluation of temperature from virtual temperature
  