519 real(DP),
dimension(:),
contiguous,
intent(in) :: p_mem
520 character(len=*),
intent(in) :: varname
521 character(len=*),
intent(in) :: mempath
522 character(len=*),
intent(in) :: shapestr
523 integer(I4B),
intent(in) :: iout
524 integer(I4B),
dimension(:),
pointer,
contiguous :: model_shape
525 real(DP),
dimension(:, :, :),
pointer,
contiguous :: dbl3d
526 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
527 integer(I4B),
dimension(3) :: dis3d_shape
528 integer(I4B),
dimension(2) :: dis2d_shape
529 integer(I4B),
pointer :: distype
530 character(LENMEMPATH) :: input_mempath
531 character(LENCOMPONENTNAME) :: comp, subcomp
532 integer(I4B) :: i, j, k, inunit, export_dim
533 logical(LGP) :: is_layered
538 call mem_setptr(distype,
'DISENUM', input_mempath)
539 call mem_setptr(model_shape,
'MODEL_SHAPE', input_mempath)
542 export_dim = distype_export_dim(distype, shapestr, is_layered)
545 select case (export_dim)
548 dis3d_shape(1) = model_shape(3)
549 dis3d_shape(2) = model_shape(2)
551 dis3d_shape(3) = model_shape(1)
552 allocate (dbl3d(dis3d_shape(1), dis3d_shape(2), dis3d_shape(3)))
553 dbl3d = reshape(p_mem, dis3d_shape)
554 do k = 1, dis3d_shape(3)
556 inunit = create_export_file(varname, mempath, k, iout)
557 do i = 1, model_shape(2)
558 write (inunit,
'(*(G0.10, " "))') (dbl3d(j, i, k), j=1, &
567 dis2d_shape(1) = model_shape(2)
568 dis2d_shape(2) = model_shape(1)
570 allocate (dbl2d(dis2d_shape(1), dis2d_shape(2)))
571 dbl2d = reshape(p_mem, dis2d_shape)
574 do i = 1, dis2d_shape(2)
575 inunit = create_export_file(varname, mempath, i, iout)
576 write (inunit,
'(*(G0.10, " "))') (dbl2d(j, i), j=1, dis2d_shape(1))
581 inunit = create_export_file(varname, mempath, 0, iout)
582 do i = 1, dis2d_shape(2)
583 write (inunit,
'(*(G0.10, " "))') (dbl2d(j, i), j=1, dis2d_shape(1))
591 inunit = create_export_file(varname, mempath, 0, iout)
592 write (inunit,
'(*(G0.10, " "))') p_mem
595 write (errmsg,
'(a,i0)')
'EXPORT unsupported dbl1d export_dim=', &
597 call store_error(errmsg, .true.)
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine split_mem_path(mem_path, component, subcomponent)
Split the memory path into component(s)