API

Collector

GriddingMachine.Collector.download_artifact!Function
download_artifact!(arttag::String; server::String = "http://tropo.gps.caltech.edu", port::Int = 5055)

Download and unpack the artifact from the server (if file does not exist) and return the file path, given

  • arttag GriddingMachine artifact tag
  • server Server address (default: "http://tropo.gps.caltech.edu")
  • port Server port (default: 5055)
source
GriddingMachine.Collector.clean_database!Function
clean_database!(selection::String="old")

This method cleans up all selected artifacts of GriddingMachine.jl (through identify the GRIDDINGMACHINE file in the artifacts), given

  • selection
    • A string indicating which artifacts to clean up
      • old Artifacts from an old version of GriddingMachine.jl (default)
      • all All Artifacts from GriddingMachine.jl
    • A vector of artifact names

Examples

clean_database!();
clean_database!("old");
clean_database!("all");
clean_database!(["PFT_2X_1Y_V1"]);
source

Indexer

GriddingMachine.Indexer.lat_indFunction
lat_ind(lat::Number; res::Number = 1)

Round the latitude and return the index in a matrix, given

  • lat Latitude
  • res Resolution in latitude

Examples

ilat = lat_ind(0.3);
ilat = lat_ind(0.3; res=0.5);
source
GriddingMachine.Indexer.lon_indFunction
lon_ind(lon::Number; res::Number = 1)

Round the longitude and return the index in a matrix, given

  • lon Longitude
  • res Resolution in longitude

Examples

ilon = lon_ind(90.3);
ilon = lon_ind(90.3; res=0.5);
source
GriddingMachine.Indexer.read_LUTFunction
read_LUT(fn::String; include_std::Bool = true)
read_LUT(fn::String, cyc::Int; include_std::Bool = true)
read_LUT(fn::String, lat::Number, lon::Number; include_std::Bool = true, interpolation::Bool = false)
read_LUT(fn::String, lat::Number, lon::Number, cyc::Int; include_std::Bool = true, interpolation::Bool = false)

Read the entire look-up-table from collection, given

  • fn Tag name or Path to the target file
  • lat Latitude in °
  • lon Longitude in °
  • cyc Cycle number, such as 8 for data in Augest in 1 1M resolution dataset
  • include_std If true, read the standard deviation as well (default is true)
  • interpolation If true, interpolate the dataset

Examples

Indexer.read_LUT("CI_2X_1Y_V1");
Indexer.read_LUT("CI_2X_1M_V3");
Indexer.read_LUT("CI_2X_1M_V3", 8);
Indexer.read_LUT("CI_2X_1M_V3", 30, 116);
Indexer.read_LUT("CI_2X_1M_V3", 30, 116; interpolation = true);
Indexer.read_LUT("CI_2X_1M_V3", 30, 116, 8);
Indexer.read_LUT("REFLECTANCE_MCD43A4_B1_1X_1M_2000_V1", 30, 116, 8);
Indexer.read_LUT("CI_240X_1Y_V1", [-10,10], [-10,10]);
Indexer.read_LUT("CI_2X_1M_V3", [-10,10], [-10,10]; include_std = false);
source

Requestor

GriddingMachine.Requestor.request_LUTFunction
request_LUT(artname::String,
            lat::Number,
            lon::Number,
            cyc::Int = 0;
            include_std::Bool = false,
            interpolation::Bool = false,
            port::Int = 5055,
            server::String = "http://tropo.gps.caltech.edu",
            user::String="Anonymous")

Request data from the server, given

  • artname Artifact full name such as LAI_MODIS_2X_8D_2017_V1
  • lat Latitude
  • lon Longitude
  • cyc Cycle index, default is 0 (read entire time series)
  • include_std If true, include the standard deviation
  • interpolation If true, interpolate the data linearly
  • port Port number for the GriddingMachine server
  • server Server address such as https://tropo.gps.caltech.edu
  • user User name (non-registered users need to wait for 5 seconds before the server processes the request)

Examples

request_LUT("LAI_MODIS_2X_8D_2017_V1", 30.5, 115.5);
request_LUT("LAI_MODIS_2X_8D_2017_V1", 30.5, 115.5; interpolation=true);
request_LUT("LAI_MODIS_2X_8D_2017_V1", 30.5, 115.5, 8);
request_LUT("LAI_MODIS_2X_8D_2017_V1", 30.5, 115.5, 8; interpolation=true);
source