Skip to content

Commit

Permalink
converts mom6 time (days from year 0) to dart time (from 1601)
Browse files Browse the repository at this point in the history
see #494 for discusion.
I'm still not sure whether write_time should match the obs or the
model
  • Loading branch information
hkershaw-brown committed Jun 22, 2023
1 parent f202064 commit 056a336
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions models/MOM6/model_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,10 @@ function read_model_time(filename)
integer :: ncid
character(len=*), parameter :: routine = 'read_model_time'
real(r8) :: days
type(time_type) :: mom6_time
integer :: dart_base_date_in_days, dart_days

dart_base_date_in_days = 584388 ! 1601 1 1 0 0
ncid = nc_open_file_readonly(filename, routine)

call nc_get_variable(ncid, 'Time', days, routine)
Expand All @@ -955,9 +958,9 @@ function read_model_time(filename)

! MOM6 counts days from year 1
! DART counts days from 1601
dart_days = int(days) - dart_base_date_in_days

!read_model_time = set_time(0,int(days))
read_model_time = set_time(0,int(151246)) !HK hack for CESM testing
read_model_time = set_time(0,dart_days)

end function read_model_time

Expand Down

0 comments on commit 056a336

Please sign in to comment.