Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Keep attributes in python climatology computations #930

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Nov 24, 2022

closes #922

@xylar
Copy link
Collaborator Author

xylar commented Nov 24, 2022

Testing

With this fix, the no_ncclimo test in the suite produces climatologies with attributes, as desired:

 ncdump -h mpaso_ANN_000301_000812_climo.nc | more
netcdf mpaso_ANN_000301_000812_climo {
dimensions:
	nCells = 7268 ;
	nVertLevels = 60 ;
	nEdges = 22852 ;
	nMerHeatTransBinsP1 = 181 ;
	nVertLevelsP1 = 61 ;
variables:
	double timeMonthly_avg_dThreshMLD(nCells) ;
		timeMonthly_avg_dThreshMLD:_FillValue = 9.96920996838687e+36 ;
		timeMonthly_avg_dThreshMLD:units = "m" ;
		timeMonthly_avg_dThreshMLD:long_name = "mixed layer depth based 
on density threshold" ;
	double timeMonthly_avg_activeTracers_temperature(nCells, nVertLevels) ;
		timeMonthly_avg_activeTracers_temperature:_FillValue = 9.9692099
6838687e+36 ;
		timeMonthly_avg_activeTracers_temperature:long_name = "potential
 temperature" ;
		timeMonthly_avg_activeTracers_temperature:units = "degrees Celsi
us" ;
	double timeMonthly_avg_activeTracers_salinity(nCells, nVertLevels) ;
		timeMonthly_avg_activeTracers_salinity:_FillValue = 9.9692099683
8687e+36 ;
...

See the following link for the full output from the test suite:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/analysis_testing/chrysalis/copy_attrs_in_python_climo/

@xylar xylar added the bug label Nov 24, 2022
@xylar xylar self-assigned this Nov 24, 2022
@xylar xylar merged commit c19ec71 into MPAS-Dev:develop Nov 24, 2022
@xylar xylar deleted the copy_attrs_in_python_climo branch November 24, 2022 13:30
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python climatology calculation not retaining attributes
1 participant