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.
#2532 (Several bugs in diaptr) – NEMO

Opened 4 years ago

Closed 4 years ago

#2532 closed Bug (fixed)

Several bugs in diaptr

Reported by: hadcv Owned by: hadcv
Priority: low Milestone: Unscheduled
Component: DIA Version: trunk
Severity: minor Keywords: diaptr, timing
Cc:

Description

  1. timing_stop is not called if l_diaptr == .FALSE.
  2. The "zosrf" diagnostic outputs the wrong data (the 3D surface area, instead of the zonal integral of this quantity) because the result is only defined on one i row.
  3. btmsk is undefined if "subbasins.nc" does not exist

Fix

  1. Call timing_stop in the l_diaptr == .FALSE. case:

http://forge.ipsl.jussieu.fr/nemo/browser/NEMO/trunk/src/OCE/DIA/diaptr.F90?rev=13497#L101

- IF( .NOT. l_diaptr )   RETURN
+ IF( .NOT. l_diaptr ) THEN
+    IF( ln_timing ) CALL timing_stop('dia_ptr')
+    RETURN
+ ENDIF
  1. Set the zonal integral over the full working array as in other cases:

http://forge.ipsl.jussieu.fr/nemo/browser/NEMO/trunk/src/OCE/DIA/diaptr.F90?rev=13497#L199

  DO jn = 1, nptr
     zmask(1,:,:) = ptr_sjk( zmask(:,:,:), btmsk(:,:,jn) )
+    DO ji = 1, jpi
+       zmask(ji,:,:) = zmask(1,:,:)
+    ENDDO
     z4d1(:,:,:,jn) = zmask(:,:,:)
  ENDDO
  CALL iom_put( 'zosrf', z4d1 )
  1. Initialise btmsk:

http://forge.ipsl.jussieu.fr/nemo/browser/NEMO/trunk/src/OCE/DIA/diaptr.F90?rev=13497#L355

+ btmsk(:,:,:) = 0._wp
  btmsk(:,:,1) = tmask_i(:,:)

Commit History (1)

ChangesetAuthorTimeChangeLog
13557smasson2020-10-02T17:19:04+02:00

trunk fix diaprt gugs, see #2532

Change History (2)

comment:1 Changed 4 years ago by smasson

In 13557:

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

comment:2 Changed 4 years ago by smasson

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

I reported points 1 and 2.
I agree with the 3rd point but with Christian we decided to correct it in a different way as we now allow the number of basin to be 1 or 5

Note: See TracTickets for help on using tickets.