-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add high resolution clm data artifact #1007
Conversation
09b5088
to
477838c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The highres artifact is only 2 MB. I think we can just switch to using it all the time.
51ae294
to
058042a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! Thanks!
Looks good. Can we just be more precise in terms of the resolution. High vs low res is relative. Can we call it 0.125 instead? |
The name is now changed to "clm_data_0.125" |
93b94dc
to
ff7d319
Compare
# scale in meters | ||
element_scale = ClimaCore.Meshes.element_horizontal_length_scale(mesh) | ||
return abs(lowres_scale - element_scale) < | ||
abs(highres_scale - element_scale) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to check the distance between nodes, not elements. So you might want to use node_horizontal_length_scale
instead
) | ||
surface_space = domain.space.surface | ||
surface_mesh = ClimaCore.Spaces.topology(surface_space).mesh | ||
@test ClimaLand.use_lowres_clm(surface_mesh) == false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@test ClimaLand.use_lowres_clm(surface_mesh) == false | |
@test !(ClimaLand.use_lowres_clm(surface_mesh)) |
) | ||
surface_space = domain.space.surface | ||
surface_mesh = ClimaCore.Spaces.topology(surface_space).mesh | ||
@test ClimaLand.use_lowres_clm(surface_mesh) == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@test ClimaLand.use_lowres_clm(surface_mesh) == true | |
@test ClimaLand.use_lowres_clm(surface_mesh) |
) | ||
surface_space = domain.space.surface | ||
surface_mesh = ClimaCore.Spaces.topology(surface_space).mesh | ||
@test ClimaLand.use_lowres_clm(surface_mesh) == false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@test ClimaLand.use_lowres_clm(surface_mesh) == false | |
@test !(ClimaLand.use_lowres_clm(surface_mesh)) |
# test `use_lowres_clm` on the sphere domain, and then again with a sphere domain with 2x | ||
# the horizontal resolution. Then repeat with plane domains. | ||
surface_mesh = ClimaCore.Spaces.topology(surface_space).mesh | ||
@test ClimaLand.use_lowres_clm(surface_mesh) == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@test ClimaLand.use_lowres_clm(surface_mesh) == true | |
@test ClimaLand.use_lowres_clm(surface_mesh) |
Adds a higher resolution clm data artifact, named clm_data_0.125x0.125. The previous artifact is renamed to clm_data_0.9x1.25. The clm_data_folder_path function takes in the `lowres` flag as a kwarg, and returns the correct folder based on that. This also adds the `lowres` kwarg to the `clm_canopy_parameters` and `default_spatially_varying_soil_parameters` functions. The default value of `lowres` is determined by the `use_lowres_clm` function. If given a cubed sphere mesh, the function compares the results of ClimaCore.Meshes.element_horizontal_length_scale to the approximate horizontal scale of both clm data artifacts in meters. If given a rectilinear mesh, it does the same but in degrees. adjust test use node horizontal length scale
ff7d319
to
081179c
Compare
Purpose
Along with the accompanying ClimaArtifacts PR, this
closes #999
Content
Adds a higher resolution clm data artifact, named
clm_data_0.125x0.125. The previous artifact is renamed
to clm_data_0.9x1.25.
The clm_data_folder_path function takes in the
lowres
flag as a kwarg, and returns the correct folder based on
that.
This also adds the
lowres
kwarg to theclm_canopy_parameters
anddefault_spatially_varying_soil_parameters
functions. The default value of
lowres
is determined by theuse_lowres_clm
function. If given a cubed sphere mesh, the functioncompares the results of
ClimaCore.Meshes.element_horizontal_length_scale
to the approximate horizontal scale of both clm data artifacts
in meters. If given a rectilinear mesh, it does the same but in
degrees.