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.
#1854 (Use of jpdom_data in mppini_2.h90 is invalid?) – NEMO

Opened 8 years ago

Closed 8 years ago

#1854 closed Bug (fixed)

Use of jpdom_data in mppini_2.h90 is invalid?

Reported by: jamesharle Owned by: jamesharle
Priority: low Milestone:
Component: OCE Version: trunk
Severity: Keywords: MPP, BDY
Cc:

Description

Context

When running nemo with jpni x jpnj < jpnij there are iom_get calls in mppini_2.h90 that use jpdom_data: i.e. when reading ztop and zbot (defined as array jpiglo x jpjglo)

Analysis

As far as I can see jpdom_data uses istart(1:2) = (/ mig(1), mjg(1) + jstartrow - 1 /).

This is a problem because:

1) mig and mjg are yet to be defined (this happens later in the call to dom_ini) and
2) this references istart to the global position of the local processor - and ztop/zbot require the global data not just local.

This is also an issue if applying an additional correction if using the bdy_msk array.

Fix

As in v3.6_stable when bathy_meter.nc was read in - jpdom_unkown can be used.

69c69
<       REAL(wp), DIMENSION(jpiglo,jpjglo) ::   zbot, ztop          ! global workspace
---
>       REAL(wp), DIMENSION(jpiglo,jpjglo) ::   zbot, ztop, zbdy    ! global workspace
96,97c96,97
<       CALL iom_get( inum, jpdom_data, 'bottom_level' , zbot    )  ! nb of ocean T-points
<       CALL iom_get( inum, jpdom_data, 'top_level'    , ztop    )  ! nb of ocean T-points (ISF)
---
>       CALL iom_get( inum, jpdom_unknown, 'bottom_level' , zbot    )  ! nb of ocean T-points
>       CALL iom_get( inum, jpdom_unknown, 'top_level'    , ztop    )  ! nb of ocean T-points (ISF)
118c118
<          CALL iom_get ( inum, jpdom_data, 'bdy_msk', bdytmask(:,:) )
---
>          CALL iom_get ( inum, jpdom_unknown, 'bdy_msk', zbdy )
120c120
<          WHERE ( bdytmask(:,:) <= 0. ) imask = 0
---
>          WHERE ( zbdy(:,:) <= 0. ) imask = 0

Commit History (1)

ChangesetAuthorTimeChangeLog
7832jamesharle2017-03-24T13:49:13+01:00

Fixes to reading in arrays from domain_cfg.nc and bdy_msk.nc, and updates to landsupression mask (see tickets #1853 and #1854).

Change History (2)

comment:1 Changed 8 years ago by jamesharle

  • Owner changed from nemo to jamesharle

comment:2 Changed 8 years ago by jamesharle

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