00001 module ice_probability_tools 00002 00003 use ice_kinds_mod 00004 use ice_blocks, only: nx_block, ny_block, nblocks_tot 00005 00006 implicit none 00007 00008 integer, parameter :: numCoeff = 10 00009 00010 real (dbl_kind) :: perfmodel(numCoeff) 00011 character (len=char_len) :: perfmodel_name 00012 !========================================================= 00013 ! This performance model derived timing data and least-sq 00014 ! approximation. 00015 !========================================================= 00016 ! minimizes: dynamics subcycling 00017 ! data perfmodel / 6.111e-05_dbl_kind, 3.0994e-2_dbl_kind, & 00018 ! -2.1127e-2_dbl_kind, 2.5825e-4_dbl_kind, & 00019 ! 5.3287e-4_dbl_kind, 0.0000e-1_dbl_kind, & 00020 ! 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind, & 00021 ! 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind / 00022 ! minimizes: Column 00023 ! data perfmodel / 1.2253e-03_dbl_kind, 9.1685e-2_dbl_kind, & 00024 ! -7.4930e-2_dbl_kind, 5.7960e-2_dbl_kind, & 00025 ! 5.0205e-3_dbl_kind, 2.0189e-3_dbl_kind / 00026 00027 !--------------------------------------------------------- 00028 ! minimizes: Column v2 00029 !--------------------------------------------------------- 00030 ! data perfmodel / 1.2253e-03_dbl_kind, 9.1685e-2_dbl_kind, & 00031 ! -7.4930e-2_dbl_kind, 1.0000e-3_dbl_kind, & 00032 ! 5.0205e-3_dbl_kind, 2.0189e-3_dbl_kind, & 00033 ! 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind, & 00034 ! 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind / 00035 ! data perfmodel_name /'Column v2'/ 00036 00037 00038 !--------------------------------------------------------- 00039 ! name: subycle v2 00040 ! minimizes: dynamics subcycle 00041 !--------------------------------------------------------- 00042 ! data perfmodel / 0.0000e-01_dbl_kind, 0.0000e-1_dbl_kind, & 00043 ! 5.3586e-2_dbl_kind, 0.0000e-1_dbl_kind, & 00044 ! 4.6250e-4_dbl_kind, 0.0000e-1_dbl_kind, & 00045 ! 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind, & 00046 ! 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind / 00047 ! data perfmodel_name /'subcycle v2'/ 00048 00049 !--------------------------------------------------------- 00050 ! name: subycle v3 00051 ! minimizes: dynamics subcycle 00052 !--------------------------------------------------------- 00053 data perfmodel / 9.9777e-06_dbl_kind, 0.0000e-1_dbl_kind, & 00054 1.9347e-2_dbl_kind, 0.0000e-1_dbl_kind, & 00055 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind, & 00056 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind, & 00057 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind / 00058 data perfmodel_name /'subcycle v3'/ 00059 00060 00061 !--------------------------------------------------------- 00062 ! name: combo v7 00063 ! minimizes: dynamics subcycle + Advection + Column 00064 ! Thermo + Shortwave + Ridging + Bound 00065 !--------------------------------------------------------- 00066 ! data perfmodel / 9.9215e-04_dbl_kind, 0.0000e-1_dbl_kind, & 00067 ! 1.1514e-1_dbl_kind, 0.0000e-1_dbl_kind, & 00068 ! 1.6484e-2_dbl_kind, 8.7421e-4_dbl_kind, & 00069 ! 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind, & 00070 ! 0.0000e-1_dbl_kind, 0.0000e-1_dbl_kind / 00071 00072 ! minimizes: Thermo 00073 ! data perfmodel / 9.4472e-04_dbl_kind, 8.6489e-2_dbl_kind, & 00074 ! -6.6769-2_dbl_kind, 2.5593e-2_dbl_kind, & 00075 ! 3.4758e-3_dbl_kind, 1.8534e-3_dbl_kind / 00076 00077 ! minimizes: dynamics subcycling + Column + Thermo + Ridging 00078 ! data perfmodel / 6.1443e-04_dbl_kind, 1.0804e-1_dbl_kind, & 00079 ! -7.5396e-2_dbl_kind, 1.8444e-3_dbl_kind, & 00080 ! 0.0000e-1_dbl_kind, -6.1136e-4_dbl_kind / 00081 ! minimizes: dynamics subcycling + Column + Thermo + Ridging 00082 ! data perfmodel / 6.2215e-03_dbl_kind, 6.3478e-2_dbl_kind, & 00083 ! 0.0000e-1_dbl_kind, 1.2852e-1_dbl_kind, & 00084 ! -8.4564e-3_dbl_kind, 1.2788e-2_dbl_kind / 00085 00086 ! manual selection 00087 ! data perfmodel /0.000e-1_dbl_kind, 0.0e-1_dbl_kind, & 00088 ! 0.000e-1_dbl_kind, 0.0e-1_dbl_kind, & 00089 ! 1.000e-2_dbl_kind, 3.0e-1_dbl_kind / 00090 00091 ! minimizes: dynamics 00092 !data perfmodel / 1.4455e-6_dbl_kind, 2.7671e-05_dbl_kind, & 00093 ! -4.7234e-05_dbl_kind,2.0304e-2_dbl_kind, & 00094 ! 1.6523e-5_dbl_kind / 00095 ! minimizes: column 00096 ! data perfmodel / 2.3000e-04_dbl_kind, 1.6847e-2_dbl_kind, & 00097 ! -1.2453e-2_dbl_kind, 0.0000e-0_dbl_kind, & 00098 ! 2.7042e-2_dbl_kind / 00099 00100 integer (int_kind), allocatable, dimension(:) :: 00101 nocn, ! number of ocean points per block 00102 nice005, ! number of ice points P > 0.005 00103 nice010, ! number of ice points P > 0.01 00104 nice050, ! number of ice points P > 0.05 00105 nice100, ! number of ice points P > 0.10 00106 nice250, ! number of ice points P > 0.25 00107 nice500 ! number of ice points P > 0.50 00108 00109 public BuildProbabilityStats2 00110 00111 contains 00112 00113 subroutine BuildProbabilityStats2(blockLocation,coeffMatrix) 00114 00115 integer (int_kind) :: blockLocation(:) 00116 real (dbl_kind) :: coeffMatrix(:,:) 00117 00118 integer (int_kind) :: maxNice,n,ip 00119 00120 coeffMatrix=0.0 00121 maxNice = MAXVAL(nice005) 00122 do n=1,nblocks_tot 00123 ip = blockLocation(n) 00124 if(ip > 0) then 00125 coeffMatrix(1,ip) = coeffMatrix(1,ip) + real(nocn(n),dbl_kind) 00126 coeffMatrix(2,ip) = coeffMatrix(2,ip) + real(nice005(n),dbl_kind) 00127 coeffMatrix(3,ip) = coeffMatrix(3,ip) + real(nice010(n),dbl_kind) 00128 coeffMatrix(4,ip) = maxNice 00129 coeffMatrix(5,ip) = coeffMatrix(5,ip) + 2*(nx_block + ny_block) 00130 if( nice005(n) > 0) then 00131 coeffMatrix(6,ip) = coeffMatrix(6,ip) + real(nx_block*ny_block,kind=dbl_kind) 00132 endif 00133 coeffMatrix(7,ip) = coeffMatrix(7,ip) + real(nice050(n),dbl_kind) 00134 coeffMatrix(8,ip) = coeffMatrix(8,ip) + real(nice100(n),dbl_kind) 00135 coeffMatrix(9,ip) = coeffMatrix(9,ip) + real(nice250(n),dbl_kind) 00136 coeffMatrix(10,ip) = coeffMatrix(10,ip) + real(nice500(n),dbl_kind) 00137 00138 endif 00139 enddo 00140 00141 end subroutine BuildProbabilityStats2 00142 00143 00144 end module ice_probability_tools 00145