New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#1861 (NEMO won't allow XIOS output_freq in minutes or seconds) – NEMO

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1861 closed Defect (fixed)

NEMO won't allow XIOS output_freq in minutes or seconds

Reported by: timgraham Owned by: timgraham
Priority: low Milestone:
Component: OCE Version: trunk
Severity: Keywords: XIOS
Cc: flavoni

Description

Context

XIOS allows file output frequencies to be specified in minutes or seconds but NEMO has not been set up to deal with this when creating the file names in iom.F90. Although this requirement is not used much in long model runs it is useful in the test cases.

Analysis

In the following section of code there is no option for minutes or seconds:

            DO WHILE ( idx /= 0 )
              IF ( output_freq%timestep /= 0) THEN
                  WRITE(clfreq,'(I18,A2)')INT(output_freq%timestep),'ts'
                  itrlen = LEN_TRIM(ADJUSTL(clfreq))
              ELSE IF ( output_freq%hour /= 0 ) THEN
                  WRITE(clfreq,'(I19,A1)')INT(output_freq%hour),'h'
                  itrlen = LEN_TRIM(ADJUSTL(clfreq))
              ELSE IF ( output_freq%day /= 0 ) THEN
                  WRITE(clfreq,'(I19,A1)')INT(output_freq%day),'d'
                  itrlen = LEN_TRIM(ADJUSTL(clfreq))
              ELSE IF ( output_freq%month /= 0 ) THEN
                  WRITE(clfreq,'(I19,A1)')INT(output_freq%month),'m'
                  itrlen = LEN_TRIM(ADJUSTL(clfreq))
              ELSE IF ( output_freq%year /= 0 ) THEN
                  WRITE(clfreq,'(I19,A1)')INT(output_freq%year),'y'
                  itrlen = LEN_TRIM(ADJUSTL(clfreq))
              ELSE
                  CALL ctl_stop('error in the name of file id '//TRIM(cdid),   &
                     & ' attribute output_freq is undefined -> cannot replace @freq@ in '//TRIM(clname) )
              ENDIF

Recommendation

Add the following lines:

              ELSE IF ( output_freq%second /= 0 ) THEN
                  WRITE(clfreq,'(I19,A1)')INT(output_freq%second),'s'
                  itrlen = LEN_TRIM(ADJUSTL(clfreq))
              ELSE IF ( output_freq%minute /= 0 ) THEN
                  WRITE(clfreq,'(I19,A2)')INT(output_freq%minute),'mi'
                  itrlen = LEN_TRIM(ADJUSTL(clfreq))

I'll commit this fix shortly.

Commit History (1)

ChangesetAuthorTimeChangeLog
7764timgraham2017-03-07T13:17:36+01:00

Fix ticket #1861 - allow output of files with frequency set in minutes or seconds

Change History (2)

comment:1 Changed 7 years ago by timgraham

  • Resolution set to fixed
  • Status changed from new to closed

Fixed at r7764

comment:2 Changed 7 years ago by nemo

  • Keywords XIOS added; xios removed
Note: See TracTickets for help on using tickets.