1 # 1 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2 # 1 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/../instrumentation.fypp" 1
3 # 1 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/../subr_list.fypp" 1
12 # 926 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/../subr_list.fypp"
13 # 2 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/../instrumentation.fypp" 2
22 # 112 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/../instrumentation.fypp"
23 # 2 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp" 2
24 # 1 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/../generics.fypp" 1
33 # 57 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/../generics.fypp"
34 # 3 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp" 2
44 use atlas_module,
only: atlas_geometry
45 use iso_c_binding,
only: c_int16_t,c_int32_t
47 use tools_const,
only:
zero,
hundredth,
tenth,
half,
quarter,
one,
two,
three,
four,
five,
eight,
ten,
thousand,
pi,
deg2rad,
rad2deg
60 integer,
parameter ::
m = 0
63 function c_fletcher32(n,var) bind(c,name='fletcher32')
result(hash)
64 use iso_c_binding,
only: c_int16_t,c_int32_t
65 integer(c_int32_t) :: n
66 integer(c_int16_t) :: var(*)
67 integer(c_int32_t) :: hash
168 # 137 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
170 # 137 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
172 # 137 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
174 # 137 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
176 # 139 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
180 # 143 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
182 # 143 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
184 # 143 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
186 # 143 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
188 # 145 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
191 # 148 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
192 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
194 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
196 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
198 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
200 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
202 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
204 # 151 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
205 # 148 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
206 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
208 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
210 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
212 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
214 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
216 # 149 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
218 # 151 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
219 # 152 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
222 # 155 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
223 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
225 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
227 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
229 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
231 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
233 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
235 # 158 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
236 # 155 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
237 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
239 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
241 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
243 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
245 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
247 # 156 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
249 # 158 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
250 # 159 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
253 # 162 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
254 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
256 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
258 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
260 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
262 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
264 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
266 # 165 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
267 # 162 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
268 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
270 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
272 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
274 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
276 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
278 # 163 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
280 # 165 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
281 # 166 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
284 # 169 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
286 # 169 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
288 # 169 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
290 # 169 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
292 # 169 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
294 # 169 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
296 # 171 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
301 public ::
fletcher32,
lonlatmod,
gridhash,
independent_levels,
sphere_dist,
cart_dist,
lonlat2xyz,
xyz2lonlat,
vector_product,
det, &
302 &
inside,
order_cc,
add,
divide,
vert_interp_size,
vert_interp_setup,
vert_interp,
fit_diag,
fit_func,
fit_lct,
lct_d2h, &
303 &
lct_h2r,
lct_r2d,
check_cond,
cholesky,
syminv,
histogram,
cx_to_cxa,
cx_to_proc,
cx_to_cxu,
convert_i2l,
convert_l2i, &
323 integer(c_int32_t) :: array_size
324 integer(c_int16_t),
allocatable :: array(:)
333 allocate(array(
size(var)))
336 array = transfer(var,(/0_kind_short/))
337 array_size =
size(array)
359 real(kind_real),
intent(inout) :: lon
360 real(kind_real),
intent(inout) :: lat
372 elseif (lat<-
half*
pi)
then
380 elseif (lon<-
pi)
then
385 if (abs(lat)>(
half-1.0e-6_kind_real)*
pi) lon =
zero
401 integer,
intent(in) :: ncx
402 integer,
intent(in) :: nlx
403 real(kind_real),
intent(in) :: lon_cx(ncx)
404 real(kind_real),
intent(in) :: lat_cx(ncx)
405 logical,
intent(in) :: mask_cx(ncx,nlx)
406 integer,
intent(out) :: grid_hash(0:nlx)
409 integer :: ilx,ncx_eff,icx_eff,icx
410 real(kind_real),
allocatable :: lonlat(:)
420 ncx_eff = count(mask_cx(:,ilx))
424 allocate(lonlat(2*ncx_eff))
429 if (mask_cx(icx,ilx))
then
431 lonlat(icx_eff) = lon_cx(icx)
433 lonlat(icx_eff) = lat_cx(icx)
448 grid_hash(0) =
fletcher32(real(grid_hash(1:nlx),kind_real))
465 integer,
intent(in) :: nlx
466 integer,
intent(in) :: grid_hash(nlx)
467 integer,
intent(out) :: nlxi
468 integer,
intent(out) :: lx_to_lxi(nlx)
469 integer,
intent(out) :: lxi_to_lx(nlx)
470 integer,
intent(in) :: ifmt
473 integer :: ilx,ilxi,jlx,jlxi,n
474 integer :: proc_to_grid_hash(mpl%nproc),grid_hash_glb(nlx)
475 character(len=1024) :: cfmt
485 call mpl%f_comm%allgather(grid_hash(ilx),proc_to_grid_hash)
492 if (all(grid_hash_glb(1:ilx-1)/=grid_hash_glb(ilx))) nlxi = nlxi+1
496 lxi_to_lx = mpl%msv%vali
501 lx_to_lxi(ilx) = ilxi
502 lxi_to_lx(ilxi) = ilx
504 if (all(grid_hash_glb(1:ilx-1)/=grid_hash_glb(ilx)))
then
507 lx_to_lxi(ilx) = ilxi
508 lxi_to_lx(ilxi) = ilx
512 if (grid_hash_glb(jlx)==grid_hash_glb(ilx))
then
513 jlxi = lx_to_lxi(jlx)
514 lx_to_lxi(ilx) = jlxi
522 write(cfmt,
'(a,i2.2,a)')
'(a',ifmt,
',a)'
523 write(mpl%info,trim(cfmt))
'',
'Compute independent levels: '
524 call mpl%flush(.false.)
526 ilx = lxi_to_lx(ilxi)
527 n = count(lx_to_lxi==ilxi)
535 write(mpl%info,trim(cfmt)) ilx,
'[',n,
'] '
536 call mpl%flush(.false.)
538 write(mpl%info,
'(a)')
''
555 real(kind_real),
intent(in) :: x_i
556 real(kind_real),
intent(in) :: y_i
557 real(kind_real),
intent(in) :: z_i
558 real(kind_real),
intent(in) :: x_f
559 real(kind_real),
intent(in) :: y_f
560 real(kind_real),
intent(in) :: z_f
561 real(kind_real),
intent(out) :: dist
570 dist = sqrt((x_f-x_i)**2+(y_f-y_i)**2+(z_f-z_i)**2)
586 real(kind_real),
intent(in) :: lon_i
587 real(kind_real),
intent(in) :: lat_i
588 real(kind_real),
intent(in) :: lon_f
589 real(kind_real),
intent(in) :: lat_f
590 real(kind_real),
intent(out) :: dist
593 type(atlas_geometry) :: ageometry
602 ageometry = atlas_geometry(
'UnitSphere')
622 real(kind_real),
intent(in) :: lon
623 real(kind_real),
intent(in) :: lat
624 real(kind_real),
intent(out) :: x
625 real(kind_real),
intent(out) :: y
626 real(kind_real),
intent(out) :: z
629 type(atlas_geometry) :: ageometry
637 if (mpl%msv%isnot(lat).and.mpl%msv%isnot(lon))
then
639 if (
inf(lon,-
pi).and.
sup(lon,
pi))
call mpl%abort(
'func_lonlat2xyz',
'wrong longitude')
640 if (
inf(lat,-
half*
pi).and.
sup(lat,-
half*
pi))
call mpl%abort(
'func_lonlat2xyz',
'wrong latitude')
643 ageometry = atlas_geometry(
'UnitSphere')
669 real(kind_real),
intent(in) :: x
670 real(kind_real),
intent(in) :: y
671 real(kind_real),
intent(in) :: z
672 real(kind_real),
intent(out) :: lon
673 real(kind_real),
intent(out) :: lat
676 type(atlas_geometry) :: ageometry
684 if (mpl%msv%isnot(x).and.mpl%msv%isnot(y).and.mpl%msv%isnot(z))
then
686 ageometry = atlas_geometry(
'UnitSphere')
689 call ageometry%xyz2lonlat(x,y,z,lon,lat)
714 real(kind_real),
intent(in) :: v1(3)
715 real(kind_real),
intent(in) :: v2(3)
716 real(kind_real),
intent(out) :: vp(3)
728 vp(1) = v1(2)*v2(3)-v1(3)*v2(2)
729 vp(2) = v1(3)*v2(1)-v1(1)*v2(3)
730 vp(3) = v1(1)*v2(2)-v1(2)*v2(1)
734 if (r>
zero) vp = vp/r
750 real(kind_real),
intent(in) :: v1(3)
751 real(kind_real),
intent(in) :: v2(3)
752 real(kind_real),
intent(in) :: v3(3)
753 real(kind_real),
intent(out) :: p
754 logical,
intent(out) :: cflag
758 real(kind_real) :: terms(6)
767 terms(1) = v1(2)*v2(3)*v3(1)
768 terms(2) = -v1(3)*v2(2)*v3(1)
769 terms(3) = v1(3)*v2(1)*v3(2)
770 terms(4) = -v1(1)*v2(3)*v3(2)
771 terms(5) = v1(1)*v2(2)*v3(3)
772 terms(6) = -v1(2)*v2(1)*v3(3)
780 if ((abs(terms(i))>
zero).and.
small(p,terms(i))) cflag = .false.
798 real(kind_real),
intent(in) :: vbnd(:,:)
799 real(kind_real),
intent(in) :: lon
800 real(kind_real),
intent(in) :: lat
801 logical,
intent(out) :: inside_hull
805 real(kind_real) :: vp(3),v1(3),v2(3),cp(3),cd(3)
814 call lonlat2xyz(mpl,lon,lat,vp(1),vp(2),vp(3))
821 if (i<
size(vbnd,2))
then
828 v1 = vbnd(:,inext)-vbnd(:,i)
833 cd = (vp+vbnd(:,i)+vbnd(:,inext))/
three
837 inside_hull = .false.
857 real(kind_real),
intent(in) :: lon
858 real(kind_real),
intent(in) :: lat
860 real(kind_real),
intent(in) :: x(n)
861 real(kind_real),
intent(in) :: y(n)
862 real(kind_real),
intent(in) :: z(n)
863 integer,
intent(out) :: order(n)
864 real(kind_real),
intent(out),
optional :: diff(n)
868 real(kind_real) :: rvec(3),costheta,sintheta,p(3),rvecxv(3),v(3),list(n)
869 real(kind_real),
allocatable :: list_save(:)
881 costheta = cos(
half*
pi-lat)
882 sintheta = sin(
half*
pi-lat)
887 p = (/x(i),y(i),z(i)/)
889 v = p*costheta+rvecxv*sintheta+rvec*sum(rvec*p)*(
one-costheta)
892 list(i) = atan2(v(2),v(1))
895 if (
present(diff))
then
897 allocate(list_save(n))
904 call qsort(n,list,order)
906 if (
present(diff))
then
908 diff(order(1)) = list_save(order(1))-list_save(order(n))+
two*
pi
910 diff(order(i)) = list_save(order(i))-list_save(order(i-1))
914 deallocate(list_save)
932 real(kind_real),
intent(in) :: val
933 real(kind_real),
intent(inout) :: cumul
934 real(kind_real),
intent(inout) :: num
935 real(kind_real),
intent(in),
optional :: wgt
938 real(kind_real) :: lwgt
948 if (
present(wgt)) lwgt = wgt
951 if (mpl%msv%isnot(val))
then
952 cumul = cumul+lwgt*val
971 real(kind_real),
intent(inout) :: val
972 real(kind_real),
intent(in) :: num
981 if (abs(num)>
zero)
then
1001 integer,
intent(in) :: nl0
1002 integer,
intent(in) :: dl0
1003 integer,
intent(out) :: nl1
1006 integer :: il0_prev,il0,dl0_tmp
1020 dl0_tmp = il0-il0_prev
1021 if (dl0_tmp==dl0)
then
1041 integer,
intent(in) :: nl0
1042 integer,
intent(in) :: dl0
1043 integer,
intent(in) :: nl1
1044 integer,
intent(out) :: il0_interp(nl1)
1045 integer,
intent(out) :: il1inf(nl0)
1046 integer,
intent(out) :: il1sup(nl0)
1047 real(kind_real),
intent(out) :: rinf(nl0)
1048 real(kind_real),
intent(out) :: rsup(nl0)
1051 integer :: il0,il0_prev,jl0,dl0_tmp,il0_inf,il0_sup
1052 integer :: il1,il1_inf,il1_sup
1068 dl0_tmp = il0-il0_prev
1069 if (dl0_tmp==dl0)
then
1072 il0_interp(il1) = il0
1078 il1_sup = min(il1_inf+1,nl1)
1080 il0_sup = min(il0_inf+dl0,nl0)
1081 do jl0=il0_inf,il0_sup
1082 if (il0_inf==il0_sup)
then
1083 il1inf(jl0) = il1_inf
1085 il1sup(jl0) = il1_sup
1088 il1inf(jl0) = il1_inf
1089 rinf(jl0) = real(il0_sup-jl0,kind_real)/real(il0_sup-il0_inf,kind_real)
1090 il1sup(jl0) = il1_sup
1091 rsup(jl0) = real(jl0-il0_inf,kind_real)/real(il0_sup-il0_inf,kind_real)
1110 type(
mpl_type),
intent(inout) :: mpl
1111 integer,
intent(in) :: nl1
1112 real(kind_real),
intent(in) :: var_l1(nl1)
1113 integer,
intent(in) :: nl0
1114 integer,
intent(in) :: il1inf(nl0)
1115 integer,
intent(in) :: il1sup(nl0)
1116 real(kind_real),
intent(in) :: rinf(nl0)
1117 real(kind_real),
intent(in) :: rsup(nl0)
1118 real(kind_real),
intent(out) :: var_l0(nl0)
1131 if (mpl%msv%isnot(var_l1(il1inf(il0))).and.mpl%msv%isnot(var_l1(il1sup(il0))))
then
1132 var_l0(il0) = rinf(il0)*var_l1(il1inf(il0))+rsup(il0)*var_l1(il1sup(il0))
1134 var_l0(il0) = mpl%msv%valr
1152 type(
mpl_type),
intent(inout) :: mpl
1153 integer,
intent(in) :: nc3
1154 integer,
intent(in) :: nl0r
1155 real(kind_real),
intent(in) :: disth(nc3)
1156 real(kind_real),
intent(in) :: distv(nl0r)
1157 real(kind_real),
intent(in) :: coef
1158 real(kind_real),
intent(in) :: rh
1159 real(kind_real),
intent(in) :: rv
1160 real(kind_real),
intent(out) :: fit(nc3,nl0r)
1163 integer :: jl0r,jc3,nc3max
1164 real(kind_real) :: disthsq(nc3),distvsq(nl0r),distnorm
1172 if (mpl%msv%is(coef).or.mpl%msv%is(rh).or.mpl%msv%is(rv))
then
1182 if (disth(jc3)>rh)
exit
1189 disthsq(jc3) = (disth(jc3)/rh)**2
1190 elseif (disth(jc3)>
zero)
then
1200 distvsq(jl0r) = (distv(jl0r)/rv)**2
1201 elseif (distv(jl0r)>
zero)
then
1202 distvsq(jl0r) =
zero
1211 distnorm = sqrt(disthsq(jc3)+distvsq(jl0r))
1212 fit(jc3,jl0r) =
fit_func(mpl,distnorm)
1244 if (distnorm<
half)
then
1245 value =
one-distnorm
1248 value =
one-20.0_kind_real/
three*distnorm**2*
value
1249 elseif (distnorm<
one)
then
1255 value =
one-12.0_kind_real*distnorm*
value
1256 value = -
value/(
three*distnorm)
1276 type(
mpl_type),
intent(inout) :: mpl
1289 if (distnorm<
zero)
call mpl%abort(
'func_fit_func',
'negative normalized distance')
1292 value =
gc99(distnorm)
1295 value = max(
value,
zero)
1306 subroutine func_fit_lct(mpl,nc3,nl0r,dxsq,dysq,dxdy,dzsq,dmask,nscales,D,coef,fit)
1311 type(
mpl_type),
intent(inout) :: mpl
1312 integer,
intent(in) :: nc3
1313 integer,
intent(in) :: nl0r
1314 real(kind_real),
intent(in) :: dxsq(nc3,nl0r)
1315 real(kind_real),
intent(in) :: dysq(nc3,nl0r)
1316 real(kind_real),
intent(in) :: dxdy(nc3,nl0r)
1317 real(kind_real),
intent(in) :: dzsq(nc3,nl0r)
1318 logical,
intent(in) :: dmask(nc3,nl0r)
1319 integer,
intent(in) :: nscales
1320 real(kind_real),
intent(in) :: D(4,nscales)
1321 real(kind_real),
intent(in) :: coef(nscales)
1322 real(kind_real),
intent(out) :: fit(nc3,nl0r)
1325 integer :: jl0r,jc3,iscales
1326 real(kind_real) :: Dcoef(nscales),D11,D22,D33,D12,H11,H22,H33,H12,rsq,distnorm
1338 dcoef = max(
dmin,min(coef,
one))
1339 dcoef = dcoef/sum(dcoef)
1340 do iscales=1,nscales
1342 d11 = max(
dmin,d(1,iscales))
1343 d22 = max(
dmin,d(2,iscales))
1352 call lct_d2h(mpl,d11,d22,d33,d12,h11,h22,h33,h12)
1357 if (dmask(jc3,jl0r))
then
1359 if (iscales==1) fit(jc3,jl0r) =
zero
1362 rsq = h11*dxsq(jc3,jl0r)+h22*dysq(jc3,jl0r)+h33*dzsq(jc3,jl0r)+
two*h12*dxdy(jc3,jl0r)
1366 distnorm = sqrt(rsq)*
gc2gau
1367 fit(jc3,jl0r) = fit(jc3,jl0r)+dcoef(iscales)*
gc99(distnorm)
1370 if (rsq<40.0_kind_real) fit(jc3,jl0r) = fit(jc3,jl0r)+dcoef(iscales)*exp(-
half*rsq)
1373 fit(jc3,jl0r) = fit(jc3,jl0r)+dcoef(iscales)*
matern(mpl,
m,sqrt(rsq))
1394 type(
mpl_type),
intent(inout) :: mpl
1395 real(kind_real),
intent(in) :: D11
1396 real(kind_real),
intent(in) :: D22
1397 real(kind_real),
intent(in) :: D33
1398 real(kind_real),
intent(in) :: D12
1399 real(kind_real),
intent(out) :: H11
1400 real(kind_real),
intent(out) :: H22
1401 real(kind_real),
intent(out) :: H33
1402 real(kind_real),
intent(out) :: H12
1405 real(kind_real) :: det
1413 if (mpl%msv%isnot(d11).and.mpl%msv%isnot(d22).and.mpl%msv%isnot(d33).and.mpl%msv%isnot(d12))
then
1415 det = d11*d22-d12**2
1423 call mpl%abort(
'func_lct_d2h',
'non-invertible tensor')
1452 type(
mpl_type),
intent(inout) :: mpl
1453 real(kind_real),
intent(in) :: H11
1454 real(kind_real),
intent(in) :: H22
1455 real(kind_real),
intent(in) :: H33
1456 real(kind_real),
intent(in) :: H12
1457 real(kind_real),
intent(out) :: rh
1458 real(kind_real),
intent(out) :: rv
1461 real(kind_real) :: tr,det,diff
1469 if (mpl%msv%isnot(h11).and.mpl%msv%isnot(h22).and.mpl%msv%isnot(h33).and.mpl%msv%isnot(h12))
then
1471 if ((h11<
zero).or.(h22<
zero))
call mpl%abort(
'func_lct_h2r',
'negative diagonal LCT coefficients')
1477 det = h11*h22-h12**2
1480 diff =
quarter*(h11-h22)**2+h12**2
1482 if (
sup(
half*tr,sqrt(diff)))
then
1485 call mpl%abort(
'func_lct_h2r',
'non positive-definite LCT (eigenvalue)')
1488 call mpl%abort(
'func_lct_h2r',
'non positive-definite LCT (determinant)')
1517 real(kind_real),
intent(in) :: r
1518 real(kind_real),
intent(out) :: D
1543 real(kind_real),
intent(in) :: d1
1544 real(kind_real),
intent(in) :: d2
1545 real(kind_real),
intent(in) :: nod
1546 logical,
intent(out) :: valid
1549 real(kind_real) :: det,tr,diff,ev1,ev2
1560 diff =
quarter*(d1-d2)**2+d1*d2*nod**2
1564 ev1 =
half*tr+sqrt(diff)
1565 ev2 =
half*tr-sqrt(diff)
1593 type(
mpl_type),
intent(inout) :: mpl
1594 integer,
intent(in) ::
m
1611 if (
m<2)
call mpl%abort(
'func_matern',
'M should be larger than 2')
1612 if (mod(
m,2)>0)
call mpl%abort(
'func_matern',
'M should be even')
1621 value =
value+beta*(xtmp)**(
m-2-j)
1628 value =
value/beta+
one
1631 value =
value*exp(-xtmp)
1648 type(
mpl_type),
intent(inout) :: mpl
1649 integer,
intent(in) :: n
1650 real(kind_real),
intent(in) :: a(n,n)
1651 real(kind_real),
intent(out) :: u(n,n)
1654 integer :: nn,i,j,ij
1655 real(kind_real),
allocatable :: apack(:),upack(:)
1678 call cholesky(mpl,n,nn,apack,upack)
1709 type(
mpl_type),
intent(inout) :: mpl
1710 integer,
intent(in) :: n
1711 real(kind_real),
intent(in) :: a(n,n)
1712 real(kind_real),
intent(out) :: c(n,n)
1715 integer :: nn,i,j,ij
1716 real(kind_real),
allocatable :: apack(:),cpack(:)
1739 call syminv(mpl,n,nn,apack,cpack)
1769 type(
mpl_type),
intent(inout) :: mpl
1770 integer,
intent(in) :: nlist
1771 real(kind_real),
intent(in) :: list(nlist)
1772 integer,
intent(in) :: nbins
1773 real(kind_real),
intent(in) :: histmin
1774 real(kind_real),
intent(in) :: histmax
1775 real(kind_real),
intent(out) :: bins(nbins+1)
1776 real(kind_real),
intent(out) :: hist(nbins)
1779 integer :: ibins,ilist
1780 real(kind_real) :: delta
1790 if (nbins<=0)
call mpl%abort(
'func_histogram',
'the number of bins should be positive')
1791 if (histmax>histmin)
then
1792 if (
zss_minval(list,mask=mpl%msv%isnot(list))<histmin)
call mpl%abort(
'func_histogram',
'values below histogram minimum')
1793 if (
zss_maxval(list,mask=mpl%msv%isnot(list))>histmax)
call mpl%abort(
'func_histogram',
'values over histogram maximum')
1796 delta = (histmax-histmin)/real(nbins,kind_real)
1799 bins(ibins) = histmin+real(ibins-1,kind_real)*delta
1801 bins(nbins+1) = histmax
1804 bins(1) = bins(1)-1.0e-6_kind_real*delta
1805 bins(nbins+1) = bins(nbins+1)+1.0e-6_kind_real*delta
1810 if (mpl%msv%isnot(list(ilist)))
then
1813 do while (.not.found)
1815 if (ibins>nbins)
call mpl%abort(
'func_histogram',
'bin not found')
1816 if (
infeq(bins(ibins),list(ilist)).and.
inf(list(ilist),bins(ibins+1)))
then
1817 hist(ibins) = hist(ibins)+
one
1823 if (abs(sum(hist)-real(count(mpl%msv%isnot(list)),kind_real))>
half) &
1824 &
call mpl%abort(
'func_histogram',
'histogram sum is not equal to the number of valid elements')
1844 integer,
intent(in) :: nproc
1845 integer,
intent(in) :: proc_to_cx_offset(nproc)
1846 integer,
intent(in) :: icx
1861 iproc =
cx_to_proc(nproc,proc_to_cx_offset,icx)
1864 icxa = icx-proc_to_cx_offset(iproc)
1880 integer,
intent(in) :: nproc
1881 integer,
intent(in) :: proc_to_cx_offset(nproc)
1882 integer,
intent(in) :: icx
1895 if ((proc_to_cx_offset(iproc)<icx).and.(icx<=proc_to_cx_offset(iproc+1)))
then
1910 function func_cx_to_cxu(nproc,proc_to_cx_offset,proc_to_ncxa,myuniverse,icx)
result(icxu)
1915 integer,
intent(in) :: nproc
1916 integer,
intent(in) :: proc_to_cx_offset(nproc)
1917 integer,
intent(in) :: proc_to_ncxa(nproc)
1918 logical,
intent(in) :: myuniverse(nproc)
1919 integer,
intent(in) :: icx
1925 integer :: iproc,icxa,offset,jproc
1934 iproc =
cx_to_proc(nproc,proc_to_cx_offset,icx)
1936 if (myuniverse(iproc))
then
1938 icxa = icx-proc_to_cx_offset(iproc)
1943 if (myuniverse(jproc)) offset = offset+proc_to_ncxa(jproc)
1967 type(
mpl_type),
intent(inout) :: mpl
1968 integer,
intent(in) :: fldi
1969 logical,
intent(out) :: fldl
1979 elseif (fldi==1)
then
1982 call mpl%abort(
'func_convert_i2l_r0',
'wrong integer value')
1990 # 1865 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2000 type(
mpl_type),
intent(inout) :: mpl
2001 integer,
intent(in) :: fldi(:)
2002 logical,
intent(out) :: fldl(:)
2005 # 1880 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2007 # 1882 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2015 # 1890 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2016 do i1=1,
size(fldl,1)
2017 # 1892 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2019 # 1896 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2021 # 1900 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2023 # 1902 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2025 # 1904 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2031 # 1865 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2041 type(
mpl_type),
intent(inout) :: mpl
2042 integer,
intent(in) :: fldi(:,:)
2043 logical,
intent(out) :: fldl(:,:)
2046 # 1880 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2048 # 1880 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2050 # 1882 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2058 # 1890 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2059 do i2=1,
size(fldl,2)
2060 # 1890 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2061 do i1=1,
size(fldl,1)
2062 # 1892 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2064 # 1894 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2066 # 1896 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2068 # 1898 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2070 # 1900 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2072 # 1902 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2074 # 1902 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2076 # 1904 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2082 # 1865 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2092 type(
mpl_type),
intent(inout) :: mpl
2093 integer,
intent(in) :: fldi(:,:,:)
2094 logical,
intent(out) :: fldl(:,:,:)
2097 # 1880 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2099 # 1880 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2101 # 1880 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2103 # 1882 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2111 # 1890 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2112 do i3=1,
size(fldl,3)
2113 # 1890 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2114 do i2=1,
size(fldl,2)
2115 # 1890 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2116 do i1=1,
size(fldl,1)
2117 # 1892 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2119 # 1894 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2121 # 1894 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2123 # 1896 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2125 # 1898 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2127 # 1898 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2129 # 1900 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2131 # 1902 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2133 # 1902 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2135 # 1902 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2137 # 1904 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2143 # 1865 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2153 type(
mpl_type),
intent(inout) :: mpl
2154 integer,
intent(in) :: fldi(:,:,:,:)
2155 logical,
intent(out) :: fldl(:,:,:,:)
2158 # 1880 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2160 # 1880 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2162 # 1880 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2164 # 1880 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2166 # 1882 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2174 # 1890 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2175 do i4=1,
size(fldl,4)
2176 # 1890 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2177 do i3=1,
size(fldl,3)
2178 # 1890 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2179 do i2=1,
size(fldl,2)
2180 # 1890 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2181 do i1=1,
size(fldl,1)
2182 # 1892 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2184 # 1894 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2186 # 1894 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2188 # 1894 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2190 # 1896 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2192 # 1898 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2194 # 1898 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2196 # 1898 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2198 # 1900 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2200 # 1902 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2202 # 1902 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2204 # 1902 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2206 # 1902 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2208 # 1904 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2214 # 1910 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2225 logical,
intent(in) :: fldl
2226 integer,
intent(out) :: fldi
2245 # 1941 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2255 logical,
intent(in) :: fldl(:)
2256 integer,
intent(out) :: fldi(:)
2259 # 1955 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2261 # 1957 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2269 # 1965 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2270 do i1=1,
size(fldl,1)
2271 # 1967 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2273 # 1971 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2275 # 1975 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2277 # 1977 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2279 # 1979 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2285 # 1941 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2295 logical,
intent(in) :: fldl(:,:)
2296 integer,
intent(out) :: fldi(:,:)
2299 # 1955 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2301 # 1955 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2303 # 1957 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2311 # 1965 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2312 do i2=1,
size(fldl,2)
2313 # 1965 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2314 do i1=1,
size(fldl,1)
2315 # 1967 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2317 # 1969 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2319 # 1971 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2321 # 1973 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2323 # 1975 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2325 # 1977 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2327 # 1977 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2329 # 1979 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2335 # 1941 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2345 logical,
intent(in) :: fldl(:,:,:)
2346 integer,
intent(out) :: fldi(:,:,:)
2349 # 1955 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2351 # 1955 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2353 # 1955 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2355 # 1957 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2363 # 1965 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2364 do i3=1,
size(fldl,3)
2365 # 1965 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2366 do i2=1,
size(fldl,2)
2367 # 1965 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2368 do i1=1,
size(fldl,1)
2369 # 1967 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2371 # 1969 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2373 # 1969 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2375 # 1971 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2377 # 1973 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2379 # 1973 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2381 # 1975 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2383 # 1977 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2385 # 1977 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2387 # 1977 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2389 # 1979 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2395 # 1941 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2405 logical,
intent(in) :: fldl(:,:,:,:)
2406 integer,
intent(out) :: fldi(:,:,:,:)
2409 # 1955 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2411 # 1955 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2413 # 1955 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2415 # 1955 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2417 # 1957 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2425 # 1965 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2426 do i4=1,
size(fldl,4)
2427 # 1965 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2428 do i3=1,
size(fldl,3)
2429 # 1965 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2430 do i2=1,
size(fldl,2)
2431 # 1965 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2432 do i1=1,
size(fldl,1)
2433 # 1967 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2435 # 1969 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2437 # 1969 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2439 # 1969 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2441 # 1971 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2443 # 1973 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2445 # 1973 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2447 # 1973 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2449 # 1975 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2451 # 1977 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2453 # 1977 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2455 # 1977 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2457 # 1977 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2459 # 1979 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2465 # 1985 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2467 # 1987 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2468 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2478 integer(kind_int),
intent(in) :: array(:)
2479 logical,
intent(in),
optional :: mask(:)
2482 integer(kind_int) :: value
2490 if (
size(array)>0)
then
2491 if (
present(mask))
then
2493 value = maxval(array,mask=mask)
2498 value = maxval(array)
2508 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2518 integer(kind_int),
intent(in) :: array(:,:)
2519 logical,
intent(in),
optional :: mask(:,:)
2522 integer(kind_int) :: value
2530 if (
size(array)>0)
then
2531 if (
present(mask))
then
2533 value = maxval(array,mask=mask)
2538 value = maxval(array)
2548 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2558 integer(kind_int),
intent(in) :: array(:,:,:)
2559 logical,
intent(in),
optional :: mask(:,:,:)
2562 integer(kind_int) :: value
2570 if (
size(array)>0)
then
2571 if (
present(mask))
then
2573 value = maxval(array,mask=mask)
2578 value = maxval(array)
2588 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2598 integer(kind_int),
intent(in) :: array(:,:,:,:)
2599 logical,
intent(in),
optional :: mask(:,:,:,:)
2602 integer(kind_int) :: value
2610 if (
size(array)>0)
then
2611 if (
present(mask))
then
2613 value = maxval(array,mask=mask)
2618 value = maxval(array)
2628 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2638 integer(kind_int),
intent(in) :: array(:,:,:,:,:)
2639 logical,
intent(in),
optional :: mask(:,:,:,:,:)
2642 integer(kind_int) :: value
2650 if (
size(array)>0)
then
2651 if (
present(mask))
then
2653 value = maxval(array,mask=mask)
2658 value = maxval(array)
2668 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2678 integer(kind_int),
intent(in) :: array(:,:,:,:,:,:)
2679 logical,
intent(in),
optional :: mask(:,:,:,:,:,:)
2682 integer(kind_int) :: value
2690 if (
size(array)>0)
then
2691 if (
present(mask))
then
2693 value = maxval(array,mask=mask)
2698 value = maxval(array)
2708 # 2028 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2709 # 1987 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2710 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2721 logical,
intent(in),
optional :: mask(:)
2732 if (
size(array)>0)
then
2733 if (
present(mask))
then
2735 value = maxval(array,mask=mask)
2740 value = maxval(array)
2750 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2760 real(
kind_real),
intent(in) :: array(:,:)
2761 logical,
intent(in),
optional :: mask(:,:)
2772 if (
size(array)>0)
then
2773 if (
present(mask))
then
2775 value = maxval(array,mask=mask)
2780 value = maxval(array)
2790 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2800 real(
kind_real),
intent(in) :: array(:,:,:)
2801 logical,
intent(in),
optional :: mask(:,:,:)
2812 if (
size(array)>0)
then
2813 if (
present(mask))
then
2815 value = maxval(array,mask=mask)
2820 value = maxval(array)
2830 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2840 real(
kind_real),
intent(in) :: array(:,:,:,:)
2841 logical,
intent(in),
optional :: mask(:,:,:,:)
2852 if (
size(array)>0)
then
2853 if (
present(mask))
then
2855 value = maxval(array,mask=mask)
2860 value = maxval(array)
2870 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2880 real(
kind_real),
intent(in) :: array(:,:,:,:,:)
2881 logical,
intent(in),
optional :: mask(:,:,:,:,:)
2892 if (
size(array)>0)
then
2893 if (
present(mask))
then
2895 value = maxval(array,mask=mask)
2900 value = maxval(array)
2910 # 1988 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2920 real(
kind_real),
intent(in) :: array(:,:,:,:,:,:)
2921 logical,
intent(in),
optional :: mask(:,:,:,:,:,:)
2932 if (
size(array)>0)
then
2933 if (
present(mask))
then
2935 value = maxval(array,mask=mask)
2940 value = maxval(array)
2950 # 2028 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2951 # 2029 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2953 # 2031 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2954 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
2964 integer(kind_int),
intent(in) :: array(:)
2965 logical,
intent(in),
optional :: mask(:)
2968 integer(kind_int) :: value
2976 if (
size(array)>0)
then
2977 if (
present(mask))
then
2979 value = minval(array,mask=mask)
2984 value = minval(array)
2994 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3004 integer(kind_int),
intent(in) :: array(:,:)
3005 logical,
intent(in),
optional :: mask(:,:)
3008 integer(kind_int) :: value
3016 if (
size(array)>0)
then
3017 if (
present(mask))
then
3019 value = minval(array,mask=mask)
3024 value = minval(array)
3034 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3044 integer(kind_int),
intent(in) :: array(:,:,:)
3045 logical,
intent(in),
optional :: mask(:,:,:)
3048 integer(kind_int) :: value
3056 if (
size(array)>0)
then
3057 if (
present(mask))
then
3059 value = minval(array,mask=mask)
3064 value = minval(array)
3074 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3084 integer(kind_int),
intent(in) :: array(:,:,:,:)
3085 logical,
intent(in),
optional :: mask(:,:,:,:)
3088 integer(kind_int) :: value
3096 if (
size(array)>0)
then
3097 if (
present(mask))
then
3099 value = minval(array,mask=mask)
3104 value = minval(array)
3114 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3124 integer(kind_int),
intent(in) :: array(:,:,:,:,:)
3125 logical,
intent(in),
optional :: mask(:,:,:,:,:)
3128 integer(kind_int) :: value
3136 if (
size(array)>0)
then
3137 if (
present(mask))
then
3139 value = minval(array,mask=mask)
3144 value = minval(array)
3154 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3164 integer(kind_int),
intent(in) :: array(:,:,:,:,:,:)
3165 logical,
intent(in),
optional :: mask(:,:,:,:,:,:)
3168 integer(kind_int) :: value
3176 if (
size(array)>0)
then
3177 if (
present(mask))
then
3179 value = minval(array,mask=mask)
3184 value = minval(array)
3194 # 2072 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3195 # 2031 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3196 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3207 logical,
intent(in),
optional :: mask(:)
3218 if (
size(array)>0)
then
3219 if (
present(mask))
then
3221 value = minval(array,mask=mask)
3226 value = minval(array)
3236 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3246 real(
kind_real),
intent(in) :: array(:,:)
3247 logical,
intent(in),
optional :: mask(:,:)
3258 if (
size(array)>0)
then
3259 if (
present(mask))
then
3261 value = minval(array,mask=mask)
3266 value = minval(array)
3276 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3286 real(
kind_real),
intent(in) :: array(:,:,:)
3287 logical,
intent(in),
optional :: mask(:,:,:)
3298 if (
size(array)>0)
then
3299 if (
present(mask))
then
3301 value = minval(array,mask=mask)
3306 value = minval(array)
3316 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3326 real(
kind_real),
intent(in) :: array(:,:,:,:)
3327 logical,
intent(in),
optional :: mask(:,:,:,:)
3338 if (
size(array)>0)
then
3339 if (
present(mask))
then
3341 value = minval(array,mask=mask)
3346 value = minval(array)
3356 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3366 real(
kind_real),
intent(in) :: array(:,:,:,:,:)
3367 logical,
intent(in),
optional :: mask(:,:,:,:,:)
3378 if (
size(array)>0)
then
3379 if (
present(mask))
then
3381 value = minval(array,mask=mask)
3386 value = minval(array)
3396 # 2032 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3406 real(
kind_real),
intent(in) :: array(:,:,:,:,:,:)
3407 logical,
intent(in),
optional :: mask(:,:,:,:,:,:)
3418 if (
size(array)>0)
then
3419 if (
present(mask))
then
3421 value = minval(array,mask=mask)
3426 value = minval(array)
3436 # 2072 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3437 # 2073 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3439 # 2075 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3440 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3450 integer(kind_int),
intent(in) :: array(:)
3451 logical,
intent(in),
optional :: mask(:)
3454 integer(kind_int) :: value
3462 if (
size(array)>0)
then
3463 if (
present(mask))
then
3465 value = sum(array,mask=mask)
3480 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3490 integer(kind_int),
intent(in) :: array(:,:)
3491 logical,
intent(in),
optional :: mask(:,:)
3494 integer(kind_int) :: value
3502 if (
size(array)>0)
then
3503 if (
present(mask))
then
3505 value = sum(array,mask=mask)
3520 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3530 integer(kind_int),
intent(in) :: array(:,:,:)
3531 logical,
intent(in),
optional :: mask(:,:,:)
3534 integer(kind_int) :: value
3542 if (
size(array)>0)
then
3543 if (
present(mask))
then
3545 value = sum(array,mask=mask)
3560 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3570 integer(kind_int),
intent(in) :: array(:,:,:,:)
3571 logical,
intent(in),
optional :: mask(:,:,:,:)
3574 integer(kind_int) :: value
3582 if (
size(array)>0)
then
3583 if (
present(mask))
then
3585 value = sum(array,mask=mask)
3600 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3610 integer(kind_int),
intent(in) :: array(:,:,:,:,:)
3611 logical,
intent(in),
optional :: mask(:,:,:,:,:)
3614 integer(kind_int) :: value
3622 if (
size(array)>0)
then
3623 if (
present(mask))
then
3625 value = sum(array,mask=mask)
3640 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3650 integer(kind_int),
intent(in) :: array(:,:,:,:,:,:)
3651 logical,
intent(in),
optional :: mask(:,:,:,:,:,:)
3654 integer(kind_int) :: value
3662 if (
size(array)>0)
then
3663 if (
present(mask))
then
3665 value = sum(array,mask=mask)
3680 # 2116 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3681 # 2075 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3682 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3693 logical,
intent(in),
optional :: mask(:)
3704 if (
size(array)>0)
then
3705 if (
present(mask))
then
3707 value = sum(array,mask=mask)
3709 value = 0.0_kind_real
3715 value = 0.0_kind_real
3722 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3732 real(
kind_real),
intent(in) :: array(:,:)
3733 logical,
intent(in),
optional :: mask(:,:)
3744 if (
size(array)>0)
then
3745 if (
present(mask))
then
3747 value = sum(array,mask=mask)
3749 value = 0.0_kind_real
3755 value = 0.0_kind_real
3762 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3772 real(
kind_real),
intent(in) :: array(:,:,:)
3773 logical,
intent(in),
optional :: mask(:,:,:)
3784 if (
size(array)>0)
then
3785 if (
present(mask))
then
3787 value = sum(array,mask=mask)
3789 value = 0.0_kind_real
3795 value = 0.0_kind_real
3802 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3812 real(
kind_real),
intent(in) :: array(:,:,:,:)
3813 logical,
intent(in),
optional :: mask(:,:,:,:)
3824 if (
size(array)>0)
then
3825 if (
present(mask))
then
3827 value = sum(array,mask=mask)
3829 value = 0.0_kind_real
3835 value = 0.0_kind_real
3842 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3852 real(
kind_real),
intent(in) :: array(:,:,:,:,:)
3853 logical,
intent(in),
optional :: mask(:,:,:,:,:)
3864 if (
size(array)>0)
then
3865 if (
present(mask))
then
3867 value = sum(array,mask=mask)
3869 value = 0.0_kind_real
3875 value = 0.0_kind_real
3882 # 2076 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3892 real(
kind_real),
intent(in) :: array(:,:,:,:,:,:)
3893 logical,
intent(in),
optional :: mask(:,:,:,:,:,:)
3904 if (
size(array)>0)
then
3905 if (
present(mask))
then
3907 value = sum(array,mask=mask)
3909 value = 0.0_kind_real
3915 value = 0.0_kind_real
3922 # 2116 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3923 # 2117 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3925 # 2119 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3935 logical,
intent(in) :: array(:)
3946 if (
size(array)>0)
then
3947 value = count(array)
3956 # 2119 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3966 logical,
intent(in) :: array(:,:)
3977 if (
size(array)>0)
then
3978 value = count(array)
3987 # 2119 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
3997 logical,
intent(in) :: array(:,:,:)
4008 if (
size(array)>0)
then
4009 value = count(array)
4018 # 2119 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
4028 logical,
intent(in) :: array(:,:,:,:)
4039 if (
size(array)>0)
then
4040 value = count(array)
4049 # 2119 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
4059 logical,
intent(in) :: array(:,:,:,:,:)
4070 if (
size(array)>0)
then
4071 value = count(array)
4080 # 2119 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
4090 logical,
intent(in) :: array(:,:,:,:,:,:)
4101 if (
size(array)>0)
then
4102 value = count(array)
4111 # 2150 "/Users/miesch/JEDI/code/working_copy/internal/mpas-bundle/saber/src/saber/bump/tools_func.fypp"
Generic ranks, dimensions and types.