API
Collector
GriddingMachine.Collector.download_artifact! — Functiondownload_artifact!(arttag::String; server::String = "http://222.195.83.136", port::Int = 5055)Download and unpack the artifact from the server (if file does not exist) and return the file path, given
arttagGriddingMachine artifact tagserverServer address (default: "http://222.195.83.136")portServer 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
oldArtifacts from an old version of GriddingMachine.jl (default)allAll 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
latLatituderesResolution 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
lonLongituderesResolution 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_LUT(fn::String, lats::Vector, lons::Vector; include_std::Bool = true)Read the entire look-up-table from collection, given
fnTag name or Path to the target filelatLatitude in°lonLongitude in°cycCycle number, such as 8 for data in Augest in 11Mresolution datasetinclude_stdIf true, read the standard deviation as well (default is true)interpolationIf true, interpolate the datasetlatsLatitude range (a vector of two elements)lonsLongitude range (a vector of two elements)
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_site_data — Functionrequest_site_data(artname::String,
lat::Number,
lon::Number,
cyc::Int = 0;
include_std::Bool = false,
interpolation::Bool = false,
port::Int = 5055,
server::String = "http://222.195.83.136",
user::String="Anonymous")Request data from the server, given
artnameArtifact full name such asLAI_MODIS_2X_8D_2017_V1latLatitudelonLongitudecycCycle index, default is 0 (read entire time series)include_stdIf true, include the standard deviationinterpolationIf true, interpolate the data linearlyportPort number for the GriddingMachine serverserverServer address such ashttp://222.195.83.136userUser name (non-registered users need to wait for 5 seconds before the server processes the request)
Examples
request_site_data("LAI_MODIS_2X_8D_2017_V1", 30.5, 115.5);
request_site_data("LAI_MODIS_2X_8D_2017_V1", 30.5, 115.5; interpolation=true);
request_site_data("LAI_MODIS_2X_8D_2017_V1", 30.5, 115.5, 8);
request_site_data("LAI_MODIS_2X_8D_2017_V1", 30.5, 115.5, 8; interpolation=true);