wrtsss.f 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ! ==================================================================
  2. ! ------------------------------------------------------------------
  3. !
  4. subroutine wrtsss(pfield,mon)
  5. use lsgvar
  6. implicit none
  7. !
  8. ! ------------------------------------------------------------------
  9. !
  10. integer :: mon,kpar,ktape,inum,kkk
  11. real (kind=8) :: anum
  12. real (kind=8) :: pfield(ienjen)
  13. real (kind=8) :: zhead(20),zprel(6)
  14. !
  15. open (69,file="sssforo",form="formatted")
  16. rewind 69
  17. !
  18. anum=10.
  19. kpar=-5
  20. ktape=71
  21. zhead(1)=real(kpar) ! field code of the variable
  22. zhead(2)=-100.
  23. zhead(3)=real(ktape)
  24. zhead(4)=real(ien)
  25. zhead(5)=real(jen)
  26. zhead(6)=1.
  27. zhead(7)=0.3750000000e+01
  28. zhead(8)=0.9375000000e+02
  29. zhead(9)=0.2111030000e+06
  30. zhead(10)=0.8806140000e+06
  31. !
  32. write (69,7000) anum
  33. !
  34. inum=nint(anum)
  35. inum=min0(inum,20)
  36. inum=max0(inum,8)
  37. !
  38. ! Header.
  39. !
  40. do kkk=1,inum
  41. write (69,7000) zhead(kkk)
  42. end do
  43. !
  44. !
  45. !* 2. Write data
  46. ! ----------
  47. !
  48. zprel(1)=real(kpar) ! field code of the variable
  49. zprel(2)=real(mon)
  50. zprel(2)=1.
  51. zprel(3)=0.
  52. zprel(4)=0.
  53. zprel(5)=0.
  54. zprel(6)=0.
  55. write (69,7050) (zprel(kkk),kkk=1,6)
  56. 7050 format (6e12.4)
  57. write (69,7100) (pfield(kkk),kkk=1,ienjen)
  58. 7100 format (4e20.10)
  59. close (69)
  60. 7000 format (e20.10)
  61. end subroutine wrtsss