21 use fckit_log_module,
only: fckit_log
24 use kinds,
only: kind_real
27 use random_mod,
only: normal_distribution
33 use mpas_abort,
only: mpas_dmpar_global_abort
35 use mpas_derived_types
37 use mpas_field_routines
38 use mpas_kind_types,
only: shortstrkind
39 use mpas_pool_routines
86 character (len=*),
intent(in) :: fieldname
89 (/
'qv',
'qc',
'qi',
'qr',
'qs',
'qg',
'qh',
'nr'/))
109 character (len=*),
intent(in) :: scalarname
110 character (len=*),
intent(in) :: fieldname
114 scalarname ==
'scalars' .and. &
136 type (block_type),
pointer :: block
138 type (mpas_pool_type),
pointer :: structs
139 type (mpas_pool_type),
pointer :: allFields
140 type (mpas_pool_type),
pointer :: da_state
141 type (mpas_pool_type),
pointer :: da_state_incr
143 type (field2DReal),
pointer :: field
145 write(0,*)
'****** Begin pool demo routine ******'
147 structs => block % structs
148 allfields => block % allFields
153 call mpas_pool_create_pool(da_state)
159 call mpas_pool_get_field(allfields,
'theta', field)
160 call mpas_pool_add_field(da_state,
'theta', field)
161 write(0,*)
'Now, max value of theta is ', maxval(field % array),minval(field % array)
163 write(0,*)
'Dimensions Field: ',field % dimSizes(:)
165 call mpas_pool_get_field(allfields,
'rho', field)
166 call mpas_pool_add_field(da_state,
'rho', field)
167 write(0,*)
'Now, max value of rho is ', maxval(field % array),minval(field % array)
173 call mpas_pool_create_pool(da_state_incr)
179 call mpas_pool_clone_pool(da_state, da_state_incr)
187 call mpas_pool_get_field(da_state_incr,
'rho', field)
188 write(0,*)
'Now, max value of rho_incr is ', maxval(field % array)
190 call mpas_pool_get_field(da_state,
'rho', field)
191 write(0,*)
'Now, max value of rho is ', maxval(field % array)
197 call mpas_pool_empty_pool(da_state)
202 call mpas_pool_destroy_pool(da_state)
208 call mpas_pool_destroy_pool(da_state_incr)
210 write(0,*)
'****** End pool demo routine ******'
232 type (mpas_pool_type),
pointer :: pool_a, pool_b
234 type (mpas_pool_iterator_type) :: poolitr
235 real (kind=kind_real),
pointer :: r0d_ptr_a, r0d_ptr_b
236 real (kind=kind_real),
dimension(:),
pointer :: r1d_ptr_a, r1d_ptr_b
237 real (kind=kind_real),
dimension(:,:),
pointer :: r2d_ptr_a, r2d_ptr_b
238 real (kind=kind_real),
dimension(:,:,:),
pointer :: r3d_ptr_a, r3d_ptr_b
244 call mpas_pool_begin_iteration(pool_b)
246 do while ( mpas_pool_get_next_member(pool_b, poolitr) )
250 if (poolitr % memberType == mpas_pool_field)
then
253 if (poolitr % dataType == mpas_pool_real)
then
257 if (poolitr % nDims == 0)
then
258 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r0d_ptr_a)
259 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r0d_ptr_b)
260 r0d_ptr_a = r0d_ptr_a + r0d_ptr_b
261 else if (poolitr % nDims == 1)
then
262 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r1d_ptr_a)
263 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r1d_ptr_b)
264 r1d_ptr_a = r1d_ptr_a + r1d_ptr_b
265 else if (poolitr % nDims == 2)
then
266 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r2d_ptr_a)
267 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r2d_ptr_b)
268 r2d_ptr_a = r2d_ptr_a + r2d_ptr_b
269 write(
message,*)
'Operator add MIN/MAX: ',minval(r2d_ptr_a),maxval(r2d_ptr_a)
271 else if (poolitr % nDims == 3)
then
272 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r3d_ptr_a)
273 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r3d_ptr_b)
274 r3d_ptr_a = r3d_ptr_a + r3d_ptr_b
301 type (mpas_pool_type),
pointer,
intent(inout) :: pool_a
302 type (mpas_pool_type),
pointer :: pool_b, state
303 type (domain_type),
pointer,
intent(in) :: domain
305 type (mpas_pool_iterator_type) :: poolitr_a, poolitr_b
306 real (kind=kind_real),
pointer :: r0d_ptr_a, r0d_ptr_b
307 real (kind=kind_real),
dimension(:),
pointer :: r1d_ptr_a, r1d_ptr_b
308 real (kind=kind_real),
dimension(:,:),
pointer :: r2d_ptr_a, r2d_ptr_b
309 integer,
pointer :: index_scalar
311 type (field2dreal),
pointer :: field2d
312 type (field3dreal),
pointer :: field3d
315 pool_b => domain % blocklist % allFields
316 call mpas_pool_get_subpool(domain % blocklist % structs,
'state',state)
321 call mpas_pool_begin_iteration(pool_b)
323 do while ( mpas_pool_get_next_member(pool_b, poolitr_b) )
327 if (poolitr_b % memberType == mpas_pool_field)
then
330 if (poolitr_b % dataType == mpas_pool_real)
then
332 call mpas_pool_begin_iteration(pool_a)
333 do while ( mpas_pool_get_next_member(pool_a, poolitr_a) )
335 if (( trim(poolitr_b % memberName)).eq.(trim(poolitr_a % memberName)) )
then
339 if (poolitr_b % nDims == 0)
then
340 call mpas_pool_get_array(pool_a, trim(poolitr_a % memberName), r0d_ptr_a)
341 call mpas_pool_get_array(pool_b, trim(poolitr_b % memberName), r0d_ptr_b)
342 r0d_ptr_a = r0d_ptr_b
343 else if (poolitr_b % nDims == 1)
then
344 call mpas_pool_get_array(pool_a, trim(poolitr_a % memberName), r1d_ptr_a)
345 call mpas_pool_get_array(pool_b, trim(poolitr_b % memberName), r1d_ptr_b)
346 r1d_ptr_a = r1d_ptr_b
347 else if (poolitr_b % nDims == 2)
then
348 write(
message,*)
'poolItr_b % memberName=',trim(poolitr_b % memberName)
350 call mpas_pool_get_array(pool_a, trim(poolitr_a % memberName), r2d_ptr_a)
351 call mpas_pool_get_array(pool_b, trim(poolitr_b % memberName), r2d_ptr_b)
352 r2d_ptr_a = r2d_ptr_b
353 write(
message,*)
'Copy all2sub field MIN/MAX: ',trim(poolitr_b % memberName), &
354 minval(r2d_ptr_a),maxval(r2d_ptr_a)
358 else if (
match_scalar(trim(poolitr_b % memberName), trim(poolitr_a % memberName)) )
then
359 write(
message,*)
'Copy all2sub field: Looking at SCALARS now',trim(poolitr_a % memberName)
361 call mpas_pool_get_dimension(state,
'index_'//trim(poolitr_a % memberName), index_scalar)
362 if (index_scalar .gt. 0)
then
363 call mpas_pool_get_field(pool_a, trim(poolitr_a % memberName), field2d)
364 call mpas_pool_get_field(pool_b, trim(poolitr_b % memberName), field3d)
365 field2d % array(:,:) = field3d % array(index_scalar,:,:)
366 write(
message,*)
'Copy all2sub field MIN/MAX: ',trim(poolitr_a % memberName), &
367 minval(field2d % array), maxval(field2d % array)
370 write(
message,*)
'WARNING in Copy all2sub field; ',trim(poolitr_a % memberName), &
371 'not available from MPAS'
400 type (mpas_pool_type),
pointer,
intent(in) :: pool_a
401 type (mpas_pool_type),
pointer :: pool_b, state
402 type (domain_type),
pointer,
intent(inout) :: domain
404 type (mpas_pool_iterator_type) :: poolitr_a, poolitr_b
405 real (kind=kind_real),
pointer :: r0d_ptr_a, r0d_ptr_b
406 real (kind=kind_real),
dimension(:),
pointer :: r1d_ptr_a, r1d_ptr_b
407 real (kind=kind_real),
dimension(:,:),
pointer :: r2d_ptr_a, r2d_ptr_b
408 integer,
pointer :: index_scalar
410 type (field2dreal),
pointer :: field2d
411 type (field3dreal),
pointer :: field3d
414 pool_b => domain % blocklist % allFields
415 call mpas_pool_get_subpool(domain % blocklist % structs,
'state',state)
420 call mpas_pool_begin_iteration(pool_b)
422 do while ( mpas_pool_get_next_member(pool_b, poolitr_b) )
426 if (poolitr_b % memberType == mpas_pool_field)
then
429 if (poolitr_b % dataType == mpas_pool_real)
then
431 call mpas_pool_begin_iteration(pool_a)
432 do while ( mpas_pool_get_next_member(pool_a, poolitr_a) )
434 if (( trim(poolitr_b % memberName)).eq.(trim(poolitr_a % memberName)) )
then
438 if (poolitr_b % nDims == 0)
then
439 call mpas_pool_get_array(pool_a, trim(poolitr_a % memberName), r0d_ptr_a)
440 call mpas_pool_get_array(pool_b, trim(poolitr_b % memberName), r0d_ptr_b)
441 r0d_ptr_b = r0d_ptr_a
442 else if (poolitr_b % nDims == 1)
then
443 call mpas_pool_get_array(pool_a, trim(poolitr_a % memberName), r1d_ptr_a)
444 call mpas_pool_get_array(pool_b, trim(poolitr_b % memberName), r1d_ptr_b)
445 r1d_ptr_b = r1d_ptr_a
446 write(
message,*)
'Copy sub2all field MIN/MAX: ',trim(poolitr_b % memberName), &
447 minval(r1d_ptr_a),maxval(r1d_ptr_a)
449 else if (poolitr_b % nDims == 2)
then
450 call mpas_pool_get_array(pool_a, trim(poolitr_a % memberName), r2d_ptr_a)
451 call mpas_pool_get_array(pool_b, trim(poolitr_b % memberName), r2d_ptr_b)
452 r2d_ptr_b = r2d_ptr_a
453 write(
message,*)
'Copy sub2all field MIN/MAX: ',trim(poolitr_b % memberName), &
454 minval(r2d_ptr_a),maxval(r2d_ptr_a)
458 else if (
match_scalar(trim(poolitr_b % memberName), trim(poolitr_a % memberName)) )
then
459 write(
message,*)
'Copy sub2all field: Looking at SCALARS now',trim(poolitr_a % memberName)
461 call mpas_pool_get_dimension(state,
'index_'//trim(poolitr_a % memberName), index_scalar)
462 if (index_scalar .gt. 0)
then
463 call mpas_pool_get_field(pool_a, trim(poolitr_a % memberName), field2d)
464 call mpas_pool_get_field(pool_b, trim(poolitr_b % memberName), field3d)
465 field3d % array(index_scalar,:,:) = field2d % array(:,:)
466 write(
message,*)
'Copy sub2all field MIN/MAX: ',trim(poolitr_a % memberName), &
467 minval(field2d % array), maxval(field2d % array)
470 write(
message,*)
'WARNING in Copy sub2all field; ',trim(poolitr_a % memberName), &
471 'not available from MPAS'
501 type (mpas_pool_type),
pointer,
intent(out) :: templatepool
502 integer,
intent(in) :: nf
503 character (len=*),
intent(in) :: fieldnames(nf)
506 type (mpas_pool_type),
pointer :: allfields, state
507 character(len=MAXVARLEN) :: fieldname, template
511 integer,
pointer :: index_scalar, dim0d
513 integer,
parameter :: ndims=10
514 character(len=ShortStrKIND) :: dimnames(ndims)
516 call mpas_pool_create_pool(templatepool)
518 dimnames( 1) =
'nCellsSolve'
519 dimnames( 2) =
'nEdgesSolve'
520 dimnames( 3) =
'nVerticesSolve'
521 dimnames( 4) =
'nVertLevels'
522 dimnames( 5) =
'nVertLevelsP1'
523 dimnames( 6) =
'nSoilLevels'
524 dimnames( 7) =
'nCells'
525 dimnames( 8) =
'nEdges'
526 dimnames( 9) =
'nVertices'
527 dimnames(10) =
'vertexDegree'
530 call mpas_pool_get_dimension(geom % domain % blocklist % dimensions, trim(dimnames(ii)), dim0d)
531 call mpas_pool_add_dimension(templatepool, trim(dimnames(ii)), dim0d)
534 call mpas_pool_get_subpool(geom % domain % blocklist % structs,
'state',state)
535 allfields => geom % domain % blocklist % allFields
538 fieldname = fieldnames(ii)
542 call mpas_pool_get_dimension(state,
'index_'//trim(fieldname), index_scalar)
543 if (index_scalar .gt. 0)
then
546 write(
message,*)
'--> da_template_pool: ',trim(fieldname), &
547 ' not available in MPAS domain'
553 else if (geom % is_templated(fieldname))
then
554 template = geom%template(fieldname)
556 write(
message,*)
'--> da_template_pool: ',trim(template), &
557 ' not available in MPAS domain'
561 write(
message,*)
'--> da_template_pool: ',trim(fieldname), &
562 ' not available in MPAS domain or geom % templated_fields'
589 type (mpas_pool_type),
pointer,
intent(in) :: srcPool
590 character (len=*),
intent(in) :: srcFieldName, dstFieldName
591 type (mpas_pool_type),
pointer,
intent(inout) :: dstPool
594 type (mpas_pool_iterator_type) :: poolItr
595 type (field0DReal),
pointer :: field0d_src, field0d_dst
596 type (field1DReal),
pointer :: field1d_src, field1d_dst
597 type (field2DReal),
pointer :: field2d_src, field2d_dst
598 type (field3DReal),
pointer :: field3d_src, field3d_dst, field3d
599 type (field0DInteger),
pointer :: ifield0d_src, ifield0d_dst
600 type (field1DInteger),
pointer :: ifield1d_src, ifield1d_dst
601 type (field2DInteger),
pointer :: ifield2d_src, ifield2d_dst
602 type (field3DInteger),
pointer :: ifield3d_src, ifield3d_dst
607 call mpas_pool_begin_iteration(srcpool)
609 do while ( mpas_pool_get_next_member(srcpool, poolitr) )
612 if ( poolitr % memberType == mpas_pool_field .and. &
613 trim(srcfieldname) == trim(poolitr % memberName) )
then
616 if (poolitr % dataType == mpas_pool_real)
then
619 if (poolitr % nDims == 0)
then
620 call mpas_pool_get_field(srcpool, trim(srcfieldname), field0d_src)
621 call mpas_duplicate_field(field0d_src, field0d_dst)
622 field0d_dst % fieldName = dstfieldname
623 call mpas_pool_add_field(dstpool, trim(dstfieldname), field0d_dst)
624 else if (poolitr % nDims == 1)
then
625 call mpas_pool_get_field(srcpool, trim(srcfieldname), field1d_src)
626 call mpas_duplicate_field(field1d_src, field1d_dst)
627 field1d_dst % fieldName = dstfieldname
628 call mpas_pool_add_field(dstpool, trim(dstfieldname), field1d_dst)
629 else if (poolitr % nDims == 2)
then
630 call mpas_pool_get_field(srcpool, trim(srcfieldname), field2d_src)
631 call mpas_duplicate_field(field2d_src, field2d_dst)
632 field2d_dst % fieldName = dstfieldname
633 call mpas_pool_add_field(dstpool, trim(dstfieldname), field2d_dst)
634 else if (poolitr % nDims == 3)
then
635 call mpas_pool_get_field(srcpool, trim(srcfieldname), field3d_src)
636 call mpas_duplicate_field(field3d_src, field3d_dst)
637 field3d_dst % fieldName = dstfieldname
638 call mpas_pool_add_field(dstpool, trim(dstfieldname), field3d_dst)
641 else if (poolitr % dataType == mpas_pool_integer)
then
644 if (poolitr % nDims == 0)
then
645 call mpas_pool_get_field(srcpool, trim(srcfieldname), ifield0d_src)
646 call mpas_duplicate_field(ifield0d_src, ifield0d_dst)
647 ifield0d_dst % fieldName = dstfieldname
648 call mpas_pool_add_field(dstpool, trim(dstfieldname), ifield0d_dst)
649 else if (poolitr % nDims == 1)
then
650 call mpas_pool_get_field(srcpool, trim(srcfieldname), ifield1d_src)
651 call mpas_duplicate_field(ifield1d_src, ifield1d_dst)
652 ifield1d_dst % fieldName = dstfieldname
653 call mpas_pool_add_field(dstpool, trim(dstfieldname), ifield1d_dst)
654 else if (poolitr % nDims == 2)
then
655 call mpas_pool_get_field(srcpool, trim(srcfieldname), ifield2d_src)
656 call mpas_duplicate_field(ifield2d_src, ifield2d_dst)
657 ifield2d_dst % fieldName = dstfieldname
658 call mpas_pool_add_field(dstpool, trim(dstfieldname), ifield2d_dst)
659 else if (poolitr % nDims == 3)
then
660 call mpas_pool_get_field(srcpool, trim(srcfieldname), ifield3d_src)
661 call mpas_duplicate_field(ifield3d_src, ifield3d_dst)
662 ifield3d_dst % fieldName = dstfieldname
663 call mpas_pool_add_field(dstpool, trim(dstfieldname), ifield3d_dst)
672 write(
message,*)
'--> mpas_pool_template_field: ',trim(srcfieldname), &
673 ' not available in srcPool'
692 type (mpas_pool_type),
pointer :: pool_a, pool_b
693 type (mpas_pool_iterator_type) :: poolitr
694 character (len=*) :: fieldname(:)
695 integer :: ii, jj, nsize, nsize0
698 nsize =
size(fieldname)
699 call mpas_pool_begin_iteration(pool_a)
701 do while ( mpas_pool_get_next_member(pool_a, poolitr) )
704 if (poolitr % memberType == mpas_pool_field)
then
706 if (poolitr % dataType == mpas_pool_real)
then
708 if ( trim(fieldname(ii)).eq.(trim(poolitr % memberName)) )
then
710 else if (
match_scalar(trim(poolitr % memberName), trim(fieldname(ii))))
then
736 type (mpas_pool_type),
pointer,
intent(inout) :: pool_a
737 character (len=*),
optional,
intent(in) :: fld_select(:)
739 integer,
parameter :: rseed = 7
740 type (mpas_pool_iterator_type) :: poolitr
741 real (kind=kind_real),
pointer :: r0d_ptr_a
742 real (kind=kind_real),
dimension(:),
pointer :: r1d_ptr_a
743 real (kind=kind_real),
dimension(:,:),
pointer :: r2d_ptr_a
744 real (kind=kind_real),
dimension(:,:,:),
pointer :: r3d_ptr_a
750 call mpas_pool_begin_iteration(pool_a)
752 do while ( mpas_pool_get_next_member(pool_a, poolitr) )
754 if (
present(fld_select))
then
755 if (ufo_vars_getindex(fld_select,trim(poolitr % memberName)) < 0) cycle
760 if (poolitr % memberType == mpas_pool_field)
then
763 if (poolitr % dataType == mpas_pool_real)
then
767 if (poolitr % nDims == 0)
then
768 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r0d_ptr_a)
770 else if (poolitr % nDims == 1)
then
771 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r1d_ptr_a)
773 else if (poolitr % nDims == 2)
then
774 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r2d_ptr_a)
776 else if (poolitr % nDims == 3)
then
777 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r3d_ptr_a)
801 subroutine da_operator(kind_op, pool_a, pool_b, pool_c, fld_select)
805 type (mpas_pool_type),
pointer :: pool_a, pool_b
806 type (mpas_pool_type),
pointer,
optional :: pool_c
807 character (len=*) :: kind_op
808 character (len=*),
optional :: fld_select(:)
810 type (mpas_pool_iterator_type) :: poolitr
811 real (kind=kind_real),
pointer :: r0d_ptr_a, r0d_ptr_b, r0d_ptr_c
812 real (kind=kind_real),
dimension(:),
pointer :: r1d_ptr_a, r1d_ptr_b, r1d_ptr_c
813 real (kind=kind_real),
dimension(:,:),
pointer :: r2d_ptr_a, r2d_ptr_b, r2d_ptr_c
814 real (kind=kind_real),
dimension(:,:,:),
pointer :: r3d_ptr_a, r3d_ptr_b, r3d_ptr_c
819 call mpas_pool_begin_iteration(pool_b)
821 write(
message,*)
'Operator ',trim(kind_op)
824 do while ( mpas_pool_get_next_member(pool_b, poolitr) )
826 if (
present(fld_select))
then
827 if (ufo_vars_getindex(fld_select,trim(poolitr % memberName)) < 0) cycle
832 if (poolitr % memberType == mpas_pool_field)
then
835 if (poolitr % dataType == mpas_pool_real)
then
839 if (poolitr % nDims == 0)
then
840 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r0d_ptr_a)
841 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r0d_ptr_b)
842 if (
present(pool_c))
then
843 call mpas_pool_get_array(pool_c, trim(poolitr % memberName), r0d_ptr_c)
846 if ( trim(kind_op).eq.
'add' )
then
847 r0d_ptr_a = r0d_ptr_a + r0d_ptr_b
848 if (
present(pool_c))
then
849 r0d_ptr_a = r0d_ptr_b + r0d_ptr_c
851 r0d_ptr_a = r0d_ptr_a + r0d_ptr_b
853 else if ( trim(kind_op).eq.
'schur' )
then
854 if (
present(pool_c))
then
855 r0d_ptr_a = r0d_ptr_b * r0d_ptr_c
857 r0d_ptr_a = r0d_ptr_a * r0d_ptr_b
859 else if ( trim(kind_op).eq.
'sub' )
then
860 if (
present(pool_c))
then
861 r0d_ptr_a = r0d_ptr_b - r0d_ptr_c
863 r0d_ptr_a = r0d_ptr_a - r0d_ptr_b
867 else if (poolitr % nDims == 1)
then
868 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r1d_ptr_a)
869 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r1d_ptr_b)
870 if (
present(pool_c))
then
871 call mpas_pool_get_array(pool_c, trim(poolitr % memberName), r1d_ptr_c)
874 if ( trim(kind_op).eq.
'add' )
then
875 if (
present(pool_c))
then
876 r1d_ptr_a = r1d_ptr_b + r1d_ptr_c
878 r1d_ptr_a = r1d_ptr_a + r1d_ptr_b
880 else if ( trim(kind_op).eq.
'schur' )
then
881 if (
present(pool_c))
then
882 r1d_ptr_a = r1d_ptr_b * r1d_ptr_c
884 r1d_ptr_a = r1d_ptr_a * r1d_ptr_b
886 else if ( trim(kind_op).eq.
'sub' )
then
887 if (
present(pool_c))
then
888 r1d_ptr_a = r1d_ptr_b - r1d_ptr_c
890 r1d_ptr_a = r1d_ptr_a - r1d_ptr_b
894 else if (poolitr % nDims == 2)
then
895 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r2d_ptr_a)
896 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r2d_ptr_b)
897 if (
present(pool_c))
then
898 call mpas_pool_get_array(pool_c, trim(poolitr % memberName), r2d_ptr_c)
901 if ( trim(kind_op).eq.
'add' )
then
902 write(
message,*)
'Operator_a add MIN/MAX: ',minval(r2d_ptr_a),maxval(r2d_ptr_a)
904 write(
message,*)
'Operator_b add MIN/MAX: ',minval(r2d_ptr_b),maxval(r2d_ptr_b)
906 if (
present(pool_c))
then
907 r2d_ptr_a = r2d_ptr_b + r2d_ptr_c
909 r2d_ptr_a = r2d_ptr_a + r2d_ptr_b
911 write(
message,*)
'Operator2 add MIN/MAX: ',minval(r2d_ptr_a),maxval(r2d_ptr_a)
913 else if ( trim(kind_op).eq.
'schur' )
then
914 if (
present(pool_c))
then
915 r2d_ptr_a = r2d_ptr_b * r2d_ptr_c
917 r2d_ptr_a = r2d_ptr_a * r2d_ptr_b
919 else if ( trim(kind_op).eq.
'sub' )
then
920 if (
present(pool_c))
then
921 r2d_ptr_a = r2d_ptr_b - r2d_ptr_c
923 r2d_ptr_a = r2d_ptr_a - r2d_ptr_b
927 else if (poolitr % nDims == 3)
then
928 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r3d_ptr_a)
929 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r3d_ptr_b)
930 if (
present(pool_c))
then
931 call mpas_pool_get_array(pool_c, trim(poolitr % memberName), r3d_ptr_c)
934 if ( trim(kind_op).eq.
'add' )
then
935 if (
present(pool_c))
then
936 r3d_ptr_a = r3d_ptr_b + r3d_ptr_c
938 r3d_ptr_a = r3d_ptr_a + r3d_ptr_b
940 else if ( trim(kind_op).eq.
'schur' )
then
941 if (
present(pool_c))
then
942 r3d_ptr_a = r3d_ptr_b * r3d_ptr_c
944 r3d_ptr_a = r3d_ptr_a * r3d_ptr_b
946 else if ( trim(kind_op).eq.
'sub' )
then
947 if (
present(pool_c))
then
948 r3d_ptr_a = r3d_ptr_b - r3d_ptr_c
950 r3d_ptr_a = r3d_ptr_a - r3d_ptr_b
975 type (mpas_pool_type),
pointer :: pool_a
976 real (kind=kind_real) :: zz
978 type (mpas_pool_iterator_type) :: poolitr
979 real (kind=kind_real),
pointer :: r0d_ptr_a
980 real (kind=kind_real),
dimension(:),
pointer :: r1d_ptr_a
981 real (kind=kind_real),
dimension(:,:),
pointer :: r2d_ptr_a
982 real (kind=kind_real),
dimension(:,:,:),
pointer :: r3d_ptr_a
988 call mpas_pool_begin_iteration(pool_a)
990 do while ( mpas_pool_get_next_member(pool_a, poolitr) )
994 if (poolitr % memberType == mpas_pool_field)
then
997 if (poolitr % dataType == mpas_pool_real)
then
1001 if (poolitr % nDims == 0)
then
1002 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r0d_ptr_a)
1003 r0d_ptr_a = r0d_ptr_a * zz
1004 else if (poolitr % nDims == 1)
then
1005 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r1d_ptr_a)
1006 r1d_ptr_a = r1d_ptr_a * zz
1007 else if (poolitr % nDims == 2)
then
1008 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r2d_ptr_a)
1009 r2d_ptr_a = r2d_ptr_a * zz
1010 else if (poolitr % nDims == 3)
then
1011 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r3d_ptr_a)
1012 r3d_ptr_a = r3d_ptr_a * zz
1036 type (mpas_pool_type),
pointer,
intent(inout) :: pool_a
1037 real (kind=kind_real),
intent(in) :: realvalue
1038 character (len=*),
optional,
intent(in) :: fld_select(:)
1040 type (mpas_pool_iterator_type) :: poolitr
1041 real (kind=kind_real),
pointer :: r0d_ptr_a
1042 real (kind=kind_real),
dimension(:),
pointer :: r1d_ptr_a
1043 real (kind=kind_real),
dimension(:,:),
pointer :: r2d_ptr_a
1044 real (kind=kind_real),
dimension(:,:,:),
pointer :: r3d_ptr_a
1046 call mpas_pool_begin_iteration(pool_a)
1048 do while ( mpas_pool_get_next_member(pool_a, poolitr) )
1050 if (
present(fld_select))
then
1051 if (ufo_vars_getindex(fld_select,trim(poolitr % memberName)) < 0) cycle
1056 if (poolitr % memberType == mpas_pool_field)
then
1059 if (poolitr % dataType == mpas_pool_real)
then
1063 if (poolitr % nDims == 0)
then
1064 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r0d_ptr_a)
1065 r0d_ptr_a = realvalue
1066 else if (poolitr % nDims == 1)
then
1067 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r1d_ptr_a)
1068 r1d_ptr_a = realvalue
1069 else if (poolitr % nDims == 2)
then
1070 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r2d_ptr_a)
1071 r2d_ptr_a = realvalue
1072 else if (poolitr % nDims == 3)
then
1073 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r3d_ptr_a)
1074 r3d_ptr_a = realvalue
1097 type (mpas_pool_type),
pointer,
intent(inout) :: pool_a
1098 character (len=*),
optional,
intent(in) :: fld_select(:)
1100 type (mpas_pool_iterator_type) :: poolitr
1101 real (kind=kind_real),
pointer :: r0d_ptr_a
1102 real (kind=kind_real),
dimension(:),
pointer :: r1d_ptr_a
1103 real (kind=kind_real),
dimension(:,:),
pointer :: r2d_ptr_a
1104 real (kind=kind_real),
dimension(:,:,:),
pointer :: r3d_ptr_a
1110 call mpas_pool_begin_iteration(pool_a)
1112 do while ( mpas_pool_get_next_member(pool_a, poolitr) )
1114 if (
present(fld_select))
then
1115 if (ufo_vars_getindex(fld_select,trim(poolitr % memberName)) < 0) cycle
1120 if (poolitr % memberType == mpas_pool_field)
then
1123 if (poolitr % dataType == mpas_pool_real)
then
1127 if (poolitr % nDims == 0)
then
1128 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r0d_ptr_a)
1130 else if (poolitr % nDims == 1)
then
1131 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r1d_ptr_a)
1133 else if (poolitr % nDims == 2)
then
1134 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r2d_ptr_a)
1136 else if (poolitr % nDims == 3)
then
1137 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r3d_ptr_a)
1161 type (mpas_pool_type),
pointer :: pool_a
1162 real (kind=kind_real) :: zz
1164 type (mpas_pool_iterator_type) :: poolitr
1165 real (kind=kind_real),
pointer :: r0d_ptr_a
1166 real (kind=kind_real),
dimension(:),
pointer :: r1d_ptr_a
1167 real (kind=kind_real),
dimension(:,:),
pointer :: r2d_ptr_a
1168 real (kind=kind_real),
dimension(:,:,:),
pointer :: r3d_ptr_a
1174 call mpas_pool_begin_iteration(pool_a)
1176 do while ( mpas_pool_get_next_member(pool_a, poolitr) )
1180 if (poolitr % memberType == mpas_pool_field)
then
1183 if (poolitr % dataType == mpas_pool_real)
then
1187 if (poolitr % nDims == 0)
then
1188 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r0d_ptr_a)
1190 else if (poolitr % nDims == 1)
then
1191 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r1d_ptr_a)
1193 else if (poolitr % nDims == 2)
then
1194 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r2d_ptr_a)
1196 else if (poolitr % nDims == 3)
then
1197 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r3d_ptr_a)
1225 subroutine da_axpy(pool_a, pool_b, zz, fld_select)
1228 type (mpas_pool_type),
pointer,
intent(inout) :: pool_a
1229 type (mpas_pool_type),
pointer,
intent(in) :: pool_b
1230 real (kind=kind_real),
intent(in) :: zz
1231 character (len=*),
optional,
intent(in) :: fld_select(:)
1235 type (mpas_pool_iterator_type) :: poolitr
1236 real (kind=kind_real),
pointer :: r0d_ptr_a, r0d_ptr_b
1237 real (kind=kind_real),
dimension(:),
pointer :: r1d_ptr_a, r1d_ptr_b
1238 real (kind=kind_real),
dimension(:,:),
pointer :: r2d_ptr_a, r2d_ptr_b
1239 real (kind=kind_real),
dimension(:,:,:),
pointer :: r3d_ptr_a, r3d_ptr_b
1245 call mpas_pool_begin_iteration(pool_b)
1247 do while ( mpas_pool_get_next_member(pool_b, poolitr) )
1249 if (
present(fld_select))
then
1250 if (ufo_vars_getindex(fld_select,trim(poolitr % memberName)) < 0) cycle
1255 if (poolitr % memberType == mpas_pool_field)
then
1258 if (poolitr % dataType == mpas_pool_real)
then
1262 if (poolitr % nDims == 0)
then
1263 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r0d_ptr_a)
1264 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r0d_ptr_b)
1265 r0d_ptr_a = r0d_ptr_a + r0d_ptr_b * zz
1266 else if (poolitr % nDims == 1)
then
1267 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r1d_ptr_a)
1268 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r1d_ptr_b)
1269 r1d_ptr_a = r1d_ptr_a + r1d_ptr_b * zz
1270 else if (poolitr % nDims == 2)
then
1271 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r2d_ptr_a)
1272 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r2d_ptr_b)
1273 r2d_ptr_a = r2d_ptr_a + r2d_ptr_b * zz
1274 else if (poolitr % nDims == 3)
then
1275 call mpas_pool_get_array(pool_a, trim(poolitr % memberName), r3d_ptr_a)
1276 call mpas_pool_get_array(pool_b, trim(poolitr % memberName), r3d_ptr_b)
1277 r3d_ptr_a = r3d_ptr_a + r3d_ptr_b * zz
1302 type (mpas_pool_type),
pointer,
intent(in) :: pool_a
1303 type (dm_info),
pointer,
intent(in) :: dminfo
1304 integer,
intent(in) :: nf
1305 character (len=*),
intent(in) :: fld_select(nf)
1306 real(kind=kind_real),
intent(out) :: pstat(3, nf)
1308 type (mpas_pool_iterator_type) :: poolitr
1309 type (field1dreal),
pointer :: field1d
1310 type (field2dreal),
pointer :: field2d
1311 type (field3dreal),
pointer :: field3d
1312 real(kind=kind_real) :: globalsum, globalmin, globalmax, dimtot, dimtot_global, prodtot
1314 integer :: jj, ndims
1315 integer :: dim1, dim2, dim3
1316 integer,
allocatable :: dimsizes(:)
1324 call mpas_pool_begin_iteration(pool_a)
1326 do while ( mpas_pool_get_next_member(pool_a, poolitr) )
1327 jj = ufo_vars_getindex(fld_select,trim(poolitr % memberName))
1328 if ( jj < 0 .or. jj > nf ) cycle
1332 if (poolitr % memberType == mpas_pool_field)
then
1335 if (poolitr % dataType == mpas_pool_real)
then
1339 ndims = poolitr % nDims
1341 if (ndims == 1)
then
1343 call mpas_pool_get_field(pool_a, trim(poolitr % memberName), field1d)
1344 dimtot = real(dim1,kind_real)
1345 prodtot = sum(field1d % array(1:dim1)**2 )
1346 call mpas_dmpar_sum_real(dminfo, dimtot, dimtot_global)
1347 call mpas_dmpar_sum_real(dminfo, prodtot, globalsum)
1348 call mpas_dmpar_min_real(dminfo, minval(field1d % array(1:dim1)), globalmin)
1349 call mpas_dmpar_max_real(dminfo, maxval(field1d % array(1:dim1)), globalmax)
1350 pstat(1,jj) = globalmin
1351 pstat(2,jj) = globalmax
1352 pstat(3,jj) = sqrt( globalsum / dimtot_global )
1353 else if (ndims == 2)
then
1356 call mpas_pool_get_field(pool_a, trim(poolitr % memberName), field2d)
1357 dimtot = real(dim1*dim2,kind_real)
1358 prodtot = sum(field2d % array(1:dim1,1:dim2)**2 )
1359 call mpas_dmpar_sum_real(dminfo, dimtot, dimtot_global)
1360 call mpas_dmpar_sum_real(dminfo, prodtot, globalsum)
1361 call mpas_dmpar_min_real(dminfo, minval(field2d % array(1:dim1,1:dim2)), globalmin)
1362 call mpas_dmpar_max_real(dminfo, maxval(field2d % array(1:dim1,1:dim2)), globalmax)
1363 pstat(1,jj) = globalmin
1364 pstat(2,jj) = globalmax
1365 pstat(3,jj) = sqrt( globalsum / dimtot_global )
1366 else if (ndims == 3)
then
1370 call mpas_pool_get_field(pool_a, trim(poolitr % memberName), field3d)
1371 dimtot = real(dim1*dim2*dim3,kind_real)
1372 prodtot = sum(field3d % array(1:dim1,1:dim2,1:dim3)**2 )
1373 call mpas_dmpar_sum_real(dminfo, dimtot, dimtot_global)
1374 call mpas_dmpar_sum_real(dminfo, prodtot, globalsum)
1375 call mpas_dmpar_min_real(dminfo, minval(field3d % array(1:dim1,1:dim2,1:dim3)), globalmin)
1376 call mpas_dmpar_max_real(dminfo, maxval(field3d % array(1:dim1,1:dim2,1:dim3)), globalmax)
1377 pstat(1,jj) = globalmin
1378 pstat(2,jj) = globalmax
1379 pstat(3,jj) = sqrt( globalsum / dimtot_global )
1381 deallocate(dimsizes)
1404 type (mpas_pool_type),
pointer,
intent(in) :: pool_a
1405 type (dm_info),
pointer,
intent(in) :: dminfo
1406 real(kind=kind_real),
intent(out) :: fldrms
1407 character (len=*),
optional,
intent(in) :: fld_select(:)
1409 type (mpas_pool_iterator_type) :: poolitr
1410 type (field1dreal),
pointer :: field1d
1411 type (field2dreal),
pointer :: field2d
1412 type (field3dreal),
pointer :: field3d
1413 real(kind=kind_real) :: dimtot, dimtot_global, prodtot, prodtot_global
1416 integer :: dim1, dim2, dim3
1417 integer,
allocatable :: dimsizes(:)
1426 call mpas_pool_begin_iteration(pool_a)
1428 do while ( mpas_pool_get_next_member(pool_a, poolitr) )
1429 if (
present(fld_select))
then
1430 if (ufo_vars_getindex(fld_select,trim(poolitr % memberName)) < 0) cycle
1432 if (poolitr % dataType == mpas_pool_real)
then
1433 if (poolitr % memberType == mpas_pool_field)
then
1434 ndims = poolitr % nDims
1436 if (ndims == 1)
then
1438 call mpas_pool_get_field(pool_a, trim(poolitr % memberName), field1d)
1439 dimtot = dimtot + real(dim1,kind_real)
1440 prodtot = prodtot + sum( field1d % array(1:dim1)**2 )
1441 else if (ndims == 2)
then
1444 call mpas_pool_get_field(pool_a, trim(poolitr % memberName), field2d)
1445 dimtot = dimtot + real(dim1*dim2,kind_real)
1446 prodtot = prodtot + sum( field2d % array(1:dim1,1:dim2)**2 )
1447 else if (ndims == 3)
then
1451 call mpas_pool_get_field(pool_a, trim(poolitr % memberName), field3d)
1452 dimtot = dimtot + real(dim1*dim2*dim3,kind_real)
1453 prodtot = prodtot + sum( field3d % array(1:dim1,1:dim2,1:dim3)**2 )
1455 deallocate(dimsizes)
1460 call mpas_dmpar_sum_real(dminfo, dimtot, dimtot_global)
1461 call mpas_dmpar_sum_real(dminfo, prodtot, prodtot_global)
1462 fldrms = sqrt(prodtot_global / dimtot_global)
1482 type (mpas_pool_type),
pointer,
intent(in) :: pool_a, pool_b
1483 type (dm_info),
pointer,
intent(in) :: dminfo
1484 real(kind=kind_real),
intent(out) :: zprod
1486 type (mpas_pool_iterator_type) :: poolitr
1487 type (field1dreal),
pointer :: field1d_a, field1d_b
1488 type (field2dreal),
pointer :: field2d_a, field2d_b
1489 type (field3dreal),
pointer :: field3d_a, field3d_b
1490 real(kind=kind_real) :: fieldsum_local, zprod_local
1493 integer :: dim1, dim2, dim3
1494 integer,
allocatable :: dimsizes(:)
1500 call mpas_pool_begin_iteration(pool_a)
1504 do while ( mpas_pool_get_next_member(pool_a, poolitr) )
1505 if (poolitr % dataType == mpas_pool_real)
then
1506 if (poolitr % memberType == mpas_pool_field)
then
1507 ndims = poolitr % nDims
1510 if (ndims == 1)
then
1512 call mpas_pool_get_field(pool_a, trim(poolitr % memberName), field1d_a)
1513 call mpas_pool_get_field(pool_b, trim(poolitr % memberName), field1d_b)
1514 fieldsum_local = sum(field1d_a % array(1:dim1) * field1d_b % array(1:dim1))
1515 zprod_local = zprod_local + fieldsum_local
1516 else if (ndims == 2)
then
1519 call mpas_pool_get_field(pool_a, trim(poolitr % memberName), field2d_a)
1520 call mpas_pool_get_field(pool_b, trim(poolitr % memberName), field2d_b)
1521 fieldsum_local = sum(field2d_a % array(1:dim1,1:dim2) &
1522 * field2d_b % array(1:dim1,1:dim2))
1523 zprod_local = zprod_local + fieldsum_local
1524 else if (ndims == 3)
then
1528 call mpas_pool_get_field(pool_a, trim(poolitr % memberName), field3d_a)
1529 call mpas_pool_get_field(pool_b, trim(poolitr % memberName), field3d_b)
1530 fieldsum_local = sum(field3d_a % array(1:dim1,1:dim2,1:dim3) &
1531 * field3d_b % array(1:dim1,1:dim2,1:dim3))
1532 zprod_local = zprod_local + fieldsum_local
1534 deallocate(dimsizes)
1539 call mpas_dmpar_sum_real(dminfo, zprod_local, zprod)
1548 character (len=*),
intent(in) :: instring2
1549 character (len=*),
intent(inout) :: outstring2
1550 integer,
intent(in) :: iconv
1551 integer :: i, curlen
1552 integer :: year, month, day, hour, minute, second
1554 character (len=ShortStrKIND) :: timepart
1555 character (len=ShortStrKIND) :: yearformat
1556 logical :: charexpand
1557 character (len=4) :: yyyy
1558 character (len=2) :: mm, dd, h, m, s
1559 character (len=21) :: outstring, instring
1566 if (iconv.eq.-1)
then
1567 yyyy = instring2(1:4)
1569 dd = instring2(9:10)
1570 h = instring2(12:13)
1571 m = instring2(15:16)
1572 s = instring2(18:19)
1574 yyyy = instring2(1:4)
1576 dd = instring2(9:10)
1577 h = instring2(12:13)
1578 m = instring2(15:16)
1579 s = instring2(18:19)
1582 write(
message,*)
'cvt_oopsmpas_date instring: ',trim(yyyy),trim(mm),trim(dd),trim(h),trim(m),trim(s)
1584 write(
message,*)
'cvt_oopsmpas_date input ',trim(instring2)
1587 write(outstring,*)
''
1588 instring = trim(outstring2)
1591 charexpand = .false.
1592 do i = 1, len_trim(instring)
1593 if (instring(i:i) ==
'$' )
then
1595 else if (instring(i:i) /=
'$')
then
1596 write(
message,*)
'inString: ',trim(instring(i:i)),charexpand
1598 if (charexpand)
then
1599 select case (instring(i:i))
1601 outstring = trim(outstring) // trim(yyyy)
1603 outstring = trim(outstring) // trim(mm)
1605 outstring = trim(outstring) // trim(dd)
1607 outstring = trim(outstring) // trim(h)
1609 outstring = trim(outstring) // trim(m)
1611 outstring = trim(outstring) // trim(s)
1613 call mpas_dmpar_global_abort(
'ERROR: mpas_timekeeping')
1615 curlen = len_trim(outstring)
1616 charexpand = .false.
1617 write(
message,*)
'outString: ',trim(outstring)
1620 outstring(curlen+1:curlen+1) = outstring2(i:i)
1626 outstring2 = trim(outstring)
1627 write(
message,*)
'cvt_oopsmpas_date output ',trim(outstring2)
1639 & nCells, edgeNormalVectors, nEdgesOnCell, edgesOnCell, nVertLevels)
1651 type (domain_type),
pointer,
intent(inout) :: domain
1652 type (field2dreal),
pointer,
intent(in) :: u_field
1653 type (field2dreal),
pointer,
intent(in) :: v_field
1654 type (field2dreal),
pointer,
intent(inout) :: du
1655 real(kind_real),
intent(in) :: loncell(1:ncells), latcell(1:ncells)
1656 real(kind_real),
intent(in) :: edgenormalvectors(:,:)
1657 integer,
intent(in) :: nedgesoncell(:), edgesoncell(:,:)
1658 integer,
intent(in) :: ncells, nvertlevels
1661 integer,
parameter :: r3 = 3
1662 real(kind_real),
dimension(:,:),
allocatable :: east, north
1663 integer :: icell, iedge, jedge, k
1666 allocate(east(r3,ncells))
1667 allocate(north(r3,ncells))
1673 do icell = 1, ncells
1674 east(1,icell) = -sin(loncell(icell))
1675 east(2,icell) = cos(loncell(icell))
1677 call r3_normalize(east(1,icell), east(2,icell), east(3,icell))
1678 north(1,icell) = -cos(loncell(icell))*sin(latcell(icell))
1679 north(2,icell) = -sin(loncell(icell))*sin(latcell(icell))
1680 north(3,icell) = cos(latcell(icell))
1681 call r3_normalize(north(1,icell), north(2,icell), north(3,icell))
1686 do icell = 1, ncells
1687 do jedge = 1, nedgesoncell(icell)
1688 iedge = edgesoncell(jedge, icell)
1689 do k = 1, nvertlevels
1690 du%array(k,iedge) = du%array(k,iedge) +
mpas_jedi_half_kr * u_field%array(k,icell) &
1691 * (edgenormalvectors(1,iedge) * east(1,icell) &
1692 + edgenormalvectors(2,iedge) * east(2,icell) &
1693 + edgenormalvectors(3,iedge) * east(3,icell)) &
1695 * (edgenormalvectors(1,iedge) * north(1,icell) &
1696 + edgenormalvectors(2,iedge) * north(2,icell) &
1697 + edgenormalvectors(3,iedge) * north(3,icell))
1714 real(kind_real),
intent(inout) :: ax, ay, az
1715 real(kind_real) :: mi
subroutine, public da_self_mult(pool_a, zz)
Performs A = A * zz for pool A, zz a real number.
subroutine, public da_dot_product(pool_a, pool_b, dminfo, zprod)
Performs the dot_product given two pools of fields.
subroutine, public r3_normalize(ax, ay, az)
subroutine, public da_posdef(pool_a, fld_select)
Performs A = max(0.,A) for pool A.
subroutine, public da_constant(pool_a, realvalue, fld_select)
Performs A = constant. for pool A.
subroutine mpas_pool_template_field(srcFieldName, srcPool, dstFieldName, dstPool)
Add a field to dstPool that is templated on a srcPool field.
pure logical function match_scalar(scalarName, fieldName)
Test for a form of water vapor or hydrometeor of interest.
subroutine, public da_operator(kind_op, pool_a, pool_b, pool_c, fld_select)
Performs A = A 'kind_op' B for pools A and B.
character(len=1024) message
subroutine, public cvt_oopsmpas_date(inString2, outString2, iconv)
subroutine, public da_template_pool(geom, templatePool, nf, fieldnames)
Subset a pool from fields described in geom.
subroutine, public da_operator_addition(pool_a, pool_b)
Performs A = A + B for pools A and B.
integer function da_common_vars(pool_a, fieldname)
subroutine, public da_fldrms(pool_a, dminfo, fldrms, fld_select)
Performs basic statistics min/max/norm given a pool.
subroutine, public da_copy_all2sub_fields(domain, pool_a)
Performs a copy of allfield to a sub pool A.
subroutine, public uv_cell_to_edges(domain, u_field, v_field, du, lonCell, latCell, nCells, edgeNormalVectors, nEdgesOnCell, edgesOnCell, nVertLevels)
subroutine mpas_pool_demo(block)
Demonstrate basic usage of MPAS pools.
subroutine, public da_copy_sub2all_fields(domain, pool_a)
Performs a copy of a sub pool A to allfields.
subroutine, public da_setval(pool_a, zz)
Performs A = Val_R. for pool A.
pure logical function field_is_scalar(fieldName)
Test for a form of water vapor or hydrometeor of interest.
subroutine, public da_axpy(pool_a, pool_b, zz, fld_select)
Performs A = A + B * zz for pools A and B.
subroutine, public da_gpnorm(pool_a, dminfo, nf, pstat, fld_select)
Performs basic statistics min/max/norm given a pool.
subroutine, public da_random(pool_a, fld_select)
Performs random for pool A.
real(kind=kind_real), parameter mpas_jedi_half_kr
real(kind=kind_real), parameter mpas_jedi_zero_kr
real(kind=kind_real), parameter mpas_jedi_one_kr
integer function, dimension(:), allocatable, public getsolvedimsizes(pool, key, dimPool)
Returns an array with the dimension sizes of a pool field member.
logical function, public pool_has_field(pool, field)
Check for presence of field in pool.
Fortran derived type to hold geometry definition.