CLM: Fun with aerial imagery (1) (9 Feb 2015)

One of the basic challenges of any land management agency is figuring out what’s out there. The BLM Las Cruces District manages 5.4 million acres of public land. Although I do my best to get outside and visit as much of it as I can, that’s a lot of land to cover. There are many GIS layers we can use to get around this problem and understand what’s happening on the landscape in areas we can’t personally visit and experience, but one of the most informative is aerial imagery. Trying to understand aerial imagery is also, in my opinion, just about the most challenging and entertaining thing you can do with maps! My basic process in training myself to understand aerial imagery is to stare at maps for a while, guess what I’m looking at, and then go outside and see if I’m correct. Sometimes this is part of my job, sometimes this is just what I do for fun. Once you get a good sense of the relative scale of the different shrubs, what grasses to expect in what context, and the like, you can get a surprising amount of information from aerial imagery and, in reference to Stillman‘s recent post on this blog, sometimes you can even make out the stems of ocotillo from aerial imagery! Of course, there are still many things you can’t understand without being out on the ground.

There are also various programs that implement basically the same approach in an automated computational framework. LANDFIRE, for instance, produces vegetation maps by taking vegetation plot data and then running GIS wizardry to interpolate and classify all of the areas between the plots. That’s useful, but not nearly as much fun. So here are some examples of what plant communities look like in aerial imagery vs. what they look like on the ground. I’m anticipating doing a few more posts like this, hence the “1″ in the title of this post.

In the Las Cruces District, most of our vegetation is grassland or shrubland. Our two most abundant shrubs are Larrea tridentata (creosote bush) and Prosopis glandulosa (honey mesquite). Many of our grasses, especially Dasyochloa pulchella and Muhlenbergia porteri, are typically abundant hidden within either of these, or in the interspaces of shrubland rather than occurring as grassland. Our most abundant perennial “grassland” grasses include Pleuraphis mutica (tobosa), Scleropogon brevifolius (burrograss), Sporobolus flexuosus (mesa dropseed), and Bouteloua eriopoda (black grama). We also have a few ubiquitous annual grasses that sometimes form annual grasslands, most notably Aristida adscensionis (sixweeks threeawn). This is what they look like:

Larrea tridentata shrubland, on the ground:


Same site from the air:


Larrea tridentata shrubland, on the ground:


Same site from the air:


Prosopis glandulosa shrubland, on the ground:


Same site from the air:


Prosopis glandulosa shrubland, on the ground:


Same site from the air:


Pleuraphis mutica grassland, on the ground:


Same site from the air:


Pleuraphis mutica grassland, on the ground:


Same site from the air:


Scleropogon brevifolius grassland, on the ground:


Same site from the air:


Scleropogon brevifolius grassland, on the ground:


Same site from the air:


Sporobolus flexuosus grassland, on the ground:


Same site from the air:


Sporobolus flexuosus grassland, on the ground:


Same site from the air:


Bouteloua eriopoda grassland, on the ground:


Same site from the air:


Aristida adscensionis grassland, on the ground:


Same site from the air:


In that last aerial image, you might notice that Aristida adscensionis is basically invisible in aerial imagery, but looks like a thick carpet on the ground. The aerial photograph might have been taken in a dry year, or during the middle of summer when most of the annual grasses have dried up and blown away, or Aristida adscensionis might just be too diffuse to ever be visible in aerial imagery–it tends to form fairly uniform stands that don’t offer a whole lot of contrast. Yucca elata, on the other hand, is fairly sparse but stands out prominently in the aerial imagery–that’s what most of the dark blobs are, and in a few you can tell from the shadows that you are indeed looking at relatively tall, narrow plants (at least, if you click & open the full-size image!). The smaller dark speckles in there are a mixture of sparse perennial grasses (Sporobolus airoides and Sporobolus flexuosus), perennial forbs (mostly Croton pottsii), and small shrubs (Ephedra trifurca, some small, young Prosopis glandulosa) but not very intelligible in the aerial imagery. In the next post, I think I will dive into the various flavors of Prosopis glandulosa shrubland.

All aerial imagery is via Google, using screenshots from Gmap4.

CLM: Where I’ve been in the last year (13 Jan 2015)

A brief post this month. As we begin a new year, I decided to create a map of where I’ve been in the last one. Well, OK, I also included a few places I’ve visited so far this year; close enough. So, here it is:

I’ve highlighted the counties of the Las Cruces District Office in red. Each of those blue dots is a place where I’ve taken a picture and recorded what plants were there. About half of those dots are places I visited as part of my CLM internship, the other half are mostly recreational botanizing with a few trips that were part of my old job, before I started my internship, thrown in. I am steadily moving towards my goal of having been just about everywhere in southwestern New Mexico, but it’s a big place and I don’t think I’m going to run out of destinations any time soon. I’ve been here a decade and have still only visited 174 of the LCDO’s 608 grazing allotments, for instance. One of the things I’m really enjoying about working with the BLM is that it gives me a good excuse to go to a lot of places most botanists would never bother with. For instance, wandering around in mesquite shrubland for a few weeks is not very high on the priority list for most botanists, but I enjoy it and now I have more reason to do it. Looking at this map, I’m also remembering that I need to put more labels and legends on maps. Perhaps some people don’t immediately recognize, say, the outline of Otero County. Oh well.

In the coming year, I think I’ll start posting about plant communities and interpretation of aerial imagery. Examining aerial imagery and trying to figure out what you’re looking at is one of the most enjoyable mental puzzles out there, in my opinion, and also on my list of “fun things I get to do more often with the BLM”. Admittedly, I already spent what most would probably consider an unfathomable amount of time staring at maps!

CLM: More scurfpeas and Nerisyrenia hypercorax (10 Dec 2014)

As of 2008 there were only two known populations of Pediomelum pentaphyllum, one in southwestern New Mexico and one in southeastern Arizona. Other populations had been reported in the past, but either could not be found in recent surveys or had sufficiently vague localities that no one was really sure where to search. I mentioned one of those vague localities in a previous post here, a Mexican Boundary Survey specimen that was collected in the general vicinity of the Rio Grande somewhere between Doña Ana and Big Bend. It could be in New Mexico, Texas or Chihuahua–good luck! In 2008, Pediomelum pentaphyllum was petitioned for listing under the Endangered Species Act based, in part, on this very limited distribution. Here’s an approximate map of the known populations in 2008:

Over the next few years, more searches were made. My first, very brief, work with the BLM was one of these, wandering around for a couple of weeks and finding all kinds of fun plants but no Pediomelum pentaphyllum whatsoever. A couple of botanists in Arizona (Marc Baker and Laura Pavliscak) did succeed in finding a couple of new populations (or one bigger population, depending on how you want to look at it; “population” is essentially an undefined term!), though. So, that puts us up to threeish populations:

However, this year either conditions were better, the botanists conducting surveys were better, or (most likely) we were just plain lucky! More populations in Arizona and New Mexico were found by myself, Joneen Cockman of the Safford Field Office, and our associated field crews. I don’t know how you might count the number of populations at this point but the gist is there are a fair number of them–and more being found, last I heard from Joneen! Pediomelum pentaphyllum is starting to look a bit less rare:

Just in case you’ve forgotten what Pediomelum pentaphyllum looks like, here are a few more pictures of it:

And here’s what the habitat looks like for several of the new populations. Try spotting the Pediomelum pentaphyllum–there’s at least one in each photo!

I think we’re starting to get a better idea of the habitat Pediomelum pentaphyllum likes. All of the new populations found this year were in loose, sandy soil with Prosopis glandulosa and “other shrubs”. The other shrubs could be Artemisia filifolia, Atriplex canescens, Atriplex polycarpa, Lycium pallidum, or Larrea tridentata–but in any case it’s not just our typical boring mesquite shrubland. Hopefully, as we continue to refine our idea of good Pediomelum pentaphyllum habitat, we’ll be able to keep finding more populations and have a better idea of where it isn’t going to be found as well. I also learned this year that some populations of Pediomelum pentaphyllum are guarded by Crotalus scutulatus:

The other exciting development here is that Nerisyrenia hypercorax, a new species we (Michael Moore, Norm Douglas, Helga Ochoterena, Hilda Flores-Olvera, and I) discovered last year on the west side of the Guadalupe Mountains, has been published in the Journal of the Botanical Research Institute of Texas. There’s also an episode of Plants are Cool, Too! that includes this species. Nerisyrenia hypercorax is a gypsophile, meaning it occurs only on soils high in hydrated calcium sulfate, a.k.a. gypsum. As you may have guessed from my post about Alkali Lakes, gypsum in New Mexico is home to a whole slew of rare plants and makes for excellent botanizing–at least, provided you avoid some of the worst of summer heat, which seems to be amplified on gypseous soils! We keep finding new species on gypsum–Michael Howard, our soon-to-be-retired state botanist, found another new gypsophilic plant (Linum allredii) just a couple years ago. And, of course, I have pictures of Nerisyrenia hypercorax:

And of its habitat:

CLM: Alkali Lakes (6 Nov 2014)

There have been some more exciting developments in the land of Pediomelum pentaphyllum, which I’ll probably discuss in more detail in my next post. The short version is that there were previously two broadly-defined populations known in Arizona. Now there are, depending on how broadly you want to define them, four or five! Put that on top of the new population we found in New Mexico, and we’ve gone from three populations to six (or seven) this year. It’s still rare, but it’s looking like Pediomelum pentaphyllum is at least in better shape than we thought. For the next few days, I’m going to go look for more–amazingly, they’re still up, at least in southeastern Arizona. This goes on my list of reasons I love the southwest. Not too many places have good botanizing in November!

For the moment, here are some photographs of another rare plant in the Las Cruces District. On the 21st of October, I went out to Alkali Lakes to tag along on a research trip by Evelyn Williams of the Chicago Botanic Garden. Evelyn has been studying Lepidospartum burgessii. This is a rare shrub found only on gypsum, in two populations on the west side of the Guadalupe Mountains (one in New Mexico, one in Texas) that has been the focus of research on both its population genetics and reproductions. It rarely (if ever) produces viable seed and has been difficult to propagate from cuttings, but we might have gotten some good seed on this trip–the rate of apparently well-developed fruits is very low, but perhaps it isn’t zero.

The New Mexico population is at the Alkali Lakes Area of Critical Environmental Concern, an area of low hills of gypseous clay around low, dry depressions (a.k.a. “lakes”). Lepidospartum burgessii is not an immediately appealling plant. From a distance, it looks like a fairly anonymous grey shrub:

On closer inspection, though… well, it still looks like a fairly boring shrub, to be perfectly honest, but it does have nice little yellow flowers rather like those of Ericameria nauseosa:

Later, it has nice fluffy pappus which is attached (unfortunately) to mostly shriveled empty fruits:

The Alkali Lakes is also home to a variety of other uncommon plants that are found only on gypsum, including Senecio warnockii:

And Mentzelia humilis var. humilis:

Another rare plant in the area, although not an obligate gypsophile, is Coryphantha robustispina var. scheeri:

Alkali Lakes is also a beautiful place!

CLM: Scurfpeas (10 Oct 2014)

I spent the previous five weeks walking the desert surveying for rare plants. As I’ve mentioned before, I was doing surveys for rare plants on areas where herbicide treatments intended to restore grassland in areas that have been converted to shrubland through grazing as part of the Restore New Mexico program. In my previous posts on the subject, I’ve mostly talked about Peniocereus greggii, partly because that is all I was finding and partly because that is all I expected to find. However, since then we’ve found the other, and much more exciting, of our target species: Pediomelum pentaphyllum, a.k.a. Chihuahuan scurfpea, a.k.a. (for those who like USDA codes) PEPE27!

Pediomelum pentaphyllum is quite rare. As of 2008, there were a grand total of two known populations, one near the small community of Sunizona in southeastern Arizona and one in Hachita Valley in southwestern New Mexico. In 2010, a third population was found, southeast of Safford in southeastern Arizona. These three populations gave us a total of around 2,000 known individuals. There are also historical records from additional sites in southeastern Arizona, northern Chihuahua, and, maybe, western Texas. However, searches to rediscover these additional populations have failed, and none of them have been seen in the last 50 years. Maybe they’re still out there, who knows?

That western Texas record is a story in itself. A specimen was collected during the United States and Mexican Boundary Survey in 1853, but the locality is very uncertain. The specimen’s label says it was collected “chiefly in the Valley of the Rio Grande, below Doñana”. A note anonymously handwritten in pencil says “Fields nr the Presidio del Norte, August, Presidio Co., Texas”. This presents multiple problems: Doña Ana (in southern New Mexico) and Presidio del Norte (now called Ojinaga) are 240 miles apart; Ojinaga is in Chihuahua, Mexico, not Texas (although of course “fields near” Ojinaga might be in Texas); we have no idea where that “Fields nr the Presidio del Norte” locality comes from or on what basis we should take it to be accurate. That last problem turns out to be relatively easily solved. The “Presidio del Norte” locality comes from the Report on the United States and Mexican Boundary Survey. We’re still left with the first two problems and no good way to resolve them. I’ve encountered this kind of confusion before; specimens from the boundary survey have one locality on the specimen label and a different locality in the report and you don’t know which one (if any) is correct. So far as I can tell, locality information on boundary survey specimens just isn’t particularly reliable. So, we don’t know if that specimen came from New Mexico, Texas, or Chihuahua and it is our only basis for believing Pediomelum pentaphyllum has ever been seen in Texas. Ugh. By the way, you can see this specimen for yourself:

It’s amazing how easily things like this can be tracked down these days. The report is online, a photograph of the specimen is online, it’s all right there! I’m still left with an irritating uncertainty, but at least it didn’t take me weeks of waiting for letters back and forth and schlepping things from the library.

OK, back to Pediomelum pentaphyllum. It’s rare, and most of the surveys for it have come up empty-handed. I did a couple of weeks of surveying back in 2010, for instance, during which I did not see a single individual except for a few at the Hachita Valley population to familiarize myself with the species at a known population. More extensive surveys for the Restore New Mexico program in 2012 had the same result. For this year’s surveys, I basically expected that we’d get to wander around in the desert for a few weeks, see some wonderful places, put a couple hundred miles on our shoes, and not see any Pediomelum pentaphyllum. So it took a while for me to believe what I was seeing when I stumbled across the first one:

And another:

And another:

By the end of the day, the crew and I had found 29 of them. By the end of the survey, we had found about 270 across an area about 8 miles long and 2 miles wide northwest of Lordsburg on Lordsburg Mesa. Now we have four known, extant populations of Pediomelum pentaphyllum. This should also help us determine what habitat it likes. Our new population was in looser, dunier sand than the previously known populations, in Prosopis glandulosa / Atriplex canescens / Artemisia filifolia shrubland with a number of sand specialist plants that are uncommon in the area, including Amaranthus acanthochiton, Heliotropium convolvulaceum, Chamaesyce parryi, and Dalea lanata var. terminalis. Conveniently his habitat is fairly easy to spot on aerial imagery, so I’ve put together a list of similar areas to check. Maybe we can find a fifth population!

Some of the Pediomelum pentaphyllum was in flower, too, allowing me finally to get a good series of photographs of it:

Other notable events in the field surveys:

First, I had the best field crew ever. Seriously, these folks were awesome. Here’s one of them (Jeanne Tenorio) taking notes Pediomelum pentaphyllum:

Second, we found a lot more Peniocereus greggii as well. I’ll spare you all the photos of them… at least for now.

Third, we found a bunch of other uncommon species, including four that are new records for Luna County, New Mexico: Simsia lagasceiformis, Mortonia scabrella, Ipomoea cardiophylla, and Anoda pentaschista. I also got to photograph a half-dozen species I hadn’t photographed before.

Fourth, we got stuck in the mud a couple more times. I forgot to take a picture of the first one, but here’s the second:

That’s the Mexican border at the left. On the border road, they’ve put in concrete blocks through the muddier parts and I was hoping these would be shallow enough that we wouldn’t just sink into the mud. I was wrong. Luckily, we had two vehicles and the second could quickly pull us out.

QGIS errata

I encountered an odd and frustrating problem with QGIS and figured I’d post here in case others run into it and need a solution.

Using QGIS 2.4 and 2.6 (both from kyngchaos binaries) under Mac OS-X 10.8.2, if I enable the “Render as HTML” option for a text label in the Print Composer, printing and exporting images of the map no longer works. If I click the appropriate buttons, I can very briefly see the save image dialogue box start to pop up, and immediately disappear. Sometimes, if I click the “Export as image” button several times in rapid succession, the save image dialogue will successfully open. This does not, however, work with the “Print”, “Print Atlas”, or “Export Atlas as images” buttons. Uncheck the “Render as HTML” box, and everything works just fine–well, except that I can’t render html!

I tried a few things: upgrading to the most recent QGIS, downloading various possibly-necessary Python modules, changing various settings that seemed like they might be relevant, and searching online to see if anyone else had solved the problem. No dice… until I changed the blending mode for the text label. It doesn’t seem to matter what I change it to. I can even change it back to the default, “Normal” blending mode. Any change whatsoever to the blending mode fixes the problem. Hell if I know why.

More CLM Internship posts…

Because one is short, here are my last two posts on the CLM internship blog:

The Botanical Society of America is encouraging botanists to take selfies with, “I am a botanist!” signs to increase the visibility of botany. These have been all over my facebook newsfeed the last few days. All my friends are doing it, so I’m giving in to peer pressure. Also, since most of the #iamabotanist photos are taken by academics in labs, I figured it was worthwhile to add another kind of botany to the mix.

And the second:

Greetings, all.

I suppose I ought to make a “real” post this month and not just a picture of myself looking silly outside. Right now, I’m gearing up for a month or so of more-or-less constant fieldwork doing more rare plant surveys on proposed herbicide treatments for Restore New Mexico, looking for Pediomelum pentaphyllum and Peniocereus greggii. We’ve hired a short-term field crew through the New Mexico Association of Conservation Districts, placing me at least nominally in charge of 9 people. I think we have an excellent crew assembled; the majority even did similar surveys in 2012 and already know what they’re doing! If I’m lucky, they might not notice that I don’t know what I’m doing!

If nothing else, this is an excellent excuse to wander through the desert. You can never have too many of those. Low elevations in New Mexico don’t immediately grab your attention. The tourists (of which there are, generally, not too many) head up to the mountains for the shady cool of pine trees, the occasional stream, and a relative abundance of green and flowers that do not require a microscope. In winter, if we get any precipitation, you can even ski. Personally, I do not ski because the conditions favorable for this activity are generally incompatible with botanizing, but to each their own. However, the low elevations are generally flat, brown, hot, sunny, desolate and, in the words of the immortal Rooster Cogburn, “nothing else grows but has stickers on it”. In my first few years in New Mexico, I viewed it as “drive-through” country–something that must be crossed between me and the mountains. But after a few years I developed an obsession with the flats, driven if nothing else by the simple questions: “Well, where am I? What is out there?” After subtantial investigation: mostly, yes, it is flat, brown, hot, sunny, and desolate. Occasionally, it is cold, green, steep, or cloudy. Rarely, it rains. You might even find interesting plants. If you enjoy solitude and don’t mind a bit of monotony, walking the Chihuahuan Desert offers a kind of sweaty Zen.

Oh, and I have some pictures. First, one of the Restore New Mexico treatments that I scouted the week before last to get a feel for the landscape before we start surveying. The local rancher accompanied me and was baffled by my objectives. “Just seeing what’s out there,” was not on his radar. “Ooh, this spot might have some interesting plants!” was met with, “That’s just a bunch of weeds.” Que sera and whatnot. But the place was wonderful!

Those familiar with southern New Mexico may be looking at that second photo and thinking to themselves, “Wait… is that Bouteloua eriopoda persisting in sandy soil?” Yes, it is! Black grama used to be the dominant plant in somewhat sandy soils at low elevations but has mostly disappeared after grazing (although it can still be abundant in rockier soils).

Onward to the next adventure; I visited The Rim on the west side of the Guadalupe Mountains with Mike Howard. Here’s what it looks like on the drive in (OK, I took the photo on the way out):

About three fifths of the way across the photograph from the left, you can see some gypsum outcrops. As you draw nearer, the gypsum become more obvious:

The pale bits that look like they have no vegetation? That’s the goal. Walk in further:

And you find some small outcrops of gypseous clay intermingled with limestone:

Keep walking.

By this point it feels like your brain is about to melt out through your ears. However, you have arrived!

That gypsum may look desolate, but it is the home of three plants found only on gypsum on the rim of the Gudalupe Mountains: Anulocaulis leiosolenus var. howardii, Nerisyrenia hypercorax, and Mentzelia humilis var. guadalupensis. Nerisyrenia hypercorax was discovered only a year ago, and the paper describing it is in press at Journal of the Botanical Research Institute of Texas. As of yesterday, the paper includes this site! In addition to these three gypsophiles, there were two other rare plants in the area: Nama xylopodum and Dermatophyllum guadalupense.

Also, in the last few weeks I found some more Peniocereus greggii:

And a cute & friendly rattlesnake (Crotalus viridis):

Who’s next?

Living surrounded by relatively recent geologic catastrophe, I occasionally wonder, “When’s the next one?” I’m in the Basin and Range Province, where every mountain range owes its existence to faults. I’m in the Rio Grande Rift, one of the largest rift valleys in the world. We have several basaltic lava flows and cinder cones nearby, and a slew of igneous mountain ranges. The evidence of volcanism and other geologic calamities is everywhere around me… but should I worry? The faults are there. Some of the lava flows are recent. Who’s next?

Well, I don’t know. Unlike California, where earthquakes reside permanently in the backs of the minds of anyone with an inkling of geologic awareness, or near Yellowstone, which we know will explode disastrously someday, or the Cascade Mountains, with Mount Saint Helens as a constant reminder on the horizon that volcanism is not dead and might well ruin your day… in southern New Mexico I have never heard anyone worry about what our faults are doing or when there might be an eruption. I guess nothing has happened recently enough to worry us. Or the scars of past events are not quite big and spectacular enough. You might think a mile-wide crater from a maar volcano about 30 miles southwest of town might get some attention but hardly anyone in Las Cruces has even heard on Kilbourne Hole, much less visited it or worried about what such explosive potential might mean for our future. Carrizozo, at least, might have reason to be worried with a very recent lava flow just west of town. Yet, if you tried to buy volcano insurance in Carrizozo I suspect you would be met with blank stares by the local insurance agent.

All that above is kind of an excuse to show a really half-assed map:

So, those are the recentish (i.e., not yet buried under sediment) basaltic lava flows I know of in our area. Some (the Grants Malpais and Carrizozo Malpais) are very recent. Maybe we should worry, maybe we shouldn’t, I don’t know. But if I hike Tortugas Mountain on the east side of Las Cruces, I can see on a good day eight igneous mountain ranges, a few isolated cinder cones, a big basaltic lava flow, and five mountain ranges that, although comprised primarily of sedimentary rocks, owe their existence to faults. This ought, at least, to make one wonder. Even if quiescent, the evidence of disaster is around us.

Post-fire seeding

A quick note about seeding, particularly of non-native, often invasive plants after fires.

It’s a bad idea. A really, really bad idea.

Even with natives, I’m not sure that dumping seeds across large areas is a great idea in this context. It will probably dramatically change the species composition of the area in the short term (effectively prolonging the disturbance created by the fire) and might do so in the long term. It has risks that we do not understand.

So, that aside, the risk of dumping non-natives into an area is more obvious. We risk replacing our spectacular native flora with a depauperate one. We risk permanently preventing an area from recovering from a fire. In this case, the fire isn’t the problem. What we do afterwards is the problem. A fire is a temporary disturbance, but an established invasive species is a permanent disturbance.

Unfortunately, post-fire seeding with non-native species remains common. A recent example is the Silver Fire (2013) in the Black Range. It was seeded with Hordeum vulgare, Triticum aestivum, and perhaps various other contaminants. The Hordeum and Triticum probably will not persist. Hopefully this will just be a severe, but temporary, disruption of post-fire succession. But… well, we don’t know. This is a bad idea.

After the Peppin Fire (2004) in the Capitan Mountains, the area was seeded with Psathyrostachys juncea. I first noticed this species in profusion back in 2006. I hoped it was temporary. I visited the area again a few weeks ago. It is still there and abundant, now 10 years on from the fire. At this point, I think it is likely it will be there indefinitely and that this represents a permanent replacement of part of the native flora with an invasive species. This seeding was an extremely bad idea. We should not have allowed this to happen.

Also, both areas contain a number of rare species. For instance, in the Capitan Mountains, the seeded area includes the rare species: Cirsium inornatum, Erigeron rybius, Lupinus sierra-blancae, Geranium dodecatheoides, Penstemon cardinalis, Penstemon neomexicanus, Eriogonum wootonii, Delphinium novomexicanum, Heuchera woodsiaphila, and Heuchera wootonii. There are probably several others. Those are just the rare plants I am certain of because I have seen them there! Why would you introduce an invasive species into an area with a wealth of rare species? We don’t know if Psathyrostachys juncea will have deleterious effects on all or none of these in the long term. But why take that risk?

Further adventures with AHPS and HRAP

So, once I figured out how to deal with the oddball projection, I knew in principle how to deal with precipitation shapefiles provided by NOAA. However, going through each file one-by-one would be a pain. I need to automate this, or at least partially automate it. QGIS comes with a graphical modeler that allows limited automation of tasks, but I quickly found a problem with this–I need to do some reprojection of layers from one custom CRS to another, and the “reproject layer” function available in the graphical modeler does not work with custom CRS.

Fortunately, poking around online I found a simpler solution–use shell scripts and the command line in Terminal. Fortunately, the reprojection tool used in QGIS (ogr2ogr) handles custom CRS just fine–you can just specify the projection in proj4 format and away it goes. So, now all I needed to do is figure out how to get syntax for the parameters and whatnot to work. Luckily, QGIS provides a transcript of what commands it is sending when you run a tool from one of the menus, so I can (mostly) just deal with QGIS and copy-paste from there to an sh file. I ended up with producing a set of four folders (one for the raw shapefiles from AHPS and one for each stage in the process) and three shell scripts, each of which does some needed modification of the layers and puts the output in the next folder. Here are the sh files, first, for reprojecting the AHPS files from the HRAP geographic coordinate system to the HRAP projected coordinate system:

for f in *.shp
do
  echo "Processing $f"
/Library/Frameworks/GDAL.framework/Versions/1.11/Programs/ogr2ogr 
-s_srs "+proj=longlat +a=6371200 +b=6371200 +no_defs" -t_srs 
"+proj=stere +lat_0=90 +lat_ts=60 +lon_0=-105 +k=1
+x_0=0 +y_0=0 +a=6371200 +b=6371200 +to_meter=4762.5 +no_defs" 
../reprojected/$f $f
done

And then rasterization:

for f in *.shp
do
  echo "Processing $f"
/Library/Frameworks/GDAL.framework/Versions/1.11/Programs/gdal_rasterize 
-a Globvalue -tr 1.0 1.0 $f ../rasterized/$f.tif
done

Last, clipping the rasters to a smaller extent so that the collection of files is not unnecessarily large:

for f in *.tif
do
  echo "Processing $f"
/Library/Frameworks/GDAL.framework/Versions/1.11/Programs/gdal_translate 
-of GTiff -projwin -112.0 -1327.0 17.0 -1414.0 $f ../output/$f
done

That all works nicely and allows me to process large numbers of files quickly and efficiently. I’m sure that if I really understood sh (rather than copying the work of others and modifying things without really knowing what I’m doing) I could probably just have an “input” and “output” directory and a single sh file. But this is still pretty efficient and didn’t require too much farting around.