Skip to content
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

timeaveraging tool should use standard time variables only #273

Closed
ceblanton opened this issue Feb 7, 2024 · 0 comments · Fixed by #278
Closed

timeaveraging tool should use standard time variables only #273

ceblanton opened this issue Feb 7, 2024 · 0 comments · Fixed by #278

Comments

@ceblanton
Copy link
Contributor

Is your feature request related to a problem? Please describe.
FMS history output has traditionally included time bounds metadata in a non-standard convention. i.e.

  • 3 time bounds variables: average_T1, average_T2, and average_DT
    • average_T1 is the start time for the averaging period (in the same time units as time)
    • average_T2 is the end time for the averaging period
    • average_DT is the length of the averaging period, in days
	double average_T1(time) ;
		average_T1:_FillValue = 1.e+20 ;
		average_T1:missing_value = 1.e+20 ;
		average_T1:units = "days since 1979-01-01 00:00:00" ;
		average_T1:long_name = "Start time for average period" ;
	double average_T2(time) ;
		average_T2:_FillValue = 1.e+20 ;
		average_T2:missing_value = 1.e+20 ;
		average_T2:units = "days since 1979-01-01 00:00:00" ;
		average_T2:long_name = "End time for average period" ;
	double average_DT(time) ;
		average_DT:_FillValue = 1.e+20 ;
		average_DT:missing_value = 1.e+20 ;
		average_DT:units = "days" ;
		average_DT:long_name = "Length of average period" ;
  • These 3 variables are referenced as a variable attribute in each diagnostic. e.g.
		dis_liq:time_avg_info = "average_T1,average_T2,average_DT" ;

The problem is that there is also a standard way to specify the same time bounds information, specified in the CF standards.

  • One time_bounds variable, with an extra nv dimension, that species both average_T1 and average_T2.
	double nv(nv) ;
		nv:long_name = "vertex number" ;
	double time_bnds(time, nv) ;
		time_bnds:units = "days since 1979-01-01 00:00:00" ;
		time_bnds:long_name = "time axis boundaries" ;
  • This time_bounds variable is refernced as a variable attribute of time:
		time:bounds = "time_bnds" ;

Describe the solution you'd like

  1. The timeaveraging tool should read and use the CF standard time:bounds attribute to find the time bounds variable (and not use the nonstandard average_(T1|T2|DT) variables.
  2. The timeaveraging tool should write output time bounds in the standard convention (and not write the nonstandard variables)

Describe alternatives you've considered
Continuing to output duplicate time bounds information is a bad idea, and the diag manager rewrite is a good opportunity to remove unneeded legacy conventions.

Additional context
https://cfconventions.org/Data/cf-conventions/cf-conventions-1.11/cf-conventions.html#cell-boundaries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant