parser.add_option('--coloc', action='store', dest='coloc', default=None, choices=colocs, help='Use colocation method, one of %s, default is %%default)'%(colocs,)) parser.add_option('-o', '--output', action='store', dest='output', default='layer-%(var)s-%(depth)s-%(tmin)s-%(tmax)s.png', metavar='pattern', help='Output files pattern (default: %default)') parser.add_option('--show', action='store_true', dest='show', default=None, help='Show figures') options, args = parser.parse_args() if options.variables is None: parser.error('Missing variables parameter') if options.time is None: parser.error('Missing time parameter') if options.depth is None: parser.error('Missing depth parameter') if options.bbox: bbox = options.bbox.split(',') if len(bbox) != 4: parser.error('Invalid bbox parameter: %s', options.bbox) lonmin, latmin, lonmax, latmax = map(float, bbox) if options.cfgfile: Object.load_default_config(options.cfgfile, nested=True) MARS3D.load_default_config(Object.get_default_config()) ProfilesDataset.load_default_config(Object.get_default_config()) variables = map(lambda v:v.split(','), options.variables) depths = [] for d in options.depth: depths.extend(d.split(',')) time = options.time.split(',') if len(time) == 4: tmin, tmax, tstep, ustep = time; tbb = 'co' elif len(time) == 5: tmin, tmax, tbb, tstep, ustep = time else: parser.error('Invalid time parameter') tstep = int(tstep) # Force negative depth value print depths depths = map(lambda d: -abs(float(d)), depths) dtfmt = '%Y%m%dT%H%M%S' mars = MARS3D()
# liability. # # In this respect, the user's attention is drawn to the risks associated # with loading, using, modifying and/or developing or reproducing the # software by the user in light of its specific status of free software, # that may mean that it is complicated to manipulate, and that also # therefore means that it is reserved for developers and experienced # professionals having in-depth computer knowledge. Users are therefore # encouraged to load and test the software's suitability as regards their # requirements in conditions enabling the security of their systems and/or # data to be ensured and, more generally, to use and operate it in the # same conditions as regards security. # # The fact that you are presently reading this means that you have had # knowledge of the CeCILL license and that you accept its terms. # __author__ = 'Jonathan Wilkins' __email__ = '*****@*****.**' __date__ = '2010-12-17' __doc__ = 'Produce profiles plots' import sys from vacumm.data.misc.profile import ProfilesDataset if __name__ == '__main__': sys.exit(ProfilesDataset.main())
default=None, help='Show figures') options, args = parser.parse_args() if options.variables is None: parser.error('Missing variables parameter') if options.time is None: parser.error('Missing time parameter') if options.depth is None: parser.error('Missing depth parameter') if options.bbox: bbox = options.bbox.split(',') if len(bbox) != 4: parser.error('Invalid bbox parameter: %s', options.bbox) lonmin, latmin, lonmax, latmax = map(float, bbox) if options.cfgfile: Object.load_default_config(options.cfgfile, nested=True) MARS3D.load_default_config(Object.get_default_config()) ProfilesDataset.load_default_config(Object.get_default_config()) variables = map(lambda v: v.split(','), options.variables) depths = [] for d in options.depth: depths.extend(d.split(',')) time = options.time.split(',') if len(time) == 4: tmin, tmax, tstep, ustep = time tbb = 'co' elif len(time) == 5: tmin, tmax, tbb, tstep, ustep = time else: parser.error('Invalid time parameter') tstep = int(tstep) # Force negative depth value
help='Output files pattern (default: %default)') options, args = parser.parse_args() if options.time is None: parser.error('Missing time parameter') if options.bbox: bbox = options.bbox.split(',') if len(bbox) != 4: parser.error('Invalid bbox parameter: %s', options.bbox) lonmin, latmin, lonmax, latmax = map(float, bbox) if options.plots is None: #parser.error('You must specify at least one plot command') options.plots = plots if options.cfgfile: Object.load_default_config(options.cfgfile, nested=True) MARS3D.load_default_config(Object.get_default_config()) ProfilesDataset.load_default_config(Object.get_default_config()) time = options.time.split(',') if len(time) == 4: tmin, tmax, tstep, ustep = time tbb = 'co' elif len(time) == 5: tmin, tmax, tbb, tstep, ustep = time else: parser.error( 'Invalid time parameter - 4 (tmin, tmax, tstep, ustep) or 5 (tmin, tmax, tbb, tstep, ustep) parameters are needed.' ) tstep = int(tstep) dtfmt = '%Y%m%dT%H%M%S' select = dict()
parser.add_option('--show', action='store_true', dest='show', default=None, help='Show figures') parser.add_option('-o', '--output', action='store', dest='output', default='%(plot)s-%(tmin)s-%(tmax)s.png', metavar='pattern', help='Output files pattern (default: %default)') options, args = parser.parse_args() if options.time is None: parser.error('Missing time parameter') if options.bbox: bbox = options.bbox.split(',') if len(bbox) != 4: parser.error('Invalid bbox parameter: %s', options.bbox) lonmin, latmin, lonmax, latmax = map(float, bbox) if options.plots is None: #parser.error('You must specify at least one plot command') options.plots = plots if options.cfgfile: Object.load_default_config(options.cfgfile, nested=True) MARS3D.load_default_config(Object.get_default_config()) ProfilesDataset.load_default_config(Object.get_default_config()) time = options.time.split(',') if len(time) == 4: tmin, tmax, tstep, ustep = time; tbb = 'co' elif len(time) == 5: tmin, tmax, tbb, tstep, ustep = time else: parser.error('Invalid time parameter - 4 (tmin, tmax, tstep, ustep) or 5 (tmin, tmax, tbb, tstep, ustep) parameters are needed.') tstep = int(tstep) dtfmt = '%Y%m%dT%H%M%S' select=dict() mars = MARS3D() profiles = ProfilesDataset() if options.cfgfile: mars.load_default_config(options.cfgfile, nested=True) profiles.load_default_config(options.cfgfile, nested=True) mars.load_config(options.cfgfile, nested=True)
# modify and redistribute granted by the license, users are provided only # with a limited warranty and the software's author, the holder of the # economic rights, and the successive licensors have only limited # liability. # # In this respect, the user's attention is drawn to the risks associated # with loading, using, modifying and/or developing or reproducing the # software by the user in light of its specific status of free software, # that may mean that it is complicated to manipulate, and that also # therefore means that it is reserved for developers and experienced # professionals having in-depth computer knowledge. Users are therefore # encouraged to load and test the software's suitability as regards their # requirements in conditions enabling the security of their systems and/or # data to be ensured and, more generally, to use and operate it in the # same conditions as regards security. # # The fact that you are presently reading this means that you have had # knowledge of the CeCILL license and that you accept its terms. # __author__ = 'Jonathan Wilkins' __email__ = '*****@*****.**' __date__ = '2010-12-17' __doc__ = 'Produce profiles plots' import sys from vacumm.data.misc.profile import ProfilesDataset if __name__ == '__main__': sys.exit(ProfilesDataset.main())