Subroutine ck_success

598 : 
599 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
600 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
601 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
602 : 
603 :       subroutine ck_success ()
604 :       use vom_sce_mod
605 :       implicit none
606 : 
607 :       INTEGER :: tmp2(2)
608 : 
609 :       call optsensitivity()
610 : 
611 :         if (success .eq. 1) then
612 : !         * [SORT ENTIRE ARRAYS]
613 : !         * use temporary variable to prevent warning in ifort
614 :           tmp2(:) = SHAPE(shufflevar(:,:))
615 :           call sortcomp(shufflevar(:,:), tmp2(:), ofvec(:), SIZE(ofvec(:)))
616 :           call writepars()
617 :           write(kfile_progress,*) 'Optimisation completed successfully.'
618 :           !close(kfile_sceout)
619 :           close(kfile_bestpars)
620 :           if (kfile_progress .ne. 6) close(kfile_progress)
621 :         else
622 : !         * [SORT ENTIRE ARRAYS]
623 : !         * use temporary variable to prevent warning in ifort
624 :           tmp2(:) = SHAPE(shufflevar(:,:))
625 :           call sortcomp(shufflevar(:,:), tmp2(:), ofvec(:), SIZE(ofvec(:)))
626 :           call writepars()
627 :           nsincebest = 0
628 :             write(kfile_bestpars,outformat) shufflevar(:,1), bestobj
629 :         endif
630 : 
631 :       return
632 :       end subroutine ck_success