Opened 3 years ago
Last modified 3 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
48 48 !! 49 49 !! ** Action : - Update (u_ice,v_ice) and ice tracers 50 50 !!---------------------------------------------------------------------- 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 !!---------------------------------------------------------------------- 51 55 ! 52 56 IF( Agrif_Root() .OR. nn_ice == 0 ) RETURN ! do not update if inside Parent Grid or if child domain does not have ice 53 57 ! … … 62 66 Agrif_SpecialValueFineGrid = -9999. 63 67 Agrif_UseSpecialValueInUpdate = .TRUE. 64 68 69 zp_update_tra_ice => update_tra_ice 70 zp_update_u_ice => update_u_ice 71 zp_update_v_ice => update_v_ice 65 72 # if defined TWO_WAY 66 73 # 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 ) 68 75 #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 ) 70 77 #endif 71 78 # 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 ) 74 81 #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 ) 77 84 #endif 78 85 ! CALL Agrif_Update_Variable( tra_ice_id , locupdate=(/0,2/), procname = update_tra_ice ) 79 86 ! 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 3 years ago by nemo
- Owner set to systeam
- Status changed from new to assigned