Skip to content

Commit cb628f4

Browse files
committed
address review comments
1 parent 5924f43 commit cb628f4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/physics/utils/musica_ccpp_dependencies.F90

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ subroutine initialize_musica_species_constituents(constituents_properties, &
129129
num_tuvx_only_gas_species = 3
130130
end if
131131

132-
allocate (species_group(num_micm_species + num_tuvx_constituents + num_tuvx_only_gas_species))
132+
allocate (species_group(num_micm_species + num_tuvx_constituents + num_tuvx_only_gas_species), &
133+
stat=errcode, errmsg=errmsg)
134+
if (errcode /= 0) return
133135

134136
species_group(1) = species_constructor(&
135137
"cloud_liquid_water_mixing_ratio_wrt_moist_air_and_condensed_water", 0.00060_kind_phys)
@@ -199,20 +201,20 @@ subroutine musica_ccpp_dependencies_init( &
199201
end if
200202

201203
allocate(photolysis_wavelength_grid_interfaces(photolysis_wavelength_grid_interface_dimension), &
202-
stat=errcode)
204+
stat=errcode, errmsg=errmsg)
203205
call check_allocate(errcode, subroutine_name, &
204206
'photolysis_wavelength_grid_interfaces(photolysis_wavelength_grid_interface_dimension)', &
205207
file=__FILE__, line=__LINE__)
206208
allocate(extraterrestrial_radiation_flux(photolysis_wavelength_grid_section_dimension), &
207-
stat=errcode)
209+
stat=errcode, errmsg=errmsg)
208210
call check_allocate(errcode, subroutine_name, &
209211
'extraterrestrial_radiation_flux(photolysis_wavelength_grid_section_dimension)', &
210212
file=__FILE__, line=__LINE__)
211-
allocate(surface_albedo(horizontal_dimension), stat=errcode)
213+
allocate(surface_albedo(horizontal_dimension), stat=errcode, errmsg=errmsg)
212214
call check_allocate(errcode, subroutine_name, &
213215
'surface_albedo(horizontal_dimension)', &
214216
file=__FILE__, line=__LINE__)
215-
allocate(blackbody_temperature_at_surface(horizontal_dimension), stat=errcode)
217+
allocate(blackbody_temperature_at_surface(horizontal_dimension), stat=errcode, errmsg=errmsg)
216218
call check_allocate(errcode, subroutine_name, &
217219
'blackbody_temperature_at_surface(horizontal_dimension)', &
218220
file=__FILE__, line=__LINE__)

0 commit comments

Comments
 (0)