R for Earth-System Science - tutorials on how to read/write netcdf4 files and manipulate geospatial data using netcf4 and terra packages R for Geospatial analysis - shows how to use…
While one can use if-else statements, the use of logging and raising errors (raise) can be a better way to handle errors and warnings in complex projects for the following…
Useful nco commands For full descriptions, check out the resource links. nccopy The nccopy compresses a netCDF file at various levelsusage: nccopy [-flag] [original nc filename] [compressed nc filename]example: nccopy…
Sources: https://www.htmlwidgets.org/develop_intro.html https://www.chartjs.org/docs/latest/samples/area/line-datasets.html inst/htmlwidgets/ # directory to add css, js, yaml, libraries # To modify chartjs high level, go to chartjs/R/chartjs.R # To modify each line of graphs chartjs/R/series.R #…
Conflict 1: hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and integrate the remote changes hint: (e.g. 'git pull…
https://here.r-lib.org/articles/here.html it is a useful package to set project root directory # my project structure is following: #> /home/sunny/work/myproject #> ├── data_proc #> │ └── mycode.R #> ├── analysis #>…
source: https://quarto.org/docs/publishing/github-pages.html Download and install Quarto CLI from https://quarto.org/docs/download/ Open your terminal and go to your working directory (e.g. ~/projects/sunny-bak/) Create a quarto scaffolding for your project (template) called funsite;…
How to get min and max value and the associated year that min and max values occurred previous <- dfile %>%filter(YearLabel == "Previous") %>%group_by(MonthName) %>%summarize(min_extent = min(extent_mil),max_extent = max(extent_mil),year_min =…
To set up required packages to create htmlwidget install.packages("htmlwidgets") install.packages("devtools") Scaffolding will provide a template (basic structure) for a widget development library(devtools) create("my_widget") htmlwidgets::scaffoldWidget("my_widget") document() # Update documentation build() #…
import netCDF4 as ncfn = '/path/to/file.nc4'ds = nc.Dataset(fn) # import Dataset from netCDF4 from netCDF4 import Dataset # open nc file and save to nc ds = Dataset('myfile.nc') # print…
source: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/build/ch05s06.html https://wiki.esipfed.org/Attribute_Convention_for_Data_Discovery_1-3 In this article, we will summarize few useful metadata standards (CF and ACDD) to describe coordinate reference systems and mapping for netcdf files. Additionally, few examples with…