/[lmdze]/trunk/bibio/Writefield/writefield_gen.f
ViewVC logotype

Contents of /trunk/bibio/Writefield/writefield_gen.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 108 - (show annotations)
Tue Sep 16 14:00:41 2014 UTC (9 years, 7 months ago) by guez
File size: 1036 byte(s)
Imported writefield from LMDZ. Close at the end of gcm the files which
were created by writefiled (not done in LMDZ).

Removed procedures for the output of Grads files. Removed calls to
dump2d. In guide, replaced calls to wrgrads by calls to writefield.

In vlspltqs, removed redundant programming of saturation
pressure. Call foeew from module FCTTRE instead.

Bug fix in interpre: size of w exceeding size of correponding actual
argument wg in advtrac.

In leapfrog, call guide until the end of the run, instead of six hours
before the end.

Bug fix in readsulfate_preind: type of arguments.

1 module writefield_gen_m
2
3 implicit none
4
5 contains
6
7 subroutine WriteField_gen(name, Field, dimx, dimy, dimz)
8
9 use CreateNewField_m, only: CreateNewField
10 use GetFieldIndex_m, only: GetFieldIndex
11 USE netcdf95, ONLY: nf95_put_var
12 USE write_field, ONLY: fieldid, fieldindex, fieldvarid
13
14 character(len=*) :: name
15 integer :: dimx, dimy, dimz
16 real, dimension(dimx, dimy, dimz) :: Field
17 integer :: index
18 integer :: start(4)
19 integer :: count(4)
20
21 !------------------------------------------------------------
22
23 Index=GetFieldIndex(name)
24 if (Index==-1) then
25 call CreateNewField(name, dimx, dimy, dimz)
26 Index=GetFieldIndex(name)
27 else
28 FieldIndex(Index)=FieldIndex(Index)+1
29 endif
30
31 start(1)=1
32 start(2)=1
33 start(3)=1
34 start(4)=FieldIndex(Index)
35
36 count(1)=dimx
37 count(2)=dimy
38 count(3)=dimz
39 count(4)=1
40
41 call NF95_PUT_VAR(FieldId(Index), FieldVarId(Index), Field, start, count)
42
43 end subroutine WriteField_gen
44
45 end module writefield_gen_m

  ViewVC Help
Powered by ViewVC 1.1.21