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

Last change on this file since 3574 was 3074, checked in by jbclement, 16 months ago

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

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