psmile_write_3d_dble.F90

Go to the documentation of this file.
00001 !-----------------------------------------------------------------------
00002 ! Copyright 2006-2010, SGI Germany, Munich, Germany.
00003 ! All rights reserved. Use is subject to OASIS4 license terms.
00004 !-----------------------------------------------------------------------
00005 !BOP
00006 !
00007 ! !ROUTINE:   psmile_write_3d_dble
00008 !
00009 ! !INTERFACE:
00010 
00011       subroutine psmile_write_3d_dble(unit                &
00012                                      ,var                 &
00013                                      ,domain              &
00014                                      ,a                   &
00015                                      ,a_shape             &
00016                                      ,v_shape             &
00017                                      ,time                &
00018                                      ,time_used           &
00019                                      ,id_blockid          &
00020                                      ,block_used          &
00021                                      ,ierror)
00022 !
00023 ! !USES:
00024 !
00025 
00026       use psmile
00027 #ifdef __PSMILE_WITH_IO
00028 
00029       implicit none
00030       include 'prism.inc'
00031 !
00032 ! !INPUT PARAMETERS:
00033 !
00034       integer,intent(in)           :: unit
00035       Type(fieldtype),intent(in)   :: var
00036       Type(domain2D),intent(inout) :: domain
00037       integer,intent(in)           :: a_shape(2,*)
00038       integer,intent(in)           :: v_shape(2,*)
00039       double precision, intent(inout) :: a(a_shape(1,1):a_shape(2,1)  
00040                                        ,a_shape(1,2):a_shape(2,2)  
00041                                        ,a_shape(1,3):a_shape(2,3)) 
00042       double precision, intent(in):: time
00043       logical,intent(in) :: time_used
00044       integer,intent(in) :: id_blockid
00045       logical,intent(in) :: block_used
00046 !
00047 ! !OUTPUT PARAMETERS:
00048 !
00049 
00050       integer, intent(out) :: ierror
00051 !
00052 ! !LOCAL VARIABLES
00053 !
00054       integer::ierrp(2)
00055 !
00056 ! !DESCRIPTION:
00057 !
00058 ! Writes a double precision partitioned 3d array to a file.
00059 ! Subblocks are supported.
00060 !
00061 ! !REVISION HISTORY:
00062 !
00063 !   Date      Programmer   Description
00064 ! ----------  ----------   -----------
00065 !  09.12.03   R. Vogelsang created
00066 !
00067 !EOP
00068 !----------------------------------------------------------------------
00069 
00070       character(len=len_cvs_string),save :: mcvs = 
00071 '$Id: psmile_write_3d_dble.F90 2325 2010-04-21 15:00:07Z valcke $'
00072       
00073       ierror=0
00074 
00075 #ifdef VERBOSE
00076       print*,trim(ch_id),' :   psmile_write_3d_dble: start'
00077       call psmile_flushstd
00078 
00079 #endif
00080 
00081       if(block_used) then
00082       if(id_blockid.le.0) then
00083          ierror = PRISM_Error_Internal
00084          call psmile_error ( ierror, 'id_blockid <= 0! ', &
00085                              ierrp, 0, __FILE__, __LINE__ )
00086       endif
00087       if(time_used) then
00088         call mpp_write( unit,var,domain,a(v_shape(1,1):v_shape(2,1) &
00089                                          ,v_shape(1,2):v_shape(2,2) &
00090                                          ,v_shape(1,3):v_shape(2,3)) &
00091                                        ,tstamp=time,blockid=id_blockid)
00092       else
00093         call mpp_write( unit,var,domain,a(v_shape(1,1):v_shape(2,1) &
00094                                          ,v_shape(1,2):v_shape(2,2) &
00095                                          ,v_shape(1,3):v_shape(2,3))&
00096                                          ,blockid=id_blockid)
00097       endif
00098       else
00099       if(time_used) then
00100         call mpp_write( unit,var,domain,a(v_shape(1,1):v_shape(2,1) &
00101                                          ,v_shape(1,2):v_shape(2,2) &
00102                                          ,v_shape(1,3):v_shape(2,3)) &
00103                                        ,tstamp=time)
00104       else
00105         call mpp_write( unit,var,domain,a(v_shape(1,1):v_shape(2,1) &
00106                                          ,v_shape(1,2):v_shape(2,2) &
00107                                          ,v_shape(1,3):v_shape(2,3)))
00108       endif
00109       endif
00110 #ifdef __PSMILE_IO_SYNC
00111       call mpp_flush(unit)
00112 #endif
00113 
00114 #ifdef VERBOSE
00115       print*,trim(ch_id),' :   psmile_write_3d_dble: end'
00116       call psmile_flushstd
00117 
00118 #endif
00119 
00120 #endif
00121       end subroutine psmile_write_3d_dble

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1