Input URL(s) to NetCDF files can be provided in the input option as either a file, with one URL to a dataset per line, a comma-separated list of URLs or a single URL. "-" causes input to be taken from stdin.
The module works for both local and remote data (e.g. on a Thredds Server). Data can be imported r.in.gdal or linked with r.external.
t.rast.import.netcdf can use GDALs Virtual Raster format (VRT) if data with Coordinate Reference systems that differ from the one of the current location are supposed to be imported.
Starting with GRASS GIS version 8.0, different variables or subdatasets in a
NetCDF file can be imported as "semantic_label" into one STRDS. To achieve this,
a configuration file has to be provided in the semantic_labels option.
That configuration file maps subdatasets in the NetCDF file to GRASS GIS
semantic_labels. Each line in that file must have the following format:
input_netcdf_subdataset=grass_gis_band_reference
The equal sign = is required.
If a semantic_labels configuration file is provided, the import of subdatasets
is limited to those subdatasets listed in that file. Hence, it can be used
to filter variables of interest.
# Choose Scenes to import (see also m.crawl.thredds module) echo "https://nbstds.met.no/thredds/fileServer/NBS/S2A/2021/02/28/S2A_MSIL1C_20210228T103021_N0202_R108_T35WPU_20210228T201033_DTERRENGDATA.nc https://nbstds.met.no/thredds/fileServer/NBS/S2A/2021/02/28/S2A_MSIL1C_20210228T103021_N0202_R108_T32VNL_20210228T201033_DTERRENGDATA.nc" > nc.txt # Create a semantic_label configuration file echo "B1=S2_1 B2=S2_2" > semantic_labels.conf # Import data (link NetCDF files without downloading them) t.rast.import.netcdf -l input=nc.txt output=S2A semantic_labels=semantic_labels.conf \ memory=2048 nprocs=2 nodata="-1"
# Create a semantic_label configuration file echo "tg=temperature_avg tn=temperature_min" > semantic_labels.conf # Import data within a selected time window t.rast.import.netcdf output=SeNorge semantic_labels=semantic_labels.conf \ memory=2048 nprocs=2 start_time="2020-08-01" end_time="2021-08-01" \ input=https://thredds.met.no/thredds/fileServer/senorge/seNorge_2018/Archive/seNorge2018_2020.nc
# Choose dataset to import (see also m.crawl.thredds module) # Create a semantic_label configuration file echo "tg=temperature_avg tn=temperature_min" > semantic_labels.conf # Import data within a selected time window t.rast.import.netcdf output=SeNorge semantic_labels=semantic_labels.conf \ memory=2048 nprocs=2 -a start_time="2020-08-01" end_time="2021-08-01" \ input=https://thredds.met.no/thredds/fileServer/senorge/seNorge_2018/Archive/seNorge2018_2021.nc
Available at: t.rast.import.netcdf source code (history)
Main index | Temporal index | Topics index | Keywords index | Graphical index | Full index
© 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual