Subset a SINMOD file to depth-averaged water velocities in an area.
reshape_SINMOD.Rd
This function is a wrapper for system calls to NCO functions. A single SINMOD netcdf file contains a large grid covering the Arctic with extra variables we don't need. This function crops the spatial extent, performs a weighted average across depth layers, and limits to variables `u_east` and `v_north`.
Arguments
- path
a character string directing to the source file location.
- file
the name of a netcdf file to process.
- out_dir
a character string directing to the folder the new files should be written to.
- window
a named list containing `xmin`, `xmax`, `ymin`, `ymax`, the indices of the window to crop to.
Details
Performing the reshaping directly on the netcdf files means I can host a small subset locally on my machine. This avoids costly queries to the idrive later on. These files can also then be concatenated into a single netcdf file, allowing data to be read into R pixel by pixel, unlike saving a clipped dataframe as a .rds object.
See also
Other water movements:
get_bed_shear_stress()
,
get_tides_ts()
,
get_waves_ts()
,
sample_tides_year()
,
sample_waves()