Closed jonathancallahan closed 4 years ago
wrf_basePlot()
is always called by higher-level functions like wrf_rasterPlot()
or wrf_standardPlot()
, which are actually given the rasters from which we can extract their titles. So I think it is better to set the title of the plot within the higher-level function and just passing that string down to wrf_basePlot()
.
This isn't a precisely defined task but I feel the various
plot_~()
andlayer_~()
functions (or some new ones) need some changes to make them more user friendly in the context of working with WRF output.Here are some specific suggestions for the
layer_~()
functions:layer_vectorField()
accepts separateuRaster
andvRaster
rasterLayers as arguments and assumes they are on the same grid. Instead, I think it should accept araster
argument (which will be a RasterBrick object) anduName
andvName
arguments and create the internaluvRasterBrick
from that information.layer_raster() should also accept a
rasterand
varNamearguments. As a nicety, it could also handle
rasterbeing a single variable _rasterLayer_ object in which case
varNamewould not be needed (default of
NULL` could be ignored).And I'm not thrilled about a new "class" of objects implied by the
plot_~()
functions. Instead, I think these should be functions/methods associated with the somewhat abstractwrf_
objects -- basically just a RasterBrick full of WRF output variables.Some suggestions for the
plot_~()
functions (now renamed aswrf_~()
functions:wrf_basePlot()
-- No change except maybe have title default to "WRF output for hourraster@title
to help create this?wrf_rasterPlot()
-- Like the functions above, this should acceptraster
andvarName
arguments.wrf_standardPlot()
-- Like the functions above, this should acceptraster
argument and the names of other parameters for background, U and V.