00001
00002
00003
00004
00005
00006
00007
00008
00009
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
00024
00025
00026 use psmile
00027 #ifdef __PSMILE_WITH_IO
00028
00029 implicit none
00030 include 'prism.inc'
00031
00032
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
00048
00049
00050 integer, intent(out) :: ierror
00051
00052
00053
00054 integer::ierrp(2)
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
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