Opened 7 weeks ago

#2543 new Defect

More flexibility in the restart name numbering ?

Reported by: mathiot Owned by: systeam
Priority: low Milestone:
Component: IOM Version: trunk
Severity: minor Keywords: restart,
Cc:

Description

Context

Default NEMO restart numbering is time-step based:

clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out)

Some users (UKMO at least) need a date based numbering (ln_rstdate):

            ! beware of the format used to write kt (default is i8.8, that should be large enough...)
            IF ( ln_rstdate ) THEN
               zfjulday = fjulday + rdt / rday
               IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error
               CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )           
               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
            ELSE
               IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
               ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst
               ENDIF
            ENDIF
            ! create the file
            clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out)

Other prefer a numbering nn_no based (DRAKKAR):

!{ DRAKKAR modification : NEMO reads restart files :
!       <CN_OCERST_INDIR>.<<nn_no-1>>/<CN_OCERST_IN>-<<nn_no -1 >>_<RANK>.nc
      ! Add extension (job number to the restart dir. Differ for restart input and restart output
      WRITE(cl_no,*) nn_no-1 ; cl_no = TRIM(ADJUSTL(cl_no) )
      cn_ocerst_indir=TRIM(cn_ocerst_indir)//'.'//TRIM(cl_no)
      cn_ocerst_in= TRIM(cn_ocerst_in)//'-'//TRIM(cl_no)

!  DRAKKAR modification : NEMO writes restart files :
!       <CN_OCERST_INDIR>.<<nn_no>>/<CN_OCERST_IN>-<<nn_no  >>_<RANK>.nc
      WRITE(cl_no,*) nn_no   ; cl_no = TRIM(ADJUSTL(cl_no) )
      cn_ocerst_outdir=TRIM(cn_ocerst_outdir)//'.'//TRIM(cl_no)
      cn_ocerst_out= TRIM(cn_ocerst_out)//'-'//TRIM(cl_no)
!}

These 3 possibilities cover time-step, date and leg number. I think with this we cover a lot of the possible choice. Maybe a fourth one is needed:

  • namelist only (ie the user manages the entire name within the namelist via its submission script).

Analysis

  • More flexibility in the restart name numbering could ease the user life when coming the time to upgrade to a new version (less file NEMO source file to manage)

Commit History (0)

(No commits)

Change History (0)

Note: See TracTickets for help on using tickets.