There are a range of answers to that.I have been working on the chemistry of nitrogen-bearing caliche, especially where it overlies copper deposits. Caliche can be a sponge for many elements, and provide a detailed record of different sources over time. Hope this helps for starters, and good luck!
I also suggest reading the following:
Chong G., (1994) The nitrate deposits of Chile, In: Reutter, K.J., Scheuber, E., Wigger, P.J. (Eds.), Tectonics of the Southern central Andes: Structure and evolution of an active continental margin. Springer-Verlag, New York. pp. 303-316.
Ericksen, G.E., Hosterman, J.W., St. Amand, P., (1988) Chemistry, mineralogy, and origin of the clay-hill nitrate deposits, Amargosa River valley, Death Valley region, California, U.S.A. Chem. Geol. 67, 85-102.
Michalski, G., Böhlke, J.K., Thiemens, M., (2004) Long term atmospheric deposition as the source of nitrate and other salts in the Atacama Desert, Chile: New evidence from mass-independent oxygen isotopic compositions. Geochim. Cosmochim. Acta 68, 4023-4038.
Ericksen, G.E., (1981) Geology and origin of the Chilean nitrate deposits, U.S. Geological Survey Professional Paper 1188.