New module OnlineLogging
. PR #137
A new module, OnlineLogging
, provides tools to report messages while a
simulation is running. Currently, the only feature implemented is
WallTimeInfo
, to report on timing information.
With WallTimeInfo
, one can add reports like the following to their simulations
┌ Info: Progress
│ simulation_time = "2 seconds"
│ n_steps_completed = 20
│ wall_time_per_step = "10 milliseconds, 100 microseconds"
│ wall_time_total = "1 second, 10 milliseconds"
│ wall_time_remaining = "808 milliseconds, 35 microseconds"
│ wall_time_spent = "202 milliseconds, 8 microseconds"
│ percent_complete = "20.0%"
│ estimated_sypd = "0.027"
│ date_now = 2024-12-03T16:01:13.660
└ estimated_finish_date = 2024-12-03T16:01:14.660
Find more information in the documentation.
NCFileReader
s can now read multiple files at the same time. The files have to
contain temporal data for the given variable and they are aggregated along the
time dimension. To use this feature, just pass a vector of file paths to the
constructor.
This capability is also available to DataHandler
s and TimeVaryingInput
s. To
use this feature, just pass the list of files that contain your variable of
interested, for example
timevaryinginput = TimeVaryingInputs.TimeVaryingInput(["era5_1980.nc", "era5_1981.nc"],
"u",
target_space,
start_date = Dates.DateTime(1980, 1, 1),
regridder_type = :InterpolationsRegridder)
You can also compose variables
timevaryinginput = TimeVaryingInputs.TimeVaryingInput(["era5_1980.nc", "era5_1981.nc", "era5_1982.nc"],
["u", "v"],
target_space,
start_date = Dates.DateTime(1980, 1, 1),
regridder_type = :InterpolationsRegridder,
compose_function = (x, y) -> sqrt(x^2 + y^2))
When you compose variables, pay attention that TimeVaryingInput
implements
some heuristics to disambiguate the case where the passed list of files is split
along the time or the variable dimension. You can always pass a list of lists to
be explicit in your intentions. Read the
documentation
to learn more about this.
This capability is only available for the InterpolationsRegridder
.
Reduced default size of cache in DataHandler
. PR #133
The default cache size for regridded fields in DataHandler
was reduced from
128 to 2, reducing the memory footprint. You can pass the cache_max_size
keyword argument to control this value.
When using a function that depends on loading another package, the error now tells the user which package should be loaded if the package has not been loaded already.
ClimaComms
is now a required dependency. PR #128
ClimaComms
used to be an optional dependency and was turned into a required
one. The reason for this change is to improve robustness in MPI settings.
The new version should also further reduce the "Path not properly synced" error.
- Fixed
@clima_artifact
for Julia 1.12. PR #123 - Increased sleep time across attempts in checking for synced filesystems. This should give the distributed filesystems more time to sync and reduce the occurrence of the "Path not properly synced" error. PR #125
Changed signature for OutputPathGenerator.detect_restart_file
. PR #122
The signature for OutputPathGenerator.detect_restart_file
was changed. This
change is motivated by the fact that OutputPathGenerator.detect_restart_file
only makes sense with the ActiveLinkStyle
. This led to a cumbersome usage in
downstream packages where ActiveLinkStyle
had to be imported just to call
detect_restart_file
.
The old signature was deprecated.
Fixed parsing of date
s in NetCDF files. PR #122
This release fixes an issue with reading NetCDF files that have date
as a time
dimension. Only the YYYYMMDD format is currently supported.
-
Utils.isequispaced
is now more efficient: it fails fast and does not allocate as much. More redundant allocations due toUtils.isequispaced
were fixed. -
Reduced allocations in regridding. New method
read!
. Existingread
now returns a copy of the data when returning from the cache. PR #119
Added OutputPathGenerator.detect_restart_file
. PR #120
A new function, OutputPathGenerator.detect_restart_file
, has been added to
help automatically locate the most recent restart file generated by a
simulation. This function is particularly useful when restarting simulations
from a previous checkpoint. It works with the ActiveLinkStyle
and can be
customized to handle different restart file naming conventions and sorting
criteria.
Added support for composing input variables. PR #105
This allows a list of varnames
(and possibly file_paths
) to be passed to
TimeVaryingInput
or SpaceVaryingInput
, along with a compose_function
to
compose them, as so:
# Define the pointwise composing function we want, a simple sum in this case
compose_function = (x, y) -> x + y
# Define pre-processing function to convert units of input
unit_conversion_func = (data) -> 1000 * data
data_handler = TimeVaryingInputs.TimeVaryingInput("era5_example.nc",
["u", "v"],
target_space,
start_date = Dates.DateTime(2000, 1, 1),
regridder_type = :InterpolationsRegridder,
file_reader_kwargs = (; preprocess_func = unit_conversion_func),
compose_function)
See the TimeVaryingInput
or DataHandler
docs "NetCDF file input" sections
for more details.
reference_date
was renamed to start_date
and t_start
was dropped from the
constructors for DataHandler
and TimeVaryingInput
.
These changes are due to the fact that these arguments should not be needed.
- Reduce floating point errors in times for DataHandling. PR #101
- Fix
show
forLRUCache
(anditerate
with a state). PR #96
- Add support for interpolating while "period filling". PR #85
- Add support for boundary conditions in interpolation. PR #84
- Increased allocations in regridding.
read!
method removed. PR #84
- Reduced allocations in regridding. New method
read!
. PR #83
- Reduced allocations in regridding. New method
regridded_snapshot!
. PR #72
- Extensions are internally reorganized, removing precompilation errors. PR #69
generate_output_path(..., ::ActiveLinkStyle)
now returns the folder instead of the link. Links are still being created and managed. PR #63
- Fix compatibility with ClimaComms 0.6. PR #54
OutputPathGenerator
now tries to create an active link when one is not available but some data is already there #50- Fix compatibility with ClimaCore 0.14. PR #50
- Support passing down regridder and file reader arguments from higher level constructors. PR #40