New URL for NEMO forge!

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.
#741 (lim_dia works in MPP) – NEMO

Opened 13 years ago

Closed 13 years ago

Last modified 22 months ago

#741 closed Enhancement (fixed)

lim_dia works in MPP

Reported by: vancop Owned by: nemo
Priority: low Milestone:
Component: LIM3 Version: v3.1
Severity: Keywords: LIM* v3.1


The lim_dia routine used in lln and the evolu files did not work in mpp. Here we added a few lines in the code to allow to have one evolu file per processor

best wishes,


Commit History (6)


ticket GMED#372,NEMO#741: Branch that enables varying weight of snow precipitation forcing over sea ice


ticket GMED#372,NEMO#741: Half snow precipitation forcing


v3.2:correct limdia.F90 routine to work in MPP, see ticket #741


v3.3beta: #741 correct 2 small bugs in ice.evolu diag calculation


Add lim_dia changes for mpp on the 3.3 beta (LIM3 only), see ticket #741


Add lim_dia changes for mpp on the trunk (LIM3 only), see ticket #741

Attachments (1)

limdia.F90 (29.7 KB) - added by vancop 13 years ago.
modified routine

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by vancop

modified routine

comment:1 Changed 13 years ago by gm

The attached routine does not compile with the trunk version of the code. It corresponds to a 3.2 environment...

  • The ctlopn routine is in fact ctl_opn.
  • Its optional argument for the index of the processor is the last one, and a logical print argument now exist.
  • the ice_oce.F90 module does not exist anymore

Therefore, the "USE ice_oce" should be suppressed and the lines 586-587:

      CALL ctlopn( numevo_ice, clname, 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL',    &
         &         irecl, numout, narea, 1 )

should be replaced by:

      CALL ctl_opn( numevo_ice, clname, 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL',    &
         &         irecl, numout, lwp, narea )

In addition, there is a small bug in the computation of northern (southern) hemisphere sum. the "tms" ice-mask at t-point is used, not the "tmask_i". Therefore, duplicated lines due to North fold and east-west boundary conditions, as well as exchanged halos in mpp are taken into account twice ! Simply change line 474:

      aire(:,:) = area(:,:) * tms(:,:)


      aire(:,:) = area(:,:) * tmask_i(:,:)

solves the problem. The results will changed to more accurate values !

Last, all the division by 1.e12 have been replaced by a multiplication by 1.e-12, which is much faster when the compiler is not that smart. By the way, this unit change could be done on the cumulated value (vinfor) instead of on each grid point during the summation ==> significant reduction of the number of operations (currently not done)

All the above changes, including the creation of 1 ice.evolu file by processor as you have suggested, has been done in v3.3beta. set changeset:2439

Remains to be done in the trunk (consolidation of v3.2) before closing the ticket

comment:2 Changed 13 years ago by cetlod

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

Done in v3.2 for consolidation, see changeset:2472

comment:3 Changed 6 years ago by nemo

  • Keywords LIM* added

comment:4 Changed 6 years ago by anaguiar

In 9233:

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

comment:5 Changed 6 years ago by anaguiar

In 9287:

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

comment:6 Changed 22 months ago by nemo

  • Keywords r3.1 added

comment:7 Changed 22 months ago by nemo

  • Keywords v3.1 added; r3.1 removed
Note: See TracTickets for help on using tickets.