@@ -456,7 +456,7 @@ subroutine test_host(retval, test_suites)
456
456
call test_host_const_get_index(' dyn_const2_wrt_moist_air' , index_dyn2, errflg, errmsg)
457
457
call check_errflg(subname// " .index_dyn_const2" , errflg, errmsg, &
458
458
errflg_final)
459
- call test_host_const_get_index(' dyn_const3 ' , index_dyn3, errflg, errmsg)
459
+ call test_host_const_get_index(' dyn_const3_wrt_moist_air_and_condensed_water ' , index_dyn3, errflg, errmsg)
460
460
call check_errflg(subname// " .index_dyn_const3" , errflg, errmsg, &
461
461
errflg_final)
462
462
@@ -602,7 +602,38 @@ subroutine test_host(retval, test_suites)
602
602
! Reset error flag to continue testing other properties:
603
603
errflg = 0
604
604
end if
605
- ! Check moist mixing ratio for a dynamic constituent
605
+ ! Check wet mixing ratio for dynamic constituent 1
606
+ call const_props(index_dyn1)% is_dry(const_log, errflg, errmsg)
607
+ if (errflg /= 0 ) then
608
+ write (6 , ' (a,i0,a,a,i0,/,a)' ) " ERROR: Error, " , errflg, " trying " , &
609
+ " to get dry prop for dyn_const1 index = " , index_dyn1, trim (errmsg)
610
+ errflg_final = - 1 ! Notify test script that a failure occurred
611
+ end if
612
+ if (errflg == 0 ) then
613
+ if (const_log) then
614
+ write (6 , * ) " ERROR: dyn_const1 is dry and should be wet"
615
+ errflg_final = - 1
616
+ end if
617
+ else
618
+ ! Reset error flag to continue testing other properties:
619
+ errflg = 0
620
+ end if
621
+ call const_props(index_dyn1)% is_wet(const_log, errflg, errmsg)
622
+ if (errflg /= 0 ) then
623
+ write (6 , ' (a,i0,a,a,i0,/,a)' ) " ERROR: Error, " , errflg, " trying " , &
624
+ " to get wet prop for dyn_const1 index = " , index_dyn1, trim (errmsg)
625
+ errflg_final = - 1 ! Notify test script that a failure occurred
626
+ end if
627
+ if (errflg == 0 ) then
628
+ if (.not. const_log) then
629
+ write (6 , * ) " ERROR: dyn_const1 is not wet but should be"
630
+ errflg_final = - 1
631
+ end if
632
+ else
633
+ ! Reset error flag to continue testing other properties:
634
+ errflg = 0
635
+ end if
636
+ ! Check moist mixing ratio for dynamic constituent 2
606
637
call const_props(index_dyn2)% is_dry(const_log, errflg, errmsg)
607
638
if (errflg /= 0 ) then
608
639
write (6 , ' (a,i0,a,a,i0,/,a)' ) " ERROR: Error, " , errflg, " trying " , &
@@ -633,6 +664,22 @@ subroutine test_host(retval, test_suites)
633
664
! Reset error flag to continue testing other properties:
634
665
errflg = 0
635
666
end if
667
+ ! Check dry mixing ratio for dynamic constituent 3
668
+ call const_props(index_dyn3)% is_dry(const_log, errflg, errmsg)
669
+ if (errflg /= 0 ) then
670
+ write (6 , ' (a,i0,a,a,i0,/,a)' ) " ERROR: Error, " , errflg, " trying " , &
671
+ " to get dry prop for dyn_const3 index = " , index_dyn3, trim (errmsg)
672
+ errflg_final = - 1 ! Notify test script that a failure occurred
673
+ end if
674
+ if (errflg == 0 ) then
675
+ if (.not. const_log) then
676
+ write (6 , * ) " ERROR: dyn_const3 is not dry and should be"
677
+ errflg_final = - 1
678
+ end if
679
+ else
680
+ ! Reset error flag to continue testing other properties:
681
+ errflg = 0
682
+ end if
636
683
637
684
! -------------------
638
685
@@ -866,6 +913,41 @@ subroutine test_host(retval, test_suites)
866
913
! Reset error flag to continue testing other properties:
867
914
errflg = 0
868
915
end if
916
+
917
+ ! Check that setting a constituent to be a water species via the
918
+ ! instantiate call works as expected
919
+ call const_props(index_dyn1)% is_water_species(check, errflg, errmsg)
920
+ if (errflg /= 0 ) then
921
+ write (6 , ' (a,i0,a,i0,/,a)' ) " ERROR: Error, " , errflg, &
922
+ " trying to get water_species prop for dyn_const1 index = " , &
923
+ index_dyn1, trim (errmsg)
924
+ end if
925
+ if (errflg == 0 ) then
926
+ if (.not. check) then ! Should now be True
927
+ write (6 ,* ) " ERROR: 'water_species=.true. did not set" , &
928
+ " water_species constituent property correctly"
929
+ errflg_final = - 1 ! Notify test script that a failure occurred
930
+ end if
931
+ else
932
+ ! Reset error flag to continue testing other properties:
933
+ errflg = 0
934
+ end if
935
+ call const_props(index_dyn2)% is_water_species(check, errflg, errmsg)
936
+ if (errflg /= 0 ) then
937
+ write (6 , ' (a,i0,a,i0,/,a)' ) " ERROR: Error, " , errflg, &
938
+ " trying to get water_species prop for dyn_const2 index = " , &
939
+ index_dyn2, trim (errmsg)
940
+ end if
941
+ if (errflg == 0 ) then
942
+ if (check) then ! Should now be False
943
+ write (6 ,* ) " ERROR: 'water_species=.false. did not set" , &
944
+ " water_species constituent property correctly"
945
+ errflg_final = - 1 ! Notify test script that a failure occurred
946
+ end if
947
+ else
948
+ ! Reset error flag to continue testing other properties:
949
+ errflg = 0
950
+ end if
869
951
! -------------------
870
952
871
953
! Check that setting a constituent's default value works as expected
0 commit comments