ESCOMP / MOM_interface

CESM interface to MOM Ocean Model
5 stars 18 forks source link

time_bnds units differ from time units #110

Closed klindsay28 closed 2 years ago

klindsay28 commented 2 years ago

In out current MOM6 output, units for the variables time and time_bnds are

time:units = "days since 0001-01-01 00:00:00"
time_bnds:units = "days"

This difference is not compliant with CF conventions, sec 7.1, paragraph 2.

It caused problems for a post-processing script that I use. I alluded to this in this week's section meeting, but it took awhile to figure out the source of the problem for my script.

I dug into FMS and found that if we add

&mpp_io_nml
    cf_compliance = .true.
/

to input.nml, then time_bnds:units is the same as time:units.

Can we modify input_nml.yaml so that the above is added to input.nml?

The also makes the value of time:calendar lowercase and changes the attribute name cartesian_axis in MOM output to axis. I do not expect these changes to cause problems for tools.

The latter change might actually make MOM output more amenable to the cf-xarray library that @dcherian and others have developed.

klindsay28 commented 2 years ago

@alperaltuntas , can we talk about how to get cf_compliance = .true. in mpp_io_nml added to input.nml into MOM_interface? This unit difference is a headache for my analysis scripts.