Yes. You can get a legal separation or an annulment (also called a nullity) without having lived in California for six months or your county for three months before filing.
Legal separation. You may have religious, insurance, tax or other reasons for wanting a legal separation instead of a dissolution. If you obtain a legal separation, you and your spouse will remain married, but the court can divide your property and issue orders relating to child custody, visitation, child support and spousal support, and, if necessary, a restraining order.