NOVELTY - Converting biomass to liquid fuels and cyanobacteria based biofertilizer involves a) directly liquefying biomass feed by hydroprocessing feed to produce hydrocarbon liquids; b) upgrading hydrocarbon liquids to produce liquid fuels and/or chemical feedstocks, and byproduct ammonia; c) producing structured biochar and byproduct CO2 by pyrolysis of biomass residues; d) producing algae including cyanobacteria in photobioreactor (PBR) with use of byproduct CO2 produced by direct liquefaction and/or biochar producing steps; and e) producing biofertilizer incorporating biochar and algae.    USE - For converting biomass to liquid fuels and cyanobacteria based biofertilizer; for optimizing the total carbon and active nitrogen content of a soil for a given crop (claimed); in the production of specific crops.    ADVANTAGE - The method simultaneously controllably increases the chemically active carbon and nitrogen content of the soils; and is econpmically and environmentally attractive. The process reduces carbon dioxide emissions coupled with the efficient use of the CO2, carbon and inorganic byproducts. The method provides highly efficient integrated biomass to liquids (IBTL) process scheme for producing both liquids, such as premium fuels and chemical feedstocks, and self-replicating biofertilizers that reduce, or even eliminate, the carbon footprint of the integrated process. The pore size of the biochar can be controlled such that the water or other beneficial constituents are released into the soil at a roughly controlled rate, thereby providing a timed release function. The method reduces, or eliminates the CO2 footprint of the overall IBTL process on a lifecycle basis and increases the fertility of the soil for plant growth.    DETAILED DESCRIPTION - Converting biomass to liquid fuels and cyanobacteria based biofertilizer involves a) directly liquefying a biomass feed by hydroprocessing the feed under conditions and for a time sufficient for producing hydrocarbon liquids; b) upgrading hydrocarbon liquids produced by step a) to produce liquid fuels and/or chemical feedstocks, and byproduct ammonia; c) producing structured biochar and byproduct CO2 by pyrolysis of biomass residues produced in step a); d) producing algae including cyanobacteria in a photobioreactor (PBR) with the use of byproduct CO2 produced by one or both of the direct liquefaction and biochar producing steps; and e) producing a biofertilizer incorporating biochar and algae produced in steps c) and d). INDEPENDENT CLAIMS are included for the following:    (1) optimizing the total carbon and active nitrogen content of a soil for a given crop involving treating soil with a biofertilizer containing combination of cyanobacteria, diazotrophic microorganisms and structured biochar, where the ratio of cyanobacteria to diazotrophic microorganisms in the biofertilizer is selected so as to achieve desired total chemically active carbon and nitrogen contents in the soil; and    (2) a biofertilizer having a composition comprising algae, diazotrophic microorganisms and structured biochar.