source: trunk/LMDZ.COMMON/libf/evolution/info_run_PEM.F90 @ 3069

Last change on this file since 3069 was 3039, checked in by jbclement, 2 years ago

Mars PEM:
Big cleaning of main program pem.F90 (indentation, declarations, comments, simplification of conditions/loops, etc).
JBC

File size: 1.1 KB
Line 
1SUBROUTINE info_run_PEM(year_iter,criterion_stop,i_myear,n_myear)
2
3!=======================================================================
4!
5! Purpose: Write in a file called info_run_PEM.txt the reason why the PEM did stop and the number of extrapolation year done
6!          Update the file tmp_PEMyears.txt to count the number of simulated Martian years
7!
8! Author: RV, JBC
9!=======================================================================
10
11  use time_evol_mod, only: convert_years
12
13  IMPLICIT NONE
14
15  integer, intent(in) :: year_iter, criterion_stop ! # of year and reason to stop
16  integer, intent(in) :: i_myear, n_myear ! Current simulated Martian year and maximum number of Martian years to be simulated
17
18  logical :: ok
19
20inquire(file = 'info_run_PEM.txt', exist = ok)
21if (ok) then
22    open(12,file = 'info_run_PEM.txt',status = "old",position = "append",action = "write")
23else
24    open(12,file = 'info_run_PEM.txt',status = "new",action = "write")
25endif
26write(12,*) year_iter, i_myear, criterion_stop
27close(12)
28
29open(100,file = 'tmp_PEMyears.txt',status = 'replace')
30write(100,*) i_myear, n_myear, convert_years
31close(100)
32
33END SUBROUTINE info_run_PEM
Note: See TracBrowser for help on using the repository browser.