Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3726642
Add aggregator implementation
SeanBryan51 Nov 6, 2025
5926337
src/offline/cable_define_types.F90: add tscrn_max_daily and tscrn_min…
SeanBryan51 Nov 24, 2025
81661f9
src/offline/cable_serial.F90: update tscrn_max_daily and tscrn_min_da…
SeanBryan51 Nov 24, 2025
24a4b81
Introduce cable_enum_t for improved type safety for enum data structures
SeanBryan51 Jan 20, 2026
3094a2b
Add parallel I/O output module implementation
SeanBryan51 Nov 18, 2025
10272c1
src/util/cable_timing_utils.F90: Implement case for custom hourly fre…
SeanBryan51 Jan 23, 2026
5463b05
src/offline/cable_mpimaster.F90: Accumulate tscrn aggregators in mast…
SeanBryan51 Jan 23, 2026
c986a41
src/offline/cable_mpimaster.F90: Add output module to MPI master driver
SeanBryan51 Jan 30, 2026
4d59ba7
src/util/io/output/cable_output_core.F90: fix time axis values for 'a…
SeanBryan51 Jan 27, 2026
8610ad4
src/util/io/output/cable_output_utils.F90: remove unused variable
SeanBryan51 Jan 30, 2026
64b3cf4
src/offline/cable_serial.F90: fix guarding if condition for output mo…
SeanBryan51 Jan 30, 2026
7e4e932
src/util/io/output/cable_output_core.F90: fix non-standard array cons…
SeanBryan51 Feb 3, 2026
9f6854d
src/util/io/output/cable_output_utils.F90: fix non-standard array con…
SeanBryan51 Feb 3, 2026
9d27f69
src/util/io/output/cable_output_utils.F90: bug fix in infer_dim_names…
SeanBryan51 Feb 4, 2026
a546402
src/util/io/output/cable_output_utils.F90: bug fix for comparing data…
SeanBryan51 Feb 4, 2026
90433a0
src/util/io/output/cable_output_utils.F90: fix cell_methods attribute
SeanBryan51 Feb 4, 2026
7b30d24
src/util/io/output/cable_output_core.F90: Remove redundant temp_buffe…
SeanBryan51 Feb 5, 2026
8c8ad66
src/util/io/output/cable_output_core.F90: Remove potential for implic…
SeanBryan51 Feb 5, 2026
a294717
Add variable and global attributes list
SeanBryan51 Feb 6, 2026
0e594f5
Split out decomposition and reduction buffer functionality from cable…
SeanBryan51 Feb 9, 2026
bb50434
Remove cable_io_decomp_mod
SeanBryan51 Feb 9, 2026
55f9be4
Clean up sampling frequency check subroutine
SeanBryan51 Feb 9, 2026
07f646e
src/util/io/output/cable_output_definitions.F90: remove restart argument
SeanBryan51 Feb 10, 2026
fa05244
Add carbon molar mass physical constant
SeanBryan51 Feb 20, 2026
f8cf743
Introduce diagnostic variables for CABLE outputs
SeanBryan51 Feb 13, 2026
d0f81c3
Remove duplicate namelist variables
SeanBryan51 Feb 20, 2026
74d2ac9
src/util/cable_timing_utils.F90: Add seconds_per_day constant
SeanBryan51 Feb 20, 2026
0b1c8d1
src/util/aggregator.F90: Add scale and offset procedures
SeanBryan51 Feb 10, 2026
5be0368
src/util/aggregator.F90: Add aggregator_type procedure
SeanBryan51 Feb 12, 2026
632def5
Add all output and restart definitions, bug fixes and other quality o…
SeanBryan51 Feb 20, 2026
78a6da8
Split output variable declarations into multiple modules
SeanBryan51 Feb 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ else()
src/util/cable_common.F90
src/shared/casa_offline_inout.F90
src/shared/casa_ncdf.F90
src/offline/cable_io_decomp.F90
src/offline/cable_iovars.F90
src/offline/cable_surface_types.F90
src/offline/cable_define_types.F90
Expand All @@ -278,6 +277,8 @@ else()
src/offline/cable_abort.F90
src/offline/cable_checks.F90
src/offline/cable_cru_TRENDY.F90
src/offline/cable_diagnostics_casa.F90
src/offline/cable_diagnostics_core.F90
src/offline/cable_driver_common.F90
src/offline/cable_initialise.F90
src/offline/cable_input.F90
Expand All @@ -299,14 +300,24 @@ else()
src/offline/cbl_model_driver_offline.F90
src/offline/landuse_inout.F90
src/offline/spincasacnp.F90
src/util/aggregator.F90
src/util/cable_climate_type_mod.F90
src/util/masks_cbl.F90
src/util/cable_array_utils.F90
src/util/cable_enum.F90
src/util/cable_grid_reductions.F90
src/util/cable_timing_utils.F90
src/util/netcdf/cable_netcdf_decomp_util.F90
src/util/netcdf/cable_netcdf.F90
src/util/netcdf/cable_netcdf_internal.F90
src/util/netcdf/cable_netcdf_stub_types.F90
src/util/netcdf/nf90/cable_netcdf_nf90.F90
src/util/io/output/cable_output_core.F90
src/util/io/output/cable_output_decomp.F90
src/util/io/output/cable_output_reduction_buffers.F90
src/util/io/output/cable_output_types.F90
src/util/io/output/cable_output_utils.F90
src/util/io/output/cable_output.F90
)

target_link_libraries(cable_common PRIVATE PkgConfig::NETCDF)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
| cswat | 4.218E3 | \( J \cdot kg^{-1} \cdot K^{-1} \) | Specific heat for water at \( 0^{\circ}C \) |
| density_liq | 1000.0 | \( kg \cdot m^{-3} \) | Density of liquid water |
| density_ice | 921.0 | \( kg \cdot m^{-3} \) | Density of ice |
| c_molar_mass | 1.201E-5 | \( \micro g / mol \) | Molar mass of carbon |
44 changes: 43 additions & 1 deletion src/offline/cable_define_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
!#define UM_BUILD yes
MODULE cable_def_types_mod

USE cable_climate_type_mod, ONLY: climate_type
USE cable_climate_type_mod, ONLY: climate_type
USE aggregator_mod, ONLY: aggregator_real32_1d_t, new_aggregator

! Contains all variables which are not subroutine-internal

Expand Down Expand Up @@ -264,6 +265,7 @@ MODULE cable_def_types_mod
qssrf, & ! sublimation
snage, & ! snow age
snowd, & ! snow depth (liquid water)
totsdepth, & ! total snow depth (m)
smelt, & ! snow melt
ssdnn, & ! average snow density
tss, & ! surface temperature (weighted soil, snow)
Expand Down Expand Up @@ -453,12 +455,18 @@ MODULE cable_def_types_mod
frpw, & ! plant respiration (woody component) (g C m-2 s-1)
frpr, & ! plant respiration (root component) (g C m-2 s-1)
frs, & ! soil respiration (g C m-2 s-1)
fra, & ! autotrophic respiration (g C m-2 s-1)
fnee, & ! net carbon flux (g C m-2 s-1)
frday, & ! daytime leaf resp
fnv, & ! net rad. avail. to canopy (W/m2)
fev, & ! latent hf from canopy (W/m2)
epot, & ! total potential evaporation
et, & ! total evapotranspiration (kg/m2/s)
eint, & ! interception evaporation from wet canopy (kg/m2/s)
tveg, & ! vegation transpiration (kg/m2/s)
esoil, & ! soil evaporation (kg/m2/s)
fnpp, & ! npp flux
fgpp, & ! gpp flux
fevw_pot,& ! potential lat heat from canopy
gswx_T, & ! ! stom cond for water
cdtq, & ! drag coefficient for momentum
Expand All @@ -474,6 +482,7 @@ MODULE cable_def_types_mod
ghflux, & ! ground heat flux (W/m2) ???
precis, & ! throughfall to soil, after snow (mm)
qscrn, & ! specific humudity at screen height (g/g)
qmom, & ! surface momentum flux
rnet, & ! net radiation absorbed by surface (W/m2)
rniso, & !isothermal net radiation absorbed by surface (W/m2)
segg, & ! latent heatfl from soil mm
Expand Down Expand Up @@ -531,6 +540,8 @@ MODULE cable_def_types_mod
! vh_js ! !litter thermal conductivity (Wm-2K-1) and vapour diffusivity (m2s-1)
REAL(r_2), DIMENSION(:), POINTER :: kthLitt, DvLitt

type(aggregator_real32_1d_t), allocatable :: tscrn_max_daily
type(aggregator_real32_1d_t), allocatable :: tscrn_min_daily

END TYPE canopy_type

Expand All @@ -553,6 +564,9 @@ MODULE cable_def_types_mod
latitude,& ! latitude
lwabv, & ! long wave absorbed by vegetation
qssabs, & ! absorbed short-wave radiation for soil
swnet, & ! net shortwave radiation absorbed by surface (W/m^2)
lwnet, & ! net longwave radiation absorbed by surface (W/m^2)
rnet, & ! net radiation absorbed by surface (W/m^2)
transd, & ! frac SW diffuse transmitted through canopy
trad, & ! radiative temperature (soil and veg)
otrad ! radiative temperature on previous timestep (ACCESS)
Expand Down Expand Up @@ -917,6 +931,7 @@ SUBROUTINE alloc_soil_snow_type(var, mp)
ALLOCATE( var% smass(mp,msn) )
ALLOCATE( var% snage(mp) )
ALLOCATE( var% snowd(mp) )
ALLOCATE( var% totsdepth(mp) )
ALLOCATE( var% smelt(mp) )
ALLOCATE( var% ssdn(mp,msn) )
ALLOCATE( var% ssdnn(mp) )
Expand Down Expand Up @@ -1122,6 +1137,7 @@ SUBROUTINE alloc_canopy_type(var, mp)
ALLOCATE( var% frpw(mp) )
ALLOCATE( var% frpr(mp) )
ALLOCATE( var% frs(mp) )
ALLOCATE( var% fra(mp) )
ALLOCATE( var% fnee(mp) )
ALLOCATE( var% frday(mp) )
ALLOCATE( var% fnv(mp) )
Expand All @@ -1135,6 +1151,7 @@ SUBROUTINE alloc_canopy_type(var, mp)
ALLOCATE( var% ghflux(mp) )
ALLOCATE( var% precis(mp) )
ALLOCATE( var% qscrn(mp) )
ALLOCATE( var% qmom(mp) )
ALLOCATE( var% rnet(mp) )
ALLOCATE( var% rniso(mp) )
ALLOCATE( var% segg(mp) )
Expand All @@ -1154,7 +1171,12 @@ SUBROUTINE alloc_canopy_type(var, mp)
ALLOCATE( var% ga_cor(mp) ) !REV_CORR variable
ALLOCATE ( var % evapfbl(mp,ms) )
ALLOCATE( var% epot(mp) )
ALLOCATE( var% et(mp) )
ALLOCATE( var% eint(mp) )
ALLOCATE( var% tveg(mp) )
ALLOCATE( var% esoil(mp) )
ALLOCATE( var% fnpp(mp) )
ALLOCATE( var% fgpp(mp) )
ALLOCATE( var% fevw_pot(mp) )
ALLOCATE( var% gswx_T(mp) )
ALLOCATE( var% cdtq(mp) )
Expand Down Expand Up @@ -1186,6 +1208,9 @@ SUBROUTINE alloc_canopy_type(var, mp)
ALLOCATE (var % kthLitt(mp))
ALLOCATE (var % DvLitt(mp))

var%tscrn_max_daily = new_aggregator(source_data=var%tscrn); CALL var%tscrn_max_daily%init(method="max")
var%tscrn_min_daily = new_aggregator(source_data=var%tscrn); CALL var%tscrn_min_daily%init(method="min")

END SUBROUTINE alloc_canopy_type

! ------------------------------------------------------------------------------
Expand All @@ -1205,6 +1230,9 @@ SUBROUTINE alloc_radiation_type(var, mp)
ALLOCATE( var% lwabv(mp) )
ALLOCATE( var% qcan(mp,mf,nrb) )
ALLOCATE( var% qssabs(mp) )
ALLOCATE( var% swnet(mp) )
ALLOCATE( var% lwnet(mp) )
ALLOCATE( var% rnet(mp) )
ALLOCATE( var% rhocdf(mp,nrb) )
ALLOCATE( var% rniso(mp,mf) )
ALLOCATE( var% scalex(mp,mf) )
Expand Down Expand Up @@ -1565,6 +1593,7 @@ SUBROUTINE dealloc_soil_snow_type(var)
DEALLOCATE( var% smass )
DEALLOCATE( var% snage )
DEALLOCATE( var% snowd )
DEALLOCATE( var% totsdepth )
DEALLOCATE( var% smelt )
DEALLOCATE( var% ssdn )
DEALLOCATE( var% ssdnn )
Expand Down Expand Up @@ -1756,6 +1785,7 @@ SUBROUTINE dealloc_canopy_type(var)
DEALLOCATE( var% frpw )
DEALLOCATE( var% frpr )
DEALLOCATE( var% frs )
DEALLOCATE( var% fra )
DEALLOCATE( var% fnee )
DEALLOCATE( var% frday )
DEALLOCATE( var% fnv )
Expand All @@ -1769,6 +1799,7 @@ SUBROUTINE dealloc_canopy_type(var)
DEALLOCATE( var% ghflux )
DEALLOCATE( var% precis )
DEALLOCATE( var% qscrn )
DEALLOCATE( var% qmom )
DEALLOCATE( var% rnet )
DEALLOCATE( var% rniso )
DEALLOCATE( var% segg )
Expand All @@ -1788,7 +1819,12 @@ SUBROUTINE dealloc_canopy_type(var)
DEALLOCATE( var% ga_cor ) !REV_CORR variable
DEALLOCATE ( var % evapfbl )
DEALLOCATE( var% epot )
DEALLOCATE( var% et )
DEALLOCATE( var% eint )
DEALLOCATE( var% tveg )
DEALLOCATE( var% esoil )
DEALLOCATE( var% fnpp )
DEALLOCATE( var% fgpp )
DEALLOCATE( var% fevw_pot )
DEALLOCATE( var% gswx_T )
DEALLOCATE( var% cdtq )
Expand All @@ -1811,6 +1847,9 @@ SUBROUTINE dealloc_canopy_type(var)
DEALLOCATE (var % kthLitt)
DEALLOCATE (var % DvLitt)

DEALLOCATE(var%tscrn_max_daily)
DEALLOCATE(var%tscrn_min_daily)

END SUBROUTINE dealloc_canopy_type

! ------------------------------------------------------------------------------
Expand All @@ -1829,6 +1868,9 @@ SUBROUTINE dealloc_radiation_type(var)
DEALLOCATE( var% lwabv )
DEALLOCATE( var% qcan )
DEALLOCATE( var% qssabs )
DEALLOCATE( var% swnet )
DEALLOCATE( var% lwnet )
DEALLOCATE( var% rnet )
DEALLOCATE( var% rhocdf )
DEALLOCATE( var% rniso )
DEALLOCATE( var% scalex )
Expand Down
Loading