Skip to content

Commit c53c5d2

Browse files
committed
Bump to 0.5.8
1 parent adb1dd0 commit c53c5d2

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

NEWS.md

+22-16
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ v0.5.8
55
------
66

77
## Features
8+
This release introduces the following features
9+
- [Directly reading NetCDF files](https://github.com/CliMA/ClimaAnalysis.jl/blob/main/NEWS.md#add-support-for-directly-reading-netcdf-files)
10+
- [Resampling a OutputVar using the dimensions from another OutputVar](https://github.com/CliMA/ClimaAnalysis.jl/blob/main/NEWS.md#resampling-a-outputvar-using-the-dimensions-from-another-outputvar)
11+
- [Add support for converting units](https://github.com/CliMA/ClimaAnalysis.jl/blob/main/NEWS.md#add-support-for-converting-units)
12+
- [Applying a land/sea mask to GeoMakie plots](https://github.com/CliMA/ClimaAnalysis.jl/blob/main/NEWS.md#applying-a-landsea-mask-to-geomakie-plots)
13+
- [Integrating OutputVar with respect to longitude or latitude](https://github.com/CliMA/ClimaAnalysis.jl/blob/main/NEWS.md#integrating-outputvar-with-respect-to-longitude-or-latitude)
14+
- [Splitting OutputVar by season](https://github.com/CliMA/ClimaAnalysis.jl/blob/main/NEWS.md#splitting-outputvar-by-season)
15+
- [Compute bias and squared error between OutputVar](https://github.com/CliMA/ClimaAnalysis.jl/blob/main/NEWS.md#compute-bias-and-squared-error-between-outputvar)
16+
- [Represent RMSEs from various models](https://github.com/CliMA/ClimaAnalysis.jl/blob/main/NEWS.md#represent-rmses-from-various-models)
817

918
### Add support for directly reading NetCDF files
1019

@@ -133,7 +142,7 @@ integration being done is rectangular integration using the left endpoints for i
133142
longitude and latitude. See the example of integrating over a sphere where the data is all
134143
ones to find the surface area of a sphere.
135144

136-
```@julia integrate_lonlat
145+
```julia
137146
julia> lon = collect(range(-179.5, 179.5, 360));
138147

139148
julia> lat = collect(range(-89.5, 89.5, 180));
@@ -164,7 +173,7 @@ julia> long_name(integrated_var) # updated long name to reflect the data being i
164173
"f integrated over lon (-179.5 to 179.5degrees_east) and integrated over lat (-89.5 to 89.5degrees_north)"
165174
```
166175

167-
### Split by season
176+
### Splitting OutputVar by season
168177
`OutputVar`s can be split by seasons using `split_by_season(var)` provided that a start date
169178
can be found in `var.attributes["start_date"]` and time is a dimension in the `OutputVar`.
170179
The unit of time is expected to be second. The function `split_by_season(var)` returns a
@@ -173,7 +182,7 @@ the seasons are March to May, June to August, September to November, and Decembe
173182
February. The order of the vector is MAM, JJA, SON, and DJF. If there are no dates found for
174183
a season, then the `OutputVar` for that season will be an empty `OutputVar`.
175184

176-
```@julia split_by_season
185+
```julia
177186
julia> attribs = Dict("start_date" => "2024-1-1");
178187

179188
julia> time = [0.0, 5_184_000.0, 13_132_800.0]; # correspond to dates 2024-1-1, 2024-3-1, 2024-6-1
@@ -204,7 +213,7 @@ julia> [MAM.data, JJA.data, DJF.data]
204213
[1.0]
205214
```
206215

207-
### Bias and squared error
216+
### Compute bias and squared error between OutputVar
208217
Bias and squared error can be computed from simulation data and observational data in
209218
`OutputVar`s using `bias(sim, obs)` and `squared_error(sim, obs)`. The function `bias(sim,
210219
obs)` returns a `OutputVar` whose data is the bias (`sim.data - obs.data`) and computes the
@@ -225,7 +234,7 @@ and `obs` and the units for longitude and latitude should be degrees.
225234
Consider the following example, where we compute the bias and RMSE between our simulation
226235
and some observations stored in "ta\_1d\_average.nc".
227236

228-
```@julia bias_and_mse
237+
```julia
229238
julia> obs_var = OutputVar("ta_1d_average.nc"); # load in observational data
230239

231240
julia> sim_var = get(simdir("simulation_output"), "ta"); # load in simulation data
@@ -276,7 +285,7 @@ plot_bias_on_globe!(fig, sim_var, obs_var)
276285
CairoMakie.save("myfigure.pdf", fig)
277286
```
278287

279-
### RMSEVariable
288+
### Represent RMSEs from various models
280289

281290
To facilitate analysis of root mean squared errors (RMSEs) over different models and
282291
categories (e.g., seasons) for a single variable of interest, `RMSEVariable` is introduced in
@@ -361,7 +370,7 @@ can be done using `add_category`, `add_model`, and `add_units!`.
361370

362371
See the example below for how to use this functionality.
363372

364-
Adding categories (e.g., seasons, months, years, etc.), models, and units to a `RMSEVariable`
373+
```julia
365374
rmse_var2 = ClimaAnalysis.add_category(rmse_var, "Jan") # can take in mode than one category
366375
rmse_var = ClimaAnalysis.add_model(rmse_var, "CliMA") # can take in more than one model name
367376
ClimaAnalysis.add_unit!(rmse_var, "CliMA", "K")
@@ -377,22 +386,19 @@ root mean squared errors (RMSEs) and name is returned. The function `median` onl
377386
model's RMSEs. Any `NaN` that appear in the data is ignored when computing the summary
378387
statistics. See the example below on how to use this functionality.
379388

380-
```julia rmse_var
389+
```julia
381390
ClimaAnalysis.find_best_single_model(rmse_var, category_name = "DJF")
382391
ClimaAnalysis.find_worst_single_model(rmse_var, category_name = "DJF")
383392
ClimaAnalysis.median(rmse_var)
384393
```
385394

386395
#### Plotting RMSEVariable
387396
`RMSEVariable` can be visualized as a box plot or heat map using `plot_boxplot!` and
388-
`plot_leaderboard!`. The function `plot_boxplot!(fig, rmse_var::ClimaAnalysis.RMSEVariable;
389-
model_names = ["CliMA"], ploc = (1, 1), best_and_worst_category_name = "ANN")` makes a box
390-
plot for each category in the `RMSEVariable` and plots any other models as specified by
391-
`model_names`. The function `plot_leaderboard!(fig,
392-
rmse_vars::ClimaAnalysis.RMSEVariable...; ploc = (1, 1), model_names = ["CliMA"],
393-
best_category_name = "ANN")` makes a heatmap of the RMSEs between the variables of interest
394-
and the categories. The values of the heatmap are normalized by dividing over the median
395-
model's RMSEs for each variable.
397+
`plot_leaderboard!`. The function `plot_boxplot!` makes a box plot for each category in the
398+
`RMSEVariable` and plots any other models as specified by `model_names`. The function
399+
`plot_leaderboard!` makes a heatmap of the RMSEs between the variables of interest and the
400+
categories. The values of the heatmap are normalized by dividing over the median model's
401+
RMSEs for each variable.
396402

397403
## Bug fixes
398404

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ClimaAnalysis"
22
uuid = "29b5916a-a76c-4e73-9657-3c8fd22e65e6"
33
authors = ["Gabriele Bozzola <[email protected]>", "Kevin Phan <[email protected]>"]
4-
version = "0.5.7"
4+
version = "0.5.8"
55

66
[deps]
77
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"

0 commit comments

Comments
 (0)