- 积分
- 3601
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-9-8
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 hillside 于 2013-6-1 19:23 编辑
Christophe Sturm (aka. Kristof) Associate professor in biogeochemicalmodelling http://people.su.se/~cstur/index.htm
Department of Geology and Geochemistry Stockholm University 10691 Stockhom, Sweden E-mail: Christophe.Sturm@geo.su.se Phone:(+46) 8 16 47 23 Mobile: (+46) 70 49 82012 Fax:(+46) 8 674 78 97 Skype: kauboulot
The SWING2 website latest update happened on Dec. 11, 2008.In February 2008, I started as associateprofessor in biogeochemical modelling at theDepartment ofGeology and Geochemistry within the Bert BolinCentre for Climate Research. My research focuses on investigatingthe feedbacks between the land surface and the atmosphere. This includes themodelling of the terrestrial water and carbon cycle, with their respectiveisotopes: H218O,HD and 18O / 13C in organic matter.
For that purpose, I primarily use components of the Earth system modellingframework developed at the Max-Planck-Institutefor Meteorology, Hamburg.REMOisoa regional circulation model with embedded stable waterisotope module, which I developed during my PhD.JSBACHa land-surface model representing the terrestrial waterand carbon cycles, developed by Christian Reick and co-workers at the MPI-M.LPJa dynamical vegetation model developed by the Lund-Potsdam-Jena consortium.
The current toolbox containsfollowing routines:
- Introduction
- GrADS-Matlab interface:
- read_grads.m: Read the GrADS control file and retrieves the variable accordingly into the Matlab workspace. Grid dimensions are stored in the 'header' structure. It was extended to deal with NetCDF files (provided that the mexnc and snctools is installed).
- write_grads.m: Writes a variable from the Matlab workspace as a binary file, with associated GrADS control file.
- Plotting routines:
- plot_global.m: Plots a map of a global variable, with indications from the 'header' structure. Coastal contours are added from an independent file
- plot_iregy.m: Plots a global map, with iregular Y axis (as often happens with GCM outpout).
- remo2geog.m: converts the rotated REMO coordinates into geographical lon/lat coordinates. This file is called by plot_data.m.
- plot_data.m: similar to plot_global.m, but for a limited area.
- add_cont.m: Adding coastal contours to an existing plot (including lat/lon grid). Requires the cont_land.mat file (as for the above plot_{global,data}.m).
- remo_domains.m: plots the different domains where REMOiso has been applied so far.
- Miscellanous(其他):
- stable water isotope routines: delta.m and excess.m dompute the d18O, dD and D excess from H218O, HDO and H216O input.
- gnip_read.m: reads the GNIP 2001 climatology into Matlab, with relatedGNIP2001monthly.csv and GNIP2001monthly.txt files
- read_lpj.m: reads the LPJ column output and converts it into a grid format. This routine is only compatible with the LPJ Fortran I/O routine that I use...
- koeppen.m: computes the Koeppen climate classes based on monthly precipitation and temperature fields.
- plot_koeppen.m: plots the different Koeppen classes with an appropriate colour bar. Examples can be found below.
- NaN utilities: extension of common Matlab routines to variables containing NAN. Includes nancorrcoeff.m, nanmeans.m, nansums.m, nanunique.m.
- Other useful utilities: calling Linux shell commands from within Matlab (shell.m), computes the catchment area from topography (catchment.m).
The entire toolbox can be downloaded as a gzipped tarred archive.
Introduction Matlab is a great tool for climatedata analysis and plotting. Below is a collection of scripts I've developed toread, analyse and plot climate data with Matlab. The routines have been testedunder Matlab R2006b and previous version, on both Mac and Linux OS, and partlyunder Windows (although I discourage any serious climate modeller to use thelatter OS). The routines are (more or less) documented, feel free to send me anemail if some features are unclear. All routines are licensed as open source(GPL License), with no personal responsability but some hope that they can beuseful to others. Bug reports are welcome...
To give a little background, I've been using several climatemodels and used Matlab to read, analyse and plot model output. These include REMOiso, a regional circulation model withstable water isotope diagnostics, as well as its GCM counterpart ECHAMiso, andthe LPJ global globaldynamical vegetation model.
GrADS - Matlab interface GrADS is a widely spread, open source software for plotting gridded datasets, astypically produced by climate models. It has developed conventions for writing and reading binary files; all the meta-information iscontained in the so-called control file (*.ctl), which lists the XY griddimensions, as well as the variables name, number of levels and time-steps.
It is worthwile noticing that the CDO toolbox constructs the control file for most common (grib, IEG, SV) binary formatscurrently used by MPI-Met models. The syntax is: 'cdo gradsdes<filename>'
I introduce here an interface between GrADS and Matlab: the read_grads.m routine reads the GrADS control file and retrieves the variable from thebinary file accordingly. As far as possible, the compenents of the GrADS Data Descriptor File (or control file) were implemented in this routine. The companion routine write_grads.m writes a variable in the Matlab workspace as a binary file, with theappropriate control file. Examples are given hereafter.Example:
[data,header]=read_grads('filename.ctl',''); % Reads only theheader
[data,header]=read_grads('filename.ctl','varname'); % Reads the headerand <varname>
[data,header]=read_grads('filename.ctl','varname','z',[z1,z2],'lon',[lon1,lon2],'lat',[lat1,lat2],'t',[t1,t2]);
[data,header]=read_grads('filename.nc','varname'); % Extension ofread_grads.m to NetCDF variables
- data is a 4-D variable, with X/lon as the first dimension, Y/lat as second dimension, Z/lev as third dimension and time in fourth dimension.
- header is a structure variable, which contains all relevant information from the GrADS control file. In particular, the header.XDEF and header.YDEF sub-structures contain information for plotting the variable. header.XDEF.num is the number of X fields, and header.XDEF.vec the X coordinates.
Details of the optional input canbe inferred from reading the Matlab script.
Plottingroutines
All routines need the coastal contours storedin cont_land.mat (which can else be constructed from cont_land.lon-lat.ascii).
Examples:
plot_global(header,2-Dvar) % Plots a 2-S XY variable, with header from the read_grads.mroutine
plot_global(header,2-Dvar,'lon',[lon1,lat1]) % Plots a 2-S XY variable only between [lon1,lon2] and [lat1,lat2]
plot_global(header,2-D var,'CA',[1 1 1;jet(63)]) % Plots the 2-D variable according to the colouraxis specified after 'CA' (cf. help caxis)
plot_global(header,2-Dvar,'CB','hor') % Plots the 2-D variable according to thehorizontal colour bar (cf. help colorbar)
plot_iregy(header,2-D var) % Plots the 2-D variable whose header.YDEF.vec is not regularly spaced
plot_data(header,2-Dvar,'area','EU') % Plots the 2-Dvariable on the European rotated grid
add_cont(gca,'area','EU') % Adds the coastal contours to an existing plot, withthe EU rotated coordinates
Details of the optional input can be inferredfrom reading the Matlab script.
lpj_plotand koeppen_plot routines
注:附件为作者提供打包下载的全部matlab程序。
|
评分
-
查看全部评分
|