ClimaOcean.jl icon indicating copy to clipboard operation
ClimaOcean.jl copied to clipboard

Some improvements to the interface for `TabulatedAlbedo`

Open glwagner opened this issue 6 months ago • 0 comments

Here's the docstring:

https://github.com/CliMA/ClimaOcean.jl/blob/290951d823e8571740c3db6a55f31e822320d646/src/OceanSeaIceModels/CrossRealmFluxes/tabulated_albedo.jl#L53-L57

Here's what I suggest:

# Make clear that the latitudes are specific to the tabulated albedo above
const payne_latitude = (0:2:90) .* π / 180
const payne_transmittivity = 0:0.05:1

TabulatedAlbedo(arch = CPU(), FT = Float64; 
                     solar_constant = convert(FT, 1365), # units, also is this specific to payne too?
                     albedo  = payne_albedo, 
                     latitude = payne_latitude, 
                     transmissivity = payne_transmissivity)

This:

  • Uses English words for kwargs which we recommend for all future code
  • Clarifies that the default latitude and transmissivity are specifically associated with the table that's also included in the source code
  • Makes the latitude computation a little clearer

glwagner avatar Aug 20 '24 20:08 glwagner