Tuesday, March 3, 2015

VCF Summary

Averaging minimum woody cover along a route per species, only considering when a species occurs, seems to be the best summary metric. In other words, only consider min. values in years when a species is present. This also may have implications for "real" variation of VCF per year. Also, maybe try min. VCF in models?

Monday, March 2, 2015

VCF

I'm right now running a suite of models incorporating VCF, but the results are not looking good. I do wonder if I've picked a bad "summary" metric. I think my summary stats will never improve, because there is not an  option to weight by count. I think the only way I could avoid saturating VCF characterizations would be at a finer spatial scale.

The question then becomes, what will perform better in a model? I'm currently averaging LWM per route over the MODIS timescale (2000-2013). So, a few questions: is change in VCF real or fake (or a combo.)? Real change means succession and/or deforestation over the time period along a route, whereas false change is change in image quality. (If it's only a question of processing i.e. level 5, most recently processed imagery  should suffice and that shouldn't be a problem.)

If the change is interesting, then we should account for it. Thus, it would probably be good to run a separate analysis for VCF over just the MODIS timeline.
    • range LWM = succession/deforestation depending on direction of change?
    • combo. of line vars?
    • ...but also consider a (400m) buffer
    • I may also pick a different subset of images (most recent?)
    • relate to years for MODIS timespan?
    • I had a suggestion of using NLCD for...
      • canopy cover...
      • ...and/or land cover (already summarized?)

    Sunday, February 22, 2015

    Comparison

    While BCR’s are delineated to reflect relative ecosystem homogeneity, fine-scale habitat variation within BCRs also influences avian community assemblages (Kantrud & Kologiski 1983). Upland sandpiper density was highest at intermediate values of PDSI, and declined at extremes, which is similar to the pattern we discovered in exploratory data analysis (Kim et al. 2008). It is also sensible, in that this species is likely well adapted to the climate regime of the BCR, but like many species, able to capitalize when weather slightly differs from normal. By contrast, this same study did not find a significant response of grasshopper sparrow density to either variable. BBS data for grassland birds has also been related to May pond index and PDSI using information-theoretic methods (Niemuth et al. 2008). Horned lark, Sprague’s pipit and grasshopper sparrow responded most strongly to the number of ponds, whereas Baird’s sparrow and vesper sparrow didn’t respond significantly to those drought metrics. The severe heat wave in Europe in 2003 led to significant decline in population growth rate for many species, and was assessed using their Breeding Bird Survey data (Jiguet et al. 2011).

    Friday, February 20, 2015

    New Analysis

    Today, I'm looking at my chapter 1 numbers from a different perspective (i.e. subsequent year response).

    Thursday, February 19, 2015

    RS to Arc

    Now, per last post, let's assume you have a bunch of GeoTIFFs that need to be rasters. Let's switch gears to Python for this one. I have written some code for the python window in Arc that allows you to quickly convert images to GRID.
     import os  
     import arcpy  
     from arcpy import env  
     env.workspace = ""  
     for raster in arcpy.ListRasters():  
        fileName,fileExtension = os.path.splitext(raster)  
        fileNameParts = fileName.split('_') #something useful?  
        arcpy.CopyRaster_management(raster,fileNameParts[0][8:11])  
    
    Make sure you're in the right place and Arc is "seeing" your files by just running arcpy.ListRasters() after you set the work space.

    Wednesday, February 18, 2015

    MODIS

    This will be my first research post on this blog! Yay! Anyway, I'll be copying one of my old posts from the former blog over here. Yesterday, I downloaded VCF 2000-2013, and now I have to finish processing it. As usual, my favorite open source (OS) OS just seems to do this with less mess, so I do all this on our Linux server.

    When you have all your freshly downloaded tiles, you'll notice the 2nd field is the date. I wrote a little script to put in the folder where all your raw files are that takes advantage of that. It makes lists per date it finds in the folder, and mosaics all the tiles for that date. I call it mosaicmadeeasy.sh :)
     #!/bin/bash  
     listofmodisdays=`ls *.hdf | cut -d. -f2 | uniq`  
     for i in $listofmodisdays #for each date...  
     do  
       ls *$i*.hdf > tiles$i  
     #change path for wherever your modis tools are  
       /MRT/bin/mrtmosaic -i tiles$i -o mosaic$i.hdf  
     done  
    
    Now that last line, you may have to mod (no pun intended!) depending on your files. For example, the VCF was too big, so I had to subset before re-projecting (what I usually do). Thus, I had to use the -s option and specify bands (in my case "1 0 0 0 0 0 0"). Once you have your mosaics, if you want to bulk process them, open one using ModisTool and save your .prm file. Then, here's a script for the folder where all the mosaics are (I call it reproj.sh)...
     #!/bin/bash  
     listofmosaics=`ls mosaic*.hdf`  
     for i in $listofmosaics  
     do  
     cat > param.txt << EOF  
     INPUT_FILENAME = $i  
     OUTPUT_FILENAME = "$i.tif"  
     #this needs to be copied from your parameter file  
     SPECTRAL_SUBSET = ( 1 )  
     SPATIAL_SUBSET_TYPE = INPUT_LAT_LONG  
     SPATIAL_SUBSET_UL_CORNER = ( 49.999999996 -171.129620923 )  
     SPATIAL_SUBSET_LR_CORNER = ( 19.999999998 -53.208888618 )  
     RESAMPLING_TYPE = NEAREST_NEIGHBOR  
     OUTPUT_PROJECTION_TYPE = GEO  
     OUTPUT_PROJECTION_PARAMETERS = (  
      0.0 0.0 0.0  
      0.0 0.0 0.0  
      0.0 0.0 0.0  
      0.0 0.0 0.0  
      0.0 0.0 0.0 )  
     DATUM = NoDatum  
     EOF  
     #change to wherever that tool is  
     /MRT/bin/resample -p param.txt  
     done   
    

    Monday, February 16, 2015

    Buff

    I have a lightweight buff, and I found its limit today. I went on a long walk in this 18 degree high afternoon temp, and my breath froze in the fabric! Can't do anything less than my polar-tec, I guess.