stephpenn1 / SeniorThesis

Changes in Antarctic Intermediate Water physical properties; RCP 8.5; CESM1 - BGC
0 stars 0 forks source link

Code Structure #6

Open cahartin opened 8 years ago

cahartin commented 8 years ago

Now that we have all of the data downloaded and are beginning to process and analyze, we should sit down on Tuesday (8/9) and discuss the best way to set up our code. We don't want to be executing the same line of code over and over again, we would like to load the variables, process them, and then plot them in separate steps.

stephpenn1 commented 8 years ago

That sounds good. I'm having trouble trying to open the file in R from the hard drive, yesterday i used _ncid <- nc_open("/Users/SP/Desktop/CMIP5_Data/so_Omon_CESM1-BGC_historical_r1i1p1197001-197912.nc") (I renamed the external "CMIP5_Data") and it worked but i'm getting Error in R_nc4_open: Not a directory now. Is this since the external is not in my local drive?

cahartin commented 8 years ago

is that the full error message?

stephpenn1 commented 8 years ago

ncid <- nc_open("/Users/SP/Desktop/CMIP5_Data/so_Omon_CESM1-BGC_historical_r1i1p1_197001-197912.nc") Error in R_nc4_open: Not a directory Error in nc_open("/Users/SP/Desktop/CMIP5_Data/so_Omon_CESM1-BGC_historical_r1i1p1_197001-197912.nc") : Error in nc_open trying to open file /Users/SP/Desktop/CMIP5_Data/so_Omon_CESM1-BGC_historical_r1i1p1_197001-197912.nc

cahartin commented 8 years ago

in the command line type getwd(). what do you get back?

stephpenn1 commented 8 years ago

getwd() [1] "/Users/SP" setwd("/Users/SP/Desktop/CMIP5_Data") Error in setwd("/Users/SP/Desktop/CMIP5_Data") : cannot change working directory

Is this not where the hard drive is located?

cahartin commented 8 years ago

External drives are mounted under /Volumes/ on your MAC. If you open up a terminal window and type ls /Volumes you should see a drive called CMIP5_Data

stephpenn1 commented 8 years ago

Found it! /Volumes was what I was missing. Just finished downloading and moving the data. I think trying to do multiple things at once really slowed my computer down.

Earlier I was working on the colors and zlim of the plot and below is a preview of historical 1970-1980. Working on combining the files now... R is just being slow still. Also the yaxis label is cut off because the width/height is off.

rplot

cahartin commented 8 years ago

awesome! look at AAIW in green there!

stephpenn1 commented 8 years ago

Here's the averaged historical from 1970-1990! used "abind" to combine the arrays...i'll upload the script soon

hist_so_150

cahartin commented 8 years ago

nice job!