We should make sure the shape of any arrays being stored via cvmix_put are the
same shape as the data type attribute they are being stored in.
Example:
1) This is good, because zt should be size nlev
allocate(depth(5))
cvmix_put(CVMix_vars, 'nlev', 5)
cvmix_put(CVMix_vars, 'zt', depth)
2) This is bad, but results in a seg-fault instead of a clean error
allocate(depth(8))
cvmix_put(CVMix_vars, 'nlev', 5)
cvmix_put(CVMix_vars, 'zt', depth)
3) This is also bad, and I think will also seg-fault... at the very least it
will do something unexpected
allocate(depth(5))
cvmix_put(CVMix_vars, 'nlev', 8)
cvmix_put(CVMix_vars, 'zt', depth)
Original issue reported on code.google.com by mike.lev...@gmail.com on 7 Jun 2013 at 11:03
Original issue reported on code.google.com by
mike.lev...@gmail.com
on 7 Jun 2013 at 11:03