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

THIRTY_DAY_MONTHS calendar is not CF compliant #573

Closed
adcroft opened this issue Sep 8, 2020 · 0 comments · Fixed by #574
Closed

THIRTY_DAY_MONTHS calendar is not CF compliant #573

adcroft opened this issue Sep 8, 2020 · 0 comments · Fixed by #574
Assignees
Labels
enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality. feature request
Milestone

Comments

@adcroft
Copy link
Member

adcroft commented Sep 8, 2020

Describe the bug
Using the THIRTY_DAY_MONTHS calendar leads to a CF-non-compliant calendar attribute in the netCDF file, namely time:calendar = "THIRTY_DAY_MONTHS" ;. For this calendar the CF-compliant attribute is time:calendar = "360_day" ;. The CF calendar attribute is documented at https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#calendar

To Reproduce
Use THIRTY_DAY_MONTHS from time_manager_mod with

use time_manager_mod, only : THIRTY_DAY_MONTHS

Run a model with the THIRTY_DAY_MONTHS calendar selected and examine the output. If you don't have examples of the above then

git clone --recursive https://github.com/ocean-eddy-cpt/NeverWorld2
cd NeverWorld2
(. scripts/gaea-gnu-env ; make TEMPLATE=src/mkmf/templates/ncrc-gnu.mk -j )
cd config_0p25/
srun -n 800 ../build/MOM6  # On compute node
ncdump -h snapshots_00000005.nc

Expected behavior
In any output file from diag_manager with a time-dependent variable we expect to get (CDL):

	double time(time) ;
		time:long_name = "time" ;
		time:units = "days since 0001-01-01 00:00:00" ;
		time:cartesian_axis = "T" ;
		time:calendar_type = "360_day" ;
		time:calendar = "360_day" ;
		time:bounds = "time_bnds" ;

but actually get

	double time(time) ;
		time:long_name = "time" ;
		time:units = "days since 0001-01-01 00:00:00" ;
		time:cartesian_axis = "T" ;
		time:calendar_type = "THIRTY_DAY_MONTHS" ;
		time:calendar = "THIRTY_DAY_MONTHS" ;
		time:bounds = "time_bnds" ;

System Environment
Describe the system environment, include:

  • OS: any
  • Compiler(s): any
  • MPI type, and version (e.g. MPICH, Cray MPI, openMPI): any
  • netCDF Version: For both C and Fortran: any
  • Configure options: any

Additional context
This has been raised in MOM6 issue NOAA-GFDL/MOM6/issues/1203 in the context of reading output with xarray. OUr non-compliance with CF has been lond-standing and needs to be addressed.

@thomas-robinson thomas-robinson added enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality. feature request labels Sep 14, 2020
@thomas-robinson thomas-robinson added this to the 2020.03 milestone Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality. feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants