Defining NASA Precipitation Datasets
Defining a NASAPrecipitationDataset
is easy, all you have to define are two things:
- Date range, ranging from
start
tostop
- Data path, i.e. where you want to save the NASA Precipitation Data
DatasetFunction(
start = Date(),
stop = Date(),
path = ...
)
Examples
See below for an example of defining an IMERGDataset
julia> using NASAPrecipitation
julia> npd = IMERGFinalHH(start=Date(2017,2,1),stop=Date(2017,2,1),path=homedir())
[ Info: 2024-02-17T00:56:21.442 - NASAPrecipitation.jl - Setting up data structure containing information on Final IMERG Half-Hourly data to be downloaded The NASA Precipitation Dataset {String,Date} has the following properties: Dataset ID (ID) : imergv7finalhh Logging Name (name) : Final IMERGv7 Half-Hourly DOI URL (doi) : 10.5067/GPM/IMERG/3B-HH/07 Data Directory (datapath) : /home/runner/imergv7finalhh Mask Directory (maskpath) : /home/runner/imergmask Date Begin (start) : 2017-02-01 Date End (stop) : 2017-02-01 Timestep : 30 minutes Data Resolution : 0.1º Data Server (hroot) : https://gpm1.gesdisc.eosdis.nasa.gov/opendap/GPM_L3/GPM_3IMERGHH.07
julia> npd.start
2017-02-01
julia> npd.datapath
"/home/runner/imergv7finalhh"
julia> npd.fpref
"3B-HHR.MS.MRG.3IMERG"
julia> typeof(npd)
NASAPrecipitation.IMERGHalfHourly{String, Date}
julia> typeof(npd) <: NASAPrecipitation.NASAPrecipitationDataset
true
And below for an example of defining a TRMMDataset
julia> using NASAPrecipitation
julia> npd = TRMMMonthly(start=Date(2017,2,1),stop=Date(2017,2,1),path=homedir())
[ Info: 2024-02-17T00:56:21.679 - NASAPrecipitation.jl - Setting up data structure containing information on TRMM Monthly data to be downloaded The NASA Precipitation Dataset {String,Date} has the following properties: Dataset ID (ID) : trmmmonthly Logging Name (name) : TRMM Monthly (TMPA 3B43) DOI URL (doi) : 10.5067/TRMM/TMPA/MONTH/7 Data Directory (datapath) : /home/runner/trmmmonthly Mask Directory (maskpath) : /home/runner/trmmmask Date Begin (start) : 2017-01-01 Date End (stop) : 2017-12-31 Timestep : 1 Month Data Resolution : 0.25º Data Server (hroot) : https://disc2.gesdisc.eosdis.nasa.gov/opendap/TRMM_L3/TRMM_3B43.7
julia> npd.start
2017-01-01
julia> npd.datapath
"/home/runner/trmmmonthly"
julia> npd.fpref
"3B43"
julia> typeof(npd)
TRMMMonthly{String, Date}
julia> typeof(npd) <: NASAPrecipitation.NASAPrecipitationDataset
true
We see that the input arguments, and the fields of the resulting dataset, are the same despite the different dataset Types.