Skip to content

Commit

Permalink
Merge pull request #111 from gaelforget/v0p4p1d
Browse files Browse the repository at this point in the history
use Climatology, renamed from OceanStateEstimation
  • Loading branch information
gaelforget authored Jun 21, 2024
2 parents 8cdebc9 + c78cc1c commit 75e907d
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/src/functionalities_configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@ MITgcm_path
verification_experiments
setup_verification!
testreport
MITgcm.set_environment_variables_to_default
```
1 change: 1 addition & 0 deletions docs/src/functionalities_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ The [ClimateModels.jl](https://github.com/gaelforget/ClimateModels.jl/#readme)'s

```@example 1
using MITgcm
MITgcm.set_environment_variables_to_default()
MC=MITgcm_config(configuration="advect_xy")
setup(MC)
build(MC,"--allow-skip")
Expand Down
1 change: 1 addition & 0 deletions src/MITgcm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ include("FormatConversions.jl")
include("PhysicalOceanography.jl")
include("ModelConfigurations.jl")
include("ShellScripting.jl")
include("System.jl")

export MITgcm_path, MITgcmScratchSpaces
export MITgcm_download, HS94_pickup_download
Expand Down
28 changes: 28 additions & 0 deletions src/System.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

"""
set_environment_variables_to_default()
Defines environment variables to default values.
_!!! Warning : it is generally much better to adjust them to your own system !!!_
_!!! Warning : the defaults will likely NOT work on most systems !!!_
"""
set_environment_variables_to_default()=begin
@static if Sys.islinux()
ENV_print("DATADEPS_ALWAYS_ACCEPT",true)
ENV_print("MPI_INC_DIR","/usr/lib/x86_64-linux-gnu/openmpi/include")
ENV_print("NETCDF_ROOT","/usr")
elseif Sys.isapple()
ENV_print("NETCDF_ROOT","/opt/homebrew")
ENV_print("MPI_INC_DIR","/opt/homebrew/include")
else
#generic_thing(a)
end
end

ENV_print(a,b) = begin
@warn "setting environment variable $a to $b"
ENV[a]=b
end
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[deps]
Climatology = "9e9a4d37-2d2e-41e3-8b85-f7978328d9c7"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
NetCDF = "30363a11-5582-574a-97bb-aa9a979735b9"
OceanStateEstimation = "891f6deb-a4f5-4bc5-a2e3-1e8f649cdd2c"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using MITgcm, NetCDF, OceanStateEstimation, Test
using MITgcm, NetCDF, Climatology, Test

using MITgcm.MeshArrays
using MITgcm.ClimateModels.Suppressor
using MITgcm.ClimateModels.DataFrames
using MITgcm.ClimateModels.CSV

MITgcm_download()
MITgcm.set_environment_variables_to_default()

@testset "MITgcm.jl" begin

Expand Down

0 comments on commit 75e907d

Please sign in to comment.