climate data store toolbox for matlab

版本 2.2.6.0 (1.1 mb) 作者:
matlab(r) tools to access the climate data store (https://cds.climate.copernicus.eu/)
685.0 次下载
更新时间 2023/9/26

climate data store toolbox for matlab -凯发k8网页登录

matlab® tools to access . it is a wealth of information about the earth's past, present and future climate. there are hundreds of data sets associated with climate change. this toolbox allows you to easily access data and download it for analysis in matlab.

please report bugs and suggest enhancements by .

more info on installing and using the toolbox .

collaborating on the climate data store toolbox

we're always excited to have people make improvements large and small to climate data store toolbox. contributions do not have to be code! if you see a way to explain things more clearly or a great example of how to use something, please contribute it (or a link to your content). please even if you don't code the solution. we also welcome pull requests to resolve issues that we haven't gotten to yet! see for more information.

how to get started improving the toolbox:

  1. clone the repository: using matlab:
    1. in matlab, switch to the directory where you want the project created.
    2. right click in the current folder browser, and choose source control/manage files...
    3. set the repository path to https://github.com/mathworks/climatedatastore.git, and set sandbox to the directory you want created.
    4. click (retrieve). files will be cloned locally.
  2. open the climatedatastore.prj -- you're ready to make edits!
  3. when you're done, run the test suite.
  4. create a pull request.

looking for ideas? fix a

matlab features used

this demonstrates a number of matlab features, including:

  • code issue detection using and
    • and
  • to run automated checks and tests
    • configure a matlab session
    • multi-release testing: run tests across a number of matlab releases
    • run automated checks and tests when new code is pushed to repo
    • run automated tests and release a new version when a new tag is created.

using the climate data store toolbox

this is just a quick overview -- install and look at gettingstarted.mlx for more information on using the toolbox.

functions

function description
climatedatastoredownload get data from copernicus climate data store
climatedatastoredownloadasync queue a request data from copernicus climate data store and continue working in matlab.

usage

  1. see the notes below for information on first time install
  2. type help climatedatastoredownload or help climatedatastoredownloadasync for help on using the functions
  3. find your dataset at and click on the "download data" tab. make your selections for the subset of data you want. click "show api request" at the bottom.
  4. use climatedatastoredownload to get the data. the first parameter is the name of the data set to retrieve. the second parameter is a matlab version of the python structure that selects what subset of the data to download. climatedatastoredownload downloads the files, and returns a list of files that were downloaded.

note that downloading the files can take some time, depending on how large they are. if you have really large files, climatedatastoredownloadasync can be helpful. you can check on the status of your request by visiting .

typically, files returned are:

file type extension matlab functions
netcdf .nu ,
grib .grib ,
text .txt , .csv

first time install

  • requires matlab release r2020a or later
  • install the toolbox by using the add-on explorer in matlab, or by downloading the climatedatastore.mltbx file attached to the latest release on github, then doubleclicking on it.
  • this relies on the created by the european centre for medium-range weather forecasts (ecmwf). you'll need to have python installed. get it from the . see for more information.
  • the toolbox will automatically configure python and download and install the csapi package (you can manually install using pip3 install cdsapi)
  • the toolbox will prompt you the first time for csapi credentials. visit for more info.

example: getting started with copernicus climate data store toolbox

provides monthly gridded data of sea ice thickness for the arctic region based on satellite radar altimetry observations. sea ice is an important component of our climate system and a sensitive indicator of climate change. its presence or its retreat has a strong impact on air-sea interactions, the earth’s energy budget as well as marine ecosystems. it is recognized by the global climate observing system as an essential climate variable. sea ice thickness is one of the parameters commonly used to characterize sea ice, alongside sea ice concentration, sea ice edge, and sea ice type, also available in the climate data store.

select the sea ice thickness dataset.

datasetname ="satellite-sea-ice-thickness";

select the data to download from the dataset (see for options). this is a "matlabized" version of the python structure that is generated in the api request.

datasetoptions.version = "1_0";
datasetoptions.variable = "all";
datasetoptions.satellite = "cryosat_2";
datasetoptions.cdr_type = ["cdr","icdr"]; 
datasetoptions.year = ["2011","2021"]; 
datasetoptions.month = "03";

download the data from climate data store using climatedatastoredownload. it is put in a directory called "satellite-sea-ice-thickness."

downloadedfilepaths = climatedatastoredownload(datasetname,datasetoptions);
2021-11-10 10:38:13,694 info welcome to the cds
2021-11-10 10:38:13,697 info sending request to https://cds.climate.copernicus.eu/api/v2/resources/satellite-sea-ice-thickness
2021-11-10 10:38:13,830 info request is completed
2021-11-10 10:38:13,832 info downloading https://download-0003.copernicus-climate.eu/cache-compute-0003/cache/data7/dataset-satellite-sea-ice-thickness-639d640c-3099-42c0-8878-6c335586d2c7.zip to c:\users\rpurser\appdata\local\temp\tp3e8d85e3_9026_4531_ad2b_f3199a006857.zip (4.4m)
2021-11-10 10:38:15,378 info download rate 2.8m/s

read and format ice thickness data from 2011 and 2021.

transform and load the latitude, longitude, and ice thickness.

ice2011 = readsatelliteseaicethickness(downloadedfilepaths(1));
ice2021 = readsatelliteseaicethickness(downloadedfilepaths(2));
head(ice2021)
time lat lon thickness
1 01-mar-2021 47.6290 144.0296 2.4566
2 01-mar-2021 47.9655 144.0990 2.5800
3 01-mar-2021 50.5072 148.0122 -0.0364
4 01-mar-2021 50.8360 148.1187 1.0242
5 01-mar-2021 50.3237 146.9969 0.0518
6 01-mar-2021 51.1642 148.2269 0.2445
7 01-mar-2021 50.9112 147.6573 0.8933
8 01-mar-2021 50.6540 147.0948 0.1271

citation: generated using copernicus climate change service information 2022

visually compare march ice thickness in 2011 and 2021

subplot(1,2,1)
geodensityplot(ice2011.lat,ice2011.lon,ice2011.thickness,"facecolor","interp")
geolimits([23 85],[-181.4 16.4])
geobasemap("grayterrain")
title("ice thickness, march 2011")
subplot(1,2,2)
geodensityplot(ice2021.lat,ice2021.lon,ice2021.thickness,"facecolor","interp")
geolimits([23 85],[-181.4 16.4])
geobasemap("grayterrain")
title("ice thickness, march 2021")
f = gcf;
f.position(3) = f.position(3)*2;

citation: generated using copernicus climate change service information 2022

license

the license is available in the license file within this repository

note: each data set in the copernicus climate data store has its own license terms. you should review the license terms for the data set that you are planning to use to ensure that it can be used in the way that you have planned.

© 2021-2022, the mathworks, inc.

引用格式

rob purser (2024). climate data store toolbox for matlab (https://github.com/mathworks/climatedatastore/releases/tag/v2.2.6), github. 检索来源 .

matlab 版本兼容性
创建方式 r2023b
与 r2020a 及更高版本兼容
平台兼容性
windows macos linux
标签

community treasure hunt

find the treasures in matlab central and discover how the community can help you!

start hunting!

doc

internal

doc

版本 已发布 发行说明
2.2.6.0

see release notes for this release on github:

2.2.2.0

see release notes for this release on github:

2.2.1

see release notes for this release on github:

2.1.0

see release notes for this release on github:

2.0.0

see release notes for this release on github:

1.2.0.26
要查看或报告此来自 github 的附加功能中的问题,请访问其 。
要查看或报告此来自 github 的附加功能中的问题,请访问其 。
网站地图