CDDIS File Upload Procedures

CDDIS has updated the process used to upload files for its archive; as we transition to this new system, data providers will have to make some adjustments in how files are uploaded to the CDDIS. Once the system is fully operational, ftp for uploading files will no longer be supported. During this transition time, data providers need to become familiar with and update their processes to utilize the new system.

Frequently Asked Questions
File upload parameters

Outline of the new system:

The new file upload system uses a NASA single sign-on system (https://urs.earthdata.nasa.gov/). Users will need to create an account with that system before they can use the CDDIS file upload application.

Files are then submitted to CDDIS using an HTTP POST request. This can be done utilizing a CDDIS supplied web interface (https://depot.cddis.eosdis.nasa.gov/CDDIS_FileUpload/) or with a standard command line tool like cURL (http://curl.haxx.se/) that is available for OS X, Windows, and Linux operating systems. In addition, users can write their own application to submit HTTP POST requests. An example is given below of how a data provider can create a custom application to submit an entire directory of files using cURL.

Steps to using the new system:

Initial use of the system:

  1. Create an Earthdata login account if you do not already have one. Go to https://urs.earthdata.nasa.gov/ and follow the instructions to create an account.
  2. Notify CDDIS (support-cddis@earthdata.nasa.gov) with the following information:
    1. Earthdata login name
    2. IP address from which you will be uploading
    3. Wait for confirmation from CDDIS that your credentials have been accepted before proceeding to step 3.
  3. Important: the very first time you try to use the system you need to use the web interface: https://depot.cddis.eosdis.nasa.gov/CDDIS_FileUpload/, this page will redirect you to the Earthdata login page to input your username and password. After that, the system will ask you to authorize the application's access to your Earthdata profile. You must do this the first time you use the system; this step will not be required in future upload sessions.

Uploading files:

Option 1 - Using the web interface

Go to https://depot.cddis.eosdis.nasa.gov/CDDIS_FileUpload/. When redirected to the Earthdata log in page, input your username and password. When you are returned to the application's upload page, select the type of files you are uploading (GNSS, SLR, DORIS, VLBI). You will then be presented with various options depending on your selected data type. Once you have selected a data type-specific option, click on "Browse". Navigate to the local directory containing your files, and select the files to upload. You can use shift-click to select a block of files. Click the "Upload files" button. You should then get a response similar to:

You successfully uploaded m files, out of n selected

Where:

m = the number of files you uploaded
n = the number of files you selected for upload

If mn, please contact support-cddis@earthdata.nasa.gov.


Option 2 - Using the command line interface through cURL

This process has two steps like the web interface, however, unlike that process, you will not see the redirect to Earthdata login happening, and you will need to set up a .netrc file on your system with your username and password for cURL to use when the redirect occurs behind the scenes.

** If your operating system does not have cURL installed by default, you will need to install it before you can use this process. **

  1. To create a .netrc file, you will need to create a text file with the name .netrc; this file needs to have read permissions set to only yourself, so that no one can read your file and get your username and password. The format of the file is:

    machine urs.earthdata.nasa.gov login <username> password <password>

    where <username> and <password> are the values you set when you created your Earthdata login account.
  2. To login to CDDIS Ingest, type the following on the command line:

    curl -c <urs_cookie_file> -n -L https://depot.cddis.eosdis.nasa.gov/CDDIS_FileUpload/login

    where:

    <urs_cookie_file>


    <-n>
    is a text file that is used to save the cookie needed. One example is to use a file named .urs_cookies in your homespace

    look for a text file in my homespace under the name .netrc with read only permission, see above for instructions on creating this.


    You should receive the following response:

    Welcome to CDDIS File Upload

  3. To upload files, type the following on the command line:

    curl -X POST
    -b <urs_cookie_file>
    -F "fileType=<fileType>" -F "fileContentType=<fileContentType>”
    -F "file[]=@file1" -F "file[]=@file2" -F "file[]=@fileN"
    https://depot.cddis.eosdis.nasa.gov/CDDIS_FileUpload/upload/

    where:

    <urs_cookie_file>

    <fileType>


    <fileContentType>

    <file1>


    <file2>

    <fileN>

    (Required) is the same as above

    (Required) Supported datatypes are 'GNSS', 'GNSSV2', 'DORIS', 'SLR', 'VLBI' and 'MISC'. This variable is case insensitive, so 'gnss' will work as well.

    (Required) must be set to either 'Data', 'Products', or 'Misc' (this is not needed for 'VLBI' data, and is also case insensitive)

    (Required) would be replaced with the file you are uploading (need path to file - either full or relative)

    (Optional) would be a second file, if you uploaded more than one

    (Optional) would be the last file your enter (you may add as many as you like here)


    Several examples follow; a more comprehensive list of examples is also available.

    Example #1 - DORIS data file

    curl -X POST -b .urs_cookies -F "fileType=DORIS" -F "fileContentType=data"
    -F "file[]=@zim2001j.15d.Z" https://depot.cddis.eosdis.nasa.gov/CDDIS_FileUpload/upload/

    Example #2 - GNSS RINEX version 3 data file

    curl -X POST -b .urs_cookies -F "fileType=GNSS" -F "fileContentType=data"
    -F "file[]=@zim2001j.15d.Z" https://depot.cddis.eosdis.nasa.gov//CDDIS_FileUpload/upload/

    Example #3 - GNSS RINEX version 2 data file

    curl -X POST -b .urs_cookies -F "fileType=GNSSV2" -F "fileContentType=data"
    -F "file[]=@zim2001j.15d.Z" https://depot.cddis.eosdis.nasa.gov/CDDIS_FileUpload/upload/


    For the above examples, you should receive a response similar to:

    You successfully ingested m files, out of n selected

    Where:

    m = the number of files you uploaded
    n = the number of files you selected for upload

    If mn, please contact support-cddis@earthdata.nasa.gov.

Option 3 - other applications

Sample Application:

Here is a sample java application to log in and submit the entire contents of a directory that match a particular file pattern.

To use this client, you will first need to compile it using a java compiler on your system.

Usage: javac CurlClient.java

Then to run the client you will need to specify:

working directory: Location where temporary files will be written
directory containing files: All files must be in a single directory for this sample code
file pattern: A string that all the file names will contain (used to filter out files your don't want to upload)
file Type: One of the approved data types (GNSS/GNSSV2/SLR/DORIS/VLBI/MISC)
fileContentType: One of the approved file content types (data/products/misc)

Usage: java CurlClient <working directory> <directory containing files> <filepattern to upload> <fileType GNSS/GNSSV2/SLR/DORIS/VLBI/MISC> <fileContentType data/products/misc>