From 9928da1ba73643d001b6cb979a927d44dc008f65 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Tue, 24 Dec 2024 18:31:31 +1100 Subject: [PATCH 1/4] disable ecco2 example --- docs/make.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 4f9164d5..317e81e6 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -13,7 +13,7 @@ const EXAMPLES_DIR = joinpath(@__DIR__, "..", "examples") const OUTPUT_DIR = joinpath(@__DIR__, "src/literated") to_be_literated = [ - "ecco_inspect_temperature_salinity.jl", + # "ecco_inspect_temperature_salinity.jl", "generate_bathymetry.jl", "generate_surface_fluxes.jl", "single_column_os_papa_simulation.jl", @@ -41,7 +41,7 @@ pages = [ "Home" => "index.md", "Examples" => [ - "Inspect ECCO2 data" => "literated/ecco_inspect_temperature_salinity.md", + # "Inspect ECCO2 data" => "literated/ecco_inspect_temperature_salinity.md", "Generate bathymetry" => "literated/generate_bathymetry.md", "Surface fluxes" => "literated/generate_surface_fluxes.md", "Single-column simulation" => "literated/single_column_os_papa_simulation.md", From f819fab17d206166af78a49207f6d51c769b820c Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Tue, 24 Dec 2024 18:32:28 +1100 Subject: [PATCH 2/4] fix docstring rendering --- src/DataWrangling/JRA55.jl | 70 +++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/DataWrangling/JRA55.jl b/src/DataWrangling/JRA55.jl index 96ee8f9e..a5cf3c2d 100644 --- a/src/DataWrangling/JRA55.jl +++ b/src/DataWrangling/JRA55.jl @@ -23,7 +23,7 @@ using ClimaOcean.OceanSeaIceModels: using CUDA: @allowscalar using NCDatasets -using JLD2 +using JLD2 using Dates using Scratch @@ -286,40 +286,41 @@ new_backend(::JRA55NetCDFBackend, start, length) = JRA55NetCDFBackend(start, len """ JRA55_field_time_series(variable_name; architecture = CPU(), - time_indices = nothing, - latitude = nothing, - longitude = nothing, + grid = nothing, location = nothing, url = nothing, + dir = download_jra55_cache, filename = nothing, shortname = nothing, + latitude = nothing, + longitude = nothing, backend = InMemory(), + time_indexing = Cyclical(), preprocess_chunk_size = 10, - preprocess_architecture = CPU()) + preprocess_architecture = CPU(), + time_indices = nothing) Return a `FieldTimeSeries` containing atmospheric reanalysis data for `variable_name`, which describes one of the variables in the "repeat year forcing" dataset derived from the Japanese 55-year atmospheric reanalysis for driving ocean-sea-ice models (JRA55-do). For more information about the derivation of the repeat year forcing dataset, see -"Stewart et al., JRA55-do-based repeat year forcing datasets for driving ocean–sea-ice models", -Ocean Modelling, 2020, https://doi.org/10.1016/j.ocemod.2019.101557. - -The `variable_name`s (and their `shortname`s used in NetCDF files) -available from the JRA55-do are: - - - `:river_freshwater_flux` ("friver") - - `:rain_freshwater_flux` ("prra") - - `:snow_freshwater_flux` ("prsn") - - `:iceberg_freshwater_flux` ("licalvf") - - `:specific_humidity` ("huss") - - `:sea_level_pressure` ("psl") - - `:relative_humidity` ("rhuss") - - `:downwelling_longwave_radiation` ("rlds") - - `:downwelling_shortwave_radiation` ("rsds") - - `:temperature` ("ras") - - `:eastward_velocity` ("uas") - - `:northward_velocity` ("vas") +> Stewart et al. (2020). JRA55-do-based repeat year forcing datasets for driving ocean–sea-ice models, + _Ocean Modelling_, **147**, 101557, https://doi.org/10.1016/j.ocemod.2019.101557. + +The `variable_name`s (and their `shortname`s used in NetCDF files) available from the JRA55-do are: +- `:river_freshwater_flux` ("friver") +- `:rain_freshwater_flux` ("prra") +- `:snow_freshwater_flux` ("prsn") +- `:iceberg_freshwater_flux` ("licalvf") +- `:specific_humidity` ("huss") +- `:sea_level_pressure` ("psl") +- `:relative_humidity` ("rhuss") +- `:downwelling_longwave_radiation` ("rlds") +- `:downwelling_shortwave_radiation` ("rsds") +- `:temperature` ("ras") +- `:eastward_velocity` ("uas") +- `:northward_velocity` ("vas") Keyword arguments ================= @@ -639,20 +640,20 @@ JRA55PrescribedAtmosphere(arch::Distributed, time_indices=Colon(); kw...) = # TODO: allow the user to pass dates """ JRA55PrescribedAtmosphere(architecture::AA, time_indices=Colon(); - backend = nothing, - time_indexing = Cyclical(), - reference_height = 10, # meters - include_rivers_and_icebergs = false, - other_kw...) + backend = nothing, + time_indexing = Cyclical(), + reference_height = 10, # meters + include_rivers_and_icebergs = false, + other_kw...) Return a `PrescribedAtmosphere` representing JRA55 reanalysis data. """ function JRA55PrescribedAtmosphere(architecture::AA, time_indices=Colon(); - backend = nothing, - time_indexing = Cyclical(), - reference_height = 10, # meters - include_rivers_and_icebergs = false, - other_kw...) + backend = nothing, + time_indexing = Cyclical(), + reference_height = 10, # meters + include_rivers_and_icebergs = false, + other_kw...) if isnothing(backend) # apply a default Ni = try @@ -667,7 +668,7 @@ function JRA55PrescribedAtmosphere(architecture::AA, time_indices=Colon(); end kw = (; time_indices, time_indexing, backend, architecture) - kw = merge(kw, other_kw) + kw = merge(kw, other_kw) ua = JRA55_field_time_series(:eastward_velocity; kw...) va = JRA55_field_time_series(:northward_velocity; kw...) @@ -719,4 +720,3 @@ function JRA55PrescribedAtmosphere(architecture::AA, time_indices=Colon(); end end # module - From b85f8570c9b9498853e3f9a9dd1df0b0bdcf90b8 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Tue, 24 Dec 2024 18:32:28 +1100 Subject: [PATCH 3/4] add JRA55 module in docs library --- docs/src/library/internals.md | 7 +++++++ docs/src/library/public.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/docs/src/library/internals.md b/docs/src/library/internals.md index 629b0216..503acc88 100644 --- a/docs/src/library/internals.md +++ b/docs/src/library/internals.md @@ -38,6 +38,13 @@ Modules = [ClimaOcean.ECCO] Public = false ``` +## JRA55 + +```@autodocs +Modules = [ClimaOcean.JRA55] +Public = false +``` + ## Bathymetry ```@autodocs diff --git a/docs/src/library/public.md b/docs/src/library/public.md index 13f94c53..31a77c2b 100644 --- a/docs/src/library/public.md +++ b/docs/src/library/public.md @@ -39,6 +39,13 @@ Modules = [ClimaOcean.ECCO] Private = false ``` +## JRA55 + +```@autodocs +Modules = [ClimaOcean.JRA55] +Private = false +``` + ## Bathymetry ```@autodocs From a589e7e09ab696cee1dd32477e9c377dec0b2a10 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Tue, 24 Dec 2024 22:52:44 +1100 Subject: [PATCH 4/4] fix rendering --- src/DataWrangling/JRA55.jl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/DataWrangling/JRA55.jl b/src/DataWrangling/JRA55.jl index a5cf3c2d..e1774ad2 100644 --- a/src/DataWrangling/JRA55.jl +++ b/src/DataWrangling/JRA55.jl @@ -302,11 +302,10 @@ new_backend(::JRA55NetCDFBackend, start, length) = JRA55NetCDFBackend(start, len Return a `FieldTimeSeries` containing atmospheric reanalysis data for `variable_name`, which describes one of the variables in the "repeat year forcing" dataset derived -from the Japanese 55-year atmospheric reanalysis for driving ocean-sea-ice models (JRA55-do). -For more information about the derivation of the repeat year forcing dataset, see +from the Japanese 55-year atmospheric reanalysis for driving ocean-sea ice models (JRA55-do). +For more information about the derivation of the repeat-year forcing dataset, see -> Stewart et al. (2020). JRA55-do-based repeat year forcing datasets for driving ocean–sea-ice models, - _Ocean Modelling_, **147**, 101557, https://doi.org/10.1016/j.ocemod.2019.101557. +> Stewart et al. (2020). JRA55-do-based repeat year forcing datasets for driving ocean–sea-ice models, _Ocean Modelling_, **147**, 101557, https://doi.org/10.1016/j.ocemod.2019.101557. The `variable_name`s (and their `shortname`s used in NetCDF files) available from the JRA55-do are: - `:river_freshwater_flux` ("friver") @@ -353,8 +352,8 @@ Keyword arguments - `interpolated_file`: file holding an Oceananigans compatible version of the JRA55 data. If it does not exist it will be generated. -- `time_chunks_in_memory`: number of fields held in memory. If `nothing` the whole timeseries is - loaded (not recommended). +- `time_chunks_in_memory`: number of fields held in memory. If `nothing` then the whole timeseries + is loaded (not recommended). """ function JRA55_field_time_series(variable_name; architecture = CPU(),