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.
Changeset 14619 – NEMO

Changeset 14619


Ignore:
Timestamp:
2021-03-21T19:25:43+01:00 (3 years ago)
Author:
ldebreu
Message:

AGFdomcfg:uncomment the call to agrif_set_external_mapping, call agrif_nemo_init even on the root grid #2638

Location:
NEMO/branches/2021/dev_r14608_AGRIF_domcfg/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/src/NST/agrif_user.F90

    r14433 r14619  
    142142#endif       
    143143 
    144    !   CALL Agrif_Set_ExternalMapping(nemo_mapping) 
     144      CALL Agrif_Set_ExternalMapping(nemo_mapping) 
    145145      ! 
    146146   END SUBROUTINE agrif_declare_var_ini 
     
    861861      ENDIF 
    862862 
    863 ! JC => side effects of lines below to be checked: 
    864       lk_west  = .NOT. ( Agrif_Ix() == 1 ) 
    865       lk_east  = .NOT. ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo) -1 ) 
    866       lk_south = .NOT. ( Agrif_Iy() == 1 ) 
    867       lk_north = .NOT. ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo) -1 ) 
    868       ! 
    869863      ! Set the number of ghost cells according to periodicity 
    870864      nbghostcells_x   = nbghostcells 
    871865      nbghostcells_y_s = nbghostcells 
    872866      nbghostcells_y_n = nbghostcells 
    873       ! 
    874       IF(    l_Iperio    )   nbghostcells_x   = 0 
     867 
     868      !IF ((jperio == 1).OR.(jperio == 4) ) THEN    
     869      IF ( l_Iperio ) nbghostcells_x = 0 
     870      lk_south = .NOT. ( Agrif_Iy() == 1 ) 
    875871      IF( .NOT. lk_south )   nbghostcells_y_s = 0 
    876       IF( .NOT. lk_north )   nbghostcells_y_n = 0 
     872 
     873! JC => side effects of lines below to be checked: 
     874      IF (.not.agrif_root()) THEN 
     875        lk_west  = .NOT. ( Agrif_Ix() == 1 ) 
     876        lk_east  = .NOT. ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo) -1 ) 
     877        lk_south = .NOT. ( Agrif_Iy() == 1 ) 
     878        lk_north = .NOT. ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo) -1 ) 
     879      ! 
     880 
     881      ! 
     882        IF(    l_Iperio    )   nbghostcells_x   = 0 
     883        IF( .NOT. lk_south )   nbghostcells_y_s = 0 
     884        IF( .NOT. lk_north )   nbghostcells_y_n = 0 
    877885      ! 
    878886      ! Some checks 
    879       IF( (.NOT.ln_vert_remap).AND.(jpkglo>Agrif_Parent(jpkglo)) )                    CALL ctl_stop( 'STOP',    & 
    880          &   'agrif_nemo_init: Agrif children must have less or equal number of vertical levels without ln_vert_remap defined' )  
    881       IF( jpiglo /= nbcellsx + 2 + 2*nn_hls + nbghostcells_x   + nbghostcells_x   )   CALL ctl_stop( 'STOP',    & 
    882          &   'agrif_nemo_init: Agrif children requires jpiglo == nbcellsx + 2 + 2*nn_hls + 2*nbghostcells_x' ) 
    883       IF( jpjglo /= nbcellsy + 2 + 2*nn_hls + nbghostcells_y_s + nbghostcells_y_n )   CALL ctl_stop( 'STOP',    & 
    884          &   'agrif_nemo_init: Agrif children requires jpjglo == nbcellsy + 2 + 2*nn_hls + nbghostcells_y_s + nbghostcells_y_n' ) 
    885       IF( ln_use_jattr )   CALL ctl_stop( 'STOP', 'agrif_nemo_init:Agrif children requires ln_use_jattr = .false. ' ) 
     887        IF( (.NOT.ln_vert_remap).AND.(jpkglo>Agrif_Parent(jpkglo)) )                    CALL ctl_stop( 'STOP',    & 
     888           &   'agrif_nemo_init: Agrif children must have less or equal number of vertical levels without ln_vert_remap defined' )  
     889        IF( jpiglo /= nbcellsx + 2 + 2*nn_hls + nbghostcells_x   + nbghostcells_x   )   CALL ctl_stop( 'STOP',    & 
     890           &   'agrif_nemo_init: Agrif children requires jpiglo == nbcellsx + 2 + 2*nn_hls + 2*nbghostcells_x' ) 
     891        IF( jpjglo /= nbcellsy + 2 + 2*nn_hls + nbghostcells_y_s + nbghostcells_y_n )   CALL ctl_stop( 'STOP',    & 
     892           &   'agrif_nemo_init: Agrif children requires jpjglo == nbcellsy + 2 + 2*nn_hls + nbghostcells_y_s + nbghostcells_y_n' ) 
     893        IF( ln_use_jattr )   CALL ctl_stop( 'STOP', 'agrif_nemo_init:Agrif children requires ln_use_jattr = .false. ' ) 
     894      ENDIF 
     895 
    886896      ! 
    887897      ! 
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/src/OCE/LBC/mppini.F90

    r14433 r14619  
    8989      ! 
    9090#if defined key_agrif 
    91     IF (.NOT.agrif_root()) THEN 
    9291      call agrif_nemo_init() 
    93     ENDIF 
    9492#endif 
    9593   END SUBROUTINE mpp_init 
     
    307305 
    308306#if defined key_agrif 
    309       IF( .NOT. Agrif_Root() ) THEN       ! AGRIF children: specific setting (cf. agrif_user.F90) 
    310307         CALL agrif_nemo_init() 
    311       ENDIF 
    312308#endif 
    313309      ! 
Note: See TracChangeset for help on using the changeset viewer.