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