Opened 5 years ago

Closed 5 years ago

#87 closed defect (worksforme)

Duration arithmetics does not work

Reported by: ssenesi Owned by: ymipsl
Priority: major Component: XIOS
Version: 2.0 Keywords:
Cc:

Description

According to the ref_guide :

Arithmetic operations on durations
The following arithmetic operations on durations are available:
• Addition: xios_duration = xios_duration + xios_duration
• Subtraction: xios_duration = xios_duration - xios_duration
• Multiplication by a scalar value: xios_duration = scalar * xios_duration
or xios_duration = xios_duration * scalar
• Negation: xios_duration = -xios_duration

But gfortran doesn't agree :

      CALL XIOS_SET_FIELD_ATTR(HREC, freq_op=KFREQOP*XIOS_HOUR)

1

Error: Operands of binary numeric operator '*' at (1) are INTEGER(4)/TYPE(xios_duration)

   CALL XIOS_SET_FIELD_ATTR(HREC, freq_offset=0.*XIOS_SECOND)

1

Error: Operands of binary numeric operator '*' at (1) are REAL(8)/TYPE(xios_duration)

Change History (2)

comment:1 Changed 5 years ago by ssenesi

Ticket can be closed, as I understood my error : because of the programming standards for my client model, I wrote :

USE XIOS , ONLY : ..[a number of functions] ...

which doesn't allow XIOS to override binary operator '*'

comment:2 Changed 5 years ago by rlacroix

  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.