{ "info": { "author": "Sean Kelly", "author_email": "sean.kelly@jpl.nasa.gov", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "License :: Other/Proprietary License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Database :: Front-Ends", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "**********\ncdx.client\n**********\n\n.. contents::\n\nCDX Client provides an API library and command-line tools for\naccessing CDX data. CDX is the Climate Data Exchange, an effort of the Jet\nPropulsion Laboratory to create a virtual environment for the sharing of\nclimate data.\n\nInstallation\n************\n\nThis document tells you how to install cdx.client.\n\n\nQuick Instructions\n==================\n\nAs a user with administrative privileges, run::\n\n easy_install cdx.client\n\nThat's it.\n\n\nFull Instructions\n=================\n\ncdx.client requires the Python_ programming language. We recommend version 2.4\nor later. As of this writing, 2.6 is the latest stable version. If Python is\nnot yet installed on your system, you can find binary and and source\ndistributions from the Python website.\n\nTo test if a correct version of Python is available on your system, run::\n\n python -V\n \nYou should see output similar to::\n\n Python 2.6\n \nindicating the version of Python installed. cdx.client also requires `Agile\nOODT`_. OODT_ is Object Oriented Data Technology, a framework for metadata\nand data grids. Agile OODT is a Python version of OODT that supports higher\nperformance and easier integration than the Java_ version.\n\nBy far the easiest, recommended, and encouraged way to install cdx.client is\nto use EasyInstall_. If your Python installation has EasyInstall available to\nit, then this one command is all you need to run in order to download, build,\ninstall, and generate command-line tools all in one go for all users on your\nsystem::\n\n easy_install cdx.client\n \nBe sure to run that command as an administrative user. For example, on Mac OS\nX and other Unix systems, you might need to run::\n\n sudo easy_install cdx.client\n\nThat will also download and install all dependencies, including Agile OODT.\n\n\nExecutables\n-----------\n\nThe commands ``cdxls`` and ``cdxget`` will be generated and placed with your\nstandard installation directory for Python commands. Usually, this is the\nsame location as the ``python`` executable itself. For example, on Mac OS X\n10.5, the directory is::\n\n /Library/Frameworks/Python.framework/Versions/Current/bin\n\nYou may want to add that directory to your shell's PATH variable, as well as\nforcing your shell to re-scan the PATH variable for new executables.\n\n\nInstalling EasyInstall\n----------------------\n\nIf you happen to be on a system where your Python installation lacks easy\ninstall, fret not. Upgrading your system to gain EasyInstall's abilities is\nquite simple. Follow these instructions:\n\n1. Download http://peak.telecommunity.com/dist/ez_setup.py\n2. As an administrative user, run the freshly-downloaded ez_setup.py file\n using your system's Python.\n\nEasyInstall and its necessary libraries will be downloaded, built, and\ninstalled for you, and the ``easy_install`` executable generated. The\nlocation of the ``easy_install`` executable is as described above.\n\n\nInstalling Without EasyInstall\n------------------------------\n\nIf EasyInstall is not available on your system, you can still make a proper\ninstallation of cdx.client. Follow these instructions:\n\n1. Download the Agile OODT source distribution from\n http://oodt.jpl.nasa.gov/dist/agile-oodt/oodt-0.0.1.tar.gz.\n Substitute version numbers as appropriate.\n2. Download the cdx.client source distribution from\n http://cdx.jpl.nasa.gov/software/dist/cdx.client-0.0.3.tar.gz.\n Substitute version numbers as appropriate.\n3. Unpack each archive.\n4. Change the current working directory to each newly-created subdirectory,\n ``oodt-0.0.1`` and ``cdx.client-0.0.2``, again substituting version\n numbers as appropriate.\n5. As an administrative user, run: ``python setup.py install`` in each\n subdirectory.\n\n\nIssues and Questions\n====================\n\nTo report any problems with or ask for help about cdx.client, visit our\ncontact_ web page.\n\n\n.. References:\n.. _Agile OODT: http://agility.jpl.nasa.gov/\n.. _contact: http://cdx.jpl.nasa.gov/contact-info\n.. _EasyInstall: http://peak.telecommunity.com/DevCenter/EasyInstall\n.. _Java: http://tinyurl.com/5kng2h\n.. _OODT: http://oodt.jpl.nasa.gov/\n.. _Python: http://python.org/\n\nUsing CDX Client\n****************\n\nInstalling the CDX Client package makes available three things on your\ncomputer:\n\n``cdxls`` command\n The ``cdxls`` command lets you list the contents of a CDX server from your\n terminal prompt or a shell script.\n``cdxget`` command\n The ``cdxget`` command lets you retrieve data from CDX from either your\n terminal prompt or a shell script.\nCDX Library\n The CDX Library is a Python-based API for using CDX servers.\n \nThis document describes how to use the above three items, with special\nattention to the CDX Library.\n\n\nCommands\n========\n\nAfter installing the CDX Client package, two new command are made available on\nyour system, ``cdxls`` and ``cdxget``. These commands enable you to list the\ncontents of the data on a CDX server and retrieve selected files from the\nserver.\n\nTo use these commands from your interactive prompt, you just need to make sure\nyour shell's PATH environment variable includes the directory where the\ncommands are installed. On most systems, these two commands are installed in::\n\n /usr/local/bin\n\nHowever, on Mac OS X, the installation location may be::\n\n /Library/Frameworks/Python.framework/Versions/Current/bin\n \nAnd on Windows, it may be::\n\n c:\\Program Files\\Python\n \nNote also that some interactive shells create a cache of commands in order to\nexecute your requests more quickly. You may need to force your shell to\nre-build that cache. The csh and tcsh shells are two such examples; you can\nmake these shells rebuild their caches by running the ``rehash`` command.\n\n\nUse from Shell Scripts\n----------------------\n\nThe ``cdxls`` and ``cdxget`` commands may be used from shell scripts as well. The\nonly requirement for making these commands available to shell scripts is the\nsame as for interactive sessions: the shell's PATH environment variable must\ninclude the directory that contains the ``cdxls`` and ``cdxget`` commands.\n\nHere is a sample shell script that retrieves the MLS Aura L2GP data files (and\nmetadata) files for HO2 and HOCl from day 325 in 2008::\n\n #!/bin/sh\n PATH=/usr/local/bin:/usr/bin:/bin; export PATH\n CDX_SERVER=http://mlscdx.jpl.nasa.gov:8080/cdx/prod; export CDX_SERVER\n \n for kind in HO2 HOCl; do\n for extension in he5 he5.met; do\n cdxget 2008/325/MLS-Aura_L2GP-${kind}_v02-23-c01_2008d325.${extension}\n done\n done\n \nThe above shell script assumes that ``cdxget`` will be found in\n``/usr/local/bin``, ``/usr/bin``, or ``/bin``. It also sets the ``CDX_SERVER``\nenvironment variable to set what CDX server to talk to. It then loops through\ntwo kinds of data (``HO2`` and ``HOCl``), and loops through two kinds of file\nextensions (``he5`` and ``he5.met``). The results is it retrieves four files to\nthe current working directory, specifically:\n\n* 2008/325/MLS-Aura_L2GP-HO2_v02-23-c01_2008d325.he5\n* 2008/325/MLS-Aura_L2GP-HO2_v02-23-c01_2008d325.he5.met\n* 2008/325/MLS-Aura_L2GP-HOCl_v02-23-c01_2008d325.he5\n* 2008/325/MLS-Aura_L2GP-HOCl_v02-23-c01_2008d325.he5.met\n\n\nThe ``cdxsubset`` command may also be used from a shell script. It is\nconfigured by two environment variables:\n\n* CDX_SUBSET_MODE - if set then local data wrapper mode will be used (remote\n is assumed as default)\n* CDX_SERVER - set to the product server to talk to for subsetting\n\nSome example working commands are:\n\nSubset spatial bounding box from NCAR CCSM model output::\n\n cdxsubset -b /esg/data18/commit/atm/da/hfls/ncar_ccsm3_0/run1/hfls_A2.Commit_1.CCSM.atmd.2000-01-01_cat_2039-12-31.nc\n\nSubset time range from NCAR CCSM model output::\n\n cdxsubset -t /esg/data18/commit/atm/da/hfls/ncar_ccsm3_0/run1/hfls_A2.Commit_1.CCSM.atmd.2000-01-01_cat_2039-12-31.nc\n \nGet time array variable data from the MLS L2 granule::\n\n cdxsubset -p Time /mls/2005/100/MLS-Aura_L2GP-BrO_v01-51-c01_2005d100.he5\n\nGet spatial bounding box from AIRS level 2 granule::\n\n cdxsubset -b /airs/data/s4pa/Aqua_AIRS_Level2/AIRX2RET.003/2007/005/AIRS.2007.01.05.240.L2.RetStd.v4.0.9.0.G07007180718.hdf\n\nSubset by lat lon and variable for an AIRS level 2 granule::\n\n cdxsubset -p TAirStd --latitude-range=67.35:78.40 -longitude-range=172.226:176.10 /airs/2009/01/01/airx2ret/AIRS.2009.01.01.001.L2.RetStd.v5.2.2.0.G09002135510.hdf\n\nCDX Library\n===========\n\nThe CDX Library is a Python-based application programming interface (API) for\ncommunicating with CDX servers. In fact, the two commands ``cdxls`` and\n``cdxget`` are implemented using the CDX Library. If shell-script programming\nis not to your taste, and you know Python, then using the CDX Library may be\nright for you.\n\nThe CDX Library uses an object-oriented approach to model the contents of a\nCDX server. Objects represent CDX files and directories, and you call methods\non those objects to determine file attributes, directory contents, or retrieve\na file's contents.\n\nThe remainder of this document describes the modules, classes, and functions\nthat comprise the CDX Library. If you don't know Python, you may wish to skip\nthe rest.\n\n\nThe ``cdx`` Module\n------------------\n\nThe ``cdx`` module is a namespace module. It provides no classes or functions.\nRather, it contains a single, nested module called ``client``.\n\n\nThe ``cdx.client`` Module\n-------------------------\n\nThe ``cdx.client`` module contains nested modules that provide the CDX Library.\nIt also contains implementations of the ``cdxls`` and ``cdxget`` commands.\n\n\nThe ``cdx.client.cdxfile`` Module\n---------------------------------\n\nThe ``cdx.client.cdxfile`` module is where all the action is. It contains\nclasses and functions for communicating with and modeling the contents of CDX\nservers. It contains the following items:\n\n``CDXDirectory``\n Objects of this class represent directories on a CDX server. You can use\n Python's iterator, length, and containment protocols to examine the\n contents of the directory. They can also be sorted.\n``CDXFile``\n Objects of this class represent files on a CDX server. While you can\n instantiate objects of this class, you'd typically instantiate a\n CDXDirectory and examine its contents which will include CDXFile objects\n for files in the directory and nested CDXDirectory objects for\n subdirectories. A CDXFile object also provides a method to let you\n retrieve its data.\n``findFile``\n The ``findFile`` function is a utility function that, given a starting\n CDXDirectory and a path name, yields the matching CDXDirectory or CDXFile\n on a CDX server.\n\n\nCDXDirectory Objects\n~~~~~~~~~~~~~~~~~~~~\n\n``CDXDirectory`` objects represent directories in a CDX server. You can\ncreate these objects directly or you can use the ``findFile`` method in the\n``cdx.client.cdxfile`` module.\n\nclass CDXDirectory(*path*, *cdxURL* = None)\n Create a ``CDXDirectory`` object with the given *path*. You can also\n specify the URL to a CDX server to use by passing in a string for\n *cdxURL*.\nsort(*cmp* = cmp, *reverse* = False)\n Return the contents of the directory, sorted, using the a comparison\n function *cmp*, defaulting to Python's built-in ``cmp``. If *reverse* is\n True, reverse the order of the sort. Comparison with *cmp* on ``CDXFile``\n and ``CDXDirectory`` objects is by CDX server URL and by name. You can\n pass in your own *cmp* that, for example, sorts by file size.\nisFile()\n Always returns False.\npath\n The path name of the directory.\nname\n The name of the directory; this is the last element of the path.\nsize\n By convention sizes for directories are always zero.\n\n``CDXDirectory`` objects obey Python's protocols for hashing, comparison,\ncontainment testing, iteration, indexing, and length query. Containment\ntesting with directories with with ``CDXDirectory`` objects, ``CDXFile``\nobjects, or plain strings::\n\n >>> from cdx.client.cdxfile import CDXDirectory\n >>> root = CDXDirectory('/', 'http://localhost:8192/cdx/prod')\n >>> len(root)\n 3\n >>> subdir = root['2005']\n >>> subdir\n CDXDirectory(path=/2005)\n >>> subdir in root\n True\n >>> '2005' in root\n True\n >>> subdir < root\n False\n >>> subdir > root\n True\n >>> for i in root:\n ... print i\n ...\n /2008\n /2007\n /2005\n >>> root.sort()\n [CDXDirectory(path=/2005), CDXDirectory(path=/2007), CDXDirectory(path=/2008)]\n \n\n``CDXFile`` Objects\n~~~~~~~~~~~~~~~~~~~\n\nTBD.\n\n\nChangelog\n*********\n\n1.3.1 - 10/19/11\n================\n\nThis release includes an updated version of the datawrappers \npackage (0.0.8) as specified in CDX-122.\n\nFor the issue tracker, see\nhttps://oodt.jpl.nasa.gov/jira/browse/CDX\n\n1.3.0 - 10/17/11\n================\n\nThis release fixes an important issue in the CDX regrid service \nand computes an average of the running sum of data points indexed \nby cube cell. See CDX-118 for more information.\n\nFor the issue tracker, see\nhttps://oodt.jpl.nasa.gov/jira/browse/CDX\n\n\n1.2.0 - 06/27/11\n================\n\nThis release provides tight integration with the ESG, and plugs \ninto its security infrastructure and adds a bunch of virtual \nroots for use in cdxregrid and cdxsubset for ESG data. See CDX-110\nand CDX-111 for more information.\n\nFor the issue tracker, see\nhttp://oodt.jpl.nasa.gov/jira/browse/CDX.\n\n\n1.1.0 - 11/13/2010\n==================\n\nThis release incorporates version 0.0.6 of the cdx.datawrappers package\nwhich includes CDX-103, which implements GetVariable by lat, lon, and \ntime. In turn this release also provides CDX-102, which incoprorates \nthis functionality into the basic cdxregrid functionality. At this point, \ncdxregrid is pretty much fully functional.\n\nFor the issue tracker, see\nhttp://oodt.jpl.nasa.gov/jira/browse/CDX.\n\n1.0.0 - 09/10/10\n================\n\nThis release made a minor improvement to the public cdxls API, exposing\nthe set of found and lost files from the listFiles function, taking away\nits function-local orchestration and exposing the lists of found and notfound \nfiles to the user. See CDX-93 for more information. This release additionally \nexposes the CDX MODIS product server via cdxls. See CDX-98 for more details. \nFinally, this release includes updates to fix CloudSat as a cdxsubset source, \nas described in CDX-99.\n\nFor the issue tracker, see\nhttp://oodt.jpl.nasa.gov/jira/browse/CDX.\n\n\n0.0.9 - 03/24/2010\n==================\n\nThis release includes improvements to cdxsubset, specifically the ability\nto print out the full numpy array returned from a DataWrapper. See \nCDX-82 for specific details. Additionally cdxsubset has been updated to expose\nthe subset by LatLon functionality per CDX-84 and CDX-85. Subset by range query\nallowing constraints to be specified was also included in this release (see \nCDX-86 for more information).\n\nFor the issue tracker, see\nhttp://oodt.jpl.nasa.gov/jira/browse/CDX.\n\n\n0.0.8 - Inclusion of improvements to cdxcd, virtual roots and new tools\n=======================================================================\n\nThis release includes improvements to cdxcd to make it work nicely \nwith cdx virtual roots, and includes integration with the other cdx client\ntoolkit including cdxls, cdxsubset and cdxget. See CDX-70 and CDX-71 for\nfurther details.\n\nFor the issue tracker, see\nhttp://oodt.jpl.nasa.gov/jira/browse/CDX.\n\n\n0.0.7 - Add Resource Files\n==========================\n\nRelease 0.0.6 was mis-configured and didn't include some important resource\nfiles. This emergency release includes them!\n\n\n0.0.6 - Inclusion of cdxsubset and other tools, and some minor bug fixes\n========================================================================\n\nThis release includes the cdxsubset tool, as described in CDX-56.\nThis release also includes the cdxcd tool, as described in CDX-69.\nThis release also includes minor aestetic bug fixes that address pathing\nissues in cdxls, e.g., CDX-29.\n\nFor the issue tracker, see\nhttp://oodt.jpl.nasa.gov/jira/browse/CDX.\n\n\n0.0.5 - Repaired Unit Tests\n===========================\n\nThis release updates the unit tests and test data based on the changes in\n0.0.4 and the new behavior of actual product servers. In addition, it\nfixes some documentation problems (incorrect package name cdx-client\nwhich should've been cdx.client) in the INSTALL.txt file.\n\nThe sole bug report addressed in this release is CDX-45, \"Unit tests in\ncdx-client failing\". For the issue tracker, see\nhttp://oodt.jpl.nasa.gov/jira/browse/CDX.\n\n\n0.0.4 - Bugfix to 0.0.3 release\n===============================\n\nThis is a bugfix release to 0.0.3, which includes some error checking to\ndeal with some data format inconsistencies on the OODT OFSN product server\nend.\n\nJIRA issues addressed (see http://oodt.jpl.nasa.gov/jira/browse/CDX):\n\n* CDX-43 Directory structure shouldn't be preserved if cdxget is called\n without the -r parameter\n* CDX-42 cdxget -r fails to retrieve MLS data\n* CDX-41 cdxls -R chokes if dir size not provided\n\n\n0.0.3 - Directory caching\n=========================\n\nThe major feature of this release is the ``cdx.client.dircache`` module which\nenables local-disk caching of a subset of a remote CDX product server's\ncontents. It also introduces the concept of a ``cdx:`` scheme URL. Such a\nURL has this form::\n\n cdx://hostname[:port]/endpoint/prod/path/to/a/directory\n \nwhere hostname is the name or IP address of a CDX product server, port is an\noptional port number on which the server is listening, endpoint is the\nWebGrid_ service identifier (typically just the string ``cdx``), prod is the\nfixed keyword ``prod``, and ``path/to/a/directory`` is an absolute path to a\ndirectory within that product server.\n\nSuch caching is intended to support the CCMValDiag_ software.\n\n\n0.0.2 - Bug fix for cdxls\n=========================\n\nThis release repairs a bug in cdxls that caused directories with only one item\nin them to not be listed properly.\n\n\n0.0.1 - URL specification\n=========================\n\nThis release provides support for a (-u url, --url=url) pair of command-line\noptions that enable specification of a specific URL to use, falling back to\nthe URL specified in the CDX_SERVER environment variable (and, if that's\nunset, then http://mlscdx.jpl.nasa.gov:8080/cdx/prod). This supports two\nideas suggested in CDX-16 (the first two, not the third with a cdx: style\nURL).\n\n\n0.0.0 - Initial\n===============\n\nThis is an initial release of cdx-client supporting minimal ``cdxls`` and\n``cdxget`` function.\n\n\n.. References:\n.. _WebGrid: http://agility.jpl.nasa.gov/products/agile-oodt/\n.. _CCMValDiag: http://www.pa.op.dlr.de/CCMVal/CCMVal_DiagnosticTool.html", "description_content_type": null, "docs_url": null, "download_url": "http://oodt.jpl.nasa.gov/dist/cdx-client", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://cdx.jpl.nasa.gov/software/cdx-client", "keywords": "climate data cdx python client", "license": "Copyright\n*********\n\nCopyright (c) 2008-2009 by the California Institute of Technology. ALL RIGHTS\nRESERVED.\n\nThe Software is owned by Caltech/JPL and is protected by United States\ncopyright laws and applicable international treaties and/or conventions. The\nUnited States Government may have prior rights to use some or all of the\nSoftware as determined under applicable contracts and license agreements with\nCaltech/JPL.\n\nThis software was developed at the Jet Propulsion Laboratory, an operating\ndivision of the California Institute of Technology and is not available for\nuse by any person, organization, or other entity without prior, specific\nwritten permission.", "maintainer": null, "maintainer_email": null, "name": "cdx.client", "package_url": "https://pypi.org/project/cdx.client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cdx.client/", "project_urls": { "Download": "http://oodt.jpl.nasa.gov/dist/cdx-client", "Homepage": "http://cdx.jpl.nasa.gov/software/cdx-client" }, "release_url": "https://pypi.org/project/cdx.client/1.3.1/", "requires_dist": null, "requires_python": null, "summary": "CDX Client", "version": "1.3.1" }, "last_serial": 334676, "releases": { "0.0.0": [], "0.0.0.dev-r4691": [], "0.0.1": [], "0.0.2": [], "0.0.4.dev-r5660": [], "0.0.5": [], "0.0.6": [], "0.0.7": [], "0.0.7.dev-r7006": [], "0.0.8": [], "0.0.9": [], "1.0.0": [], "1.1.0": [], "1.2.0": [], "1.3.0": [], "1.3.1": [] }, "urls": [] }