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.
#1840 (optional variables) – NEMO

Opened 7 years ago

Closed 4 years ago

#1840 closed Task (invalid)

optional variables

Reported by: andmirek Owned by: andmirek
Priority: low Milestone:
Component: OCE Version: trunk
Severity: minor Keywords:
Cc:

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 7 years ago by andmirek

  • Milestone set to Miscellaneous

comment:2 Changed 7 years ago by andmirek

  • Version changed from v3.6 to trunk

branch branches/2017/dev_r7864_XIOS_defs created.

comment:3 Changed 7 years ago by andmirek

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

comment:4 Changed 7 years ago by andmirek

  • Status changed from new to assigned

comment:5 Changed 6 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 6 years ago by nemo

  • Keywords Misc. added

comment:7 Changed 6 years ago by nemo

  • Keywords Misc. removed

comment:8 Changed 6 years ago by nicolasmartin

  • Type changed from Task to Enhancement

comment:9 Changed 6 years ago by nicolasmartin

  • Milestone Unscheduled deleted

comment:10 Changed 5 years ago by andmirek

In 11784:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:12 Changed 5 years ago by andmirek

In 11786:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:13 Changed 5 years ago by andmirek

In 11787:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:14 Changed 5 years 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 4 years ago by andmirek

In 11976:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:16 Changed 4 years ago by smasson

  • branch_review set to pending
  • mp_status set to yes

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 4 years 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.