Changeset 3771 for palm


Ignore:
Timestamp:
Feb 28, 2019 12:19:33 PM (5 years ago)
Author:
raasch
Message:

rrtmg preprocessor for directives moved/added, save attribute added to temporary pointers to avoid compiler warnings about outlived pointer targets, statement added to avoid compiler warning about unused variable

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/prognostic_equations.f90

    r3761 r3771  
    2525! -----------------
    2626! $Id$
     27! preprocessor directivs fro rrtmg added
     28!
     29! 3761 2019-02-25 15:31:42Z raasch
    2730! unused variable removed
    2831!
     
    425428        ONLY:  cthf, pcm_tendency
    426429
     430#if defined( __rrtmg )
    427431    USE radiation_model_mod,                                                   &
    428432        ONLY:  radiation, radiation_tendency,                                  &
    429433               skip_time_do_radiation
     434#endif
    430435                         
    431436    USE salsa_mod,                                                             &
     
    943948             ENDIF
    944949
     950#if defined( __rrtmg )
    945951!
    946952!--          If required, add tendency due to radiative heating/cooling
     
    949955                CALL radiation_tendency ( i, j, tend )
    950956             ENDIF
    951 
     957#endif
    952958
    953959             CALL module_interface_actions( i, j, 'pt-tendency' )
     
    19571963       ENDIF
    19581964
     1965#if defined( __rrtmg )
    19591966!
    19601967!--    If required, add tendency due to radiative heating/cooling
     
    19631970            CALL radiation_tendency ( tend )
    19641971       ENDIF
     1972#endif
    19651973
    19661974       CALL module_interface_actions( 'pt-tendency' )
  • palm/trunk/SOURCE/radiation_model_mod.f90

    r3769 r3771  
    2323! Current revisions:
    2424! ------------------
    25 !
     25! 
    2626!
    2727! Former revisions:
    2828! -----------------
    2929! $Id$
     30! rrtmg preprocessor for directives moved/added, save attribute added to temporary
     31! pointers to avoid compiler warnings about outlived pointer targets,
     32! statement added to avoid compiler warning about unused variable
     33!
     34! 3769 2019-02-28 10:16:49Z moh.hefny
    3035! removed unused variables and subroutine radiation_radflux_gridbox
    3136!
     
    12191224    END INTERFACE radiation_rrtmg
    12201225
     1226#if defined( __rrtmg )
    12211227    INTERFACE radiation_tendency
    12221228       MODULE PROCEDURE radiation_tendency
    12231229       MODULE PROCEDURE radiation_tendency_ij
    12241230    END INTERFACE radiation_tendency
     1231#endif
    12251232
    12261233    INTERFACE radiation_rrd_local
     
    12671274           radiation_check_parameters, radiation_control,                      &
    12681275           radiation_header, radiation_init, radiation_parin,                  &
    1269            radiation_3d_data_averaging, radiation_tendency,                    &
     1276           radiation_3d_data_averaging,                                        &
    12701277           radiation_data_output_2d, radiation_data_output_3d,                 &
    12711278           radiation_define_netcdf_grid, radiation_wrd_local,                  &
     
    12741281           radiation_interaction, radiation_interaction_init,                  &
    12751282           radiation_read_svf, radiation_presimulate_solar_pos
    1276            
    12771283
    12781284   
     
    13001306
    13011307#if defined ( __rrtmg )
    1302     PUBLIC rrtm_aldif, rrtm_aldir, rrtm_asdif, rrtm_asdir
     1308    PUBLIC radiation_tendency, rrtm_aldif, rrtm_aldir, rrtm_asdif, rrtm_asdir
    13031309#endif
    13041310
     
    14831489
    14841490
    1485    INTEGER(iwp),      INTENT(IN)     ::  dots_max
    1486    INTEGER(iwp),      INTENT(INOUT)  ::  dots_num
     1491    INTEGER(iwp),      INTENT(IN)     ::  dots_max
     1492    INTEGER(iwp),      INTENT(INOUT)  ::  dots_num
     1493
     1494!
     1495!-- Next line is just to avoid compiler warning about unused variable.
     1496    IF ( dots_max == 0 )  CONTINUE
    14871497
    14881498!
     
    48814891!> Cache-optimized version.
    48824892!------------------------------------------------------------------------------!
     4893#if defined( __rrtmg )
    48834894 SUBROUTINE radiation_tendency_ij ( i, j, tend )
    48844895
     
    48904901
    48914902    IF ( radiation_scheme == 'rrtmg' )  THEN
    4892 #if defined  ( __rrtmg )
    48934903!
    48944904!--    Calculate tendency based on heating rate
     
    48974907                                         * d_exner(k) * d_seconds_hour
    48984908       ENDDO
     4909
     4910    ENDIF
     4911
     4912 END SUBROUTINE radiation_tendency_ij
    48994913#endif
    4900     ENDIF
    4901 
    4902     END SUBROUTINE radiation_tendency_ij
    49034914
    49044915
     
    49094920!> Vector-optimized version
    49104921!------------------------------------------------------------------------------!
     4922#if defined( __rrtmg )
    49114923 SUBROUTINE radiation_tendency ( tend )
    49124924
     
    49214933
    49224934    IF ( radiation_scheme == 'rrtmg' )  THEN
    4923 #if defined  ( __rrtmg )
    49244935!
    49254936!--    Calculate tendency based on heating rate
     
    49334944          ENDDO
    49344945       ENDDO
     4946    ENDIF
     4947
     4948 END SUBROUTINE radiation_tendency
    49354949#endif
    4936     ENDIF
    4937 
    4938 
    4939  END SUBROUTINE radiation_tendency
    49404950
    49414951!------------------------------------------------------------------------------!
     
    58995909       REAL(wp)     :: mrl
    59005910#if defined( __parallel )
    5901        INTEGER(iwp), DIMENSION(:), POINTER      ::  gridsurf_rma   !< fortran pointer, but lower bounds are 1
     5911       INTEGER(iwp), DIMENSION(:), POINTER, SAVE ::  gridsurf_rma   !< fortran pointer, but lower bounds are 1
    59025912       TYPE(c_ptr)                               ::  gridsurf_rma_p !< allocated c pointer
    59035913       INTEGER(iwp)                              ::  minfo          !< MPI RMA window info handle
     
    64456455        INTEGER(iwp)                                  :: max_track_len !< maximum 2d track length
    64466456        INTEGER(iwp)                                  :: minfo
    6447         REAL(wp), DIMENSION(:), POINTER               :: lad_s_rma       !< fortran 1D pointer
     6457        REAL(wp), DIMENSION(:), POINTER, SAVE         :: lad_s_rma       !< fortran 1D pointer
    64486458        TYPE(c_ptr)                                   :: lad_s_rma_p     !< allocated c pointer
    64496459#if defined( __parallel )
Note: See TracChangeset for help on using the changeset viewer.