Index: /palm/trunk/LIB/rrtmg/install_rrtmg
===================================================================
--- /palm/trunk/LIB/rrtmg/install_rrtmg	(revision 4857)
+++ /palm/trunk/LIB/rrtmg/install_rrtmg	(revision 4858)
@@ -1,3 +1,3 @@
-#!/bin/ksh
+#!/bin/bash
 
 # install_rrtmg - install script for creating a RRTMG library
@@ -27,4 +27,7 @@
 # -----------------
 # $Id$
+# switch from ksh to bash
+#
+# 
 #
 # 1613 2015-07-08 14:53:29Z maronga
Index: /palm/trunk/LIB/rrtmg/rrlw_ncpar.f90
===================================================================
--- /palm/trunk/LIB/rrtmg/rrlw_ncpar.f90	(revision 4857)
+++ /palm/trunk/LIB/rrtmg/rrlw_ncpar.f90	(revision 4858)
@@ -5,4 +5,6 @@
         save
 	
+	character(len=100) ::  rrtmg_lw_input_file_name = 'RRTMG_LW'
+
         real(kind=rb), parameter :: cpdair = 1003.5  ! Specific heat capacity of dry air
                                         		 ! at constant pressure at 273 K
Index: /palm/trunk/LIB/rrtmg/rrsw_ncpar.f90
===================================================================
--- /palm/trunk/LIB/rrtmg/rrsw_ncpar.f90	(revision 4857)
+++ /palm/trunk/LIB/rrtmg/rrsw_ncpar.f90	(revision 4858)
@@ -5,4 +5,6 @@
     save
 	
+	character(len=100) ::  rrtmg_sw_input_file_name = 'RRTMG_SW'
+
     real(kind=rb), parameter :: cpdair = 1003.5  ! Specific heat capacity of dry air
                                         		 ! at constant pressure at 273 K
Index: /palm/trunk/LIB/rrtmg/rrtmg_lw_read_nc.f90
===================================================================
--- /palm/trunk/LIB/rrtmg/rrtmg_lw_read_nc.f90	(revision 4857)
+++ /palm/trunk/LIB/rrtmg/rrtmg_lw_read_nc.f90	(revision 4858)
@@ -32,5 +32,5 @@
 	
 	status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -98,5 +98,5 @@
 	
 	status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -154,5 +154,5 @@
 	
 	status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -220,5 +220,5 @@
 	
 	status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -276,5 +276,5 @@
 	
 	status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -346,5 +346,5 @@
 	
 	status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -413,5 +413,5 @@
 	
 	status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -482,5 +482,5 @@
 	
         status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -583,5 +583,5 @@
 	
 	status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -649,5 +649,5 @@
 	
 	status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -705,5 +705,5 @@
 	
 	status(:)   = nf90_NoErr
-	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)   = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -771,5 +771,5 @@
 	
 	status(:) = nf90_NoErr
-	status(1) = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1) = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2) = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -817,5 +817,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -887,5 +887,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -942,5 +942,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
@@ -993,5 +993,5 @@
 	
         status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_lw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
Index: /palm/trunk/LIB/rrtmg/rrtmg_sw_read_nc.f90
===================================================================
--- /palm/trunk/LIB/rrtmg/rrtmg_sw_read_nc.f90	(revision 4857)
+++ /palm/trunk/LIB/rrtmg/rrtmg_sw_read_nc.f90	(revision 4858)
@@ -31,5 +31,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -87,5 +87,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionUpperAtmos",varID)
@@ -147,5 +147,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -203,5 +203,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -260,5 +260,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -327,5 +327,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -387,5 +387,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -441,5 +441,5 @@
 	
         status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -490,5 +490,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -559,5 +559,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -609,5 +609,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -643,5 +643,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
@@ -689,5 +689,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionUpperAtmos",varID)
@@ -739,5 +739,5 @@
 	
 	status(:)  = nf90_NoErr
-	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	status(1)  = nf90_open(trim(rrtmg_sw_input_file_name),nf90_nowrite,ncid)
 	
 	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
Index: /palm/trunk/SCRIPTS/.palm.iofiles
===================================================================
--- /palm/trunk/SCRIPTS/.palm.iofiles	(revision 4857)
+++ /palm/trunk/SCRIPTS/.palm.iofiles	(revision 4858)
@@ -17,6 +17,6 @@
 PIDS_VM                  inopt:tr   d3#:d3r    $base_data/$run_identifier/INPUT            _vmeas*
 PIDS_WTM                 inopt:tr   d3#:d3r    $base_data/$run_identifier/INPUT            _wtmpar*
-rrtmg_lw.nc              inopt:tr   d3#:d3r    $base_data/$run_identifier/INPUT            _rlw
-rrtmg_sw.nc              inopt:tr   d3#:d3r    $base_data/$run_identifier/INPUT            _rsw
+RRTMG_LW                 inopt:tr   d3#:d3r    $base_data/$run_identifier/INPUT            _rlw
+RRTMG_SW                 inopt:tr   d3#:d3r    $base_data/$run_identifier/INPUT            _rsw
 WTM_DATA                 inopt:tr   d3#:d3r    $base_data/$run_identifier/INPUT            _wtm
 BININ                    in:lnpe    d3r:cyclic $restart_data_path/$run_identifier/RESTART  _d3d*
Index: /palm/trunk/SOURCE/radiation_model_mod.f90
===================================================================
--- /palm/trunk/SOURCE/radiation_model_mod.f90	(revision 4857)
+++ /palm/trunk/SOURCE/radiation_model_mod.f90	(revision 4858)
@@ -27,4 +27,8 @@
 ! -----------------
 ! $Id$
+! default value for unscheduled calls of the radiation model set to FALSE,
+! rrtmg input file names changed
+!
+! 4843 2021-01-15 15:22:11Z raasch
 ! local namelist parameter added to switch off the module although the respective module namelist
 ! appears in the namelist file
@@ -664,24 +668,24 @@
     INTEGER(iwp) ::  day_of_year                    !< day of the current year
 
-    LOGICAL ::  unscheduled_radiation_calls = .TRUE., &  !< flag parameter indicating whether additional calls
-                                                         !< of the radiation code are allowed
-                constant_albedo = .FALSE.,            &  !< flag parameter indicating whether the albedo may
-                                                         !< change depending on zenith
-                force_radiation_call = .FALSE.,       &  !< flag parameter for unscheduled radiation calls
-                lw_radiation = .TRUE.,                &  !< flag parameter indicating whether longwave radiation shall be calculated
-                radiation = .FALSE.,                  &  !< flag parameter indicating whether the radiation model is used
-                sun_up    = .TRUE.,                   &  !< flag parameter indicating whether the sun is up or down
-                sw_radiation = .TRUE.,                &  !< flag parameter indicating whether shortwave
-                                                         !< radiation shall be calculated
-                sun_direction = .FALSE.,              &  !< flag parameter indicating whether solar direction shall be calculated
-                average_radiation = .FALSE.,          &  !< flag to set the calculation of radiation averaging for the domain
-                radiation_interactions = .FALSE.,     &  !< flag to activiate RTM (TRUE only if vertical
-                                                         !< urban/land surface and trees exist)
-                surface_reflections = .TRUE.,         &  !< flag to switch the calculation of radiation
-                                                         !<interaction between surfaces.
-                                                         !< When it switched off, only the effect of buildings and trees shadow
-                                                         !< will be considered. However fewer SVFs are expected.
-                radiation_interactions_on = .TRUE.       !< namelist flag to force RTM activiation regardless
-                                                         !<to vertical urban/land surface and trees
+    LOGICAL ::  unscheduled_radiation_calls = .FALSE., &  !< flag parameter indicating whether additional calls
+                                                          !< of the radiation code are allowed
+                constant_albedo = .FALSE.,             &  !< flag parameter indicating whether the albedo may
+                                                          !< change depending on zenith
+                force_radiation_call = .FALSE.,        &  !< flag parameter for unscheduled radiation calls
+                lw_radiation = .TRUE.,                 &  !< flag parameter indicating whether longwave radiation shall be calculated
+                radiation = .FALSE.,                   &  !< flag parameter indicating whether the radiation model is used
+                sun_up    = .TRUE.,                    &  !< flag parameter indicating whether the sun is up or down
+                sw_radiation = .TRUE.,                 &  !< flag parameter indicating whether shortwave
+                                                          !< radiation shall be calculated
+                sun_direction = .FALSE.,               &  !< flag parameter indicating whether solar direction shall be calculated
+                average_radiation = .FALSE.,           &  !< flag to set the calculation of radiation averaging for the domain
+                radiation_interactions = .FALSE.,      &  !< flag to activiate RTM (TRUE only if vertical
+                                                          !< urban/land surface and trees exist)
+                surface_reflections = .TRUE.,          &  !< flag to switch the calculation of radiation
+                                                          !<interaction between surfaces.
+                                                          !< When it switched off, only the effect of buildings and trees shadow
+                                                          !< will be considered. However fewer SVFs are expected.
+                radiation_interactions_on = .TRUE.        !< namelist flag to force RTM activiation regardless
+                                                          !<to vertical urban/land surface and trees
 
     REAL(wp), PARAMETER ::  emissivity_atm_clsky = 0.8_wp  !< emissivity of the clear-sky atmosphere
@@ -1922,4 +1926,9 @@
  SUBROUTINE radiation_init
 
+#if defined( __rrtmg )
+    USE control_parameters,                                                                        &
+        ONLY:  run_identifier
+#endif
+
     IMPLICIT NONE
 
@@ -3104,14 +3113,14 @@
 !
 !--    Initialize RRTMG, before check if files are existent
-       INQUIRE( FILE = 'rrtmg_lw.nc', EXIST = lw_exists )
+       INQUIRE( FILE = 'RRTMG_LW', EXIST = lw_exists )
        IF ( .NOT. lw_exists )  THEN
-          message_string = 'Input file rrtmg_lw.nc &for rrtmg missing. ' //                        &
-                         '&Please provide <jobname>_lsw file in the INPUT directory.'
+          message_string = 'Input file RRTMG_LW for rrtmg model missing.& Please provide ' //      &
+                           TRIM( run_identifier ) // '_lsw file in the INPUT directory.'
           CALL message( 'radiation_init', 'PA0583', 1, 2, 0, 6, 0 )
        ENDIF
-       INQUIRE( FILE = 'rrtmg_sw.nc', EXIST = sw_exists )
+       INQUIRE( FILE = 'RRTMG_SW', EXIST = sw_exists )
        IF ( .NOT. sw_exists )  THEN
-          message_string = 'Input file rrtmg_sw.nc &for rrtmg missing. ' //                        &
-                         '&Please provide <jobname>_rsw file in the INPUT directory.'
+          message_string = 'Input file RRTMG_SW for rrtmg model missing.& Please provide ' //      &
+                           TRIM( run_identifier ) // '_rsw file in the INPUT directory.'
           CALL message( 'radiation_init', 'PA0584', 1, 2, 0, 6, 0 )
        ENDIF
@@ -3124,5 +3133,5 @@
        INQUIRE( FILE = 'RAD_SND_DATA', EXIST = snd_exists )
        IF ( .NOT. snd_exists )  THEN
-          rrtm_input_file = 'rrtmg_lw.nc'
+          rrtm_input_file = 'RRTMG_LW'
        ENDIF
 
