/[lmdze]/trunk/bibio/writefield.f
ViewVC logotype

Diff of /trunk/bibio/writefield.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 114 by guez, Thu Sep 18 19:56:46 2014 UTC revision 115 by guez, Fri Sep 19 17:36:20 2014 UTC
# Line 2  module WriteField_m Line 2  module WriteField_m
2    
3    use CreateNewField_m, only: CreateNewField, ncid, nbfield, MaxWriteField    use CreateNewField_m, only: CreateNewField, ncid, nbfield, MaxWriteField
4    use GetFieldIndex_m, only: GetFieldIndex    use GetFieldIndex_m, only: GetFieldIndex
5    USE netcdf95, ONLY: nf95_put_var    USE netcdf95, ONLY: nf95_put_var, nf95_sync
6    
7    implicit none    implicit none
8    
# Line 39  contains Line 39  contains
39    
40      call NF95_PUT_VAR(Ncid(Index), Varid = 1, values = Field, &      call NF95_PUT_VAR(Ncid(Index), Varid = 1, values = Field, &
41           start = (/1, Record(Index)/))           start = (/1, Record(Index)/))
42        call nf95_sync(Ncid(Index))
43    
44    end subroutine WriteField1d    end subroutine WriteField1d
45    
# Line 46  contains Line 47  contains
47    
48    subroutine WriteField2d(name,Field)    subroutine WriteField2d(name,Field)
49    
     use netcdf, only: nf90_sync  
   
50      character(len=*), intent(in):: name      character(len=*), intent(in):: name
51      real, intent(in):: Field(:, :)      real, intent(in):: Field(:, :)
52    
53      ! Local:      ! Local:
54      integer index, status      integer index
55    
56      !-------------------------------------------      !-------------------------------------------
57    
# Line 68  contains Line 67  contains
67    
68      call NF95_PUT_VAR(Ncid(Index), Varid = 1, values = Field, &      call NF95_PUT_VAR(Ncid(Index), Varid = 1, values = Field, &
69           start = (/1, 1, Record(Index)/))           start = (/1, 1, Record(Index)/))
70      status = nf90_sync(Ncid(Index))      call nf95_sync(Ncid(Index))
71    
72    end subroutine WriteField2d    end subroutine WriteField2d
73    
# Line 96  contains Line 95  contains
95    
96      call NF95_PUT_VAR(Ncid(Index), Varid = 1, values = Field, &      call NF95_PUT_VAR(Ncid(Index), Varid = 1, values = Field, &
97           start = (/1, 1, 1, Record(Index)/))           start = (/1, 1, 1, Record(Index)/))
98        call nf95_sync(Ncid(Index))
99    
100    end subroutine WriteField3d    end subroutine WriteField3d
101    

Legend:
Removed from v.114  
changed lines
  Added in v.115

  ViewVC Help
Powered by ViewVC 1.1.21