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.
#2723 (Compiler-specific compilation failures in NST component related to dummy procedures of AGRIF subroutines) – NEMO

Opened 3 years ago

Last modified 2 years ago

#2723 assigned Defect

Compiler-specific compilation failures in NST component related to dummy procedures of AGRIF subroutines

Reported by: smueller Owned by: systeam
Priority: low Milestone:
Component: AGRIF Version: v4.0.*
Severity: minor Keywords: compilation, NST, AGRIF
Cc:

Description

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.

Commit History (0)

(No commits)

Change History (1)

comment:1 Changed 2 years ago by nemo

  • Owner set to systeam
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.