#2388 closed Defect (fixed)

Source code in the MY_SRC directory of the BENCH tests case is out of date

Reported by: smueller Owned by: systeam
Priority: low Milestone:
Component: env Version: trunk
Severity: minor Keywords: test_cases, BENCH
Cc: Branch review: failed
MP ready?: no Task progress: Unspecified

Description

Context

The compilation of the BENCH test case fails.

Analysis

There are two issues that result in the failure of the NEMO-executable compilation for the BENCH test case:

Recommendation

To re-enable compilation of the NEMO executable for the BENCH test case, source:/NEMO/trunk/tests/BENCH/MY_SRC/diawri.F90 could be modified according to

  • diawri.F90

     
    4545   ! 
    4646   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    4747   USE in_out_manager ! I/O manager 
    48    USE diatmb         ! Top,middle,bottom output 
    4948   USE dia25h         ! 25h Mean output 
    5049   USE iom            ! 
    5150   USE ioipsl         ! 

and source:/NEMO/trunk/tests/BENCH/MY_SRC/zdfiwm.F90 according to

  • zdfiwm.F90

     
    363363      ENDIF 
    364364      CALL iom_put( "emix_iwm", zemx_iwm ) 
    365365 
    366       IF(ln_ctl)   CALL prt_ctl(tab3d_1=zav_wave , clinfo1=' iwm - av_wave: ', tab3d_2=avt, clinfo2=' avt: ', kdim=jpk) 
     366      IF(sn_cfctl%l_prtctl)   CALL prt_ctl(tab3d_1=zav_wave , clinfo1=' iwm - av_wave: ', tab3d_2=avt, clinfo2=' avt: ', kdim=jpk) 
    367367      ! 
    368368   END SUBROUTINE zdf_iwm 

Further, source:/NEMO/trunk/tests/BENCH/MY_SRC/diawri.F90 and source:/NEMO/trunk/tests/BENCH/MY_SRC/zdfiwm.F90 should be examined for other relevant differences with source:/NEMO/trunk/src/OCE/DIA/diawri.F90 and source:/NEMO/trunk/src/OCE/ZDF/zdfiwm.F90, respectively. Also, some code in source:/NEMO/trunk/tests/BENCH/MY_SRC/ should be updated to make use of do-loop macros.

Commit History (1)

ChangesetAuthorTimeChangeLog
12487smasson2020-02-28T15:59:24+01:00

trunk: bugfix to compile BENCH, see #2388

Change History (3)

comment:1 Changed 12 months ago by smasson

following [11536] and as in release-4.0.2, diawri.F90 should be deleted from MY_SRC.
since https://forge.ipsl.jussieu.fr/nemo/changeset/11536/NEMO/trunk/src/OCE/DIA/diawri.F90, nothing is done when nn_write == -1 and key_iomput is not defined, so there is no need of specific diawri.F90 in the MY_SRC of BENCH

regarding zdfiwm: the copy of this file in BENCH/MY_SRC is there only to replace informations read in 5 different input files (as we don't want any input file in BENCH):

!!$      CALL iom_open('mixing_power_bot',inum)       ! energy flux for high-mode wave breaking [W/m2]
!!$      CALL iom_get  (inum, jpdom_data, 'field', ebot_iwm, 1 ) 
!!$      CALL iom_close(inum)
      ebot_iwm(:,:) = 1.e-6
      !
!!$      CALL iom_open('mixing_power_pyc',inum)       ! energy flux for pynocline-intensified wave breaking [W/m2]
!!$      CALL iom_get  (inum, jpdom_data, 'field', epyc_iwm, 1 )
!!$      CALL iom_close(inum)
      epyc_iwm(:,:) = 1.e-6
      !
!!$      CALL iom_open('mixing_power_cri',inum)       ! energy flux for critical slope wave breaking [W/m2]
!!$      CALL iom_get  (inum, jpdom_data, 'field', ecri_iwm, 1 )
!!$      CALL iom_close(inum)
      ecri_iwm(:,:) = 1.e-10
      !
!!$      CALL iom_open('decay_scale_bot',inum)        ! spatially variable decay scale for high-mode wave breaking [m]
!!$      CALL iom_get  (inum, jpdom_data, 'field', hbot_iwm, 1 )
!!$      CALL iom_close(inum)
      hbot_iwm(:,:) = 100.
      !
!!$      CALL iom_open('decay_scale_cri',inum)        ! spatially variable decay scale for critical slope wave breaking [m]
!!$      CALL iom_get  (inum, jpdom_data, 'field', hcri_iwm, 1 )
!!$      CALL iom_close(inum)
      hcri_iwm(:,:) = 100.
  • a quick fix is to copy src/OCE/ZDF/zdfiwm.F90 into MY_SRC an reapply those modifications
  • a better fix would be to have a nicer and more flexible way to read this input arrays needed by zdfiwm, for example with fldread? We should at least put this 5 2D arrays in a single input file.
Version 0, edited 12 months ago by smasson (next)

comment:2 Changed 12 months ago by smasson

In 12487:

trunk: bugfix to compile BENCH, see #2388

comment:3 Changed 12 months ago by smasson

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

I coded the quick fix as I needed to be able to compile BENCH.

If someone want to code a better fix and add a more flexible way to define input values in zdfiwm, I think this should be done a different and specific ticket (without forgetting to delete BENCH/MY_SRC/zdfiwm.F90 as, once the better fix is done, it should not be necessary to duplicate this routine anymore…)

Note: See TracTickets for help on using tickets.