Custom Query (2349 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (28 - 30 of 2349)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ticket Resolution Summary Owner Reporter
#2495 fixed trunk/OCE won't compile without MPI (1-proc "nemo.exe") systeam laurent
Description

Context

Compilation of the code (OCE) without MPI (i.e. without the CPP key "key_mpp_mpi") crashes when attempting to compile "lbc_lnk.F90".

Analysis

Some MPI-related calls are still in use in 2 included headers after pre-processing stage: mpp_lbc_north_icb_generic.h90 and mpp_nfd_generic.h90. These 2 header files both call "MPI_ALLGATHER" without any "#if defined key_mpp_mpi"…

Fix

(Note: I'm in unknown territories here, this fix worked for my simple test-case "STATION_ASF")

In mpp_nfd_generic.h90, replace:

         CALL MPI_ALLGATHER( znorthloc  , ibuffsize, MPI_TYPE,                &
            &                znorthgloio, ibuffsize, MPI_TYPE, ncomm_north, ierr )

with:

#if defined key_mpp_mpi
         CALL MPI_ALLGATHER( znorthloc  , ibuffsize, MPI_TYPE,                &
            &                znorthgloio, ibuffsize, MPI_TYPE, ncomm_north, ierr )
#endif

In mpp_lbc_north_icb_generic.h90, replace:      

CALL MPI_ALLGATHER( znorthloc_e(1,1-kextj)    , itaille, MPI_TYPE,    &
         &                znorthgloio_e(1,1-kextj,1), itaille, MPI_TYPE,    &
         &                ncomm_north, ierr )

with #if defined key_mpp_mpi

      CALL MPI_ALLGATHER( znorthloc_e(1,1-kextj)    , itaille, MPI_TYPE,    &
         &                znorthgloio_e(1,1-kextj,1), itaille, MPI_TYPE,    &
         &                ncomm_north, ierr )
#endif

#2492 fixed Out-of-bounds error in ORCA2-based mono-processor configuration smueller smueller
Description

Context

A user of an ORCA2-based mono-processor configuration (key_mpp_mpi undefined) has reported an out-of-bounds error which occurs during the north-fold boundary exchange in subroutine lbc_nfd_2d_ext.

Analysis

This out-of-bounds error can readily be reproduced in reference configuration ORCA2_ICE_PISCES by removing CPP-keys key_mpp_mpi and key_iomput.

The error is caused by the initialisation of array tmask_e(0:jpi+1,0:jpj+1) in subroutine icb_init; it is absent when iceberg handling is disabled (ln_icebergs = .FALSE.). The initialisation of tmask_e is finalised by calling subroutine mpp_lnk_2d_icb (interface lbc_lnk_icb), which differs in the north-fold treatment depending on whether jpni is 1 (incl. mono-processor case) or greater: if jpni = 1, subroutine lbc_nfd_2d_ext (implemented in source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/LBC/lbc_nfd_ext_generic.h90) is called. Of array tmask_e(0:jpi+1,0:jpj+1), the subset tmask_e(1:jpi,1:jpj+1) is passed to subroutine lbc_nfd_2d_ext by subroutine mpp_lnk_2d_icb. While subroutine lbc_nfd_2d_ext refers to this subset as ptab(1:jpi,0:jpj), it accesses array elements with a dimension-2 subscript of nlcj+1. Since jpj == nlcj, this results in out-of-bounds array access and potentially incorrect content of the array.

The same error also affects arrays {u,v}mask_e initialised in subroutine icb_init (source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/ICB/icbini.F90) and {uo,vo,ff,tt,fr,ua,va,hi,vi}_e initialised in subroutine icb_utl_copy (source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/ICB/icbutl.F90). Unrelated to out-of-bounds array access, it appears that the lbc_lnk_icb calls used to initialise arrays {u,v}mask_e specify incorrect grid types ('T'), which could result in further incorrect boundary exchanges that may negatively affect these two arrays.

Fix

Subroutine mpp_lnk_2d_icb could be adjusted to retain the bounds for dimension 2 of the array passed to subroutine lbc_nfd_2d_ext, i.e.,

  • src/OCE/LBC/lbclnk.F90

     
    381381      IF( npolj /= 0 ) THEN 
    382382         ! 
    383383         SELECT CASE ( jpni ) 
    384                    CASE ( 1 )     ;   CALL lbc_nfd          ( pt2d(1:jpi,1:jpj+kextj), cd_type, psgn, kextj ) 
     384                   CASE ( 1 )     ;   CALL lbc_nfd          ( pt2d(1:jpi,1-kextj:jpj+kextj), cd_type, psgn, kextj ) 
    385385                   CASE DEFAULT   ;   CALL mpp_lbc_north_icb( pt2d(1:jpi,1:jpj+kextj), cd_type, psgn, kextj ) 
    386386         END SELECT 
    387387         ! 

Further, the grid types specified in the lbc_lnk_icb calls for arrays {u,v}mask_e could be adjusted according to

  • src/OCE/ICB/icbini.F90

     
    239239      umask_e(:,:) = 0._wp   ;   umask_e(1:jpi,1:jpj) = umask(:,:,1) 
    240240      vmask_e(:,:) = 0._wp   ;   vmask_e(1:jpi,1:jpj) = vmask(:,:,1) 
    241241      CALL lbc_lnk_icb( 'icbini', tmask_e, 'T', +1._wp, 1, 1 ) 
    242       CALL lbc_lnk_icb( 'icbini', umask_e, 'T', +1._wp, 1, 1 ) 
    243       CALL lbc_lnk_icb( 'icbini', vmask_e, 'T', +1._wp, 1, 1 ) 
     242      CALL lbc_lnk_icb( 'icbini', umask_e, 'U', +1._wp, 1, 1 ) 
     243      CALL lbc_lnk_icb( 'icbini', vmask_e, 'V', +1._wp, 1, 1 ) 
    244244      ! 
    245245      ! assign each new iceberg with a unique number constructed from the processor number 
    246246      ! and incremented by the total number of processors 
#2486 fixed Fixing irregularities revealed by namelist integrity checks acc acc
Description

Context

The application of namelist integrity checking tools to 4.0-HEAD@13089 revealed several irregularities that this ticket seeks to address. Most are resolved with trivial changes but a couple of the changes proposed here should be reviewed by those more familiar with those parts of the code. Namely the changes to the PISCES reference namelist and to the stochastic parameterisation module.

Analysis

Firstly, there are two changes to the code base to replace valid code with code more conformant with the conventions used elsewhere. These are merely to allow the namelist integrity checks to correctly identify namelists.

The first is uncontroversial and merely inserts a leading ampersand on a continuation line:

  • OCE/SBC/sbcwave.F90

     
    391391                             &   sn_tauwoc, sn_tauwx, sn_tauwy     ! informations about the fields to be read 
    392392      ! 
    393393      NAMELIST/namsbc_wave/  sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wfr, & 
    394                              sn_wnum, sn_tauwoc, sn_tauwx, sn_tauwy 
     394                          &  sn_wnum, sn_tauwoc, sn_tauwx, sn_tauwy 
    395395      !!--------------------------------------------------------------------- 
    396396      ! 
    397397      REWIND( numnam_ref )              ! Namelist namsbc_wave in reference namelist : File for drag coeff. from wave model 

The second should also be uncontroversial unless there was an obscure reason for appending to the namelist in the manner used uniquely in bdydta.F90 (alignment of variables? Problems with a particular compiler?). Otherwise, the proposal is to replace the multiple declarations with a single declaration and continuation lines:

  • OCE/BDY/bdydta.F90

     
    395395      TYPE(FLD_N), DIMENSION(:), POINTER ::   bn_alias                        ! must be an array to be used with fld_fill 
    396396      TYPE(FLD  ), DIMENSION(:), POINTER ::   bf_alias 
    397397      ! 
    398       NAMELIST/nambdy_dta/ cn_dir, bn_tem, bn_sal, bn_u3d, bn_v3d, bn_ssh, bn_u2d, bn_v2d 
    399       NAMELIST/nambdy_dta/ bn_a_i, bn_h_i, bn_h_s, bn_t_i, bn_t_s, bn_tsu, bn_s_i, bn_aip, bn_hip 
    400       NAMELIST/nambdy_dta/ rn_ice_tem, rn_ice_sal, rn_ice_age, rn_ice_apnd, rn_ice_hpnd 
    401       NAMELIST/nambdy_dta/ ln_full_vel, ln_zinterp 
     398      NAMELIST/nambdy_dta/ cn_dir, bn_tem, bn_sal, bn_u3d, bn_v3d, bn_ssh, bn_u2d, bn_v2d,         & 
     399                         & bn_a_i, bn_h_i, bn_h_s, bn_t_i, bn_t_s, bn_tsu, bn_s_i, bn_aip, bn_hip, & 
     400                         & rn_ice_tem, rn_ice_sal, rn_ice_age, rn_ice_apnd, rn_ice_hpnd,           & 
     401                         & ln_full_vel, ln_zinterp 
    402402      !!--------------------------------------------------------------------------- 
    403403      ! 
    404404      IF(lwp) WRITE(numout,*) 

With these changes the namelist integrity checks reveal the issues shown in part 3 of: Namelist checks Many of the issues flagged relating to derived type variables (sn*) or array varaibles are not real issues. They are flagged simply because only the derived type name or array name appears in the namelist declaration but individual elements are set in the namelists. Ignoring these items there are still the following issues to be addressed:

Recommendation

OCE

ln_rnf_icb             declared in namsbc_rnf (sbcrnf.F90) with no namelist_ref entry
sn_i_rnf               declared in namsbc_rnf (sbcrnf.F90) with no namelist_ref entry
ln_time_average_weight declared in namberg (icb_oce.F90, icbini.F90) with no namelist_ref entry
a large block of 23 variables declared in namsto (stopar.F90) with no namelist_ref entries

The first two of these are related and seem to be a simple omission. The proposed change is to add them to the namelist_ref:

  • SHARED/namelist_ref

     
    416416      rn_rnf_max  = 5.735e-4  !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true ) 
    417417      rn_dep_max  = 150.      !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true ) 
    418418      nn_rnf_depth_file = 0   !  create (=1) a runoff depth file or not (=0) 
     419   ln_rnf_icb  = .false.   !  read in iceberg flux from a file (fill sn_i_rnf if .true.) 
    419420 
    420421   cn_dir      = './'      !  root directory for the runoff data location 
    421422   !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________! 
     
    426427   sn_s_rnf    = 'runoffs'               ,        24.        , 'rosaline',   .true.    , .true. , 'yearly'  , ''               , ''       , '' 
    427428   sn_t_rnf    = 'runoffs'               ,        24.        , 'rotemper',   .true.    , .true. , 'yearly'  , ''               , ''       , '' 
    428429   sn_dep_rnf  = 'runoffs'               ,         0.        , 'rodepth' ,   .false.   , .true. , 'yearly'  , ''               , ''       , '' 
     430   sn_i_rnf    = 'NOT_USED'              ,        -1.        , 'sorunoff',   .true.    , .true. , 'yearly'  , ''               , ''       , '' 
    429431/ 
    430432!----------------------------------------------------------------------- 
    431433&namsbc_apr    !   Atmospheric pressure used as ocean forcing           (ln_apr_dyn =T) 

The next variable is a logical switch which has no code to activate and no explanation of its intention. The proposed change is to remove it:

  • OCE/ICB/icb_oce.F90

     
    121121   REAL(wp), PUBLIC ::   rn_sicn_shift                   !: Shift of sea-ice concentration in erosion flux modulation (0<sicn_shift<1) 
    122122   LOGICAL , PUBLIC ::   ln_operator_splitting           !: Use first order operator splitting for thermodynamics 
    123123   LOGICAL , PUBLIC ::   ln_passive_mode                 !: iceberg - ocean decoupling 
    124    LOGICAL , PUBLIC ::   ln_time_average_weight          !: Time average the weight on the ocean    !!gm I don't understand that ! 
    125124   REAL(wp), PUBLIC ::   rn_speed_limit                  !: CFL speed limit for a berg 
    126125   ! 
    127126   !                                     ! Mass thresholds between iceberg classes [kg] 
  • OCE/ICB/icbini.F90

     
    381381         &              rn_distribution, rn_mass_scaling, rn_initial_thickness, nn_verbose_write     ,   & 
    382382         &              rn_rho_bergs   , rn_LoW_ratio   , nn_verbose_level    , ln_operator_splitting,   & 
    383383         &              rn_bits_erosion_fraction        , rn_sicn_shift       , ln_passive_mode      ,   & 
    384          &              ln_time_average_weight          , nn_test_icebergs    , rn_test_box          ,   & 
    385          &              ln_use_calving , rn_speed_limit , cn_dir, sn_icb 
     384         &              nn_test_icebergs                , rn_test_box         , ln_use_calving       ,   & 
     385         &              rn_speed_limit , cn_dir, sn_icb 
    386386      !!---------------------------------------------------------------------- 
    387387 
    388388#if defined key_agrif 
     
    467467            &                    '(0<sicn_shift<1)    rn_sicn_shift  = ', rn_sicn_shift 
    468468         WRITE(numout,*) '   Do not add freshwater flux from icebergs to ocean                ',   & 
    469469            &                    '                  passive_mode            = ', ln_passive_mode 
    470          WRITE(numout,*) '   Time average the weight on the ocean   time_average_weight       = ', ln_time_average_weight 
    471470         WRITE(numout,*) '   Create icebergs in absence of a restart file   nn_test_icebergs  = ', nn_test_icebergs 
    472471         WRITE(numout,*) '                   in lon/lat box                                   = ', rn_test_box 
    473472         WRITE(numout,*) '   Use calving data even if nn_test_icebergs > 0    ln_use_calving  = ', ln_use_calving 

The unused stochastic parameterisation variables present more of a dilemma. The entire namsto namelist declared in stopar.F90 is:

      NAMELIST/namsto/ ln_sto_ldf, rn_ldf_std, rn_ldf_tcor, &
        &              ln_sto_hpg, rn_hpg_std, rn_hpg_tcor, &
        &              ln_sto_pstar, rn_pstar_std, rn_pstar_tcor, nn_pstar_flt, nn_pstar_ord, &
        &              ln_sto_trd, rn_trd_std, rn_trd_tcor, &
        &              ln_sto_eos, nn_sto_eos, rn_eos_stdxy, rn_eos_stdz, &
        &              rn_eos_tcor, nn_eos_ord, nn_eos_flt, rn_eos_lim, &
        &              ln_sto_trc, nn_sto_trc, rn_trc_stdxy, rn_trc_stdz, &
        &              rn_trc_tcor, nn_trc_ord, nn_trc_flt, rn_trc_lim, &
        &              ln_rststo, ln_rstseed, cn_storst_in, cn_storst_out

but of these only:

      NAMELIST/namsto/ ln_sto_eos, nn_sto_eos, rn_eos_stdxy, rn_eos_stdz, &
        &              rn_eos_tcor, nn_eos_ord, nn_eos_flt, rn_eos_lim,   &
        &              ln_rststo, ln_rstseed, cn_storst_in, cn_storst_out

are reported to ocean.output. The intent seems to be to limit access to only these options but the other options could be activated via the namelist and will activate code within the stochastic parameterisation module. The proposed change here is to properly disable the other options by:

  • OCE/STO/stopar.F90

     
    244244      !! 
    245245      !! ** Purpose :   define the stochastic parameterization 
    246246      !!---------------------------------------------------------------------- 
    247       NAMELIST/namsto/ ln_sto_ldf, rn_ldf_std, rn_ldf_tcor, & 
    248         &              ln_sto_hpg, rn_hpg_std, rn_hpg_tcor, & 
    249         &              ln_sto_pstar, rn_pstar_std, rn_pstar_tcor, nn_pstar_flt, nn_pstar_ord, & 
    250         &              ln_sto_trd, rn_trd_std, rn_trd_tcor, & 
    251         &              ln_sto_eos, nn_sto_eos, rn_eos_stdxy, rn_eos_stdz, & 
    252         &              rn_eos_tcor, nn_eos_ord, nn_eos_flt, rn_eos_lim, & 
    253         &              ln_sto_trc, nn_sto_trc, rn_trc_stdxy, rn_trc_stdz, & 
    254         &              rn_trc_tcor, nn_trc_ord, nn_trc_flt, rn_trc_lim, & 
     247      ! stochastic equation of state only (for now) 
     248      NAMELIST/namsto/ ln_sto_eos, nn_sto_eos, rn_eos_stdxy, rn_eos_stdz, & 
     249        &              rn_eos_tcor, nn_eos_ord, nn_eos_flt, rn_eos_lim,   & 
    255250        &              ln_rststo, ln_rstseed, cn_storst_in, cn_storst_out 
     251      !NAMELIST/namsto/ ln_sto_ldf, rn_ldf_std, rn_ldf_tcor, & 
     252      !  &              ln_sto_hpg, rn_hpg_std, rn_hpg_tcor, & 
     253      !  &              ln_sto_pstar, rn_pstar_std, rn_pstar_tcor, nn_pstar_flt, nn_pstar_ord, & 
     254      !  &              ln_sto_trd, rn_trd_std, rn_trd_tcor, & 
     255      !  &              ln_sto_trc, nn_sto_trc, rn_trc_stdxy, rn_trc_stdz, & 
     256      !  &              rn_trc_tcor, nn_trc_ord, nn_trc_flt, rn_trc_lim 
    256257      !!---------------------------------------------------------------------- 
    257258      INTEGER :: jsto, jmem, jarea, jdof, jord, jordm1, jk, jflt 
    258259      INTEGER(KIND=8) :: zseed1, zseed2, zseed3, zseed4 
     
    260261      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    261262 
    262263      ! Read namsto namelist : stochastic parameterization 
    263       REWIND( numnam_ref )              ! Namelist namdyn_adv in reference namelist : Momentum advection scheme 
     264      REWIND( numnam_ref )              ! Namelist namsto in reference namelist : stochastic parameterization 
    264265      READ  ( numnam_ref, namsto, IOSTAT = ios, ERR = 901) 
    265266901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsto in reference namelist' ) 
    266267 
    267       REWIND( numnam_cfg )              ! Namelist namdyn_adv in configuration namelist : Momentum advection scheme 
     268      REWIND( numnam_cfg )              ! Namelist namsto in configuration namelist : stochastic parameterization 
    268269      READ  ( numnam_cfg, namsto, IOSTAT = ios, ERR = 902 ) 
    269270902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namsto in configuration namelist' ) 
    270271      IF(lwm) WRITE ( numond, namsto ) 

TOP

The issues found in the TOP code reduce to just two mis-spelt variables and two missing default settings in namelist_top_ref. In fact the two missing character strings don't seem to have defaults set in the code either so the choice made here should be verified:

  • namelist_top_ref

     
    121121   nn_trd_trc    =  5475     !  time step frequency and tracers trends 
    122122   nn_ctls_trc   =   0       !  control surface type in mixed-layer trends (0,1 or n<jpk) 
    123123   rn_ucf_trc    =   1       !  unit conversion factor (=1 -> /seconds ; =86400. -> /day) 
    124    ln_trdmld_trc_restart = .false. !  restart for ML diagnostics 
    125    ln_trdmld_trc_instant = .true.  !  flag to diagnose trends of instantantaneous or mean ML T/S 
     124   ln_trdmxl_trc_restart = .false.   !  restart for ML diagnostics 
     125   ln_trdmxl_trc_instant = .true.    !  flag to diagnose trends of instantantaneous or mean ML T/S 
     126   cn_trdrst_trc_in  = 'restart_trd' !  suffix of pass. tracer trends restart name (input) 
     127   cn_trdrst_trc_out = 'restart_trd' !  suffix of pass. tracer trends restart name (output) 
    126128   ln_trdtrc( 1) = .true. 
    127129   ln_trdtrc( 2) = .true. 
    128130   ln_trdtrc(23) = .true. 

PISCES

The issues found in PISCES are just two mis-spelt variables. Because there are many variables sharing names between the p4z and p5z versions it isn't immediately obvious what the correct choices are. The changes proposed here are a best guess but both the choice of variable and the validity of the default value should be verified:

  • namelist_pisces_ref

     
    196196   wchldm     =  0.02     ! maximum quadratic mortality of diatoms 
    197197   mpratn     =  0.01     ! nanophytoplankton mortality rate 
    198198   mpratp     =  0.01     ! picophytoplankton mortality rate 
    199    mprat2     =  0.01     ! Diatoms mortality rate 
     199   mpratd     =  0.01     ! Diatoms mortality rate 
    200200/ 
    201201!----------------------------------------------------------------------- 
    202202&namp4zmes     !   parameters for mesozooplankton for PISCES std       - ln_p4z 
     
    229229   bmetexc2   =  .true.   ! Metabolic use of excess carbon 
    230230   resrat2    =  0.005    ! exsudation rate of mesozooplankton 
    231231   mzrat2     =  0.02     ! mesozooplankton mortality rate 
    232    xpref2d    =  1.       ! zoo preference for phyto 
    233    xpref2p    =  1.       ! zoo preference for POC 
     232   xpref2d    =  1.       ! zoo preference for Diatoms 
     233   xpref2n    =  1.       ! zoo preference for nanophyto 
    234234   xpref2z    =  1.       ! zoo preference for zoo 
    235    xpref2m    =  0.2      ! meso preference for zoo 
    236    xpref2c    =  0.3      ! zoo preference for poc 
     235   xpref2m    =  0.2      ! zoo preference for mesozoo 
     236   xpref2c    =  0.3      ! zoo preference for POC 
    237237   xthresh2zoo = 1E-8     ! zoo feeding threshold for mesozooplankton 
    238238   xthresh2dia = 1E-8     ! diatoms feeding threshold for mesozooplankton 
    239239   xthresh2phy = 1E-8     ! nanophyto feeding threshold for mesozooplankton 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Note: See TracQuery for help on using queries.