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.
{10} Assigned, Active Tickets by Reporter (Full Description) – NEMO

{10} Assigned, Active Tickets by Reporter (Full Description) (86 matches)

List tickets assigned, group by ticket reporter. This report demonstrates the use of full-row display.

acc (3 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2175 ENHANCE-05_SimonM-Harmonic_Analysis DIA Unscheduled smueller Task 2018-12-04

Summary

Action ENHANCE-05_SimonM-Harmonic_Analysis
PI(S) Simon Müller, Nicolas Bruneau
Digest This action will enhance the tidal harmonic-analysis diagnostics available in the NEMO framework: the replacement of the current implementation by a facility for generic multiple linear regression will enable tidal harmonic analyses of three-dimensional fields, make harmonic analyses across model restarts possible, and improve the computational efficiency of the analysis, as well as facilitate a wide range of non-tidal regression analyses.
Dependencies
Branch NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/, utils/tools_dev_r11751_ENHANCE-05_SimonM-Harmonic_Analysis/
Previewer(s) Jérôme Chanut
Reviewer(s) Jérôme Chanut
Wiki wiki:2019WP/ENHANCE-05_SimonM-Harmonic_Analysis

Abstract

This action will enhance the tidal harmonic-analysis diagnostics available in the NEMO framework: the replacement of the current implementation by a facility for generic multiple linear regression will enable tidal harmonic analyses of three-dimensional fields, make harmonic analyses across model restarts possible, and improve the computational efficiency of the analysis, as well as facilitate a wide range of non-tidal regression analyses.

Description

The harmonic-analysis diagnostics available in the current reference code is limited to two-dimensional fields (surface only), is activated via a preprocessor key, uses unconventional namelist parameter names, uses a mixture of dynamic and static allocation for large arrays, and appears to be computationally inefficient. Further, while being based on multiple linear regression, the current implementation does not provide for regressions on harmonic components other than tidal constituents.

This action will replace the current tidal harmonic-analysis diagnostics with a generic implementation for multiple linear regression analysis that can be utilised for both tidal harmonic and non-tidal regression analyses. This implementation will provide harmonic-analysis diagnostics enhancements previously tested in a pre-4.0beta NEMO version by N. Bruneau: the analysis of three-dimensional fields, analysis across model restarts, and improved computational efficiency.

In contrast to both the existing harmonic analysis diagnostics in the reference NEMO code and the enhanced pre-4.0beta version by N. Bruneau, the new implementation will make extensive use of XIOS and an off-line tool. This approach should make it possible to simplify the regression analysis-related Fortran module in the core NEMO code, to relocate the regression-analysis configuration to XIOS configuration files, and to enable the selection of any model field handled by XIOS for analysis.

Implementation

See 2019WP/ENHANCE-05_SimonM-Harmonic_Analysis

Reference manual and web pages updates

See 2019WP/ENHANCE-05_SimonM-Harmonic_Analysis


smueller
#2714 ln_nnogather option not working for nn_hls=2 LBC systeam Defect 2021-07-30

Context

Default ORCA2 based SETTE tests are still failing SETTE tests with nn_hls=2. There appear to be two issues (at least): one is associated with tiling and the other with the ln_nnogather option. Setting ln_nnogather=.false. allows a full set of SETTE passes if the -t option is used with sette.sh. Even without tiling, ORCA2_ICE_PISCES reproducibility fails when ln_nnogather=.true.. This ticket addresses the ln_nnogather issues first.

Analysis

Adding the following code to stpmlf.F90 provides evidence of a change in results simply arising from the choice of ln_nnogather:

  • OCE/stpmlf.F90

     
    9393      !!---------------------------------------------------------------------- 
    9494      INTEGER ::   ji, jj, jk, jtile   ! dummy loop indice 
    9595      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   zgdept 
     96      REAL(wp), DIMENSION(jpi,jpj) ::   try1, try2 
     97      INTEGER :: jtyp 
     98      CHARACTER(LEN=1), DIMENSION(4) :: ctyp = (/'T','U','V','W'/) 
    9699      !! --------------------------------------------------------------------- 
    97100#if defined key_agrif 
    98101      IF( nstop > 0 ) RETURN   ! avoid to go further if an error was detected during previous time step (child grid) 
     
    128131         IF( lk_diamlr   )   CALL dia_mlr_iom_init    ! with additional setup for multiple-linear-regression analysis 
    129132                             CALL iom_init_closedef 
    130133         IF( ln_crs      )   CALL iom_init( TRIM(cxios_context)//"_crs" )  ! for coarse grid 
     134         DO jtyp=1,4 
     135         DO_2D(nn_hls, nn_hls, nn_hls, nn_hls ) 
     136          try1(ji,jj) = mig(ji) + (mjg(jj)-1)*jpiglo 
     137          try2(ji,jj) = mig(ji) + (mjg(jj)-1)*jpiglo 
     138         END_2D 
     139         ln_nnogather=.false. ; CALL lbc_lnk('tryme', try1, ctyp(jtyp), 1._wp) 
     140         ln_nnogather=.true. ; CALL lbc_lnk('tryme', try2, ctyp(jtyp), 1._wp) 
     141         DO_2D(nn_hls, nn_hls, nn_hls, nn_hls ) 
     142          IF(ABS(try1(ji,jj) - try2(ji,jj)) .gt. 0._wp ) THEN 
     143           write(*,*) 'NAREA:'//ctyp(jtyp)//' ',narea,ji,jj,try1(ji,jj),try2(ji,jj) 
     144          ENDIF 
     145         END_2D 
     146         END DO 
    131147      ENDIF 
    132148      IF( kstp == nitrst .AND. lwxios ) THEN 
    133149                             CALL iom_swap(                     cw_ocerst_cxt ) 

which, when run, produces this from the restartability test:

NAREA slurm-421072.out
 NAREA:T  29,  1,  17,  27421.,  27597.
 NAREA:T  29,  2,  17,  27420.,  27598.
 NAREA:U  29,  1,  17,  27420.,  27597.
 NAREA:U  29,  2,  17,  27419.,  27598.
 NAREA:V  29,  1,  17,  27237.,  27597.
 NAREA:V  29,  2,  17,  27236.,  27598.
 NAREA:V  29,  1,  18,  27053.,  27237.
 NAREA:V  29,  2,  18,  27052.,  27236.
 NAREA:V  29,  1,  19,  26869.,  27053.
 NAREA:V  29,  2,  19,  26868.,  27052.
 NAREA:W  29,  1,  17,  27421.,  27597.
 NAREA:W  29,  2,  17,  27420.,  27598.
 NAREA:U  30,  47,  17,  27508.,  27509.
 NAREA:U  30,  48,  17,  27508.,  27509.
 NAREA:U  31,  2,  17,  27508.,  27509.
 NAREA:U  31,  3,  17,  27508.,  27509.
 NAREA:T  32,  49,  17,  27420.,  27598.
 NAREA:U  32,  1,  17,  27465.,  27552.
 NAREA:W  32,  49,  17,  27420.,  27598.

Recommendation

None. I do not recognise the current implementation of the ln_nnogather option. Hopefully someone in the team will have a better idea where to start digging.

Secondary recommendation would be to add this test, or something similar, to a permanent testing suite.


systeam
#2653 Namelist quirks with Cray compilers (trunk only) TOP acc Defect 2021-04-08

Context

The behaviour of internal file based namelists differs in codes compiled with or without MPI using recent Cray compilers. Expected behaviour can be obtained if, and only if, every .true. or .false. stand-alone assignment is followed by a comma. These commas should not be necessary and are not necessary with intel or gfortran compilers (or even Crayftn without MPI??). This has been reported to Cray. Meanwhile, some simple scripts (see below) can be used to add commas. Details follow, including a simple program that reproduces the behaviour.

Analysis

The background

The current development version of NEMO uses internal files for its namelists. This is to avoid filesystem accesses; instead rank zero reads the entire namelist, strips comments and broadcasts the entire character buffer to everyone else. This is working on a variety of systems (including ARCHER). On Archer2, I've been encountering errors which the model assumes are misspelt variables in the namelist but the input namelists are fine. It turns out I can replicate these errors with a simple namelist; but, strangely, only in an MPI environment.

The example program

The program: errornml_mpi.F90 (listed below) defines a simple namelist (as a character string) and broadcasts this to other ranks. The program can also be compiled without mpi. Two different namelists can be used, decided by a command-line argument: g (for good) or b (for bad). The two namelists differ only by the addition of commas immediately after .true. or .false. settings. This is my work-around because it works with the commas but not without them. Commas should not be necessary (and aren't necessary for all the real, integer and character variables in the full namelist). Currently Loaded compiler:

ftn -V Cray Fortran : Version 10.0.4 In non-mpi mode, I find no difference in behaviour between the two namelists:

ftn -o errornml -O1 errornml_mpi.F90
 
./errornml g
The whole internal file:
&namctl sn_cfctl%l_trcstat=.true.,  sn_cfctl%l_runstat=.true., /
----
namctl in namelist_cfg:
 &NAMCTL  SN_CFCTL = T, T, F, F, F, F, F, 0, 1000000, 1, 1, LN_TIMING = F,
 LN_DIACFL = F, NN_ISPLT = 0, NN_JSPLT = 0, NN_ICTLS = 0, NN_ICTLE = 0, NN_JCTLS
 = 0, NN_JCTLE = 0 /
----
 STOP
 
./errornml b
The whole internal file:
&namctl sn_cfctl%l_trcstat=.true.  sn_cfctl%l_runstat=.true. /
----
namctl in namelist_cfg:
 &NAMCTL  SN_CFCTL = T, T, F, F, F, F, F, 0, 1000000, 1, 1, LN_TIMING = F,
 LN_DIACFL = F, NN_ISPLT = 0, NN_JSPLT = 0, NN_ICTLS = 0, NN_ICTLE = 0, NN_JCTLS
 = 0, NN_JCTLE = 0 /
----
 STOP

With MPI and srun (even with just 1 rank) the behaviour changes:

ftn -o errornml_mpi -DUSE_MPI  -O1 errornml_mpi.F90
srun -n 1 ./errornml_mpi g
The whole internal file:
&namctl sn_cfctl%l_trcstat=.true.,  sn_cfctl%l_runstat=.true., /
----
namctl in namelist_cfg:
 &NAMCTL  SN_CFCTL = T, T, F, F, F, F, F, 0, 1000000, 1, 1, LN_TIMING = F,
 LN_DIACFL = F, NN_ISPLT = 0, NN_JSPLT = 0, NN_ICTLS = 0, NN_ICTLE = 0, NN_JCTLS
 = 0, NN_JCTLE = 0 /
----
 STOP
 
srun -n 1 ./errornml_mpi b
The whole internal file:
&namctl sn_cfctl%l_trcstat=.true.  sn_cfctl%l_runstat=.true. /
----
namctl in namelist_cfg:
Not found or bad
 
Not found or bad
 
MPICH ERROR [Rank 0] [job id 42135.24] [Sat Nov  7 13:28:42 2020] [unknown]
[nid001114] - Abort(25) (rank 0 in comm 0): application called
MPI_Abort(MPI_COMM_WORLD, 25) - process 0

and just to prove the MPI is working:

srun -n 2 ./errornml_mpi g
The whole internal file:
&namctl sn_cfctl%l_trcstat=.true.,  sn_cfctl%l_runstat=.true., /
----
namctl in namelist_cfg:
 &NAMCTL  SN_CFCTL = T, T, F, F, F, F, F, 0, 1000000, 1, 1, LN_TIMING = F,
 LN_DIACFL = F, NN_ISPLT = 0, NN_JSPLT = 0, NN_ICTLS = 0, NN_ICTLE = 0, NN_JCTLS
 = 0, NN_JCTLE = 0 /
----
 STOP
----
namctl in namelist_cfg:     1
The whole internal file:
&namctl sn_cfctl%l_trcstat=.true.,  sn_cfctl%l_runstat=.true., /
----
 &NAMCTL  SN_CFCTL = T, T, F, F, F, F, F, 0, 1000000, 1, 1, LN_TIMING = F,
 LN_DIACFL = F, NN_ISPLT = 0, NN_JSPLT = 0, NN_ICTLS = 0, NN_ICTLE = 0, NN_JCTLS
 = 0, NN_JCTLE = 0 /
----
 STOP

I can't explain this so I'm assuming it is a compiler bug but it is odd that it seems impossible to replicate without the mpi environment. The work-around is to add commas (see scripts below) but it is tedious to have to maintain different namelists for different systems and Cray compilers are alone in this behaviour. The actual namelists are some 38k characters but it is only logical variables that need these commas appended.

Recommendation

Wait for Cray to fix their compiler. Meanwhile, run the edit_nmls script in the directory above tests and cfgs on each new checkout before building any configurations with Cray compilers. reverse_edit_nmls should reverse changes before any check-ins. Permanently adding the commas is an option but it is difficult to ensure they are maintained.

errornml_mpi.F90

   PROGRAM errornml
#if defined USE_MPI
      USE MPI
#endif
      CHARACTER(LEN=:), ALLOCATABLE    :: cdnambuff
      CHARACTER(LEN=100)               :: this_works='&namctl sn_cfctl%l_trcstat=.true.,  sn_cfctl%l_runstat=.true., /'
      CHARACTER(LEN=100)               :: this_breaks='&namctl sn_cfctl%l_trcstat=.true.  sn_cfctl%l_runstat=.true. /'
      CHARACTER(LEN=100)               :: use_this
      INTEGER                          :: kout = 6
      LOGICAL                          :: ldwp =.FALSE. !: .true. only for the root broadcaster
      INTEGER                          :: itot, ierr, mpprank, mppsize
      TYPE :: sn_ctl
         LOGICAL :: l_runstat = .FALSE.
         LOGICAL :: l_trcstat = .FALSE.
         LOGICAL :: l_oceout  = .FALSE.
         LOGICAL :: l_layout  = .FALSE.
         LOGICAL :: l_prtctl  = .FALSE.
         LOGICAL :: l_prttrc  = .FALSE.
         LOGICAL :: l_oasout  = .FALSE.
         INTEGER :: procmin   = 0
         INTEGER :: procmax   = 1000000
         INTEGER :: procincr  = 1
         INTEGER :: ptimincr  = 1
      END TYPE
      TYPE(sn_ctl), SAVE :: sn_cfctl
      LOGICAL ::   ln_timing
      LOGICAL ::   ln_diacfl
      INTEGER ::   nn_ictls
      INTEGER ::   nn_ictle
      INTEGER ::   nn_jctls
      INTEGER ::   nn_jctle
      INTEGER ::   nn_isplt
      INTEGER ::   nn_jsplt
      NAMELIST/namctl/ sn_cfctl, ln_timing, ln_diacfl,                                &
         &             nn_isplt,  nn_jsplt,  nn_ictls, nn_ictle, nn_jctls, nn_jctle
      character(len=32)           :: arg
      integer                     :: iarg

      use_this=this_works
      do iarg = 1, command_argument_count()
        call get_command_argument(iarg, arg)

        select case (arg)
            case ('g', 'good')
                use_this = this_works
            case ('b', 'bad')
                use_this = this_breaks
        end select
      end do
!
# if defined USE_MPI
         CALL mpi_init( ierr )
         CALL mpi_comm_size( MPI_COMM_WORLD, mppsize, ierr )
         CALL mpi_comm_rank( MPI_COMM_WORLD, mpprank, ierr )
         if( mpprank .eq. 0 ) ldwp = .true.
         if(ldwp) THEN
#endif
         !
         ! Test the contents of the internal file
         !
         ! Write it all out:
           ! hand-crafted substitute for the load_nml subroutine which reads whole namelists and
           ! condenses them into a character string
             itot=len_trim(use_this)
             IF ( .NOT. ALLOCATED(cdnambuff) ) ALLOCATE( CHARACTER(LEN=itot) :: cdnambuff )
             cdnambuff=TRIM(use_this)
           !
           write(6,'(a)') 'The whole internal file: '
           write(6,'(32A)') cdnambuff
           write(6,'(a)')'----'

# if defined USE_MPI
           call mpp_bcast_nml( cdnambuff , itot )
#endif

           write(6,'(a)') 'namctl in namelist_cfg: '
           read(cdnambuff, namctl, iostat=ios, end=99, err=99)
           write(6,namctl)
           write(6,'(a)')'----'
           goto 101
           !
    99     write(6,'(a)') 'Not found or bad ',ios
           goto 98
           !
   101     CONTINUE
# if defined USE_MPI
         ELSE
           call mpp_bcast_nml( cdnambuff , itot )
           write(*,'(a)')'----'
           write(*,'(a,i5)') 'namctl in namelist_cfg: ',mpprank
           write(6,'(a)') 'The whole internal file: '
           write(6,'(32A)') cdnambuff
           write(6,'(a)')'----'
           read(cdnambuff, namctl, iostat=ios, end=98, err=98)
           write(*,namctl)
           write(*,'(a)')'----'
         ENDIF
         call MPI_BARRIER(MPI_COMM_WORLD, ierr)
         call MPI_FINALIZE(ierr)
#endif
         STOP
    98   write(6,'(a)') 'Not found or bad ',ios
# if defined USE_MPI
         CALL MPI_ABORT(MPI_COMM_WORLD, ios, ierr)
  CONTAINS

   SUBROUTINE mpp_bcast_nml( cdnambuff , kleng )
      CHARACTER(LEN=:)    , ALLOCATABLE, INTENT(INOUT) :: cdnambuff
      INTEGER                          , INTENT(INOUT) :: kleng
      !!----------------------------------------------------------------------
      !!                  ***  routine mpp_bcast_nml  ***
      !!
      !! ** Purpose :   broadcast namelist character buffer
      !!
      !!----------------------------------------------------------------------
      !!
      INTEGER ::   iflag
      !!----------------------------------------------------------------------
      !
      call MPI_BCAST(kleng, 1, MPI_INT, 0, MPI_COMM_WORLD, iflag)
      call MPI_BARRIER(MPI_COMM_WORLD, iflag)
      IF ( .NOT. ALLOCATED(cdnambuff) ) ALLOCATE( CHARACTER(LEN=kleng) :: cdnambuff )
      call MPI_BCAST(cdnambuff, kleng, MPI_CHARACTER, 0, MPI_COMM_WORLD, iflag)
      call MPI_BARRIER(MPI_COMM_WORLD, iflag)
      !
   END SUBROUTINE mpp_bcast_nml
#endif

  END PROGRAM errornml

edit_nmls (better suggestions are welcome):

#!/bin/bash
for d in cfgs tests
do
cd $d
for nml in `find ./ -name '*namelist_*'`
do
chk=$(grep -c -i -e"= *.false.," -e"= *.true.," $nml)
if test $chk -eq 0 ; then
echo "Changing : "$nml
ed - $nml << EOF
%s/=\( *\).false./=\1.false.,/
w
q
EOF
ed - $nml << EOF
%s/=\( *\).FALSE./=\1.FALSE.,/
w
q
EOF
ed - $nml << EOF
%s/=\( *\).true./=\1.true.,/
w
q
EOF
ed - $nml << EOF
%s/=\( *\).TRUE./=\1.TRUE.,/
w
q
EOF
else
echo $nml " may have already been processed: "$chk" lines already correct"
fi
done
cd ../
done

reverse_edit_nmls:

cat reverse_edit_nmls
#!/bin/bash
for d in cfgs tests
do
cd $d
for nml in `find ./ -name '*namelist_*'`
do
chk=$(grep -c -i -e"= *.false.," -e"= *.true.," $nml)
if test $chk -ne 0 ; then
echo "Changing : "$nml
ed - $nml << EOF
%s/=\( *\).false.,/=\1.false./
w
q
EOF
ed - $nml << EOF
%s/=\( *\).FALSE.,/=\1.FALSE./
w
q
EOF
ed - $nml << EOF
%s/=\( *\).true.,/=\1.true./
w
q
EOF
ed - $nml << EOF
%s/=\( *\).TRUE.,/=\1.TRUE./
w
q
EOF
else
echo $nml " may have already been processed: "$chk" lines already reverted"
fi
done
cd ../
done

acc

amoulin (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2745 zdfric not compatible with p_sh2 calculation ZDF systeam Bug 2021-11-18

Context

...

Analysis

Richardson number vertical mixing is not compatible with the shear production term (p_sh2) calculated in zdfsh2 (using the before and after velocities)

(Simulation in the MEDSEA gave really high RMSE in the temperature and salinity fields)

Fix

We propose to reintroduce the calculation of the shear production term as it was in the past version (using only before velocities)

zdku = 0.5 / e3uw(ji,jj,jk,Kbb) * ( uu(ji-1,jj,jk-1,Kbb) + uu(ji,jj,jk-1,Kbb) &

& - uu(ji-1,jj,jk,Kbb) - uu(ji,jj,jk,Kbb) )* wumask(ji,jj,jk)

zdkv = 0.5 / e3vw(ji,jj,jk,Kbb) * ( vv(ji,jj-1,jk-1,Kbb) + vv(ji,jj,jk-1,Kbb) &

& - vv(ji,jj-1,jk,Kbb) - vv(ji,jj,jk,Kbb) )* wvmask(ji,jj,jk)

zwx = zdku*zdku + zdkv*zdkv

zcfRi = 1._wp / ( 1._wp + rn_alp * MAX( 0._wp , rn2(ji,jj,jk) / ( zwx + 1.e-20 ) ) )


systeam

cbricaud (3 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1959 ENHANCE-09_Jerome_freesurface(2017WP) OCE Unscheduled jchanut Task 2017-10-12

Summary

Action ENHANCE-09_Jerome_freesurface
PI(S) Jérôme Chanut

Digest

Improve split-explicit free surface:
1) Tracer conservation issues (all time splitting options do not ensure global and local tracer conservation): DONE
2) Missing correction terms in the barotropic equations relative to internal pressure gradients. This would reduce mode splitting error, hence improve stability
3) Work on the stability of barotropic time stepping (based on INRIA's work) to possibly remove time filtering of barotropic variables. This would limit the temporal dissipation and greatly ease online coupling of nested domains at barotropic level (with AGRIF). DONE

Dependencies
Target 2019 WP
Trac Ticket #1959
SVN branch branches/2019/dev_r10951_ENHANCE-09_Jerome_freesurface
Previewer(s) Gurvan Madec
Reviewer(s) Gurvan Madec
Link "wiki:2019WP/ENHANCE-09_Jerome_freesurface"

jchanut
#2269 OBSTOOLS/sla2fb: old altimetry format TOP djlea Defect 2019-04-05

Context

OBSTOOLS/sla2fb is used to convert aviso sla netfiles to feedback format, read by the Observation operator in NEMO

obssla_io.h90 read the aviso files, but it needs to read aviso sla files with "old format" ( Tracks, Cycles, Data dimensions)

Analysis

Someone should have the good routine

Recommendation

...


djlea
#2604 MOI-02_MOI-GLS-ICE TOP Unscheduled cbricaud Task 2021-01-25
  • branch to improve scaling of mixing under sea-ice ( do as it is in TKE)
  • add limit condition under ice shelves

Workplan action

Wikipage: wiki:2021WP/MOI-02_MOI-GLS-ICE


cbricaud

cetlod (3 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1463 CNRS-13(2015WP) - Subduction diagnostics OCE Unscheduled cetlod Task 2015-02-04

Add useful diagnostics of subduction of water masses Already coded/tested in v3.4 ; adapt to the current version


cetlod
#2654 VLD-08_CEthe_IPSL_Coupled_Model MULTIPLE Unscheduled cetlod Task 2021-04-08

Workplan action

Wikipage: wiki:2021WP/VLD-08_CEthe_IPSL_Coupled_Model


cetlod
#2659 TOP-01_CEthe_PISCES_NEWDEV PISCES Unscheduled cetlod Task 2021-04-29

Workplan action

Improvments of PISCES biogeochemical model

Wikipage: wiki:2021WP/TOP-01_CEthe_PISCES_NEWDEV


cetlod

chrenkl (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1584 utrd_zdf and vtrd_zdf are velocities minus momentum trends TRD gm Bug 2015-07-28

In the subroutine for vertical diffusion using a implicit time-stepping (dyn_zdf_imp in dynzdf_imp.F90), the momentum trends ua and va are integrated in time and become the after velocities (lines 122-136). Thus, in lines 90-95 of dynzdf.F90, when the momentum trend diagnostics are supposed to be computed, momentum trends (ztrdu, ztrdv) are subtracted from velocities (ua, va).

Therefore,

90   IF( l_trddyn )   THEN                      ! save the vertical diffusive trends for further diagnostics
91      ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
92      ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
93      CALL trd_dyn( ztrdu, ztrdv, jpdyn_zdf, kt )
94      CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
95   ENDIF

should be changed to

90   IF( l_trddyn )   THEN                      ! save the vertical diffusive trends for further diagnostics
91      ztrdu(:,:,:) = ( ua(:,:,:) - ub(:,:,:) ) / r2dt - ztrdu(:,:,:)
92      ztrdv(:,:,:) = ( va(:,:,:) - vb(:,:,:) ) / r2dt - ztrdu(:,:,:)
93      CALL trd_dyn( ztrdu, ztrdv, jpdyn_zdf, kt )
94      CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
95   ENDIF

as it is done in dynspg.F90. I have not checked whether this is also the case for vertical diffusion with explicit time-stepping.


gm

clem (7 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2737 mass of the ice+ocean system depends on the init of ice SI3 systeam Defect 2021-10-29

Analysis

The mass of the "ocean + ice" system depends on the initialization of the ice cover. I think it should not. For instance, a simulation initialized with 1m of ice contains less mass than a simulation initialized with 2m of ice. This solely concerns levitating sea ice (the default). For embedded sea ice, ssh is depleted below the ice cover. This dependency problem has already been raised in ticket #2487 but not yet adressed.

Recommendation

For embedded sea ice, the ssh is depleted below the ice cover so that the mass of the "ocean+ice" system does not depend on the ice initialization.

I propose to do similar thing for levitating sea ice, except that the depletion is spread over the whole basin (including ice shelves). Here is the new piece of code I adapted from Simon to be added in iceistate.F90 (note that a special treatment for agrif is necessary):

      IF( ln_ice_embd ) THEN            ! embedded sea-ice: deplete the initial ssh below sea-ice area
         !                              ! ----------------
         ssh(:,:,Kmm) = ssh(:,:,Kmm) - snwice_mass(:,:) * r1_rho0
         ssh(:,:,Kbb) = ssh(:,:,Kbb) - snwice_mass(:,:) * r1_rho0
         !
      ELSE                              ! levitating sea-ice: deplete the initial ssh over the whole domain
         !                              ! ------------------
         area    = glob_sum( 'iceistate', e1e2t(:,:) * ssmask(:,:) )
         zsshadj = glob_sum( 'iceistate', snwice_mass(:,:) * r1_rho0 * e1e2t(:,:) ) / area
#if defined key_agrif
         ! Override ssh adjustment in nested domains by the root-domain ssh adjustment;
         ! store the adjustment value in a global module variable to make it retrievable in nested domains
         IF( .NOT.Agrif_Root() ) THEN
            zsshadj = Agrif_Parent(rsshadj)
         ELSE
            rsshadj = zsshadj
         ENDIF
#endif
         IF(lwp) WRITE(numout,'(A23,F10.6,A20)') ' sea level adjusted by ', -zsshadj, ' m to compensate for'
         IF(lwp) WRITE(numout,*) ' the initial snow+ice mass'
         !
         WHERE( ssmask(:,:) == 1._wp )
            ssh(:,:,Kmm) = ssh(:,:,Kmm) - zsshadj
            ssh(:,:,Kbb) = ssh(:,:,Kbb) - zsshadj
         ENDWHERE
         !
      ENDIF

This change at the init makes the ssh to drop globally of about 10cm, but simulations with and without are very similar, though I do not have a simulation with open ice shelf cavities to test it. Of course, sette tests are fine. I think it needs to be implemented in both 4.0-HEAD and the trunk but I need the agreement of the system team before moving forward


systeam
#1902 Agrif with timing control AGRIF Unscheduled jchanut Bug 2017-05-17

Context


when timing control (nn_timing=1) is activated with AGRIF (for both parent and child domains), simulations crash with segmentation fault message during initialization. I guess it is somewhat related to ticket #1836 but I haven't checked this out.


jchanut
#2676 assimilation and ice thickness ASM systeam Bug 2021-05-18

Context

In assimilation there is an attempt to change ice thickness but hm_i is a diagnostic and is not used in the ice code. I wonder whether the authors of this part really wanted to change the thickness or were just making a test. It concerns both the trunk and 4.0-HEAD

            ! Nudge sea ice depth to bring it up to a required minimum depth
            WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i(:,:) < zhicifmin )
               zhicifinc(:,:) = zhicifmin - hm_i(:,:)
            ELSEWHERE
               zhicifinc(:,:) = 0.0_wp
            END WHERE
            !
            ! nudge ice depth
            hm_i (:,:) = hm_i (:,:) + zhicifinc(:,:)

systeam
#2736 vertical scale facors not recalculated when ssh/=0 DOM systeam Bug 2021-10-27

I think there is a problem with vertical scale factors in istate.F90 when ssh/=0 and linssh=false (either with wetting and drying or with user defined ssh). Gurvan wrote a comment in the code also. Vertical scale factors must be recalculated in these cases and they are not.

Solution: simply call dom_vvl_zgr

I am not sure it applies to the trunk because I do not know where ssh is initialized wrt vertical scale factors


systeam
#2657 groups in field_def.xml IOM systeam Defect 2021-04-16

Context

Creating a group of variables in field_def.xml when variables are not of the same type is problematic. I just did it for outputing conservation diagnostics (the one called OCE_BUDGET in field_def_oce.xml). When this group is called in file_def_oce.xml (instead of calling each variable), then the last output (in time) is not written properly in the netcdf file (NaN values).

Analysis

I think it occurs when mixing up SBC variables (nn_fsbc/=1) with other variables in the same group, though I do not understand why calling a group is different from calling each variable directly in the file_def.xml. Setting nn_fsbc=1 resolves the issue but this is not a good solution.

In conclusion, one must be aware of that issue and this is why I opened a ticket. I did not check for the trunk but I suppose this is the same thing

Recommendation

Ask Yann Meuredesoif...


systeam
#1894 mass and heat budgets in NEMO OCE clem Task 2017-04-28

Context

Mass and heat fluxes in NEMO are a bit messy and should be cleaned at some point. Therefore this ticket is a reminder for what should be done (or discussed) for the next NEMO release

As far as I understand, the mass budget of the ocean+ice/snow is written:

$Doce + Dice + Dsnow = - emp_oce - emp_ice + rnf - fwfisf$

  • emp_ice is E-P over sea ice
  • emp_oce includes calving ("calving_cea") in addition to E-P over ocean
  • runoffs include icerbergs ("iceberg_cea") in addition to river runoff
  • fwfisf is the ice-shelf melting (<0 = melting)

This interleaving of variables makes things complicated when it comes to define a heat budget.

  • calving => we suppose Tcal = 0degC (i.e. no sensible flux) and latent heat is removed from qns to take into account the ocean heat uptake to melt the ice (in sbccpl.F90)
  • river runoff => we suppose Trnf = SST (in sbcrnf.F90)
  • iceberg => latent heat is removed from qns (in sbccpl.F90) but since we treat iceberg as a runoff, its temperature is also at the SST (in sbcrnf.F90)
  • ice-shelf => latent heat is removed from the ocean directly as a temperature change and the sensible flux is taken into account with a melting temperature fixed at -1.9 degC (in sbcisf.F90)

Note that in coupled mode you generally have:

  • iceberg = half of the Antarctic fresh water flux is distributed in the ocean according to a climatology of icebergs distribution
  • iceshelf = half of the Antarctic fresh water flux is distributed along the coast where there is iceshelf
  • calving = Greenland fresh water is uniformly distributed

Fix

  • separate calving from emp_oce?
  • separate river runoff from icerbegs?
  • change temperature of the ice-shelf when melting?
  • change temperature for calving?
  • fwfisf does not follow the convention for runoff (>0 = input for the ocean)
  • other things?

clem
#2661 missing diags for turbulence ZDF systeam Task 2021-04-30

I propose to add a couple of diags for turbulence. They can be outputed for any of the turbulent schemes available in the code except for the Kolmogorov energy of dissipation which I solely coded for tke (don't know how to do for the other schemes). Here they are:

In field_def_oce.xml:

        <field id="avt_k"        long_name="vertical eddy diffusivity from closure schemes" standard_name="ocean_vertical_eddy_diffusivity"       unit="m2/s" />
        <field id="avm_k"        long_name="vertical eddy viscosity from closure schemes"   standard_name="ocean_vertical_eddy_viscosity"         unit="m2/s" />
        <field id="ediss_k"      long_name="Kolmogorov energy dissipation (tke scheme)"     standard_name="Kolmogorov_energy_dissipation"         unit="W/kg" />
        <field id="eshear_k"     long_name="energy source from vertical shear"              standard_name="energy_source_from_shear"              unit="W/kg" />
        <field id="estrat_k"     long_name="energy sink from stratification"                standard_name="energy_sink_from_stratification"       unit="W/kg" />

In zdfphy.F90:

      IF( iom_use('avt_k') .OR. iom_use('avm_k') .OR. iom_use('eshear_k') .OR. iom_use('estrat_k') ) THEN
         IF( l_zdfsh2 ) THEN
            zsh2(:,:,1  ) = 0._wp
            zsh2(:,:,jpk) = 0._wp
            CALL lbc_lnk( 'zdfphy', zsh2, 'W', 1. )
            CALL iom_put( 'avt_k'   ,   avt_k       * wmask )
            CALL iom_put( 'avm_k'   ,   avm_k       * wmask )
            CALL iom_put( 'eshear_k',   zsh2        * wmask )
            CALL iom_put( 'estrat_k', - avt_k * rn2 * wmask )
         ENDIF
      ENDIF

In zdftke.F90:

      ! Kolmogorov energy of dissipation (W/kg)
      !    ediss = Ce*sqrt(en)/L*en
      !    dissl = sqrt(en)/L
      IF( iom_use('ediss_k') ) THEN
         ztmp(:,:,:) = zfact3 * dissl * en * wmask
         CALL lbc_lnk( 'zdftke', ztmp, 'W', 1. )
         CALL iom_put( 'ediss_k', ztmp )
      ENDIF

systeam

clevy (4 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2057 ROBUST-03_cethe_TOP_doc TOP Documentation cetlod Task 2018-02-26

Context

...

Implementation plan

...


cetlod
#2036 SEAICE-05_crousset_coupled_interface OCE Unscheduled clem Task 2018-02-23

Context

...

Implementation plan

...


clem
#2055 ENHANCE-14_cethe_PISCES_LBC OCE Unscheduled cetlod Task 2018-02-26

Context

...

Implementation plan

...


cetlod
#2054 ENHANCE-07_crousset_LIM3adv_valorisation OCE Unscheduled clem Task 2018-02-26

Context

...

Implementation plan

...


clem

ctlod (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1967 Noise on vertical velocities when using UBS momemtum advection scheme OCE Unscheduled gm Defect 2017-10-18

Context

Under few circumstances, that have to be clarified, noise on vertical velocities arises when using the UBS momentum advection scheme. It has been observed in several configurations with various horizontal resolution (1/4°, 1/12°). This noise seems to develop close to sharp shelves and then expands offshore along either i or/and j grid direction. The attached figure illustrates this behavior in a regional configuration over the Arctic basin. It represents a monthly mean vertical velocity field around 700m depth. The noise emerges clearly in the Arctic area and is less visible within the north Atlantic region.

Analysis

The origin of this noise is not yet identified and may also not be systematic. It looks like the implicit viscosity associated to this scheme is not working or is not strong enough; yet the algorithm itself may not be the source of the problem since 2 configurations using exactly the same module dynadv_ubs.F90 have different behavior: one with noise while the other without. Below, a list of options that may not be responsible for this noise (deduced from an inter-comparison of 4 configurations namelist and CPP keys) :

  • the non linear free surface (VVL) or linear free surface
  • Partial or full steps
  • ln_logyer
  • ln_bfrimp
  • advective and/or diffusve BBL
  • GLS or TKE
  • Non Penetrative Convection (NPC) or Enhenced Vertical Diffusion (EVD)

Fix

No fix for the moment.


gm

dancopsey (3 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2707 IOM-03_Copsey_1D_river_coupling SBC Unscheduled dancopsey Task 2021-07-12

Alter NEMO to accept a 1D array of river runoff from the coupler and then redistribute that runoff over predefined runoff points as defined by a new NEMO netcdf ancillary file.

Workplan action

Wikipage: wiki:2021WP/IOM-03_Copsey_1D_river_coupling


dancopsey
#2708 IOM-04_Copsey_0D_icesheet_mass_coupling SBC Unscheduled dancopsey Task 2021-07-12

Alter NEMO to accept two scalar quantities from the coupler: Greenland icesheet mass and Antarctic icesheet mass. This is used to modify iceberg calving and iceshelf melt rates.

Workplan action

Wikipage: wiki:2021WP/IOM-04_Copsey_0D_icesheet_mass_coupling


dancopsey
#2709 SI3-01_Copsey_coupled_penetrating_radiation SBC Unscheduled dancopsey Task 2021-07-12

Add solar penetrating radiation (into sea ice) into the coupler so that it can be passed from the atmospheric component.

Workplan action

Wikipage: wiki:2021WP/SI3-01_Copsey_coupled_penetrating_radiation


dancopsey

deazer (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2135 Memory Bug requries compilation flag to zero all arrays to overcome in AMM15 LDF deazer Bug 2018-10-04

Context

AMM15 cannot be run in NEMO4 Beta on a large number of nodes without the use of a flag to initialize all arrays to 0. e.g. -ez on cray

Analysis

AMM15 will not restart if using a certain number of nodes. Below tis number it will run but wil not be reproducible across different domain decompositions without the -ez flag.

Initial analysis isolated the arrays ahmt, ahmf in ldfdyn.F90

these can be set directly to zero, e.g.

ahmt(:,:,:) = 0._wp
ahmf(:,:,:) = 0._wp

and the model will at least run but remains not reproducible

Further analysis is required to isolate remaining uninitialized data that is causing the reproducibility problem in AMM15

Note the default configurations do not appear to be affected by this bug.

Fix

...


deazer

dford (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2700 IOM-02_Ford_OBS OBS Unscheduled dford Task 2021-06-23

Workplan action

Make OBS interface more generic, add observation operator for SI3 and surface currents, improve SLA observation operator

Wikipage: wiki:2021WP/IOM-02_Ford_OBS


dford

djlea (2 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2298 Bug fixes to OBS and ASM found when reviewing the documentation OBS ayoung Bug 2019-06-14

BE CAREFUL !!! Due to dynamic behaviour of this ticket creation page, it is highly recommend to set first all other fields before writing the ticket description below. If you have lost your draft after an unwanted reload, you can click on the link 'Restore Form' in the contextual menu upper right to recover it. Remove these lines after reading.

Context

The OBS and ASM documentation will be updated as discussed in ticket #2297. This is likely to highlight some bugs to fix. These will be detailed in this ticket.

Analysis

One change I would like to make is that the OBS grid search outputs some debugging values histx etc. These are confusing and not useful. I propose removing this output.

Fix

...


ayoung
#2297 Updates to ASM and OBS documentation OBS djlea Task 2019-06-14

Context

The documentation for OBS and ASM needs reviewing as it is likely out of date with respect to NEMO release 4.

Proposal

  • I propose to review the OBS and ASM chapters for errors and anything out of date.
  • I will also test the examples given to ensure the instructions are correct

There will be an associated ticket which will include any (small) bug fixes which are found to be necessary.


djlea

dupontf (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1796 CICE interface modification for initial CICE output OCE systeam Bug 2016-11-18

Context

the NEMO-CICE interface (tag 5516) is missing a correct initialization for the CICE initial output. Some impact as well on the initial ice temperature profile. Some cleanup and consistency between CICE4 and CICE5

Analysis

CICE does an initialization based on default fields (exception: CICE5 is passed the correct sst) which could be based on NEMO fields. This can impact the initial ice temperature profile and the initial CICE output. CICE4.0 takes default values for sss,sst,potT,Tair fields. CICE5 takes values for sss,potT,Tair fields (sst is passed before the start of CICE init phase)

Fix

add a second init and CICE output after the correct sss,sst,Tf,potT,Tair fields are passed. (See attached file) some other minor cosmetic changes such as:

  1. the array ztmp is useless between 396 and 416

IncludeSource(branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90, start=390, end=420, rev=8572)?

  1. mass ice embedding has lines redundant with dom_vvl_init. Since those could useful as well in case of hot initialization, I suggest moving them in a distinct routine in domvvl.F90 so that they can be called anytime needed. The only difference is dom_vll_init has
fse3t_a(:,:,jpk) = e3t_0(:,:,jpk)

whereas sbcice_cice has

fse3t_a(:,:,:) = fse3t_b(:,:,:)

the latter being more consistent to my opinion and has no impact when ssh=0 (which is assumed when calling dom_vvl_init)

additional comment: could be merged with #1428 of Tim Graham, since I also believe that a consistent calculation of the freezing temperature is needed in NEMO and CICE.


systeam

emalod (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2150 TOP-06_emalod_OASIS_interface_between_TOP_and_NEMO TOP Unscheduled emalod Task 2018-10-30

OASIS coupling interface between TOP and NEMO

Context

IMMERSE project: Increase modularity of NEMO components - macro-task parallelism

Proposal

We propose to shape the existing ocean/sea-ice interface to an ocean/biogeochemistry coupling, to make possible the computing of TOP/Pisces equations (Aumont et al. 2015) in a separate executable and its coupling to the rest of the NEMO model. This modularity is supposed to enhance the overall computing performances by allowing (i) to reduce the TOP/Pisces module horizontal resolution and (ii) to choose the best suited parallel decomposition for both components. Regardless to result modifications that have to be evaluated, computation of the two modules can be performed concurrently, reducing time to solution even more. The OASIS coupling library (Craig at al., 2017), basis of the existing ocean/sea-ice interface, will ensure the efficient (parallel) communication of 3D fields, the easy switch between sequential and concurrent modes and, possibly, the coupling field interpolation.


emalod

emanuelaclementi (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2674 Allow cdgw if ln_NCAR SBC systeam Bug 2021-05-17

Modification to allow the use of neutral drag coefficient from wave model if ln_NCAR

Context

...

Analysis

...

Recommendation

Modify sbcwave.F90 IF( ln_cdgw .AND. .NOT. ln_NCAR ) &

& CALL ctl_stop( 'drag coefficient read from wave model NOT available yet with aerobulk package except for NCAR bulk')


systeam

emmafiedler (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2752 Undefined variable in timing.F90 MULTIPLE systeam Bug 2021-12-13

Context

zperc is undefined in src/OCE/timing.F90 when ztot == 0

Analysis

This is unlikely to be of particular importance but causes a compiler error when using debugging flags.

Fix

Initialise zperc to 0 to avoid this issue


systeam

flavoni (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2046 PUBLI-03_SFlavoni-advectionscheme-analysis OCE Unscheduled flavoni Task 2018-02-26

Context

...

Implementation plan

...


flavoni

fschwarzkopf (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2051 Implementation of fresh water budget control for AGRIF configurations (here nn_fwb = 3 only) AGRIF Unscheduled jchanut Defect 2018-02-26

Context

In AGRIF configurations (TWO-WAY), fresh water budget control does not work correctly:

If nn_fwb /= 0 in host and nn_fwb = 0 in nest --> corrections applied to the host within the nested region are "reversed" by AGRIF-update. If nn_fwb /= 0 in host and nn_fwb /= 0 in nest --> for nest, fwb from nest itself is used for correction instead of global budget.

Both versions do not correctly close the fresh water budget.

Proposal

Idea: Correct fwb in nest based on global budget.

Changes in sbcmod.F90: Apply fwb correction in nest at every host-nn_fsbc-time-step coinciding with Agrif_Update-time-step. NO consistency-check implemented yet. (in test case: host: nn_fsbc = 6; nest: rhot = nn_fsbc = nn_cln_update = 3)

Changes in sbcfwb.F90: Transfer global budget from host to nest. Apply portion of budget correction to nest depending on erp-fraction (relative to global erp) done in nest.

These changes (marked by FUS) seem to technically work (the correct numbers are transferred from the host to the nest and used by the nest at the correct timing), however, closing the budget still fails.

  • sbcmod.F90

     
    5454   USE sbcwave          ! Wave module 
    5555   USE bdy_par          ! Require lk_bdy 
    5656 
     57   USE agrif_oce        ! FUS: get nbcline and nbclineupdate for fwb-call timing 
     58   USE agrif_util       ! FUS: get Agrif_Parent*  for fwb-call timing 
     59 
    5760   IMPLICIT NONE 
    5861   PRIVATE 
    5962 
     
    411414 
    412415      IF( ln_ssr         )   CALL sbc_ssr( kt )                   ! add SST/SSS damping term 
    413416 
     417! FUS: start control fwb timing in AGRIF case - here for nn_fwb=3 only 
     418#if defined key_agrif                   
     419 
     420      IF( nn_fwb    /= 0  .AND. nn_fwb /= 3 )   CALL sbc_fwb( kt, nn_fwb, nn_fsbc )  ! control the freshwater budget 
     421 
     422      IF( nn_fwb == 3 ) THEN 
     423         IF(Agrif_Root()) THEN 
     424           CALL sbc_fwb( kt, nn_fwb, nn_fsbc )  ! control the freshwater budget 
     425         ELSE 
     426!FUS: do fwb correction in nest at nn_fsbc in host and Update time-step (make sure, nn_fsbc (nest and host) and nn_cln_update choice is suitable - NO consistency-check implemented yet) 
     427           IF ( MOD(nbcline,nbclineupdate) == 0 .AND. MOD( Agrif_Parent_Nb_Step()-1, Agrif_Parent(nn_fsbc) ) == 0  ) THEN 
     428             CALL sbc_fwb( kt, nn_fwb, nn_fsbc )  ! control the freshwater budget 
     429           ENDIF 
     430         ENDIF 
     431      ENDIF 
     432#else 
    414433      IF( nn_fwb    /= 0 )   CALL sbc_fwb( kt, nn_fwb, nn_fsbc )  ! control the freshwater budget 
     434#endif 
     435! FUS: end control fwb timing in AGRIF case - here for nn_fwb=3 only 
    415436 
    416437      IF( nn_closea == 1 )   CALL sbc_clo( kt )                   ! treatment of closed sea in the model domain 
    417438      !                                                           ! (update freshwater fluxes) 
  • sbcfwb.F90

     
    2727   USE timing          ! Timing 
    2828   USE lbclnk          ! ocean lateral boundary conditions 
    2929   USE lib_fortran 
    30  
     30   USE Agrif_Util      ! FUS: get Agrif_Parent 
     31   USE agrif_types     ! FUS: needed for POINTER to Agrif_Parent (?) 
    3132   IMPLICIT NONE 
    3233   PRIVATE 
    3334 
     
    3738   REAL(wp) ::   a_fwb     ! for 2 year before (_b) and before year. 
    3839   REAL(wp) ::   fwfold    ! fwfold to be suppressed 
    3940   REAL(wp) ::   area      ! global mean ocean surface (interior domain) 
    40  
     41   REAL(wp),PUBLIC ::   z_fwf, z_fwf_nsrf, zsum_fwf, zsum_erp, zsurf_tospread  ! FUS: variables transfered from the parent to child via Agrif_Parent need to be PUBLIC! 
     42                                                                              ! FUS: variable names are still in local nomenclature - adjustments needed 
    4143   !! * Substitutions 
    4244#  include "domzgr_substitute.h90" 
    4345#  include "vectopt_loop_substitute.h90" 
     
    6769      INTEGER, INTENT( in ) ::   kn_fwb   ! ocean time-step index 
    6870      ! 
    6971      INTEGER  ::   inum, ikty, iyear     ! local integers 
    70       REAL(wp) ::   z_fwf, z_fwf_nsrf, zsum_fwf, zsum_erp                ! local scalars 
    71       REAL(wp) ::   zsurf_neg, zsurf_pos, zsurf_tospread, zcoef          !   -      - 
     72!      REAL(wp) ::   z_fwf, z_fwf_nsrf, zsum_fwf, zsum_erp                ! local scalars ! FUS: now defined public 
     73!      REAL(wp) ::   zsurf_neg, zsurf_pos, zsurf_tospread, zcoef          !   -      -    ! FUS: zsurf_tospread now defined public 
     74      REAL(wp) ::   zsurf_neg, zsurf_pos, zcoef                          !   -      -    ! FUS: zsurf_tospread now defined public 
    7275      REAL(wp), POINTER, DIMENSION(:,:) ::   ztmsk_neg, ztmsk_pos, z_wgt ! 2D workspaces 
    7376      REAL(wp), POINTER, DIMENSION(:,:) ::   ztmsk_tospread, zerp_cor    !   -      - 
     77! FUS: define pointer for parent-variables transfered through Agrif_Parent 
     78#if defined key_agrif 
     79      REAL(wp),POINTER :: parent_z_fwf, parent_z_fwf_nsrf, parent_zsum_erp, parent_zsum_fwf, parent_zsurf_tospread 
     80#endif 
     81 
    7482      !!---------------------------------------------------------------------- 
    7583      ! 
    7684      IF( nn_timing == 1 )  CALL timing_start('sbc_fwb') 
     
    160168            ! 
    161169            zsurf_neg = glob_sum( e1e2t(:,:)*ztmsk_neg(:,:) )  ! Area filled by <0 and >0 erp 
    162170            zsurf_pos = glob_sum( e1e2t(:,:)*ztmsk_pos(:,:) ) 
     171 
     172! FUS: differentiate between host and nest in AGRIF case 
     173#if defined key_agrif 
     174IF ( Agrif_Root() ) THEN 
     175#endif 
     176 
    163177            !                                                  ! fwf global mean (excluding ocean to ice/snow exchanges) 
    164178            z_fwf     = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area 
    165179            !            
     
    171185                ztmsk_tospread(:,:) = ztmsk_neg(:,:) 
    172186            ENDIF 
    173187            ! 
    174             zsum_fwf   = glob_sum( e1e2t(:,:) * z_fwf )         ! fwf global mean over <0 or >0 erp area 
     188            zsum_fwf   = glob_sum( e1e2t(:,:) * z_fwf )         ! fwf global mean over <0 or >0 erp area ! FUS: this is erp-independent global mean! 
    175189!!gm :  zsum_fwf   = z_fwf * area   ???  it is right?  I think so.... 
    176             z_fwf_nsrf =  zsum_fwf / ( zsurf_tospread + rsmall ) 
     190            z_fwf_nsrf =  zsum_fwf / ( zsurf_tospread + rsmall )       ! FUS: is this necessary? could use zsum_fwf for zerp_cor instead 
    177191            !                                                  ! weight to respect erp field 2D structure 
    178192            zsum_erp   = glob_sum( ztmsk_tospread(:,:) * erp(:,:) * e1e2t(:,:) ) 
    179193            z_wgt(:,:) = ztmsk_tospread(:,:) * erp(:,:) / ( zsum_erp + rsmall ) 
     
    187201            qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:)  ! account for change to the heat budget due to fw correction 
    188202            erp(:,:) = erp(:,:) + zerp_cor(:,:) 
    189203            ! 
     204 
     205! FUS: differentiate between host and nest in AGRIF case 
     206#if defined key_agrif 
     207ELSE                                                          ! FUS: start special treatment for nest 
     208       parent_z_fwf             => Agrif_Parent(z_fwf)                 ! FUS: add pointer to Parent value 
     209       parent_zsum_fwf          => Agrif_Parent(zsum_fwf)               ! FUS: add pointer to Parent value - might replace parent_z_fwf_nsrf and parent_zsurf_tospread 
     210       parent_z_fwf_nsrf        => Agrif_Parent(z_fwf_nsrf)             ! FUS: add pointer to Parent value 
     211       parent_zsum_erp          => Agrif_Parent(zsum_erp)               ! FUS: add pointer to Parent value 
     212       parent_zsurf_tospread          => Agrif_Parent(zsurf_tospread)   ! FUS: add pointer to Parent value 
     213 
     214            IF( parent_z_fwf < 0._wp ) THEN         ! FUS: keep fwf-sign from parent (nest might differ) 
     215                zsurf_tospread      = zsurf_pos 
     216                ztmsk_tospread(:,:) = ztmsk_pos(:,:) 
     217            ELSE                                    
     218                zsurf_tospread      = zsurf_neg 
     219                ztmsk_tospread(:,:) = ztmsk_neg(:,:) 
     220            ENDIF 
     221 
     222            !                                                  ! weight to respect erp field 2D structure 
     223            !                                                 ! FUS: scale by zsum_erp in parent 
     224            z_wgt(:,:) = ztmsk_tospread(:,:) * erp(:,:) / ( parent_zsum_erp + rsmall ) 
     225            !                                                  ! final correction term to apply 
     226            !                                                 ! FUS: spread parent_zsum_fwf = parent_z_fwf_nsrf * parent_zsurf_tospread 
     227            zerp_cor(:,:) = -1. * parent_z_fwf_nsrf * parent_zsurf_tospread *  z_wgt(:,:) 
     228            ! 
     229            CALL lbc_lnk( zerp_cor, 'T', 1. ) 
     230            ! 
     231            emp(:,:) = emp(:,:) + zerp_cor(:,:) 
     232            qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:)  ! account for change to the heat budget due to fw correction 
     233            erp(:,:) = erp(:,:) + zerp_cor(:,:) 
     234            ! 
     235ENDIF                                                          ! FUS: end special treatment for nest 
     236#endif 
     237 
    190238            IF( nprint == 1 .AND. lwp ) THEN                   ! control print 
     239 
     240! FUS: nest specific prints 
     241#if defined key_agrif 
     242IF ( Agrif_Root()) THEN 
    191243               IF( z_fwf < 0._wp ) THEN 
    192244                  WRITE(numout,*)'   z_fwf < 0' 
    193245                  WRITE(numout,*)'   SUM(erp+)     = ', SUM( ztmsk_tospread(:,:)*erp(:,:)*e1e2t(:,:) )*1.e-9,' Sv' 
     
    198250               WRITE(numout,*)'   SUM(empG)     = ', SUM( z_fwf*e1e2t(:,:) )*1.e-9,' Sv' 
    199251               WRITE(numout,*)'   z_fwf         = ', z_fwf      ,' Kg/m2/s' 
    200252               WRITE(numout,*)'   z_fwf_nsrf    = ', z_fwf_nsrf ,' Kg/m2/s' 
    201                WRITE(numout,*)'   MIN(zerp_cor) = ', MINVAL(zerp_cor) 
    202                WRITE(numout,*)'   MAX(zerp_cor) = ', MAXVAL(zerp_cor) 
     253ELSE 
     254               IF( parent_z_fwf < 0._wp ) THEN 
     255                  WRITE(numout,*)'   z_fwf < 0' 
     256                  WRITE(numout,*)'   SUM(erp+)     = ', SUM( ztmsk_tospread(:,:)*erp(:,:)*e1e2t(:,:) )*1.e-9,' Sv' 
     257               ELSE 
     258                  WRITE(numout,*)'   z_fwf >= 0' 
     259                  WRITE(numout,*)'   SUM(erp-)     = ', SUM( ztmsk_tospread(:,:)*erp(:,:)*e1e2t(:,:) )*1.e-9,' Sv' 
     260               ENDIF 
     261               WRITE(numout,*)'   SUM(empG)     = ', SUM( z_fwf*e1e2t(:,:) )*1.e-9,' Sv' 
     262               WRITE(numout,*)'   z_fwf         = ', z_fwf      ,' Kg/m2/s' 
     263               WRITE(numout,*)'   z_fwf_nsrf    = ', z_fwf_nsrf ,' Kg/m2/s' 
     264               WRITE(numout,*)'   parent_z_fwf_nsrf        = ', parent_z_fwf_nsrf ,' Kg/m2/s' 
     265               WRITE(numout,*)'   parent_zsurf_tospread          = ', parent_zsurf_tospread ,' Kg/m2/s' 
     266               WRITE(numout,*)'   parent_zsum_fwf        = ', parent_zsum_fwf ,' Kg/m2/s' 
     267               WRITE(numout,*)'   parent_z_fwf_nsrf * parent_zsurf_tospread should be parent_zsum_fwf = ', parent_z_fwf_nsrf * parent_zsurf_tospread 
     268               WRITE(numout,*)'   parent_zsum_erp          = ', parent_zsum_erp ,' Kg/m2/s' 
     269ENDIF 
     270#else 
     271               IF( z_fwf < 0._wp ) THEN 
     272                  WRITE(numout,*)'   z_fwf < 0' 
     273                  WRITE(numout,*)'   SUM(erp+)     = ', SUM( ztmsk_tospread(:,:)*erp(:,:)*e1e2t(:,:) )*1.e-9,' Sv' 
     274               ELSE 
     275                  WRITE(numout,*)'   z_fwf >= 0' 
     276                  WRITE(numout,*)'   SUM(erp-)     = ', SUM( ztmsk_tospread(:,:)*erp(:,:)*e1e2t(:,:) )*1.e-9,' Sv' 
     277               ENDIF 
     278               WRITE(numout,*)'   SUM(empG)     = ', SUM( z_fwf*e1e2t(:,:) )*1.e-9,' Sv' 
     279               WRITE(numout,*)'   z_fwf         = ', z_fwf      ,' Kg/m2/s' 
     280               WRITE(numout,*)'   z_fwf_nsrf    = ', z_fwf_nsrf ,' Kg/m2/s' 
     281               WRITE(numout,*)'   MIN(zerp_cor) = ', MINVAL(zerp_cor)  ! FUS: in mpp-case, this is not the expected value glob_min fails 
     282               WRITE(numout,*)'   MAX(zerp_cor) = ', MAXVAL(zerp_cor)   ! FUS: in mpp-case, this is not the expected value glob_max fails 
     283#endif 
    203284            ENDIF 
    204285         ENDIF 
    205286         ! 

jchanut

gm (3 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1911 ENHANCE-04(2017WP) — MLF and RK3 time stepping OCE Unscheduled gm Task 2017-06-15

Context


Introduce an optional RK3 time-stepping scheme. The scheme will:

  1. be a valuable alternative to the current Modified Leap-Frog (MLF, Leclair and Madec OM2009) scheme,
  2. prepare the futur introduction of a compensated time-space scheme,
  3. allow AGRIF to be exactly conservative, and
  4. make much more easier to use time coarsening of TRC and OFF-line variable volume calculation


Implementation


Chosen strategy : keep both MLF and RK3 time-stepping in the code. This means : first transform the LF scheme to be consistent with a 2-level time-stepping environment, and then introduce the RK3 scheme.


gm
#2044 ENHANCE-09_Gurvan-GEOMETRIC OCE Unscheduled gm Task 2018-02-26

Context

introduction of the GEOMETRIC parameterization of unresolved eddies (Marshall al. 2017, Mak et al. 2017)

Implementation plan

...


gm
#1918 ENHANCE-17(2017WP) — Multi-Column Ocean scheme (MCO) OCE Unscheduled gm Task 2017-07-03

Context


Introduction of the Multi-Column Ocean scheme (MCO) developed by Barthélemy et al. (Ocean Modelling 2016), i.e. a subgrid-scale representation of ice-ocean interactions.

Implementation


LIM3 includes an ice thickness distribution, which provides heterogeneous surface buoyancy fluxes and stresses. The MCO scheme take them explicitly into account, by computing convection and turbulent vertical mixing separately in the open water/lead fraction of grid cells and below each ice thickness category. The resulting distinct temperature and salinity profiles of the ocean columns are allowed to be maintained over several time steps.


gm

gsamson (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2697 include ref config C1D_PAPA in SETTE tests C1D systeam Defect 2021-06-18

Context

C1D_PAPA reference configuration is broken at each new Nemo release due to the lack of testing this config, and it requires a significant amount of work which could be avoided easily if the config was included in SETTE

Recommendation

incude C1D_PAPA in SETTE tests


systeam

hadjt (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1829 Changes to C06 for climate simulation and reanalysis OCE Unscheduled ayoung Task 2017-01-16

Context

Changes to C06 for climate simulation and reanalysis

Changes

...


ayoung

jamesharle (2 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1646 pit falls of choosing parameters in the F-S sigma code OCE deazer Defect 2015-12-03

Having had a look at the NOCL set up of a high resolution AMM60 configuraton I've come across a possible pit fall concerning the choice of parameters in the Furner-Siddorn vertical coordinates. See the attached figures of the top grid box depth (e3t) using the Siddorn-Furner sigma coords for hc=150 and hc=50 (50 being the default shipped with NEMO for the AMM12 domain). Spot the discontinuity!

From reading the code - it looks like the fixed surface grid box depth (rn_zs=1m in AMM60) and stretched coordinates come into play at depths > hc. Anything less than the hc depth and we're in pure sigma - so as AMM60 has only 50 wet vertical levels - top grid box (e3t) is going to just under 3m at depths approaching 150m (i.e. hc=150). And that's why hc = 50 looks as it should!

If hc < jpk you'd have the reverse scenario: a very sudden shallowing of the depth of the top grid box.

So I guess the guidance for this is to make hc = jpk (for rn_zs=1m)!

Or more generally hc = jpk * rn_zs

To avoid users selecting inappropriate combinations of these parameters, perhaps 'hc' should be set in the furner-siddorn subroutine and a WARNING issued if it differs from the one in the namelist?


deazer
#1579 Assumption initial conditions are on z-levels when ln_sco = .true. OCE jamesharle Request 2015-07-17

The initial conditions for runs ln_sco = .true. are assumed to be on z-levels based on gdept_1d. This is not immediately apparent from reading the manual.

A few options would be to either:

  • modify code such that depth information is required in the initial condition file. This would allow an initial condition file, comprising a different number of levels and/or gird type, to be read in and interpolated onto gdept_0.
  • remove the interpolation loop completely (bearing in mind the on-going simplification process) and impose that the initial conditions read in have to be on gdept_0, requiring a pre-processing step.

jamesharle

jcastill (3 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2730 Confusing coupling order - oasis send TOP systeam Defect 2021-10-11

Context

In the file sbccp.F90, each field that can be exchanged via coupling has its own index. The order in which the fields are received via coupling is the same as fields index, but this is not true for the sent fields, as the order is hard coded in the routine sbc_cpl_snd. This can cause some confusion for users, which can easily create a deadlock condition, in particular in cases where several models are coupled to NEMO.

Analysis

The index order of the oasis sent fields should be the same as the order in which the fields are coupled to increase clarity.

Recommendation

The index order and the coupling order should be rearranged so that fields being sent to the same model component are grouped together to avoid potential deadlocks and to increase clarity and usability. The proposed order is: atmosphere, atmosphere ice, waves, wave ice. The addition of new coupling fields should take this order into account.


systeam
#2749 Wave coupling only: diurnal cycle reconstruction error SBC 2021 WP deazer Defect 2021-11-25

Context

When running in coupled mode but not coupling to an atmospheric model, and when using diurnal cycle reconstruction (ln_dm2dc=.true.), NEMO will stop with an error:

sbc_cpl_rcv: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation

Analysis

Here NEMO still assumes that when it is running in coupled mode it is coupled to an atmosphere model. In coupling mode the diurnal cycle frequency (ncpl_qsr_frq) is calculated as the sum of the coupling frequency of the atmospheric radiation terms, and this value is required to be equal to one day. If there is no atmospheric coupling, which is something perfectly valid to do (for example when coupling only to a wave model), this frequency is equal to zero and the code throws an error.

Recommendation

Throw the error mentioned above only if the frequency is not equal to one day and if atmosphere coupling is taking place (ln_cpl=.true.)


deazer
#2750 Coupled mslp in inverse barometer ssh SBC 2021 WP deazer Defect 2021-11-25

Context

The inverse barometer ssh is calculated from the mean sea level pressure as read for a netcdf forcing file. When coupling to an atmospheric model it is possible that the mslp field is received via coupling, but the inverse barometer ssh still requires an external file to read mslp.

Analysis

The routines that calculate the inverse barometer ssh read by default the mslp from a netcdf file without taking into account the fields received via coupling.

Recommendation

It would be advisable to use mslp as read from coupling when it is available in all calculations for consistency.


deazer

jchanut (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2748 Physical significance of TKE penetration not scaled by the model time step ? ZDF systeam Request 2021-11-22

Context

On TKE additional source term (e.g. nn_etau>0 in namzdf_tke)

Analysis

The additional TKE source term in zdftke is not scaled by the model time step:

      IF( nn_etau == 1 ) THEN           !* penetration below the mixed layer (rn_efr fraction)
         DO_3D_OVR( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 )
            en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -gdepw(ji,jj,jk,Kmm) / htau(ji,jj) )   &
               &                                 * MAX( 0._wp, 1._wp - zice_fra(ji,jj) ) * wmask(ji,jj,jk) * tmask(ji,jj,1)

As expected, this leads to a dependency of the tke profiles, hence of viscosities/diffusivities on the chosen time step. This may well be on purpose, but I have trouble to see the physical motivation behind that. I would rather have seen a kind of time scale associated with that process (in place of the surface tke fraction) and then multiplied by the time step.

Recommendation

At this point, I would like to be convinced :)


systeam

jpalmier (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1933 passive tracers trends TOP cetlod Bug 2017-08-23

Context


Working with the UKMO version of NEMO, i got some difficulties to get the trends working proprely.

  • one reason for this is that new trends have been added by UKMO people that are not expected by the final/"outputing" part of trdtrc. the way this final part is written, if an non expected trend arrives here to be written out by XIOS, breaks the model:
          IF( lk_trdtrc .AND. ln_trdtrc( kjn ) ) THEN
             !
             SELECT CASE( ktrd )
             CASE( jptra_xad  )       ;    WRITE (cltra,'("XAD_",4a)')
             CASE( jptra_yad  )       ;    WRITE (cltra,'("YAD_",4a)')
             CASE( jptra_zad  )       ;    WRITE (cltra,'("ZAD_",4a)')
             CASE( jptra_ldf  )       ;    WRITE (cltra,'("LDF_",4a)')
             CASE( jptra_bbl  )       ;    WRITE (cltra,'("BBL_",4a)')
             CASE( jptra_nsr  )       ;    WRITE (cltra,'("FOR_",4a)')
             CASE( jptra_zdf  )       ;    WRITE (cltra,'("ZDF_",4a)')
             CASE( jptra_dmp  )       ;    WRITE (cltra,'("DMP_",4a)')
             CASE( jptra_sms  )       ;    WRITE (cltra,'("SMS_",4a)')
             CASE( jptra_atf  )       ;    WRITE (cltra,'("ATF_",4a)')
             CASE( jptra_radb )       ;    WRITE (cltra,'("RDB_",4a)')
             CASE( jptra_radn )       ;    WRITE (cltra,'("RDN_",4a)')
             END SELECT
                                              cltra = TRIM(cltra)//TRIM(ctrcnm(kjn))
                                              CALL iom_put( cltra,  ptrtrd(:,:,:) )
             !
          END IF
    
    
    For example, the JPTRA_TOTAD case has been added by the UKMO team. with a call to trd_trc(..., jptra_totad,...)
    This call will arrive in the foreseen piece of code, cltra will not be defined, and the iom_put call will fail without variable name to look after.
  • A second problem is that these trends still do not take into account the vvl correction from ticket 1877.
  • Some trends we might need for CMIP6 are missing from the list above.
  • the namtrc_trd namelist is looking for ln_trdmxl_trc_restart and ln_trdmxl_trc_instant when namelist_top_ref has ln_trdmld_trc_restart, ln_trdmld_trc_instant instead.
  • the place where namtrc_trd is read in namtrc starts to be problematic as namtrc_dia includes mainly the namelists read if XIOS is not available.
  • Finally the trends are not defined in the field_def.xml file.


Analysis


  • The output problem, once seen is easy to fix, it needs to move the cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)); CALL iom_put( cltra, ptrtrd(:,:,:) ) sentences inside each CASE.
  • I went to talk to George for the vvl problem. the solution is to copy what have been done for the dynamic.
  • I am not sure about the full list of trends we want for the passive tracers, but at least we want the JPTRA_SMS and the total trend. Is there a definitive list of the passive tracer trends required for CMIP6 ? in the while i have added all the dynamical trends that were missing in the passive tracers, and have added a iom_use call before iom_put.
  • namtrc_dia should be protected under a IF( .NOT. lk_iomput ) test, and move the namtrc_trd namelist reading in the main routine (might be better to move it in a specific trd routine as for the ice with trc_nam_ice)
  • the field_def file needs to be completed.


Fix


A NEMO_3.6 branch has been created: nemo_v3_6_STABLE_trdtrc first changes can be seen here

Still missing:


  • Some of the trends are still not working on my MEDUSA testing branch. Once corrected, i'll import the changes.
  • i am looking for adding the trends vertical inventory through XIOS. It is feasible, i kind of see how, but would be better with an example It would avoid writing tons of 3D fields when we really want 2D.
  • Need to be tested from outside MetOffice? branch version. I removed everything from MEDUSA in this branch, but i cannot test it yet. have to check with Andrew how to test this.

cetlod

julienjouanno (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1723 diags KE with time_splitting TRD gm Bug 2016-05-02

The computation of the momentum or KE trends (key_trddyn or key_trdken) does not return a closed balance in the current stable version (rev 6478) when using time_splitted free surface and implicit diffusion.

Please find a few suggestions to close the balance in the specific case with "ln_bt_fw=False" and "explicit bottom friction":

  • Calculation of zdf trend should be moved in dynzdf_imp.F90 (instead of dynzdf.F90) after iteration "ua = ub + 2dt * ua". [In rev6478, the trend calculated in dynzdf.F90 when using implicit ZDF returns the difference between a velocity and a trend]
  • In dynspg_ts, instead of sending the total barotropic trend (ua_b-ub_b) / 2dt in ua, the surface and bottom stress contributions are subtracted. We also impose a constant bottom stress during the barotropic integration, which is calculated with a drag coefficient limited by the constraint on the CFL as in the 3d mode. By doing so, the bottom and wind stress experienced by the barotropic and baroclinic mode are strictly the same and enter only once in the 3d mode (in dynbfr and dynzdf_imp). It also results that the barotropic correction performed at the beginning of dynxt.F90 becomes null (facilitating the interpretation of the balance)

Julien (with J.C. help)

PS : I attached a tar file with the routines that have been modified


gm

kuniko (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1601 Add code for flux adjustment runs OCE Unscheduled ayoung Task 2015-09-24

Met Office internal work (not in workplan but may go back to trunk at some point)

Add a module to SBC to read in flux adjustment fields and add to surface fluxes

branch: https://forge.ipsl.jussieu.fr/nemo/browser/branches/UKMO/dev_r5518_flux_adjust


ayoung

mathiot (8 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2643 DOMAINcfg: bugs re-introduced tools systeam Bug 2021-03-29

Context

I had a look at the recent changes in DOMAINcfg and it appeared the fixes I did as part of #2588 at r14199 are gone at revision r14623.

Analysis

The root causes of this issue are probably the same as the one described in ticket #2503: conflicts/troubles/issues during a merge.

Recommendation

  • Implement some of the suggestion made in ticket #2503
  • For major changes in DOMAINcfg and other tools (REBUILD_NEMO, WEIGHTS ...) which are a critical tools for the users, apply the same development steps as for major changes in NEMO trunk.

systeam
#2741 bug: SAO does not compile SAO systeam Bug 2021-11-17

Context

I tried to use SAO in the trunk and it does not compile.

Analysis

SAO is still using old name and dimension like tsn.

Recommendation

  • Fix compilation error.
  • Test SAO.

systeam
#2742 Bug: OBStools does not compile OBS systeam Bug 2021-11-18

Context

OBStools from the trunk does not compile.

Analysis

OBStools, have some how the same 'issue' as DOMAINcfg, it is dependant of NEMO source file. In DOMAINcfg, the choice has been made to duplicate the part of NEMO needed. In OBStools, the part of the code needed are based on symbolic link. With the 'recent' change of the code. For exemple in OBStools src directory some links are broken and some file are missing (for exemple do_loop_substitute.h90).

Fix

  • update OBStools to be compatible with recent NEMO changes

Suggestion

  • in SETTE, add a test on compilation of all the tools

systeam
#2743 Bug: OBS does not seem to take into account the eos used in NEMO TOP systeam Bug 2021-11-18

Context

OBS interpolates NEMO T and S onto the obs location. It works from the EN4 data converted into feedback files. These observations are in potential temperature and practical salinity. After looking at the model data interpolated and the code I think the data are not converted to the observations eos and the netcdf attributes of the _Hx variables are missleading.

Analysis

I see different possible answer to improve this:

  • convert model T and S to observation expected T and S based on model eos and observation eos (function for conversion available in eosbn2 I think)
  • do not convert the model T and S but adapt the netcdf attributes of _Hx variables (not convinced it is in the spirit of the OBS operator)

Fix

For solution 1, a call to eos_pt_from_ct can do the job for temperature. For salinity, a function eos_ps_from_sa need to be implemented.


systeam
#2677 unit of the icb calving file ICB systeam Defect 2021-05-19

Context

Unit of the icb calving file is not described in the namelist and in the documentation. The unit is in km3 of iceberg / y, icebergs being at a density of rn_rho_bergs and not km3 weq / y as mentioned in some comments in icbclv and icbstp. This makes the input file somehow dependent of the NEMO namelist as the user most of the time want to prescribe a flux in Gt/y or any derived unit as kg/s and derived a calving file from this (using rn_rho_bergs).

Recommendation

Easiest:

  • add a description of sn_icb in the doc and mention the unit in the namelist.
  • correct comments mentioning units is in km3 weq / y

To be discussed by ST:

  • Should the unit of the input file changed from km3 of iceberg / y to kg / s (icbclv) ?

systeam
#2740 For better management of ln_rnf_icb SBC systeam Request 2021-11-17

Context

ln_rnf_icb is an option to add a climatology of icb melt. This option is embedded within the rnf module. Here are some points we realised. As it is, using this option in a regional configuration like WED025 (ie no liquid river runoff) is not possible without adding an river runoff file full of 0.

Proposal

To fix the issue mentioned above and ease the setting of icb in the namelist, I suggest to have all the icb related variables inside the namberg namelist bloc with a something similar to what is done for the isf with explicit cavities and parametrised cavities :

  • a master flag ln_berg to activate the icebergs module
    • ln_icb_clim to trigger the use of an iceberg climatology
    • ln_icb_lagr to trigger the icb lagrangian model.

systeam
#2336 AGRIF-01_mathiot_multigrid_load_balancing AGRIF Unscheduled ayoung Task 2019-11-21

Context

...

Proposal

...


ayoung
#2417 SETTE: Make sette universal tools Unscheduled smueller Task 2020-03-18

Context

As presented in ST meeting, SETTE need to be independant of the configuration itself (ie more universal). This will be easier to add a configuration and SETTE itself will move more slowly (and so more convenient as it is an external).

Proposal

Step 1 and 2 presented in the attachment:

  • All the hard coded information should go in input_CFG file
  • Run 3 configurations (REF/RST/MPP) instead of 4 (LONG+SHORT/REPRO_48/REPRO_84)
  • build a generic function to run this 3 run
  • adapt the report generation accordingly.

https://forge.ipsl.jussieu.fr/nemo/attachment/wiki/SystemTeam/Agenda/2020-02-27/ST_sette.pdf


smueller

mikebell (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1908 ROMS wetting and drying scheme OCE Unscheduled mikebell Task 2017-06-05

Context

Implement ROMS wetting and drying scheme as an alternative to the NOC scheme
...

Implementation

Involves changes only to dyn_spg_ts
...


mikebell

nicolasmartin (5 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2016 ENHANCE-11 Trusting-SETTE cooperation (previously 2018WP) env Unscheduled nicolasmartin Task 2018-02-19

Context

The SETTE and Trusting tools are more or less doing the same kind of things so it is clear that at some point the two will become one.
With Trusting as a building block, the most likely is that SETTE evolve to a kind of Trusting manager that will launch several Trusting instances to validate a development branch.

Implementation plan

This action should be a first step towards the tools merge by sharing some files/scripts to ease further development.


nicolasmartin
#1644 Few bugs in Trusting process env clevy Defect 2015-12-02

No automatic conflict resolution when updating the working copy of NEMO => Add option '--accept=theirs-conflict' or '--accept=theirs-full' in the only case of updating to the head of the trunk

Simple gzip command not fitting all possibles cases when uncompressing forcing archive => Restore find command with exec option to descend in the directory hierarchy of the forcing folder


clevy
#1640 Wiki page for Trusting env Documentation clevy Request 2015-11-27

clevy
#2105 Phasing FCM version in vendors with a tag release from metomi Github repository env nicolasmartin Request 2018-06-19

Context

The FCM source code included with NEMO looks quite outdated. The last commit by Seb goes back 5 years ago and the last overall import has 8 eight years old: browser:/vendors/FCM@9621

Few weeks ago, I ran a basic and simple test by replacing the content of the FCM directory with a import of the last release from the official repository and I did not encounter any issue at compilation.

Proposal

Actually, the upgrade seems to be straightforward by replacing the current release (labelled as 1-5 release) with the last one (2017.10.0) but the Met Office staff would certainly have more information and an informed opinion on what it is safe to do here.


nicolasmartin
#2015 ENHANCE-06 Repository cleaning (previously 2018WP) env Unscheduled ayoung Task 2018-02-19

Context

The way we use the repository has getting worse over years as we have stopped to follow the best practices. A repository should constantly evolved and would just reflect the ongoing work, then it should be easy to find inside the official releases without difficulties. Instead we have one which is full of all developments done since the code has been put under version control, even the official releases are hidden in the middle of the development branches.

In addition to not deleting dev branches after merging, we have lost in particularly a clever organisation of the repository. Each branch newly created add 1 Go to the repository and the vast majority of the duplicate code will not be modified (outside CONFIG and NEMO). As a result, the repository has grown to a huge size (~130 Go !) that prevents the developers to be able to work with a entire working copy (~ 1 hour for downloading and endless updates).

Implementation plan

The goal is to recover a proper state of the repository along with a new trunk structure, that tends to minimize the unnecessary copies by taking out the dependencies development. It will not delete the history of the repository but the tree structure of the repository for further revisions starting from this cleaning. Each item could be recovered by updating/downloading selected revision.

The first part of the action could be lead quickly, it is mainly a cleaning of '/branches' and '/tags' repository paths with a move of the official releases to '/tags' and several additions of files at the trunk root.

The second part is much more intrusive with a vast reorganisation of the trunk which includes many moves to /vendors path, mergers and renaming of directories. The best moment for doing this would be between the release of 4.0 and the beginning of the new developments in order to have the same organisation in every development branch.


ayoung

rblod (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2491 output time step in istate TOP Unscheduled rblod Defect 2020-06-22

Context

When outputting the initial state (nn_istate=1), the velocities doesn't correspond to the initial state (easy to see when starting from rest, velocities in output.ini.nc are not zero)

Analysis

diawri_state is called inside dia_wri so writes the now time step (Nnn). Velocities at time step now are corrected in dynspg_ts so doesn't correspond to the initial state anymore

Recommendation

Inside dia_wri, call diawri_state with before time step as argument : mod(kmm+1,3)+1 should do it If assigned to me, I can do it ...


rblod

rbourdal (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2052 ENHANCE-09(2018WP)_rbourdal_massfluxconvection OCE Unscheduled rbourdal Task 2018-02-26

Context

Implementation of a mass flux scheme for convection. Resolution of the convection as in atmospheric model. Improvement of the deep convection and vertical velocity associated (up and down). Alternative at evd or npc formulation.

Proposal

implementation in NEMO1D (January-June) Then test in 3D


rbourdal

rlod (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2656 VLD-09_RPerson_Antarctic_ice_Sheet_Fe_Source TOP Unscheduled rlod Task 2021-04-16

Workplan action

Wikipage: wiki:2021WP/VLD-09_RPerson_Antarctic_ice_Sheet_Fe_Source


rlod

Robin_Waldman (2 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#1984 Error in the online momentum trend diagnostic TRD Unscheduled gm Bug 2017-11-28

Context

I am using the online 3D momentum trend diagnostic (ln_dyn_trd = .true.) to compute offline vorticity budgets. The model version is NEMO v3.6, downloaded a few months ago from NEMO website. I am working on a Mediterranean configuration (NEMOMED12).

Analysis

I have first checked on 1 month of simulation that the total trend stored (utrd_tot and vtrd_tot) corresponded to the sum of individual trend terms (which is the case) and was equal to the actual trend deduced from restart files (un, vn in the restart of the end minus beginning of month). This latter point is not verified. The error is typically low (a few percents) but it can reach very high No image "Ztrend_tot_test_LION.png" attached to Ticket #1984values at localized points on the map, especially at intermediate depths (~70-300m). The error is even larger when computing the curl of the momentum trend in order to retreive the vertical relative vorticity trend.

Fix

Changeset r8102 (by Dave Storkey) has recently debugued the online tracer trend diagnostic, in particular by separating between trend contributions in even and odd timesteps. I am thinking that maybe the error on the momentum trend diagnostic also comes from that.


gm
#2068 Wrong namelist double diffusion mixing parameter name OCE Unscheduled gm Defect 2018-03-26

Context

I am currently checking the activation of the EVD scheme in the case of differential T-S mixing, either due to the double-diffusion mixing parametrization or to the new De Lavergne tidal mixing parametrization. Tests are done with NEMOMED12 configuration in the Mediterranean Sea.

Analysis

  • The double diffusion mixing parametrization has 2 namelist parameters, one of which is wrongly named. rn_hsbfr is actually not the buoyancy flux ratio (constant=0.7 in zdfddm.F90) but the critical density ratio Rc, above which double diffusion rapidly decays.
  • Also, the activation of key_zdftmx_new imposes the activation of the double diffusion mixing parametrization, which is not necessarily desired.

Recommendation

  • Rename rn_hsbfr as rn_cdr for critical density ratio, and if useful introduce a new namelist parameter rn_hsbfr with default value 0.7.
  • Introduce a logical in the namzdf_ddm section to activate or not double diffusion mixing when key_zdfddm is activated.

...


gm

sciliberti (1 match)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2612 VLD-02_Aimie_Moulin_Med_Wave_Coupling SBC Unscheduled amoulin Task 2021-02-01

Validation of the NEMO-Wave coupling in the Mediterranean Sea


amoulin

smasson (4 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2138 key_nemocice_decomp still needed? LBC Unscheduled smasson Defect 2018-10-14

Context

Do we still need key_nemocice_decomp in v4.0?

Proposal

...


smasson
#2694 iom_put without halos MULTIPLE systeam Defect 2021-06-18

Context

In the actual version of the code, in iom_put (and because of the way we defined our interface with xios):

  • we give to xios arrays defined over the full domain (jpi,jpi)
  • we say to xios to write data only over the inner domain (Ni_0, Nj_0)

The problem is that in many cases (in most of cases?), output variables are diagnostics that could be computed only over the inner domain. Having to use full domain arrays forces us to do more computation, to call lbc_lbk (that is incompatible with a proper use of the tiles) or to use arrays with uninitialized halos which prevents to use the debug options.

The ideal solution would be to be able to use iom_put (and therefore xios) for variables defined over the full domain or over the inner domain only. Unfortunately this is something which is not possible easily with the actual version of xios.

Analysis

I had a discussion with Yann Meurdesoif to try to find the best way to sort this out. He proposed 2 “solutions":

1) the simplest solution is to setup xios so it is expecting is inner domain arrays and to “cut” the full domain into inner domain arrays before calling xios. This is the solution I coded last year but it generates arrays copies and slow down the code significantly. We decided to remove it. see #2563 and changeset [13747]

2) the second solution is good for performances but bad for users and maintenance: The idea is to define 2 set of grids: gridT/U/V/F over the full domain and gridT/U/V/F over the inner domain. The modifications are quite easy to do in the code. The problem is that we would have to modify the xml files:

  • We would need to duplicated the contain of grid_def_nemo.xml to have for example grid_T_2D_full and grid_T_2D_inner instead than a simple grid_T_2D
  • next in all the field_def_nemo-*.xml files, we sould make sure that the grid linked to the variable is the proper one… there is more than 1200 variables...

Recommendation

we decide to go for solution (2)


systeam
#2624 HPC-07_Irrmann_try_new_pt2pt_comm LBC Unscheduled girrmann Task 2021-02-12

Workplan action

Wikipage: wiki:2021WP/HPC-07_Irrmann_try_new_pt2pt_comm


girrmann
#2638 AGF-01_Debreu_domcfg AGRIF Unscheduled ldebreu Task 2021-03-15

Workplan action

AGRIF / Configuration domain generation tool refactoring & Agrif friendly

Wikipage: wiki:2021WP/AGF-01_Debreu_domcfg


ldebreu

smueller (6 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2194 ENHANCE-12_SimonM-Tides SBC Unscheduled smueller Task 2018-12-20

Summary

Action ENHANCE-12_SimonM-Tides
PI(S) Simon Müller, Nicolas Bruneau
Digest This action aims to enhance the implementation of tidal forcing with the addition of an optional, alternative parameter set for the harmonic expansion of the tide potential, by somewhat simplifying the existing code, and by converting a currently fixed coefficient into a namelist parameter.
Dependencies
Branches NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis, has superseded NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides; NEMO/branches/2019/dev_r13813_ENHANCE-12_SimonM-Tides_doc
Previewer(s) Jérôme Chanut
Reviewer(s) Jérôme Chanut
Wiki 2019WP/ENHANCE-12_SimonM-Tides

Abstract

This action aims to enhance the implementation of tidal forcing with the addition of an optional, alternative parameter set for the harmonic expansion of the tide potential, by somewhat simplifying the existing code, and by converting a currently fixed coefficient into a namelist parameter.

Description

This action aims to enhance the implementation of tidal forcing with the addition of an optional, alternative parameter set for the harmonic expansion of the tide potential and by converting a currently fixed coefficient into a configurable namelist parameter; this work has previously been implemented and tested by Nicolas Bruneau in a pre-4.0beta version of NEMO.

Further, this action aims to reduce the total number of modules related to tides (the current implementation comprises the modules sbctide, tideini, tide_mod, updtide, and bdytide) and to thereby somewhat simplify the current implementation of tidal forcing.

Implementation

See 2019WP/ENHANCE-12_SimonM-Tides

Reference manual update

See 2019WP/ENHANCE-12_SimonM-Tides


smueller
#2487 Inflexible calendar year and approximate conversion in option 2 of the freshwater-budget adjustment mechanism SBC smueller Defect 2020-06-11

Context

Option 2 of the freshwater-budget adjustment mechanism (nn_fwb = 2, module sbcfwb) uses a fixed calendar year of 365 days rather than that of the selected model calendar to time annual updates of the adjustment flux; this issue has previously been reported in the form of source-code comments (source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcfwb.F90@12578#L129 and source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcfwb.F90@12578#L135). Further, the conversion of the combined sea-level, sea-ice, and snow anomaly into an equivalent freshwater flux is approximate and not in line with corresponding conversions used elsewhere in the model.

Analysis

In option 2 of the freshwater-budget adjustment mechanism, year boundaries are identified whenever the reminder of the division of the time step counter by 365 * 86400 / rdt equals zero (source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcfwb.F90@12578#L130). This i) fixes the adjustment interval to 365 days, ii) sets the date for annual adjustment-flux updates to the date of nit000 - 1 rather than the start of 1 January, and iii) leads to an update of the adjustment flux near the start of the final time step of each year (i.e., before completion of that model year).

Line source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcfwb.F90@12578#L134 implements the conversion of a combined sea-level, sea ice, and snow anomaly into an equivalent annual-average freshwater flux using a literal value of 1000.0 for the density of sea water and 365 for the number of days in a year rather than variables rau0 and nyear_len(1), respectively.

The impact of these approximations can be demonstrated using reference configuration GYRE_PISCES (which uses calendar years of 360 days) after replacing source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/USR/usrdef_sbc.F90@12578#L134 by zsumemp = 0.0_wp and activation of the freshwater-budget adjustment by setting namelist parameter nn_fwb = 2.

Recommendation

The annual average freshwater adjustment based on the sea-level and sea-ice anomaly at the end of the preceding model year should be computed using daymod variable nyear_len (i.e., the calendar year during which the adjustment will be applied) and using the reference sea-water density rau0 rather than the literal values 365 and 1000.0, respectively. Further, it would be useful for interpretability of the effect of the freshwater-adjustment mechanism to exactly align the annual computation of the freshwater-budget adjustment with the model calendar. Therefore, adjustment-flux updates could occur in the first time step of each new year, which should be identified using variables updated by module daymod such as through the conditional ( ( nday_year == 1 ) .AND. ( nsec_day == NINT( 0.5_wp * rdt ) ) ).


smueller
#2488 Inflexible calendar year and approximate conversion in option 2 of the freshwater-budget adjustment mechanism SBC smueller Defect 2020-06-11

Context

The defect described in ticket #2487 is also present in the current trunk version of NEMO.

Analysis

See ticket #2487.

Recommendation

After substitution of rdt by rn_Dt and rau0 by rho0, the modifications recommended in ticket #2487 should be suitable for removing this defect from the current trunk version of NEMO.


smueller
#2723 Compiler-specific compilation failures in NST component related to dummy procedures of AGRIF subroutines AGRIF systeam Defect 2021-09-15

Context

Not all commonly used compilers succeed in compiling the calls of AGRIF subroutines Agrif_Bc_variable and Agrif_Update_variable in component NST.

Analysis

The AGRIF subroutines Agrif_Bc_variable and Agrif_Update_variable use a dummy procedure argument with an implicit interface (argument name procname). Currently, the respective calls in the NST component (e.g., source:/NEMO/releases/r4.0/r4.0.6/src/NST/agrif_ice_update.F90#L67) refer to a procedure name as argument value, which not all commonly used compilers seem to accept.

Recommendation

The procname argument values in the Agrif_Bc_variable and Agrif_Update_variable calls included in the NST component could be replaced by explicitly assigned procedure pointers with implicit interface, such as

  • src/NST/agrif_ice_update.F90

     
    4848      !!  
    4949      !! ** Action : - Update (u_ice,v_ice) and ice tracers 
    5050      !!---------------------------------------------------------------------- 
     51!$AGRIF_DO_NOT_TREAT 
     52      PROCEDURE(), POINTER ::   zp_update_tra_ice, zp_update_u_ice, zp_update_v_ice 
     53!$AGRIF_END_DO_NOT_TREAT 
     54      !!---------------------------------------------------------------------- 
    5155      ! 
    5256      IF( Agrif_Root() .OR. nn_ice == 0 ) RETURN   ! do not update if inside Parent Grid or if child domain does not have ice 
    5357      ! 
     
    6266      Agrif_SpecialValueFineGrid    = -9999. 
    6367      Agrif_UseSpecialValueInUpdate = .TRUE. 
    6468       
     69      zp_update_tra_ice => update_tra_ice 
     70      zp_update_u_ice   => update_u_ice 
     71      zp_update_v_ice   => update_v_ice 
    6572# if defined TWO_WAY 
    6673# if ! defined DECAL_FEEDBACK 
    67       CALL Agrif_Update_Variable( tra_ice_id , procname = update_tra_ice ) 
     74      CALL Agrif_Update_Variable( tra_ice_id , procname=zp_update_tra_ice ) 
    6875#else  
    69       CALL Agrif_Update_Variable( tra_ice_id , locupdate=(/1,0/), procname = update_tra_ice ) 
     76      CALL Agrif_Update_Variable( tra_ice_id , locupdate=(/1,0/), procname=zp_update_tra_ice ) 
    7077#endif  
    7178# if ! defined DECAL_FEEDBACK 
    72       CALL Agrif_Update_Variable( u_ice_id   , procname = update_u_ice    ) 
    73       CALL Agrif_Update_Variable( v_ice_id   , procname = update_v_ice    ) 
     79      CALL Agrif_Update_Variable( u_ice_id   , procname=zp_update_u_ice ) 
     80      CALL Agrif_Update_Variable( v_ice_id   , procname=zp_update_v_ice ) 
    7481#else  
    75       CALL Agrif_Update_Variable( u_ice_id   , locupdate1=(/0,-1/),locupdate2=(/1,-2/),procname=update_u_ice) 
    76       CALL Agrif_Update_Variable( v_ice_id   , locupdate1=(/1,-2/),locupdate2=(/0,-1/),procname=update_v_ice) 
     82      CALL Agrif_Update_Variable( u_ice_id   , locupdate1=(/0,-1/), locupdate2=(/1,-2/), procname=zp_update_u_ice ) 
     83      CALL Agrif_Update_Variable( v_ice_id   , locupdate1=(/1,-2/), locupdate2=(/0,-1/), procname=zp_update_v_ice ) 
    7784#endif 
    7885!      CALL Agrif_Update_Variable( tra_ice_id , locupdate=(/0,2/), procname = update_tra_ice  ) 
    7986!      CALL Agrif_Update_Variable( u_ice_id   , locupdate=(/0,1/), procname = update_u_ice    ) 

to improve the compiler compatibility of the NST component.


systeam
#2732 Use of non-standard intrinsic function ISNAN env systeam Defect 2021-10-14

Context

The defect described in ticket #2720 is also present in the current trunk version of NEMO.

Analysis

See ticket #2720.

Recommendation

The modification recommended in ticket #2720 would also be suitable to resolve this defect in the trunk version of NEMO.


systeam
#2427 DATAINT-02_smueller_IOM_revision IOM Unscheduled smueller Task 2020-03-31

Workplan action

Wikipage: wiki:2020WP/DATAINT-02_smueller_IOM_revision


smueller

sparonuz (2 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2647 Derived data type component name shadowing FORTRAN keyword #mixedprecision ICB systeam Request 2021-03-30

Context

In file OCE/ICB/icblbc.f90 is declared the following

   TYPE, PUBLIC :: buffer
      INTEGER :: size = 0
      REAL(wp), DIMENSION(:,:), POINTER ::   data
   END TYPE buffer

Both components have a name that shadows an intrinsic statement. Specifically

Analysis

Even if the compiler does not complain, it is not a good practice and a possible source of error or confusion. It is also a source of disturbance during the parsing part of the mixed precision implementation's workflow. Even though the second is a Fortran 77 statement, and in some usage is obsolescent, as explained on page 140 of Modern Fortran Explained (Metcalf, Cohen & Reid) in some cases is still needed:

We recommend using the type declaration statement rather than the data statement, but the data statement must be employed when only part of a variable is to be initialised.

(I mentioned this because the authors are members of the WG5, which is responsible for the development of Fortran)

Recommendation

I would rather change the data type to

   TYPE, PUBLIC :: buffer
      INTEGER :: buffer_size = 0
      REAL(wp), DIMENSION(:,:), POINTER ::   buffer_data
   END TYPE buffer

And coherently in the whole file icblbc.f90 (it is the only file where this DS is used).


systeam
#2683 File OCE/OBS/obs_fbm.F90 custom precision #mixedprecision OBS systeam Request 2021-05-31

Context

In file File OCE/OBS/obs_fbm.F90 there are the following lines

   IMPLICIT NONE
   PUBLIC

   ! Type kinds for feedback data.

   INTEGER, PARAMETER :: fbsp = SELECTED_REAL_KIND( 6, 37) !: single precision
   INTEGER, PARAMETER :: fbdp = SELECTED_REAL_KIND(12,307) !: double precision

These are basically redefining the same precision (singe/double) already defined (publicly) in file OCE/par_kind.F90

   INTEGER, PUBLIC, PARAMETER ::   sp = SELECTED_REAL_KIND( 6, 37)   !: single precision (real 4)
   INTEGER, PUBLIC, PARAMETER ::   dp = SELECTED_REAL_KIND(12,307)   !: double precision (real 8)

If this was not made for a matter of flexibility, the definition should be removed and the global parameter should be used instead.

Proposal

I propose to add a

use par_kind

at the beginning of the file and change all the variables defined as

REAL(KIND=fbdp), DIMENSION [...] :: my_var1
REAL(KIND=fbsp), DIMENSION [...] :: my_var2

to

REAL(KIND=dp), DIMENSION [...] :: my_var1
REAL(KIND=sp), DIMENSION [...] :: my_var2

...


systeam

vancop (4 matches)

Ticket Summary Component Milestone Owner Type Created
Description
Owner
#2186 SI3-03_VP_rheology SI3 Unscheduled vancop Task 2018-12-20

BE CAREFUL !!! Due to dynamic behaviour of this ticket creation page, it is highly recommend to set first all other fields before writing the ticket description below. If you have lost your draft after an unwanted reload, you can click on the link 'Restore Form' in the contextual menu upper right to recover it. Remove these lines after reading.

Summary

Action ${ACTION_NAME} Subject
PI(S) M. Vancoppenolle
Digest Brief description with motivations and main tasks
Dependencies
Branch NEMO/branches/$YEAR/dev_r{REV}_{ACTION_NAME}
Previewer(s)
Reviewer(s)
Wiki wiki:${YEAR}WP/...

Abstract

Reintroduce a C-Grid VP Rheology

Description

Reintroduce a C-Grid VP Rheology. Code available from MITgcm should form the basis (Zhang and Hilber 1997).

Implementation

Describe flow chart of the changes in the code.
List the .F90 files and modules to be changed.
Detailed list of new variables (including namelists) to be defined, give for each the chosen name (following coding rules) and definition.

Reference manual and web pages updates

Using part 1 and 2, define the summary of changes to be done in reference manuals (tex files), guide (rst files) and in the content of web pages.

Once the PI has completed this section, he should send a mail to the previewer(s) asking them to preview the work within two weeks.


vancop
#2187 SI3-04_lagrangian_drifters TOP Unscheduled vancop Task 2018-12-20

Implement lagrangian drifters in sea ice for immerse

Summary

Action ${ACTION_NAME} Subject
PI(S) M. Vancoppenolle
Digest Brief description with motivations and main tasks
Dependencies
Branch NEMO/branches/$YEAR/dev_r{REV}_{ACTION_NAME}
Previewer(s)
Reviewer(s)
Wiki wiki:${YEAR}WP/...

Abstract

Introduce lagrangian drifters in sea ice for IMMERSE sea ice evaluation.

Description

Lagrangian drifters should be introduced to be able to compare with lagrangian sea ice deformation. There are two options. Either follow icebergs. Or use the corresponding ocean package.

Implementation

Describe flow chart of the changes in the code.
List the .F90 files and modules to be changed.
Detailed list of new variables (including namelists) to be defined, give for each the chosen name (following coding rules) and definition.

Reference manual and web pages updates

Using part 1 and 2, define the summary of changes to be done in reference manuals (tex files), guide (rst files) and in the content of web pages.

Once the PI has completed this section, he should send a mail to the previewer(s) asking them to preview the work within two weeks.


vancop
#2189 PUB-05_SI3_documentation SI3 Unscheduled vancop Task 2018-12-20

SI3 documentation must be continued and reviewed

Summary

Action ${ACTION_NAME} Subject
PI(S) M. Vancoppenolle
Digest Brief description with motivations and main tasks
Dependencies
Branch NEMO/branches/$YEAR/dev_r{REV}_{ACTION_NAME}
Previewer(s)
Reviewer(s)
Wiki wiki:${YEAR}WP/...

Abstract

Write and revise documentation.

Description

Progress should be made on the documentation. There are a few missing chapters left, and progress should be done.

Implementation

Describe flow chart of the changes in the code.
List the .F90 files and modules to be changed.
Detailed list of new variables (including namelists) to be defined, give for each the chosen name (following coding rules) and definition.

Reference manual and web pages updates

Using part 1 and 2, define the summary of changes to be done in reference manuals (tex files), guide (rst files) and in the content of web pages.

Once the PI has completed this section, he should send a mail to the previewer(s) asking them to preview the work within two weeks.


vancop
#2191 PUB-03_NDS_CHAPTER SI3 Unscheduled vancop Task 2018-12-20

BE CAREFUL !!! Due to dynamic behaviour of this ticket creation page, it is highly recommend to set first all other fields before writing the ticket description below. If you have lost your draft after an unwanted reload, you can click on the link 'Restore Form' in the contextual menu upper right to recover it. Remove these lines after reading.

Summary

Action ${ACTION_NAME} Subject
PI(S) M. Vancoppenolle, Ed Blockley
Digest Brief description with motivations and main tasks
Dependencies
Branch NEMO/branches/$YEAR/dev_r{REV}_{ACTION_NAME}
Previewer(s)
Reviewer(s)
Wiki wiki:${YEAR}WP/...

Abstract

NDS Ice chapter must be rewritten.

Description

NDS ice chapter is dragging behind other NDS chapters. THis is because the sea ice unified model has become a bit late when writing the previous NDS document. This year, there is a scheduled workshop to provide elements to start rewriting this document.

Implementation

Describe flow chart of the changes in the code.
List the .F90 files and modules to be changed.
Detailed list of new variables (including namelists) to be defined, give for each the chosen name (following coding rules) and definition.

Reference manual and web pages updates

Using part 1 and 2, define the summary of changes to be done in reference manuals (tex files), guide (rst files) and in the content of web pages.

Once the PI has completed this section, he should send a mail to the previewer(s) asking them to preview the work within two weeks.


vancop
Note: See TracReports for help on using and creating reports.