Map coefficient of variation (CV) and standard deviation (STD)
Map coefficient of variation (CV) and standard deviation (STD)
Dear colleagues,
the command combination l2bin + l3mapgen enables the creation of level 3 mapped image files out of level 2 files. The combined run of those two commands will result in mapped images of the mean of a selected product (in my case Kd_490) representing an indicated period of time (e.g. days, 8-days, months, years, ...). I would like to know whether there is an opportunity in SeaDAS to create the similar files but this time mapping the coefficient of variation (CV) and the standard variation (STD).
This information is already there but how can I display those two statistical variables in a map like the one for the mean? Is there a way to calculate this from the created mean files or how else can this be done?
Thanks in advance! Your help is highly appreciated. Greetings, JC
the command combination l2bin + l3mapgen enables the creation of level 3 mapped image files out of level 2 files. The combined run of those two commands will result in mapped images of the mean of a selected product (in my case Kd_490) representing an indicated period of time (e.g. days, 8-days, months, years, ...). I would like to know whether there is an opportunity in SeaDAS to create the similar files but this time mapping the coefficient of variation (CV) and the standard variation (STD).
This information is already there but how can I display those two statistical variables in a map like the one for the mean? Is there a way to calculate this from the created mean files or how else can this be done?
Thanks in advance! Your help is highly appreciated. Greetings, JC
Filters:
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Map coefficient of variation (CV) and standard deviation (STD)
The l3mapgen program can generate maps of the standard deviation:
For CV, you'll need to do the math in SeaDAS using the Band Math function (output the mean and stdev with l3mapgen and compute CV from them).
Sean
product (string) = comma separated list of products.
Each product can have an optional colon and modifier appended.
For example product=chlor_a,chlor_a:stdev,Kd_490:nobs
The avaliable modifiers are:
avg average value (default)
stdev standard deviation
var variance
nobs number of observations in the bin
nscenes number of contributing scenes
obs_time average observation time (TAI93)
bin_num bin ID number
For CV, you'll need to do the math in SeaDAS using the Band Math function (output the mean and stdev with l3mapgen and compute CV from them).
Sean
Map coefficient of variation (CV) and standard deviation (STD)
Dear Sean,
I thank you for the answer! This is very helpful.
The way to calculate the coefficient of variation is nevertheless not that handy... I would like to do this all in one. This might be easier using R? Did anybody map the mean, the standard deviation and the coefficient of variation of an ocean color product with R? I need to process data from 2002 until 2017. Therefore, this might be the better option for my case. I would be happy about some hints and advice.
Thanks a lot!
I thank you for the answer! This is very helpful.
The way to calculate the coefficient of variation is nevertheless not that handy... I would like to do this all in one. This might be easier using R? Did anybody map the mean, the standard deviation and the coefficient of variation of an ocean color product with R? I need to process data from 2002 until 2017. Therefore, this might be the better option for my case. I would be happy about some hints and advice.
Thanks a lot!
Map coefficient of variation (CV) and standard deviation (STD)
While you can work with binned files using R, it is very slow compared to
Do you need
If you need data files, there are many batch-oriented tools to manipulate NetCDF4-CF data. Have a look at NCO and CDO -- both are available in Ubuntu 16.04 and probably other linux distros. With lower level tools (the R ncdf4 library, Matlab, or Python with the Unidata netcdf4-python, among many) you can compute a new raster and add it as a new band to an existing NetCDF file, but this requires some effort and time to become familiar with the tools.
There are many tools to create images from NetCDF data grids. Many of these (including R, Matlab, Python, ncarg/ncl) support calculations on data grids, so you could read a NetCDF file with
l3mapgen
. You can use R's raster library to read the avg
and stdev
files and compute the CV in a raster, but if you simply save the resulting raster to netcdf it won't have all the metadata details of the input files. Do you need
stdev
as a data grid or just to produce a images? If you need data files, there are many batch-oriented tools to manipulate NetCDF4-CF data. Have a look at NCO and CDO -- both are available in Ubuntu 16.04 and probably other linux distros. With lower level tools (the R ncdf4 library, Matlab, or Python with the Unidata netcdf4-python, among many) you can compute a new raster and add it as a new band to an existing NetCDF file, but this requires some effort and time to become familiar with the tools.
There are many tools to create images from NetCDF data grids. Many of these (including R, Matlab, Python, ncarg/ncl) support calculations on data grids, so you could read a NetCDF file with
<prod>:avg
and <prod>:stdev
and then generate images for these two products directly and also compute the values and save to a <prod>:CV
image. There are differences in these tools in the support for color, palettes, coastlines and land masks, etc. so you should look at examples and chose one that produces suitable images for your needs.Map coefficient of variation (CV) and standard deviation (STD)
Thanks for answering and providing all the useful information!
I need to produce images of the vlaues of the standard deviation and managed to do this with the raster and ncdf4 library in R.
Greetings, JC
I need to produce images of the vlaues of the standard deviation and managed to do this with the raster and ncdf4 library in R.
Greetings, JC