Skip to content

Defining NASA Precipitation Datasets

Defining a NASAPrecipitationDataset is easy, all you have to define are two things:

  1. Date range, ranging from start to stop

  2. Data path, i.e. where you want to save the NASA Precipitation Data

DatasetFunction(
    start = Date(),
    stop  = Date(),
    path  = ...
)

Example for an IMERG Dataset

See below for an example of defining an IMERGDataset

julia
julia> using NASAPrecipitation

julia> npd = IMERGFinalHH(start=Date(2017,2,1),stop=Date(2017,2,1),path=homedir())
[ Info: 2025-03-13T06:41:47.606 - 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

Example for an TRMM Dataset

And below for an example of defining a TRMMDataset

julia
julia> using NASAPrecipitation

julia> npd = TRMMMonthly(start=Date(2017,2,1),stop=Date(2017,2,1),path=homedir())
[ Info: 2025-03-13T06:41:50.142 - 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