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.
CDT logo illustration by Adam S. Nelsen (http://www.adamnelsen.com)
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
@Nick That's an interesting question. I don't have much experience working on remote servers, but your question seems general enough that someone on the Answers forum may be able to help. The issue isn't specific to this toolbox, and it should pertain to any files on the File Exchange.
Are there any instructions on how users using a central installation of matlab can install/use this toolbox? We don't really want to modify the default mathworks installation and our users tend to run with "-nodesktop" via remote ssh session (this is installed on a remote server, not on an individual desktop/workstation). The installation instructions only seem to reference installation via the desktop client add-ons. Thanks -Nick
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');
Thank you in advance.
Really helpful toolbox!
Line 89 and 92 in ts_normstrap should repmat first to match the size.
Just amazing, thanks!
@Laura: You are exactly right. I've fixed the error in the mann_kendall function. Thanks for tracking this down and letting me know!
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.
Thanks for this helpful toolbox!
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?
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: 22.214.171.124613 (R2015a)
Thank you for the very helpfull toolbox!!!!!!!.
An example for complex EOF or something similar for current U and V EOF would be helpfull,
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.
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
Thanks for this helpful toolbox
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.
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.
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
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.
@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?
Nice Job/toolbox Chad.
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
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!