source: trunk/LMDZ.MARS/libf/phymars/dyn1d/writerestart1D_mod.F90 @ 3129

Last change on this file since 3129 was 3074, checked in by jbclement, 15 months ago

Mars PCM:
Transformation of 'writerestart1D' into module.
JBC

File size: 1.1 KB
Line 
1MODULE writerestart1D_mod
2
3implicit none
4
5contains
6
7SUBROUTINE writerestart1D(filename,psurf,tsurf,nlayer,nslope,temp,u,v,nq,qnames,qsurf,q)
8
9implicit none
10
11! Arguments
12character(len = *),                intent(in) :: filename
13integer,                           intent(in) :: nlayer, nq, nslope
14real,                              intent(in) :: psurf
15real, dimension(nslope),           intent(in) :: tsurf
16real, dimension(nlayer),           intent(in) :: temp, u, v
17real, dimension(nlayer,nq),        intent(in) :: q
18real, dimension(nq,nslope),        intent(in) :: qsurf
19character(len = *), dimension(nq), intent(in) :: qnames
20
21! Local variables
22integer :: i, j, il
23
24! Write the data needed for a restart in "restart1D.txt"
25open(1,file = filename,status = "replace",action = "write")
26write(1,*) 'ps', psurf
27do i = 1,nq
28    write(1,*) qnames(i), (qsurf(i,j), j = 1,nslope), (q(il,i), il = 1,nlayer)
29enddo
30write(1,*) 'u', (u(il), il = 1,nlayer)
31write(1,*) 'v', (v(il), il = 1,nlayer)
32write(1,*) 'teta', (tsurf(j), j = 1,nslope), (temp(il), il = 1,nlayer)
33close(1)
34
35END SUBROUTINE writerestart1D
36
37END MODULE writerestart1D_mod
Note: See TracBrowser for help on using the repository browser.