How to extract data from multiple NetCDF files in one R script

Luke Data Manager
Luke Data Manager
4.5 هزار بار بازدید - 2 سال پیش - In this video, I'll show
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-C...
Based on standard_name: https://github.com/lhmarsden/NetCDF-C...

Related videos:
Introduction to NetCDF: Introducing NetCDF and the CF and ACD...
Extracting data from a NetCDF file using R: How to get data out of a NetCDF file ...
Creating a NetCDF file using R: How to create a NetCDF file using R f...

CF conventions: http://cfconventions.org/
CF standard name table: http://cfconventions.org/Data/cf-stan...

Follow me on twitter: Twitter: LukeDataManager
Like and subscribe!
2 سال پیش در تاریخ 1401/08/16 منتشر شده است.
4,502 بـار بازدید شده
... بیشتر