source: trunk/LMDZ.MARS/libf/phymars/dyn1d/writerestart1D.F90 @ 3051

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

Mars PCM 1D:
Addition of the file "start1D.txt" which mimics a "start.nc" file to be able to run chained simulations in 1D. Like this, key variables and profiles can be got from one run to the next. As a consequence, the subroutine "write_profile.F90" is replaced by "writerestart1D.F90".
JBC

File size: 883 bytes
RevLine 
[3051]1SUBROUTINE writerestart1D(psurf,tsurf,nlayer,temp,u,v,nq,qnames,qsurf,q)
[2948]2
[3045]3implicit none
[2948]4
[3051]5! Arguments
6integer, intent(in)                           :: nlayer, nq
7real, intent(in)                              :: psurf, tsurf
8real, dimension(nlayer), intent(in)           :: temp, u, v
9real, dimension(nlayer,nq), intent(in)        :: q
10real, dimension(nq), intent(in)               :: qsurf
11character(len = *), dimension(nq), intent(in) :: qnames
[2948]12
[3051]13! Local variables
14integer :: il, iq
[2948]15
[3051]16! Write the data needed for a restart in "restart1D.txt"
17open(1,file = 'restart1D.txt',status = "replace",action = "write")
18do iq = 1,nq
19    write(1,*) qnames(iq), qsurf(iq), (q(il,iq), il = 1,nlayer)
[3045]20enddo
[3051]21write(1,*) 'ps', psurf
22write(1,*) 'u', (u(il), il = 1,nlayer)
23write(1,*) 'v', (v(il), il = 1,nlayer)
24write(1,*) 'teta', tsurf, (temp(il), il = 1,nlayer)
[3045]25close(1)
[2948]26
[3051]27END SUBROUTINE writerestart1D
Note: See TracBrowser for help on using the repository browser.