Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
d99b2b6
Misc cleanups and refactors
simone-silvestri Apr 15, 2026
9739210
Misc cleanups and refactors
simone-silvestri Apr 15, 2026
c1345d7
Add temperature/snow-dependent sea ice albedo (CCSM3 scheme)
simone-silvestri Apr 15, 2026
ac1b6a2
Add Adapt for InterfaceProperties, fix get_snow_thickness call
simone-silvestri Apr 15, 2026
0c355e3
Integrate ClimaSeaIce snow model
simone-silvestri Apr 15, 2026
8e3cb6b
Fix PhaseTransitions kwargs for updated ClimaSeaIce API
simone-silvestri Apr 15, 2026
57ba5b1
fix issue 2
simone-silvestri Apr 15, 2026
8806d2b
Remove unrelated changes from snow-model-integration PR
simone-silvestri Apr 15, 2026
6323dce
Merge branch 'main' into ss/snow-model-integration
simone-silvestri Apr 15, 2026
cb8e8dd
Add unit and integration tests for snow model
simone-silvestri Apr 15, 2026
cff071b
Replace arithmetic test with snow insulation integration test
simone-silvestri Apr 15, 2026
de9d1e7
Remove redundant coupled-model-without-snow test
simone-silvestri Apr 15, 2026
ca8a547
Remove unused imports of immersed bottom drag functions
simone-silvestri Apr 15, 2026
caca7a9
Fix ConstantField setindex! error in snowfall flux assembly
simone-silvestri Apr 15, 2026
995d7f3
correct the snowfall
simone-silvestri Apr 15, 2026
142b35e
just pass a default snow thermodynamics
simone-silvestri Apr 15, 2026
a76c245
Backwards-compatible checkpoint restore for ClimaSeaIce >= 0.4.8
simone-silvestri Apr 16, 2026
fea71d9
Fix snow NaN: PrescribedTemperature for snow top BC + interface tempe…
simone-silvestri Apr 16, 2026
6f561aa
Remove OMIPSimulations files from snow model PR
simone-silvestri Apr 16, 2026
242ce1c
just pass a default snow thermodynamics
simone-silvestri Apr 16, 2026
4654b33
fix reference
simone-silvestri Apr 16, 2026
7c2ccbf
Merge branch 'ss/snow-model-integration' of github.com:NumericalEarth…
simone-silvestri Apr 16, 2026
5921ed1
remove with_snow from the tests
simone-silvestri Apr 16, 2026
19fb9fa
fix the tests
simone-silvestri Apr 16, 2026
ae3b138
update breeze
simone-silvestri Apr 16, 2026
2ef90e4
remove fragile computation of sea ice top temperature
simone-silvestri Apr 16, 2026
88e7051
use the correct source
simone-silvestri Apr 20, 2026
2a8f654
Merge branch 'main' into ss/snow-model-integration
simone-silvestri Apr 20, 2026
fe6484b
correct source for Breeze
simone-silvestri Apr 20, 2026
691e7c3
remove source from weakdep
simone-silvestri Apr 20, 2026
b0d47b2
some fixes
simone-silvestri Apr 20, 2026
c79ea8b
fix all the tests
simone-silvestri Apr 20, 2026
e2aa0e4
import correct function
simone-silvestri Apr 20, 2026
edf43d0
fix more tests
simone-silvestri Apr 20, 2026
05defb4
fix projects to point to correct version of ClimaSeaIce
simone-silvestri Apr 21, 2026
caa630c
fix the snow thingy
simone-silvestri Apr 21, 2026
ee1419a
just pass 0
simone-silvestri Apr 21, 2026
6c96333
fix radiation iteration
simone-silvestri Apr 21, 2026
56e915c
Merge branch 'main' into ss/snow-model-integration
simone-silvestri Apr 21, 2026
371b5ea
Merge branch 'main' into ss/snow-model-integration
simone-silvestri Apr 22, 2026
b0352d7
Merge branch 'main' into ss/snow-model-integration
simone-silvestri Apr 27, 2026
508782e
remove breeze custom path
simone-silvestri Apr 27, 2026
36800b6
complete merge
simone-silvestri Apr 27, 2026
a58b26b
Merge branch 'main' into ss/snow-model-integration
simone-silvestri Apr 28, 2026
929f381
Merge branch 'main' into ss/snow-model-integration
simone-silvestri Apr 30, 2026
fa1b3e6
download also land to avoid conflicts
simone-silvestri Apr 30, 2026
f22cf14
merge main
simone-silvestri May 7, 2026
8668b22
correct the fluxes
simone-silvestri May 7, 2026
7528c9d
Merge branch 'main' into ss/snow-model-integration
simone-silvestri May 7, 2026
43c5085
new ClimaSeaIce
simone-silvestri May 7, 2026
02a9657
Merge branch 'ss/snow-model-integration' of github.com:NumericalEarth…
simone-silvestri May 7, 2026
5b415c8
typo
simone-silvestri May 7, 2026
99e5e86
test fixes
simone-silvestri May 11, 2026
0138a10
Merge branch 'main' into ss/snow-model-integration
simone-silvestri May 11, 2026
2273c27
new climaseaice
simone-silvestri May 11, 2026
f00aef5
fix snow tests
simone-silvestri May 11, 2026
4887011
Apply suggestion from @simone-silvestri
simone-silvestri May 12, 2026
80b7669
Apply suggestion from @simone-silvestri
simone-silvestri May 12, 2026
b41284c
Apply suggestion from @simone-silvestri
simone-silvestri May 12, 2026
4ebf0db
Apply suggestion from @simone-silvestri
simone-silvestri May 12, 2026
ede012b
Apply suggestion from @simone-silvestri
simone-silvestri May 12, 2026
604ec82
small change
simone-silvestri May 12, 2026
e8b53ba
restart CI
simone-silvestri May 12, 2026
c9ac425
fix veros ocean
simone-silvestri May 12, 2026
ebb2bad
Merge branch 'main' into ss/snow-model-integration
simone-silvestri May 12, 2026
380f6b3
fix radiation for veros
simone-silvestri May 12, 2026
6cc4599
Merge branch 'ss/snow-model-integration' of github.com:NumericalEarth…
simone-silvestri May 12, 2026
d477704
Merge branch 'main' into ss/snow-model-integration
simone-silvestri May 12, 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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ArchGDAL = "0.10"
Breeze = "0.4"
CDSAPI = "2.2.1"
CFTime = "0.1, 0.2"
ClimaSeaIce = "0.4.4, 0.5"
ClimaSeaIce = "0.5"
CondaPkg = "0.2.33"
CopernicusMarine = "0.1.1"
CubedSphere = "0.3.4"
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
XESMF = "2e0b0046-e7a1-486f-88de-807ee8ffabe5"

[sources]
Breeze = {rev = "main", url = "https://github.com/NumericalEarth/Breeze.jl/"}
NumericalEarth = {path = ".."}

[compat]
Expand All @@ -32,3 +31,4 @@ CUDA = "~6.0"
Documenter = "1"
DocumenterCitations = "1.3"
Literate = "2.2"
ClimaSeaIce = "0.5.0"
6 changes: 3 additions & 3 deletions docs/src/NumericalEarth.bib
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ @article{holland1999modeling
doi={10.1175/1520-0485(1999)029<1787:MTIOIA>2.0.CO;2}
}

@article{hieronymus2021comparison,
title={A comparison of ocean-ice flux parametrizations},
author={Hieronymus, Magnus and Holtermann, Peter and Gr{\"a}we, Ulf and Burchard, Hans},
@article{shi2021sensitivity,
title={Sensitivity of {Northern Hemisphere} climate to ice--ocean interface heat flux parameterizations},
author={Shi, Xiaoxu and Notz, Dirk and Liu, Jiping and Yang, Hu and Lohmann, Gerrit},
journal={Geoscientific Model Development},
volume={14},
number={8},
Expand Down
4 changes: 2 additions & 2 deletions docs/src/interface_fluxes.md
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ where:
- ``\lambda_1, \lambda_2`` are liquidus coefficients

The ratio ``R = \alpha_h / \alpha_s`` (typically around 35) reflects the different molecular diffusivities of heat and
salt, with heat diffusing faster than salt [hieronymus2021comparison](@citep).
salt, with heat diffusing faster than salt [shi2021sensitivity](@citep).

```@example interface_fluxes
using NumericalEarth.EarthSystemModels: ThreeEquationHeatFlux
Expand Down Expand Up @@ -975,4 +975,4 @@ Note: The `ComponentInterfaces` call above is illustrative; it requires fully co

The implementations follow:
- [holland1999modeling](@citet): foundational three-equation model for ice shelf-ocean interaction
- [hieronymus2021comparison](@citet): comparison of different ocean-ice flux parameterizations
- [shi2021sensitivity](@citet): sensitivity of Northern Hemisphere climate to ice-ocean interface heat flux parameterizations
28 changes: 14 additions & 14 deletions ext/NumericalEarthBreezeExt/breeze_atmosphere_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ boundary_layer_height(::BreezeAtmosphere) = 600
#####

function ComponentExchanger(atmosphere::BreezeAtmosphere, exchange_grid)
state = (; u = Oceananigans.CenterField(exchange_grid),
v = Oceananigans.CenterField(exchange_grid),
T = Oceananigans.CenterField(exchange_grid),
p = Oceananigans.CenterField(exchange_grid),
q = Oceananigans.CenterField(exchange_grid),
state = (; u = Oceananigans.CenterField(exchange_grid),
v = Oceananigans.CenterField(exchange_grid),
T = Oceananigans.CenterField(exchange_grid),
p = Oceananigans.CenterField(exchange_grid),
q = Oceananigans.CenterField(exchange_grid),
ℐꜜˢʷ = Oceananigans.CenterField(exchange_grid),
ℐꜜˡʷ = Oceananigans.CenterField(exchange_grid),
Jᶜ = Oceananigans.CenterField(exchange_grid),
Mp = Oceananigans.CenterField(exchange_grid))
Jʳⁿ = Oceananigans.CenterField(exchange_grid),
Jˢⁿ = Oceananigans.CenterField(exchange_grid))

return ComponentExchanger(state, nothing)
end
Expand All @@ -52,15 +52,15 @@ end
i, j = @index(Global, NTuple)

@inbounds begin
state.u[i, j, 1] = u[i, j, 1]
state.v[i, j, 1] = v[i, j, 1]
state.T[i, j, 1] = T[i, j, 1]
state.q[i, j, 1] = ρqᵛᵉ[i, j, 1] / ρ₀[i, j, 1]
state.p[i, j, 1] = p₀
state.u[i, j, 1] = u[i, j, 1]
state.v[i, j, 1] = v[i, j, 1]
state.T[i, j, 1] = T[i, j, 1]
state.q[i, j, 1] = ρqᵛᵉ[i, j, 1] / ρ₀[i, j, 1]
state.p[i, j, 1] = p₀
state.ℐꜜˢʷ[i, j, 1] = 0
state.ℐꜜˡʷ[i, j, 1] = 0
state.Jᶜ[i, j, 1] = 0
state.Mp[i, j, 1] = 0
state.Jʳⁿ[i, j, 1] = 0
state.Jˢⁿ[i, j, 1] = 0
end
end

Expand Down
36 changes: 22 additions & 14 deletions ext/NumericalEarthSpeedyWeatherExt/speedy_weather_exchanger.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ function ComponentExchanger(atmosphere::SpeedySimulation, exchange_grid)
to_atmosphere = XESMF.Regridder(exchange_grid, spectral_grid)
regridder = (; to_atmosphere, from_atmosphere)

state = (; u = Field{Center, Center, Nothing}(exchange_grid),
v = Field{Center, Center, Nothing}(exchange_grid),
T = Field{Center, Center, Nothing}(exchange_grid),
p = Field{Center, Center, Nothing}(exchange_grid),
q = Field{Center, Center, Nothing}(exchange_grid),
state = (; u = Field{Center, Center, Nothing}(exchange_grid),
v = Field{Center, Center, Nothing}(exchange_grid),
T = Field{Center, Center, Nothing}(exchange_grid),
p = Field{Center, Center, Nothing}(exchange_grid),
q = Field{Center, Center, Nothing}(exchange_grid),
ℐꜜˢʷ = Field{Center, Center, Nothing}(exchange_grid),
ℐꜜˡʷ = Field{Center, Center, Nothing}(exchange_grid),
Jᶜ = Field{Center, Center, Nothing}(exchange_grid))
Jʳⁿ = Field{Center, Center, Nothing}(exchange_grid),
Jˢⁿ = Field{Center, Center, Nothing}(exchange_grid))

return ComponentExchanger(state, regridder)
end
Expand All @@ -52,14 +53,19 @@ function interpolate_state!(exchanger, exchange_grid, atmos::SpeedySimulation, c
exchange_state = exchanger.state
surface_layer = atmos.model.spectral_grid.nlayers

ua = RingGrids.field_view(atmos.variables.grid.u, :, surface_layer).data
va = RingGrids.field_view(atmos.variables.grid.v, :, surface_layer).data
Ta = RingGrids.field_view(atmos.variables.grid.temperature, :, surface_layer).data
qa = RingGrids.field_view(atmos.variables.grid.humidity, :, surface_layer).data
pa = exp.(atmos.variables.grid.pressure.data)
ua = RingGrids.field_view(atmos.variables.grid.u, :, surface_layer).data
va = RingGrids.field_view(atmos.variables.grid.v, :, surface_layer).data
Ta = RingGrids.field_view(atmos.variables.grid.temperature, :, surface_layer).data
qa = RingGrids.field_view(atmos.variables.grid.humidity, :, surface_layer).data
pa = exp.(atmos.variables.grid.pressure.data)
ℐꜜˢʷ = atmos.variables.parameterizations.surface_shortwave_down.data
ℐꜜˡʷ = atmos.variables.parameterizations.surface_longwave_down.data
Jᶜ = atmos.variables.parameterizations.rain_rate.data .+ atmos.variables.parameterizations.snow_rate.data
Jʳⁿ = atmos.variables.parameterizations.rain_rate.data

# `snow_rate` is only registered when SpeedyWeather's large-scale
# condensation parameterization is part of the model
Jˢⁿ = haskey(atmos.variables.parameterizations, :snow_rate) ?
atmos.variables.parameterizations.snow_rate.data : nothing

regrid!(exchange_state.u, ua)
regrid!(exchange_state.v, va)
Expand All @@ -68,7 +74,8 @@ function interpolate_state!(exchanger, exchange_grid, atmos::SpeedySimulation, c
regrid!(exchange_state.p, pa)
regrid!(exchange_state.ℐꜜˢʷ, ℐꜜˢʷ)
regrid!(exchange_state.ℐꜜˡʷ, ℐꜜˡʷ)
regrid!(exchange_state.Jᶜ, Jᶜ)
regrid!(exchange_state.Jʳⁿ, Jʳⁿ)
isnothing(Jˢⁿ) || regrid!(exchange_state.Jˢⁿ, Jˢⁿ)

arch = architecture(exchange_grid)

Expand All @@ -83,7 +90,8 @@ function interpolate_state!(exchanger, exchange_grid, atmos::SpeedySimulation, c
fill_halo_regions!(exchange_state.p)
fill_halo_regions!(exchange_state.ℐꜜˢʷ)
fill_halo_regions!(exchange_state.ℐꜜˡʷ)
fill_halo_regions!(exchange_state.Jᶜ)
fill_halo_regions!(exchange_state.Jʳⁿ)
isnothing(Jˢⁿ) || fill_halo_regions!(exchange_state.Jˢⁿ)

return nothing
end
Expand Down
5 changes: 4 additions & 1 deletion ext/NumericalEarthVerosExt/veros_ocean_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ Returns a NamedTuple containing package information if successful.
Also patches Veros's signal handling to work with PythonCall.
"""
function install_veros()
CondaPkg.add("hdf5"; version="<2", channel="conda-forge") # Veros uses hdf5 version < 2. Therefore we pin it to prevent dependency issues
# Veros uses hdf5 < 2. The shenanigans in the following two lines
# are necessary to allow loading compatible hdf5 and h5py.
CondaPkg.add("hdf5"; version="<2", channel="conda-forge")
CondaPkg.add("h5py"; version=">=3.0,<3.13", channel="conda-forge")
CondaPkg.add_pip("veros", version="@ https://github.com/team-ocean/veros/archive/refs/heads/main.zip")
cli = CondaPkg.which("veros")

Expand Down
2 changes: 1 addition & 1 deletion src/Atmospheres/Atmospheres.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Atmospheres

export atmosphere_simulation, PrescribedAtmosphere
export atmosphere_simulation, PrescribedAtmosphere, PrescribedPrecipitationFlux

using Oceananigans
using Oceananigans.Fields: Center
Expand Down
35 changes: 21 additions & 14 deletions src/Atmospheres/interpolate_atmospheric_state.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ function interpolate_state!(exchanger, grid, atmosphere::PrescribedAtmosphere, c
atmosphere_tracers = (T = atmosphere.tracers.T.data,
q = atmosphere.tracers.q.data)

freshwater_flux = map(ϕ -> ϕ.data, atmosphere.freshwater_flux)
rainfall_flux = surface_rainfall_flux(atmosphere)
snowfall_flux = surface_snowfall_flux(atmosphere)
atmosphere_pressure = atmosphere.pressure.data

# Extract info for time-interpolation
Expand All @@ -41,12 +42,13 @@ function interpolate_state!(exchanger, grid, atmosphere::PrescribedAtmosphere, c

# Simplify NamedTuple to reduce parameter space consumption.
# See https://github.com/CliMA/NumericalEarth.jl/issues/116.
atmosphere_data = (u = atmosphere_fields.u.data,
v = atmosphere_fields.v.data,
T = atmosphere_fields.T.data,
p = atmosphere_fields.p.data,
q = atmosphere_fields.q.data,
Jᶜ = atmosphere_fields.Jᶜ.data)
atmosphere_data = (u = atmosphere_fields.u.data,
v = atmosphere_fields.v.data,
T = atmosphere_fields.T.data,
p = atmosphere_fields.p.data,
q = atmosphere_fields.q.data,
Jʳⁿ = atmosphere_fields.Jʳⁿ.data,
Jˢⁿ = atmosphere_fields.Jˢⁿ.data)

kernel_parameters = interface_kernel_parameters(grid)

Expand All @@ -67,7 +69,8 @@ function interpolate_state!(exchanger, grid, atmosphere::PrescribedAtmosphere, c
atmosphere_velocities,
atmosphere_tracers,
atmosphere_pressure,
freshwater_flux,
rainfall_flux,
snowfall_flux,
atmosphere_backend,
atmosphere_time_indexing)

Expand All @@ -93,7 +96,8 @@ end
atmos_velocities,
atmos_tracers,
atmos_pressure,
prescribed_freshwater_flux,
rainfall_flux,
snowfall_flux,
atmos_backend,
atmos_time_indexing)

Expand All @@ -114,8 +118,8 @@ end
qᵃᵗ = interp_atmos_time_series(atmos_tracers.q, atmos_args...)
pᵃᵗ = interp_atmos_time_series(atmos_pressure, atmos_args...)

# Usually precipitation
Mh = interp_atmos_time_series(prescribed_freshwater_flux, atmos_args...)
Mr = interp_atmos_time_series(rainfall_flux, atmos_args...)
Ms = interp_atmos_time_series(snowfall_flux, atmos_args...)

# Convert atmosphere velocities (usually defined on a latitude-longitude grid) to
# the frame of reference of the native grid
Expand All @@ -128,17 +132,20 @@ end
surface_atmos_state.T[i, j, 1] = Tᵃᵗ
surface_atmos_state.p[i, j, 1] = pᵃᵗ
surface_atmos_state.q[i, j, 1] = qᵃᵗ
surface_atmos_state.Jᶜ[i, j, 1] = Mh
surface_atmos_state.Jʳⁿ[i, j, 1] = Mr
surface_atmos_state.Jˢⁿ[i, j, 1] = Ms
end
end

#####
##### Utility for interpolating tuples of fields
#####

@inline interp_atmos_time_series(::Nothing, X, time, grid, args...) = 0

# Note: assumes loc = (c, c, nothing) (and the third location should not matter.)
@inline interp_atmos_time_series(J::AbstractArray, x_itp::FractionalIndices, t_itp, args...) =
interpolate(x_itp, t_itp, J, args...)
@inline interp_atmos_time_series(J::AbstractArray, X::FractionalIndices, time, args...) =
interpolate(X, time, J, args...)

@inline interp_atmos_time_series(J::AbstractArray, X, time, grid, args...) =
interpolate(X, time, J, (Center(), Center(), nothing), grid, args...)
Expand Down
35 changes: 34 additions & 1 deletion src/Atmospheres/prescribed_atmosphere.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,45 @@ function default_atmosphere_tracers(grid, times)
return (T=Ta, q=qa)
end

"""
PrescribedPrecipitationFlux(; rain=nothing, snow=nothing)
PrescribedPrecipitationFlux(rain, snow)

Container for prescribed precipitation fluxes. Either component may be `nothing`
to indicate that the corresponding precipitation type is not represented by the
atmosphere (e.g. rain-only datasets). Used as the `freshwater_flux` of a
`PrescribedAtmosphere`; downstream callers query the snow component via
[`surface_snowfall_flux`](@ref) so that prognostic atmospheres with or without
snow can dispatch on this type as well.
"""
struct PrescribedPrecipitationFlux{R, S}
rain :: R
snow :: S
end

PrescribedPrecipitationFlux(; rain=nothing, snow=nothing) =
PrescribedPrecipitationFlux(rain, snow)

Adapt.adapt_structure(to, ff::PrescribedPrecipitationFlux) =
PrescribedPrecipitationFlux(adapt(to, ff.rain), adapt(to, ff.snow))

function default_freshwater_flux(grid, times)
rain = FieldTimeSeries{Center, Center, Nothing}(grid, times)
snow = FieldTimeSeries{Center, Center, Nothing}(grid, times)
return (; rain, snow)
return PrescribedPrecipitationFlux(rain, snow)
end

@inline field_data(::Nothing) = nothing
@inline field_data(field) = field.data

@inline surface_snowfall_flux(::Nothing) = nothing
@inline surface_snowfall_flux(atmos::PrescribedAtmosphere) = surface_snowfall_flux(atmos.freshwater_flux)
@inline surface_snowfall_flux(ff::PrescribedPrecipitationFlux) = field_data(ff.snow)

@inline surface_rainfall_flux(::Nothing) = nothing
@inline surface_rainfall_flux(atmos::PrescribedAtmosphere) = surface_rainfall_flux(atmos.freshwater_flux)
@inline surface_rainfall_flux(ff::PrescribedPrecipitationFlux) = field_data(ff.rain)

""" The standard unit of atmospheric pressure; 1 standard atmosphere (atm) = 101,325 Pascals (Pa)
in SI units. This is approximately equal to the mean sea-level atmospheric pressure on Earth. """
function default_atmosphere_pressure(grid, times)
Expand Down
13 changes: 7 additions & 6 deletions src/Atmospheres/prescribed_atmosphere_regridder.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ function ComponentExchanger(atmosphere::PrescribedAtmosphere, grid)

regridder = atmosphere_regridder(atmosphere, grid)

state = (; u = Field{Center, Center, Nothing}(grid),
v = Field{Center, Center, Nothing}(grid),
T = Field{Center, Center, Nothing}(grid),
p = Field{Center, Center, Nothing}(grid),
q = Field{Center, Center, Nothing}(grid),
Jᶜ = Field{Center, Center, Nothing}(grid))
state = (; u = Field{Center, Center, Nothing}(grid),
v = Field{Center, Center, Nothing}(grid),
T = Field{Center, Center, Nothing}(grid),
p = Field{Center, Center, Nothing}(grid),
q = Field{Center, Center, Nothing}(grid),
Jʳⁿ = Field{Center, Center, Nothing}(grid),
Jˢⁿ = Field{Center, Center, Nothing}(grid))

return ComponentExchanger(state, regridder)
end
Expand Down
4 changes: 2 additions & 2 deletions src/DataWrangling/ECCO/ECCO_atmosphere.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using NumericalEarth.DataWrangling: DatasetBackend
using Oceananigans.OutputReaders
using NumericalEarth.Atmospheres: PrescribedAtmosphere
using NumericalEarth.Atmospheres: PrescribedAtmosphere, PrescribedPrecipitationFlux

"""
ECCOPrescribedAtmosphere([architecture = CPU(), FT = Float32];
Expand Down Expand Up @@ -51,7 +51,7 @@ function ECCOPrescribedAtmosphere(architecture = CPU(), FT = Float32;
pa = FieldTimeSeries(pa_meta, architecture; kw...)
Fr = FieldTimeSeries(Fr_meta, architecture; kw...)

freshwater_flux = (; rain = Fr)
freshwater_flux = PrescribedPrecipitationFlux(rain = Fr)

times = ua.times
grid = ua.grid
Expand Down
2 changes: 1 addition & 1 deletion src/DataWrangling/JRA55/JRA55.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using Oceananigans.OutputReaders: Cyclical, TotallyInMemory, AbstractInMemoryBac

using NumericalEarth

using NumericalEarth.Atmospheres: PrescribedAtmosphere
using NumericalEarth.Atmospheres: PrescribedAtmosphere, PrescribedPrecipitationFlux
using NumericalEarth.Radiations: PrescribedRadiation, SurfaceRadiationProperties, default_stefan_boltzmann_constant

using GPUArraysCore: @allowscalar
Expand Down
3 changes: 1 addition & 2 deletions src/DataWrangling/JRA55/JRA55_prescribed_atmosphere.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ function JRA55PrescribedAtmosphere(architecture = CPU(), FT = Float32;
Fra = JRA55FieldTimeSeries(:rain_freshwater_flux, architecture, FT; kw...)
Fsn = JRA55FieldTimeSeries(:snow_freshwater_flux, architecture, FT; kw...)

freshwater_flux = (rain = Fra,
snow = Fsn)
freshwater_flux = PrescribedPrecipitationFlux(rain = Fra, snow = Fsn)

times = ua.times
grid = ua.grid
Expand Down
2 changes: 1 addition & 1 deletion src/DataWrangling/OSPapa/OSPapa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using Downloads
using Thermodynamics: q_vap_from_RH, Liquid

using NumericalEarth.DataWrangling: download_progress
using NumericalEarth.Atmospheres: PrescribedAtmosphere, AtmosphereThermodynamicsParameters
using NumericalEarth.Atmospheres: PrescribedAtmosphere, PrescribedPrecipitationFlux, AtmosphereThermodynamicsParameters
using NumericalEarth.Oceans: reference_density, heat_capacity

using NumericalEarth.DataWrangling:
Expand Down
2 changes: 1 addition & 1 deletion src/DataWrangling/OSPapa/OSPapa_prescribed_atmosphere.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function OSPapaPrescribedAtmosphere(architecture = CPU(), FT = Float32;
velocities = (u=ua, v=va),
tracers = (T=Ta, q=qa),
pressure = Pa,
freshwater_flux = (; rain),
freshwater_flux = PrescribedPrecipitationFlux(; rain),
thermodynamics_parameters = thermo_params,
surface_layer_height = convert(FT, surface_layer_height))
end
Loading
Loading