diff --git a/src/gen_modules_clock.F90 b/src/gen_modules_clock.F90 index 40f9abc31..cf4173f2b 100755 --- a/src/gen_modules_clock.F90 +++ b/src/gen_modules_clock.F90 @@ -12,6 +12,7 @@ module g_clock integer :: ndpyr !number of days in yearnew integer :: num_day_in_month(0:1,12) character(4) :: cyearold, cyearnew !year as character string + character(2) :: cmonth !month as character string data num_day_in_month(0,:) /31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/ data num_day_in_month(1,:) /31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/ @@ -55,6 +56,7 @@ subroutine clock aux2=aux1+num_day_in_month(fleapyear,i) if(daynew>aux1 .and. daynew<=aux2) then month=i + write(cmonth, '(I2.2)') month day_in_month=daynew-aux1 exit end if diff --git a/src/io_meandata.F90 b/src/io_meandata.F90 index d3cab9aa3..57fcda543 100644 --- a/src/io_meandata.F90 +++ b/src/io_meandata.F90 @@ -68,6 +68,7 @@ module io_MEANDATA logical, save :: vec_autorotate=.FALSE. logical, save :: lnextGEMS=.FALSE. integer, save :: nlev_upper=1 + character(len=1), save :: filesplit_freq='y' type io_entry CHARACTER(len=15) :: id ='unknown ' INTEGER :: freq =0 @@ -141,7 +142,7 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh) type(t_tracer), intent(in) , target :: tracers type(t_dyn) , intent(in) , target :: dynamics type(t_ice) , intent(in) , target :: ice - namelist /nml_general / io_listsize, vec_autorotate, lnextGEMS, nlev_upper + namelist /nml_general / io_listsize, vec_autorotate, lnextGEMS, nlev_upper, filesplit_freq namelist /nml_list / io_list #include "associate_part_def.h" @@ -1287,8 +1288,12 @@ subroutine output(istep, ice, dynamics, tracers, partit, mesh) entry%thread_running = .false. ! define filepath - filepath = trim(ResultPath)//trim(entry%name)//'.'//trim(runid)//'.'//cyearnew//'.nc' - + if (filesplit_freq=='m') then + filepath = trim(ResultPath)//trim(entry%name)//'.'//trim(runid)//'.'//cyearnew//'_'//cmonth//'.nc' + else + filepath = trim(ResultPath)//trim(entry%name)//'.'//trim(runid)//'.'//cyearnew//'.nc' + endif + !___________________________________________________________________ ! only root rank task does output if(partit%mype == entry%root_rank) then