API
Collector
GriddingMachine.Collector.download_artifact!
— Functiondownload_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 tagserver
Server address (default: "http://tropo.gps.caltech.edu")port
Server port (default: 5055)
GriddingMachine.Collector.clean_database!
— Functionclean_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
- A string indicating which artifacts to clean up
Examples
clean_database!();
clean_database!("old");
clean_database!("all");
clean_database!(["PFT_2X_1Y_V1"]);
GriddingMachine.Collector.sync_database!
— Functionsync_database!()
Synchronizes the local database with the GriddingMachine database.
Indexer
GriddingMachine.Indexer.lat_ind
— Functionlat_ind(lat::Number; res::Number = 1)
Round the latitude and return the index in a matrix, given
lat
Latituderes
Resolution in latitude
Examples
ilat = lat_ind(0.3);
ilat = lat_ind(0.3; res=0.5);
GriddingMachine.Indexer.lon_ind
— Functionlon_ind(lon::Number; res::Number = 1)
Round the longitude and return the index in a matrix, given
lon
Longituderes
Resolution in longitude
Examples
ilon = lon_ind(90.3);
ilon = lon_ind(90.3; res=0.5);
GriddingMachine.Indexer.read_LUT
— Functionread_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 filelat
Latitude in°
lon
Longitude in°
cyc
Cycle number, such as 8 for data in Augest in 11M
resolution datasetinclude_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);
Requestor
GriddingMachine.Requestor.request_LUT
— Functionrequest_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 asLAI_MODIS_2X_8D_2017_V1
lat
Latitudelon
Longitudecyc
Cycle index, default is 0 (read entire time series)include_std
If true, include the standard deviationinterpolation
If true, interpolate the data linearlyport
Port number for the GriddingMachine serverserver
Server address such ashttps://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);