File Exchange

## Climate Data Toolbox for MATLAB

version 1.01 (104 MB) by
A set of low-level functions and tutorials for analyzing and displaying Earth science data.

Updated 04 Apr 2021

From GitHub

This toolbox contains a standard set of MATLAB functions for analyzing and displaying climate data. The functions are computationally efficient, easy to use, and come with many tutorials that describe not only how to use CDT functions, but also offer guidance on how to interpret the results in the context of Earth science processes.

### Cite As

Chad A. Greene, Kaustubh Thirumalai, Kelly A. Kearney, José Miguel Delgado, Wolfgang Schwanghart, Natalie S. Wolfenbarger, Kristen M. Thyng, David E. Gwyther, Alex S. Gardner, and Donald D. Blankenship. The Climate Data Toolbox for MATLAB. Geochemistry, Geophysics, Geosystems 2019. doi:10.1029/2019GC008392 https://doi.org/10.1029/2019GC008392

Jakob Weis

Great piece of code. I added the functionality to specify a variable baseline as an alternative to a constant base value. I opened an 'issue' with a description and the adjusted code in the CDT GitHub repository: https://github.com/chadagreene/CDT/issues/11

@Alessandro: Yes, the version of the trend function in this toolbox now includes the 'omitnan' option. If you have a previous version of the toolbox (or if you have the standalone version of the trend function found elsewhere on the File Exchange) be sure to delete those old versions, and it should work just fine.

Hi! A very nice and appealing toolbox! I was trying to apply the trend function for calculating sea level anomaly for the period 1993-2020. The matrix containing data has dimension 720x1440x366 (lat,lon,time), where 336 are the months in the studied period. The matrix contains a lot of Nans, especially in the higher latitudes. Is it correct to apply the trend function as follows in order to correctly calculate the trend taking into account in the proper manner the Nans?
[matrix_trend,p] = trend (matrix, 336, 'omitnan');

TuTu.vi

Line 89 and 92 in ts_normstrap should repmat first to match the size.

Maxime Hervo

Just amazing, thanks!

omid zandi

Zhong Ziqian

nvh

Nice.

Ashneel Chandra

@Laura: You are exactly right. I've fixed the error in the mann_kendall function. Thanks for tracking this down and letting me know!

Howard Labido

Just wondering, can I use it on common objects like used plastic bottles?
I have a waste treatment project where early detection and removal of certain waste is needed.
https://www.wiscon-tech.com/system-solution/

I tried the 'mann_kendall' function and I obtained unusually high Z values for positive trends.
I checked the code and I saw that you multiply positive values by S to calculate Z:

Z(ind) = ((S(ind)-1)/StdS).*(S(ind));
Z(~ind) = (S(~ind)+1)/StdS;

In this way, positive trends are always significant. Is it a mistake?
Tank you.

John McDowell

SChow

Ahron Cervania

excellent

Faisal Amri

It did work! Thank you

@César: Oh, I see! It helps that you included the error message and your release number! I think this is the issue: Something called implicit expansion was introduced in R2016b. Since you're using 2015a you'll need to change line 237 to

Ac = bsxfun(@plus,Ac,meanAr);

Hope that helps.

Hello Chad, I am trying to obtain climatology from 3D model data and I am obtaining the following error using climatology:
timec 4015x1 32120 double
usc 367x512x4015 6035476480 double
[us_clim,tc] = climatology(usc,timec', 'daily');
Error using +
Matrix dimensions must agree.

Error in climatology (line 237)
Ac = Ac + meanAr;

I tried to run the example for Pacific Ocean SST and the script produces the same error! I am using MATLAB Version: 8.5.0.197613 (R2015a)

Omar Nawaz

Ze Meng

Min Li

Andreas Reul

Thank you for the very helpfull toolbox!!!!!!!.
An example for complex EOF or something similar for current U and V EOF would be helpfull,
Sincerely

Darwin Cai

Carrie Merritt

Vince Clementi

Ashneel Chandra

heying

Can I use this eof function for doing Complex EOF analysis (for wind vector) by just providing the input in complex form (U +iV).
My interest is in doing eof analysis for wind vector.

Ricardo Chevarria

Wentao Lv

Sandy Herho

jy Li

li xin

Thanks so much for this toolbox

@S: Thanks for the note! The globefill function solves the issue of transparent globes. https://www.chadagreene.com/CDT/globefill_documentation.html

SChow

I think the globeborders function is not working as intended, the surface seems to be transparent and shows the borders on the otherside of the hemisphere as well.

YI Chen

Naomi Krauzig

Hi2world Chu

Naomi Krauzig

Clare Ostle

Brian Haynes

How does the EOF program handle cyclic data at the poles? There is a large value discontinuity at the Prime Meridian, even when addressing the boundary condition prior to using the function, and the equal-area gridding used with datasets like CFSR, NCEP-NCAR, etc means the concentraion of data increaes with latitude.

Nicole Paloschi

jianzu hu

iamrajl

Mthetho Sovara

Shahar Grossbard

Leo Huang

shravan patil

Emily

Yang

Nick Hitt

Sina Khatami

MattyK

Thank you so much Chad. I managed to get the updated version of trend fuction

@Franck: That should work fine as long as the input t is a 1D array of length 288. If you type

cdt deseason

do you have any trouble running the examples?

Feel free to send me a personal email if you have a simple example I can run to recreate the problem.

Franck Eitel

@chad: this is the dimension of slp 33x17x288 (lon,lat,time)

@Franck: What are the dimensions of the slp grid, and what are the dimensions of the time array?

Franck Eitel

I would like to know how can I use deseason to remove seasonal cycles from the 3d grid slp(lon,lat,time) dataset.
I have tried to follow up your instruction but didn't succeed "Error: length of t must match dimensions of
A".
.

Fernan Saenz

mhartma3

Aidan Starr

##### MATLAB Release Compatibility
Created with R2018b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux
##### Acknowledgements

Inspired: COVID19, Ice Shelf Melt Rates

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!