Skip to content

Commit f5b3aa3

Browse files
Add support for CCPP hail-aware tables
1 parent 9357681 commit f5b3aa3

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

module_mp_tempo_params.F90

+1
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ module module_mp_tempo_params
470470
! Thompson tables.
471471
character(len=*), parameter :: thomp_table_file = 'thompson_tables_precomp_v2.sl'
472472
character(len=*), parameter :: qr_acr_qg_file = 'MP_TEMPO_QRacrQG.dat'
473+
character(len=*), parameter :: qr_acr_qg_hailaware_file = 'MP_TEMPO_HAILAWARE_QRacrQG.dat'
473474
character(len=*), parameter :: qr_acr_qs_file = 'MP_TEMPO_QRacrQS.dat'
474475
character(len=*), parameter :: freeze_h2o_file = 'MP_TEMPO_freezeH2O.dat'
475476

module_mp_tempo_utils.F90

+10-10
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ end subroutine table_ccnAct
761761

762762
!=================================================================================================================
763763
! Rain collecting graupel (and inverse). Explicit CE integration.
764-
subroutine qr_acr_qg_par(NRHGtable)
764+
subroutine qr_acr_qg_par(NRHGtable, qrqg_file)
765765

766766
implicit none
767767

@@ -778,19 +778,19 @@ subroutine qr_acr_qg_par(NRHGtable)
778778
LOGICAL force_read_thompson, write_thompson_tables
779779
LOGICAL lexist,lopen
780780
INTEGER good,ierr
781+
character(len=*), intent(in) :: qrqg_file
781782

782783
force_read_thompson = .false.
783784
write_thompson_tables = .false.
784785
!+---+
785786

786-
787787
good = 0
788-
INQUIRE(FILE=qr_acr_qg_file, EXIST=lexist)
788+
INQUIRE(FILE=qrqg_file, EXIST=lexist)
789789
#ifdef MPI
790790
call MPI_BARRIER(mpi_communicator,ierr)
791791
#endif
792792
IF ( lexist ) THEN
793-
OPEN(63,file=qr_acr_qg_file,form="unformatted",err=1234)
793+
OPEN(63,file=qrqg_file,form="unformatted",err=1234)
794794
!sms$serial begin
795795
READ(63,err=1234) tcg_racg
796796
READ(63,err=1234) tmr_racg
@@ -805,13 +805,13 @@ subroutine qr_acr_qg_par(NRHGtable)
805805
INQUIRE(63,opened=lopen)
806806
IF (lopen) THEN
807807
IF( force_read_thompson ) THEN
808-
write(0,*) "Error reading "//qr_acr_qg_file//" Aborting because force_read_thompson is .true."
808+
write(0,*) "Error reading "//qrqg_file//" Aborting because force_read_thompson is .true."
809809
return
810810
ENDIF
811811
CLOSE(63)
812812
ELSE
813813
IF( force_read_thompson ) THEN
814-
write(0,*) "Error opening "//qr_acr_qg_file//" Aborting because force_read_thompson is .true."
814+
write(0,*) "Error opening "//qrqg_file//" Aborting because force_read_thompson is .true."
815815
return
816816
ENDIF
817817
ENDIF
@@ -823,7 +823,7 @@ subroutine qr_acr_qg_par(NRHGtable)
823823
ENDIF
824824
ELSE
825825
IF( force_read_thompson ) THEN
826-
write(0,*) "Non-existent "//qr_acr_qg_file//" Aborting because force_read_thompson is .true."
826+
write(0,*) "Non-existent "//qrqg_file//" Aborting because force_read_thompson is .true."
827827
return
828828
ENDIF
829829
ENDIF
@@ -926,8 +926,8 @@ subroutine qr_acr_qg_par(NRHGtable)
926926
enddo
927927
enddo
928928
IF ( write_thompson_tables ) THEN
929-
write(0,*) "Writing "//qr_acr_qg_file//" in Tempo MP init"
930-
OPEN(63,file=qr_acr_qg_file,form="unformatted",err=9234)
929+
write(0,*) "Writing "//qrqg_file//" in Tempo MP init"
930+
OPEN(63,file=qrqg_file,form="unformatted",err=9234)
931931
WRITE(63,err=9234) tcg_racg
932932
WRITE(63,err=9234) tmr_racg
933933
WRITE(63,err=9234) tcr_gacr
@@ -936,7 +936,7 @@ subroutine qr_acr_qg_par(NRHGtable)
936936
CLOSE(63)
937937
RETURN ! ----- RETURN
938938
9234 CONTINUE
939-
write(0,*) "Error writing "//qr_acr_qg_file
939+
write(0,*) "Error writing "//qrqg_file
940940
return
941941
ENDIF
942942
ENDIF

0 commit comments

Comments
 (0)