Is there a way to perform batch interpolation in ArcGIS from 1 excel file? - r

I have an excel file with station weather data. For each station, for each year (70 years), I have temperature data, as well as associated latitude and longitude of the stations. I want to create interpolated raster maps (using IDW) for each year for temperature.
My excel files are set up like this, but with 70 years of data:
I would therefore like 70 interpolated maps for each year of temperature. It also may be important to note that the stations for each year are not all the same.
I am willing to try to do this as a batch process in ArcGIS, but find that can be tedious. Is there a faster way to do this, through arcpy or even through R?

Related

How to extract monthly Worldclim data for several date-months in R

I know that there are ways of extracting weather data from WorldClim through R, by specifying the coordinates (for example, species presences).
Yet I need to do something a bit more specific.
My data has also several dates from 1980-2018, and the coordinates do not repeat between dates. My idea is to extract precipitation, max T, and min T for each specific month of those dates, preferently in one round.
So, something to identify the month and year from the date, and extract the weather information for the specific coordinate, from the equivalent weather layers (month and year)
Anyone knows how to solve this?

How can I convert vector to raster?

I am working on SDM project using Max-Ent, and Random Forest.
When I prepare tiff, or raster files of environmental data, I have difficulties, because of I’m a beginner.
For example: We have a csv file (1981_1991_ta_totalAverage.csv), which is contains average min temperature from 1981 to 1991.
Question 1: How can I convert this csv file to raster format?
I tried to convert it. When I need raster map of Korea, I used bclim6.asc (BIO6=Minimum Temperature of the Coldest Month for Korea. It seems something wrong. Question 2: How can I get taster file of Korea?

How to convert annual netCDF data to daily from the command line?

Before I resort to using Python, I would like to know if there is a simple way from the command line to convert an annual netCDF file into a file with daily data simply by duplication (including leap years), i.e. each annual value is duplicated 365 (366) times with the appropriate date stamp.
In the file each data value has the date stamped for the first day of each year:
cdo showdate population_ssp2soc_0p5deg_annual_2006-2100_density.nc4
2006-01-01 2007-01-01 2008-01-01 2009-01-01 2010-01-01 ...etc
I know it seems like a strange thing to do (the file size will be 365.25 times bigger!), but I want to read the data into a Fortran program that uses a daily timestep and do not want to mess around with dates in the Fortran code.
There might be a more efficient way of doing this. But you could first merge the original file and then a second which is the first, but time shifted to the final day of the year. Then temporally interpolate:
cdo -mergetime population_ssp2soc_0p5deg_annual_2006-2100_density.nc4 -shifttime,-1day -shifttime,1year population_ssp2soc_0p5deg_annual_2006-2100_density.nc4 temp.nc
cdo inttime,2006-01-01,12:00:00,1day temp.nc outfile.nc

How to add dates to remote sensing data?

I am working with remote sensing data to create time series of NDVI and Cloud cover. The data consists of 30 rows (latitude) and 40 columns (Longitude) and 212 matrix slices which are the months from 2000-03 until 2017-10. How ever R sees the data as an array and there is no date visible in the data. Except that I know that the 212 matrix are the months. How can I add a date to the matrix slices but still have the latitude and longitude to work with?
When I use:
NDVI_timeserie <- ts(name.ts.ndvi, frequency=12, start=c(2000,3))
This gives the correct time to the data but then it is not saved as date. So when I want to select only the rain season, I can't because I can't select the months and years.
I am open to suggestions and advice of creating a time series.
Thank you so much!

Create polar plots but missing data

We have these data below in a csv file and we would like to create a polar plot from them. We are going to use this R package - openair for creating the polar plot.
timestamp humandate NOppb
1 1412877113 09/10/2014 13:51 19
2 1412876508 09/10/2014 13:41
3 1412876508 09/10/2014 13:41
4 1412877118 09/10/2014 13:51 17
....
However, we are missing some data for using polarPlot(),
# Load package.
library("openair")
polarPlot(dat, pollutant = "NOppb", na.rm = TRUE)
result:
Can't find the variable(s) wd ws
Error in checkPrep(mydata, vars, type, remove.calm = FALSE) :
It requires columns of wd and ws for wind direction and speed which we don't have.
I am told that we can pull these missing data from wunderground's api, but the problem are:
how can pull the data from wunderground's api to match each row of our data above?
the weather data is measured and recorded hourly as it seems but our data is not recorded hourly as you can see it above. so how is this going to match?
Any ideas what can I do?
The openair package provides easy access to UK air quality monitoring station data, including several stations in London. These data will automatically include wind speed and direction (ws and wd). This capability is provided by openair's importAURN and importKCL functions.
Use one of these functions to download an hourly dataset from a monitoring station near your site, for the period of time you are interested in, and merge it with your data by date (timestamp). Timestamps (date column) in openair is a POSIXct date, usually to a whole hour. You will need to convert your timestamp or humandate to POSIXct using as.POSIXct, and name the resulting column date. Then round your date to the nearest whole hour, before merging on date with the AURN dataset.
Then you can make your polar plots based on the wind data, and even compare pollutant measurements to the city's own monitoring station data.
I don't know anything about specific stations in London, but read about this under importAURN and importKCL functions in the openair manual, or help in R after openair is loaded. See openair on CRAN, or the lastest updates on github (https://github.com/davidcarslaw/openair). ps: The openair author is an expert on London air quality.

Resources