Skip to content

Commit d024542

Browse files
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
2 parents 17a2250 + 626f3f4 commit d024542

File tree

10 files changed

+43
-37
lines changed

10 files changed

+43
-37
lines changed

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
agents:
22
queue: new-central
33
slurm_mem: 8G
4-
modules: climacommon/2025_03_18
4+
modules: climacommon/2025_07_30
55

66
timeout_in_minutes: 1440
77

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
env:
5151
TEST_GROUP: "downloading"
5252
ECCO_USERNAME: ${{ secrets.ECCO_USERNAME }} # To download ECCO data from the podaac website
53-
ECCO_PASSWORD: ${{ secrets.ECCO_PASSWORD }} # To download ECCO data from the podaac website
53+
ECCO_WEBDAV_PASSWORD: ${{ secrets.ECCO_WEBDAV_PASSWORD }} # To download ECCO data from the podaac website
5454
- uses: julia-actions/julia-processcoverage@v1
5555
- uses: codecov/codecov-action@v5
5656
with:
@@ -86,8 +86,8 @@ jobs:
8686
- uses: julia-actions/julia-runtest@v1
8787
env:
8888
TEST_GROUP: "copernicus_downloading"
89-
COPERNICUSMARINE_SERVICE_USERNAME: ${{ secrets.COPERNICUSMARINE_SERVICE_USERNAME }} # To download ECCO data from the podaac website
90-
COPERNICUSMARINE_SERVICE_PASSWORD: ${{ secrets.COPERNICUSMARINE_SERVICE_PASSWORD }} # To download ECCO data from the podaac website
89+
COPERNICUSMARINE_SERVICE_USERNAME: ${{ secrets.COPERNICUSMARINE_SERVICE_USERNAME }}
90+
COPERNICUSMARINE_SERVICE_PASSWORD: ${{ secrets.COPERNICUSMARINE_SERVICE_PASSWORD }}
9191
- uses: julia-actions/julia-processcoverage@v1
9292
- uses: codecov/codecov-action@v5
9393
with:
@@ -97,7 +97,7 @@ jobs:
9797
reactant:
9898
name: Reactant extension - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
9999
runs-on: ${{ matrix.os }}
100-
timeout-minutes: 60
100+
timeout-minutes: 80
101101
strategy:
102102
fail-fast: false
103103
matrix:
@@ -128,3 +128,4 @@ jobs:
128128
with:
129129
files: lcov.info
130130
token: ${{ secrets.CODECOV_TOKEN }}
131+

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ClimaOceanReactantExt = "Reactant"
4444
Adapt = "4"
4545
CFTime = "0.1, 0.2"
4646
CUDA = "4, 5"
47-
ClimaSeaIce = "0.3.3"
47+
ClimaSeaIce = "0.3.5"
4848
CondaPkg = "0.2.28"
4949
CubicSplines = "0.2"
5050
DataDeps = "0.7"
@@ -55,7 +55,7 @@ JLD2 = "0.4, 0.5"
5555
KernelAbstractions = "0.9"
5656
MPI = "0.20"
5757
NCDatasets = "0.12, 0.13, 0.14"
58-
Oceananigans = "0.97.4"
58+
Oceananigans = "0.97.6"
5959
OffsetArrays = "1.14"
6060
PrecompileTools = "1"
6161
PythonCall = "0.9"
@@ -65,7 +65,7 @@ SeawaterPolynomials = "0.3.5"
6565
StaticArrays = "1"
6666
Statistics = "1.9"
6767
SurfaceFluxes = "0.11, 0.12"
68-
Thermodynamics = "0.12"
68+
Thermodynamics = "0.12, 0.13"
6969
ZipFile = "0.10"
7070
julia = "1.10"
7171

examples/near_global_ocean_simulation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ radiation = Radiation(arch)
105105
# The number of snapshots that are loaded into memory is determined by
106106
# the `backend`. Here, we load 41 snapshots at a time into memory.
107107

108-
atmosphere = JRA55PrescribedAtmosphere(arch; backend=JRA55NetCDFBackend(41))
108+
atmosphere = JRA55PrescribedAtmosphere(arch; backend = JRA55NetCDFBackend(41),
109+
include_rivers_and_icebergs = false)
109110

110111
# ## The coupled simulation
111112

examples/one_degree_simulation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ set!(seaice.model, h=ecco_sea_ice_thickness, ℵ=ecco_sea_ice_concentration)
9595

9696
# We force the simulation with a JRA55-do atmospheric reanalysis.
9797
radiation = Radiation(arch)
98-
atmosphere = JRA55PrescribedAtmosphere(arch; backend=JRA55NetCDFBackend(80))
98+
atmosphere = JRA55PrescribedAtmosphere(arch; backend=JRA55NetCDFBackend(80),
99+
include_rivers_and_icebergs = false)
99100

100101
# ### Coupled simulation
101102

src/DataWrangling/DataWrangling.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,24 +147,27 @@ Arguments
147147
148148
!!! info "Credential setup requirements for ECCO datasets"
149149
150-
For ECCO datasets, the data download requires a username and password to be provided in
151-
the `ECCO_USERNAME` and `ECCO_PASSWORD` environment variables respectively. This can be
150+
For ECCO datasets, the data download requires "WebDAV/Programmatic API" credentials from
151+
NASA's Earthdrive. The WebDAV/Programmatic API username and password need to be provided in
152+
the `ECCO_USERNAME` and `ECCO_WEBDAV_PASSWORD` environment variables respectively. This can be
152153
done by exporting the environment variables in the shell before running the script, or by
153154
launching julia with
154155
155156
```
156-
ECCO_USERNAME=myusername ECCO_PASSWORD=mypassword julia
157+
ECCO_USERNAME=myusername ECCO_WEBDAV_PASSWORD=mypassword julia
157158
```
158159
159160
or by invoking
160161
161162
```julia
162163
julia> ENV["ECCO_USERNAME"] = "myusername"
163164
164-
julia> ENV["ECCO_PASSWORD"] = "mypassword"
165+
julia> ENV["ECCO_WEBDAV_PASSWORD"] = "mypassword"
165166
```
166167
167-
within julia.
168+
within julia. More detailed instructions for obtaining WebDAV credentials are at:
169+
170+
https://github.com/CliMA/ClimaOcean.jl/blob/main/src/DataWrangling/ECCO/README.md
168171
"""
169172
function download_dataset end # methods specific to datasets are added within each dataset module
170173
function inpainted_metadata_path end

src/DataWrangling/ECCO/ECCO.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ end
257257

258258
function download_dataset(metadata::ECCOMetadata)
259259
username = get(ENV, "ECCO_USERNAME", nothing)
260-
password = get(ENV, "ECCO_PASSWORD", nothing)
260+
password = get(ENV, "ECCO_WEBDAV_PASSWORD", nothing)
261261
dir = metadata.dir
262262

263263
# Create a temporary directory to store the .netrc file
@@ -276,14 +276,14 @@ function download_dataset(metadata::ECCOMetadata)
276276
if !isfile(filepath)
277277
instructions_msg = "\n See ClimaOcean.jl/src/DataWrangling/ECCO/README.md for instructions."
278278
if isnothing(username)
279-
msg = "Could not find the ECCO_PASSWORD environment variable. \
279+
msg = "Could not find the ECCO_USERNAME environment variable. \
280280
See ClimaOcean.jl/src/DataWrangling/ECCO/README.md for instructions on obtaining \
281-
and setting your ECCO_USERNAME and ECCO_PASSWORD." * instructions_msg
281+
and setting your ECCO_USERNAME and ECCO_WEBDAV_PASSWORD." * instructions_msg
282282
throw(ArgumentError(msg))
283283
elseif isnothing(password)
284-
msg = "Could not find the ECCO_PASSWORD environment variable. \
284+
msg = "Could not find the ECCO_WEBDAV_PASSWORD environment variable. \
285285
See ClimaOcean.jl/src/DataWrangling/ECCO/README.md for instructions on obtaining \
286-
and setting your ECCO_USERNAME and ECCO_PASSWORD." * instructions_msg
286+
and setting your ECCO_USERNAME and ECCO_WEBDAV_PASSWORD." * instructions_msg
287287
throw(ArgumentError(msg))
288288
end
289289
@info "Downloading ECCO data: $(metadatum.name) in $(metadatum.dir)..."

src/DataWrangling/ECCO/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Setting `ECCO_USERNAME` and `ECCO_PASSWORD` environment variables for downloading ECCO datasets
1+
# Setting `ECCO_USERNAME` and `ECCO_WEBDAV_PASSWORD` environment variables for downloading ECCO datasets
22

3-
The first step is to find the username and password for your "programmatic API" credentials on NASA's Earthdrive.
3+
The first step is to find the username and password for your "WebDAV/Programmatic API" credentials on NASA's Earthdrive.
44
For this you have to either login or make an account via the "EARTHDATA login":
55

66
> https://urs.earthdata.nasa.gov
@@ -13,19 +13,19 @@ This should produce a screen similar to the following:
1313

1414
![image](https://github.com/user-attachments/assets/490d9098-aece-4e9c-82d7-3ec86e833347)
1515

16-
showing your Programmatic API credentials -- except in place of the black boxes that say `your_username` and `cRaZYpASSwORD`,
16+
showing your WebDAV/Programmatic API credentials -- except in place of the black boxes that say `your_username` and `cRaZYpASSwORD`,
1717
you should see _your_ username and password.
18-
Copy the content of `Username:` to the environment variable `ECCO_USERNAME` and the content of `Password` to `ECCO_PASSWORD`,
18+
Copy the content of `Username:` to the environment variable `ECCO_USERNAME` and the content of `Password` to `ECCO_WEBDAV_PASSWORD`,
1919
either in a file:
2020

2121
```bash
2222
export ECCO_USERNAME=your_username
23-
export ECCO_PASSWORD=cRaZYpASSwORD
23+
export ECCO_WEBDAV_PASSWORD=cRaZYpASSwORD
2424
```
2525

26-
or within Julia by writing
26+
or within Julia by
2727

2828
```julia
2929
ENV["ECCO_USERNAME"] = "your_username"
30-
ENV["ECCO_PASSWORD"] = "cRaZYpASSwORD"
30+
ENV["ECCO_WEBDAV_PASSWORD"] = "cRaZYpASSwORD"
3131
```

src/OceanSeaIceModels/PrescribedAtmospheres.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using Oceananigans.Simulations: TimeStepWizard
1111
using Adapt
1212
using Thermodynamics.Parameters: AbstractThermodynamicsParameters
1313

14-
import Oceananigans.TimeSteppers: time_step!
14+
import Oceananigans.TimeSteppers: time_step!, update_state!
1515

1616
import Thermodynamics.Parameters:
1717
gas_constant, #
@@ -353,15 +353,21 @@ function default_atmosphere_pressure(grid, times)
353353
return pa
354354
end
355355

356-
@inline function time_step!(atmos::PrescribedAtmosphere, Δt)
357-
tick!(atmos.clock, Δt)
358356

357+
@inline function update_state!(atmos::PrescribedAtmosphere)
359358
time = Time(atmos.clock.time)
360359
ftses = extract_field_time_series(atmos)
361360

362361
for fts in ftses
363362
update_field_time_series!(fts, time)
364363
end
364+
return nothing
365+
end
366+
367+
@inline function time_step!(atmos::PrescribedAtmosphere, Δt)
368+
tick!(atmos.clock, Δt)
369+
370+
update_state!(atmos)
365371

366372
return nothing
367373
end

src/OceanSimulations/ocean_simulation.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ function default_free_surface(grid::DistributedGrid;
7676
return free_surface
7777
end
7878

79-
default_vertical_coordinate(grid) = Oceananigans.Models.ZCoordinate()
80-
default_vertical_coordinate(::MutableGridOfSomeKind) = Oceananigans.Models.ZStar()
81-
8279
function default_ocean_closure(FT=Oceananigans.defaults.FloatType)
8380
mixing_length = CATKEMixingLength(Cᵇ=0.01)
8481
turbulent_kinetic_energy_equation = CATKEEquation(Cᵂϵ=1.0)
@@ -116,7 +113,6 @@ end
116113
tracer_advection = WENO(order=7),
117114
equation_of_state = TEOS10EquationOfState(; reference_density),
118115
boundary_conditions::NamedTuple = NamedTuple(),
119-
vertical_coordinate = default_vertical_coordinate(grid),
120116
radiative_forcing = default_radiative_forcing(grid),
121117
warn = true,
122118
verbose = false)
@@ -140,7 +136,6 @@ function ocean_simulation(grid;
140136
tracer_advection = WENO(order=7),
141137
equation_of_state = TEOS10EquationOfState(; reference_density),
142138
boundary_conditions::NamedTuple = NamedTuple(),
143-
vertical_coordinate = default_vertical_coordinate(grid),
144139
radiative_forcing = default_radiative_forcing(grid),
145140
warn = true,
146141
verbose = false)
@@ -263,8 +258,7 @@ function ocean_simulation(grid;
263258
free_surface,
264259
coriolis,
265260
forcing,
266-
boundary_conditions,
267-
vertical_coordinate)
261+
boundary_conditions)
268262

269263
ocean = Simulation(ocean_model; Δt, verbose)
270264

0 commit comments

Comments
 (0)