Before you rip up the carpet, you may want to try "OdorXit".
Gary Sullivan, our local home improvement guy strongly recommends this on his radio talk show. I was kinda skeptical and the product seemed a little pricey but I learned from experience it's well worth ever penny!
When we returned home from an 8 day vacation back in June, I opened the door to the smell of cat urine so strong I almost "tossed my cookies"!
We have two cats. Our cat sitter "forgot" to come over to take care of the cats for the full 8 days! Now don't worry, they had plenty of food...they chewed a hole in the bag of cat food I had left on the kitchen table and fresh running water. The male cat will only drink from the bathtub faucet. I left a trickle of water running in the tub.
The problem was the litter box. They are both very particular and demand clean boxes. Without clean boxes, they urinated all over the carpet in several rooms. I quickly ordered some OdorXit from their website. Fortunately, they had a sales rep about 10 miles from my house. I blotted up as much of the urine as I could than saturated the areas with the OdorXit. After two applications, you couldn't detect any smell at all!
It also works great on coolers and refrigerators with food odors. You may want to check it out!