Skip to content

Commit 9e59f75

Browse files
committed
Add a comment
1 parent 5a37340 commit 9e59f75

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

mediator/med_field_info_mod.F90

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,13 @@ subroutine med_field_info_array_from_names_wtracers(field_names, field_info_arra
192192
do i = 1, n_fields
193193
is_tracer = wtracers_is_wtracer_field(field_names(i))
194194
if (is_tracer) then
195-
! Field is a water tracer; assume a single ungridded dimension
195+
! Field is a water tracer; assume a single ungridded dimension.
196+
!
197+
! Note that wtracers_get_num_tracers will return the same value for all water
198+
! tracers. However, we call this inside the loop - and in particular, inside the
199+
! is_tracer conditional - to avoid trying to retrieve this value in the
200+
! situation where there aren't any water tracers and the water tracer module
201+
! hasn't been initialized. (This may never occur in practice, but it might.)
196202
n_tracers = wtracers_get_num_tracers()
197203
field_info_array(i) = med_field_info_create_directly( &
198204
name=field_names(i), &

0 commit comments

Comments
 (0)