-
Notifications
You must be signed in to change notification settings - Fork 1
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 cesm2_albedo artifact #48
Conversation
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.
This looks great, thank you Teja! After adding the CESM license and updating some typos/outdated text this will be good to merge
Dates.DateTime.( | ||
reinterpret.(Ref(NCDatasets.DateTimeStandard), ds["time"][:]) | ||
) | ||
latitude = ds["lat"][:] |
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'm surprised we can still use this syntax - I thought it got replaced with Array(ds["lat"])
, but maybe that's for variables not dimensions? No need to change it, just something I noticed
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 good to squash and merge! Thank you Teja :)
See related ClimaLand PR here
Originally, ClimaLand was using
esw_albedo_Amon_CESM2_historical_r1i1p1f1_gn_185001-201412_v2.nc
, which is now replaced withsw_albedo_Amon_CESM2_historical_r1i1p1f1_gn_185001-201412_v2_no-nans.nc
, which is exactly the same.There was a python script we had that created a similar file from different datasets. The script calculate_sw_alb.jl is based on this. It has a some manual assignment of variable attributes to make the output file the exact same as the existing
sw_albedo_Amon_CESM2_historical_r1i1p1f1_gn_185001-201412_v2_no-nans.nc
, for which we do not have a generating script. The file the script generates in nearly identical to the original, except some of the variable attributes are saved in different orders, and some of the overall file attributes are different. This is possibly because this script uses Julia's NCDatsets, while the other script uses python's xarray. This should have no impact on ClimaLand's use of the file.We had an existing Julia script to create bareground_albedo.nc. Slight modification was required to make it run without error. In particular
ds2.attrib = ds.attrib
was removed, andsw_alb = ds["sw_alb"][:]
was changed tosw_alb = Array(ds["sw_alb"])
The resulting file is still exactly the same as the original. File equivalence was checked using ncompare and with a for loop, which checks each variable's data, dimensions, and attributes for equivalence. The overall file attributes were also compared.
Checklist:
$artifact_name
README.md
in that that folder thatLICENSE
fileProject.toml
and
Manifest.toml
)OutputArtifacts.toml
file containing the informationneeded for package developers to add
$artifact_name
to their package/groups/esm/ClimaArtifacts/artifacts/$artifact_name
)Overides.toml
on the Caltech Cluster(in
/groups/esm/ClimaArtifacts/artifacts/Overrides.toml
)README.md
to point to the new artifact