Skip to content
Snippets Groups Projects
Commit 7fddd50e authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 22/09/2023: IO / flyers: harden check (needed for later commits)

parent 6e77ce03
No related branches found
No related tags found
No related merge requests found
......@@ -2301,7 +2301,9 @@ subroutine Write_flyer_time_coord( tpflyer )
type(tdimnc), pointer :: tzdim
!Do it only if correct model level and has really flown
if ( tpflyer%nmodel == imi .and. Count( tpflyer%xx /= XUNDEF) > 1 ) then
if ( tpflyer%nmodel == imi ) then
! Do the second if only if the first one is OK (if not, xx may be not allocated)
if ( Count( tpflyer%xx /= XUNDEF) > 1 ) then
Allocate( tzdim )
istatus = NF90_INQ_NCID( tpfile%nncid, 'Flyers', icatid )
......@@ -2342,6 +2344,7 @@ subroutine Write_flyer_time_coord( tpflyer )
!Restore file identifier to root group
incid = tpfile%nncid
end if
end if
end subroutine Write_flyer_time_coord
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment