CCPP SciDoc v7.0.0  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
build_tables.F90
1program build_tables
2 !! program to build 3 lookup tables for tempo microphysics
3 !!
4 !! example build `make build_tables -f Makefile.intel mpi=1`
5 !!
16
17 use module_mp_tempo_params, only : table_dp
18 use module_mp_tempo_tables, only : tempo_build_tables
20
21#ifdef build_tables_with_mpi
22 use mpi_f08
23#endif
24
25 implicit none
26
27 integer :: build_tables_rank, build_tables_num_proc
28 type(ty_tempo_cfgs) :: tempo_cfgs
29
30#ifdef build_tables_with_mpi
31 integer :: ierror, mpi_dp_size
32#endif
33
34 build_tables_rank = 0
35 build_tables_num_proc = 1
36
37#ifdef build_tables_with_mpi
38 call mpi_init(ierror)
39 call mpi_comm_size(mpi_comm_world, build_tables_num_proc, ierror)
40 call mpi_comm_rank(mpi_comm_world, build_tables_rank, ierror)
41 call mpi_type_size(mpi_double_precision, mpi_dp_size, ierror)
42 if (mpi_dp_size /= table_dp) then
43 write(*,'(A,I1,A,I1,A)') 'MPI double precision size (', mpi_dp_size, &
44 ') does not match fortran double precision size (', table_dp, ')'
45 error stop 'MPI and fortran double precision sizes do not match.'
46 endif
47#endif
48
49 call tempo_build_tables(build_tables_rank, build_tables_num_proc, tempo_cfgs)
50
51#ifdef build_tables_with_mpi
52 call mpi_finalize(ierror)
53#endif
54
55end program build_tables
subroutine error(parameters, swdown,fsa,fsr,fira,fsh,fcev, fgev,fctr,ssoil,beg_wb,canliq,canice, sneqv,wa,smc,dzsnso,prcp,ecan, etran,edir,runsrf,runsub,dt,nsoil, nsnow,ist,errwat, iloc,jloc,fveg, sav,sag,fsrv,fsrg,zwt,pah, ifdef ccpp
check surface energy balance and water balance.