How to extract data from multiple NetCDF files in one R script
In this video, I'll show you how you can access data from multiple NetCDF files in one R script. I will cover: 00:00 Introduction 02:06 Looping through multiple files Pulling data based on variable names or pulling global attributes 16:30 Error handling Skipping files where relevant information is not found, so you script doesn't crash! 23:45 Pull data based on the the CF standard_name attribute This attribute is taken from the CF conventions. If different people create NetCDF-CF files including the same variable name, they should both assign the same standard_name variable attribute so a person (or script) can identify them as the same variable. Data used in this video: https://doi.org/10.21335/NMDC-1371694848 The data are in NetCDF-CF files, and are FAIR. The data are published to NMDC in a hierarchical way. One page (and DOI) for whole project One page (and DOI) for each cruise One page (and DOI) for each cast - sometimes multiple casts at a single station. The file is here. The scripts used are here: Based on variable name: https://github.com/lhmarsden/NetCDF-CF_workshops/blob/main/R_workshop_materials/combine_netcdf_data_into_one_dataframe.R Based on standard_name: https://github.com/lhmarsden/NetCDF-CF_workshops/blob/main/R_workshop_materials/access_multiple_netcdf_files_standard_names.R Related videos: Introduction to NetCDF: https://www.youtube.com/watch?v=FGHJhAFf1W0 Extracting data from a NetCDF file using R: https://www.youtube.com/watch?v=sEF1stn9ZwY Creating a NetCDF file using R: https://www.youtube.com/watch?v=ozhpQofa_g4 CF conventions: http://cfconventions.org/ CF standard name table: http://cfconventions.org/Data/cf-standard-names/current/build/cf-standard-name-table.html Follow me on twitter: https://twitter.com/LukeDataManager Like and subscribe!
Download
0 formatsNo download links available.