diff --git a/src/offline/cable_mpimaster.F90 b/src/offline/cable_mpimaster.F90 index 3be49630d..cc3db43f6 100644 --- a/src/offline/cable_mpimaster.F90 +++ b/src/offline/cable_mpimaster.F90 @@ -334,6 +334,12 @@ SUBROUTINE mpidrv_master (comm, trunk_sumbal, dels, koffset, kend, PLUME, CRU) ! END header + !ccc Set "calendar" for netcdf time attribute + calendar = "noleap" + IF ( leaps ) THEN + calendar = "standard" + END IF + ! outer loop - spinup loop no. ktau_tot : ktau = 0 SPINLOOP:DO @@ -341,16 +347,11 @@ SUBROUTINE mpidrv_master (comm, trunk_sumbal, dels, koffset, kend, PLUME, CRU) CurYear = YYYY - !ccc Set calendar attribute: dependant on the value of `leaps` - ! that is set in the MetType if conditions above. - calendar = "noleap" + !ccc Set number of days in the year LOY = 365 - IF ( leaps ) THEN - calendar = "standard" - ENDIF IF ( leaps .AND. IS_LEAPYEAR( YYYY ) ) THEN LOY = 366 - ENDIF + END IF SELECT CASE (TRIM(cable_user%MetType)) CASE ('gswp') diff --git a/src/offline/cable_serial.F90 b/src/offline/cable_serial.F90 index ba7778741..a1ff661e9 100644 --- a/src/offline/cable_serial.F90 +++ b/src/offline/cable_serial.F90 @@ -273,6 +273,11 @@ SUBROUTINE serialdrv(trunk_sumbal, NRRRR, dels, koffset, kend, GSWP_MID, PLUME, ! INISTUFF + !ccc Set "calendar" for netcdf time attribute + calendar = "noleap" + IF ( leaps ) THEN + calendar = "standard" + END IF ! outer loop - spinup loop no. ktau_tot : ktau = 0 @@ -284,13 +289,8 @@ SUBROUTINE serialdrv(trunk_sumbal, NRRRR, dels, koffset, kend, GSWP_MID, PLUME, CurYear = YYYY - !ccc Set "calendar" for netcdf time attribute and - ! number of days in the year - calendar = "noleap" + !ccc Set number of days in the year LOY = 365 - IF ( leaps ) THEN - calendar = "standard" - END IF IF ( leaps .AND. IS_LEAPYEAR( YYYY ) ) THEN LOY = 366 END IF