Home > Uncategorized > What about coastal cells?

What about coastal cells?

UPDATE: code at the drop

With the validation in place we can now test the difference one gets if you look at the actual water area in cells. We did the same thing with the Land. Counting any cell with ANY Land as 100% Land, and then calculating the effect of using the “percent” mask. Not much of a difference on the land. What about SST.

So a new script was added to the zip.

we add the following

downloadLandOceanMask()

Download the LAND/OCEAN .25 degree percent of land grid. This is different from the Land/water I used. That will make its way back into the Land analysis. Land/Water contains “inland” water. I do the download for you and unzip the file.

LandOcean<-getLandOceanMask(cellsize=5)

get the land/ocean mask into a raster layer. cell size to match the ocean. I pull the data in at .25degrees And then I aggregate it to 5 degree data.

Ocean<-1-LandOcean

Since the landOcean contains values of 0 to 1.  zero for ocean, .5 for half and half, 1 for all land, I just switch this to 1 for all ocean and 0 for all land.. values inbetween for “percent” water.

Inside our loop….

mth<-raster(SST,layer=i)
mask<-as.logical(mth)
Area<-area(mth)*Ocean

That reads.. get the temperature for this layer (mth). Create a ‘logical’ binary map of temp/notemp. Then calculate the area of every cell and FACTOR it according to the percent of Ocean in that cell. If its all ‘1’, then the area is just the area.

Results: Tiny difference.

Categories: Uncategorized
  1. the big bang theory free streaming
    September 7, 2010 at 6:41 AM

    Hi. AMAZING POST! Oh btw, sometimes your websites looks funny on this browser, I’m on my linux machine right now.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: