nc_to_img takes a file path downloaded nc format CRW data and converts the SST data to img format.

nc_to_img(pathin, vector = "WA")

Arguments

pathin

a character file path to the working directory (see details).

vector

character representation of the shape file name to clip the global data to. No file extension. Defaults to "WA" an internal bounding box for the WA region.

Value

a directory called `img_data/` will be created for output img data. Yearly folder structure will be recreated here and outputs will all be clipped to either the default WA region or to a region of the users choice. All outputs will have the EPSG of 3577.

Details

Takes a file path to downloaded nc format files from NOAA's Coral Reef Watch ftp://ftp.star.nesdis.noaa.gov/pub/sod/mecb/crw/data/5km/v3.1/nc/v0.1/daily/sst/ and converts the files to img format for easier handling. The original nc files are global and this function clips the data to the Western Australian region unless provided an alternative shape file.

Note that there is a strict folder structure required. The file path provided is presumed to be a working directory where user provided shape files and any outputs will be saved. All functions operate relative to this location. This should also contain a directory called `nc_data/` which contains the downloaded nc data organised into directories by year.

Note output data will have the EPSG 3577 and any user supplied shape file will be automatically transformed to this prior to use.

Author

Bart Huntley, bart.huntley@dbca.wa.gov.au

For more details see https://dbca-wa.github.io/dbcaDHW/index.html the dbcaDHW website

Examples

if (FALSE) { # \dontrun{
nc_to_img(pathin = ".", vector = "WA")
} # }