0

I have a ncdf file for the whole world and I just want to extract and plot US.

our_nc_data <- nc_open("main_2010.nc")
print(our_nc_data)
lswt_array <- ncvar_get(our_nc_data, "o3")
image(lswt_array)

our_nc_data$dim$lon$vals -> lon
our_nc_data$dim$lat$vals -> lat
image(lon,lat, lswt_array)
library(maptools)
data(wrld_simpl)
plot(wrld_simpl,add=TRUE)

enter image description here

Phil
  • 7,287
  • 3
  • 36
  • 66
Arwen
  • 77
  • 4

0 Answers0