Opened 3 years ago

Closed 8 weeks ago

#1840 closed Task (invalid)

optional variables

Reported by: andmirek Owned by: andmirek
Priority: low Milestone:
Component: OCE Version: trunk
Severity: minor Keywords:
Cc: Review: pending
MP ready?: yes
Progress:

Description (last modified by andmirek)

Context

There are few places where optional arguments are used without checking if these variables are passed to the subroutine.

Analysis

Fix

add if(PRESENT) for each OPTIONAL variable before using those variables.

Commit History (8)

ChangesetAuthorTimeChangeLog
11976andmirek2019-11-27T12:06:09+01:00

Ticket #1840, changes after review

11787andmirek2019-10-24T13:46:35+02:00

Ticket #1840, add fix related to optional argument from ticket 2270

11786andmirek2019-10-24T13:05:47+02:00

Ticket #1840, changes in iom.F90

11784andmirek2019-10-24T11:25:37+02:00

Branch for ticket #1840

7867andmirek2017-04-03T17:11:05+02:00

#1840 : add if PRESENT before each OPTIONAL variable in iom.F90

7866andmirek2017-04-03T12:26:42+02:00

Ticket #1840 xios definitions and optional variables

7650andmirek2017-02-06T16:24:31+01:00

#1840 : if(PRESENT) for eanch OPTIONAL variable in iom.F90

7636timgraham2017-02-03T14:56:23+01:00

#1840 Create TEST_CASES directory and move OVERFLOW test case

Change History (17)

comment:1 Changed 3 years ago by andmirek

  • Milestone set to Miscellaneous

comment:2 Changed 3 years ago by andmirek

  • Version changed from nemo_v3_6_STABLE to trunk

branch branches/2017/dev_r7864_XIOS_defs created.

comment:3 Changed 3 years ago by andmirek

branch branches/2017/dev_r7864_XIOS_defs created. Changes in revision 7866.

comment:4 Changed 2 years ago by andmirek

  • Status changed from new to assigned

comment:5 Changed 2 years ago by andmirek

  • Priority changed from lowest to low
  • Type changed from Enhancement to Task
  • workplan_status set to unknown

to be continued next year (2018)

comment:6 Changed 2 years ago by nemo

  • Keywords Misc. added

comment:7 Changed 2 years ago by nemo

  • Keywords Misc. removed

comment:8 Changed 2 years ago by nicolasmartin

  • Type changed from Task to Enhancement

comment:9 Changed 2 years ago by nicolasmartin

  • Milestone Unscheduled deleted

comment:10 Changed 3 months ago by andmirek

In 11784:

Branch for ticket #1840

comment:12 Changed 3 months ago by andmirek

In 11786:

Ticket #1840, changes in iom.F90

comment:13 Changed 3 months ago by andmirek

In 11787:

Ticket #1840, add fix related to optional argument from ticket 2270

comment:14 Changed 3 months ago by andmirek

  • Description modified (diff)
  • Summary changed from xios definitions and optional variables to optional variables
  • Type changed from Enhancement to Task

comment:15 Changed 8 weeks ago by andmirek

In 11976:

Ticket #1840, changes after review

comment:16 Changed 8 weeks ago by smasson

  • MP ready? set to yes
  • Review set to pending

I don't understand the need of these modifications.
To me, you don't need to test the presence of optional variables to pass them as optional arguments of a subroutine. We use this in so many places… see for example iom_g3d.

Why to you need these modifications in iom.F90?

However, I agree with the change in sbcdcy.F90

comment:17 Changed 8 weeks ago by andmirek

  • Resolution set to invalid
  • Status changed from assigned to closed

Indeed in XIOS Fortran interface all those arguments are optional. Given that XIOS is an external library I thought it would make more sense to have separate calls for each argument which is defined. Given everything works I don't see it as a problem, nor there is a need to have in the trunk.

I'll close this ticket and re-open #2270 (for sbcdcy.F90 only).

Note: See TracTickets for help on using tickets.