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

Last change on this file since 3040 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
RevLine 
[3039]1SUBROUTINE info_run_PEM(year_iter,criterion_stop,i_myear,n_myear)
[2886]2
[2980]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
[3039]6!          Update the file tmp_PEMyears.txt to count the number of simulated Martian years
[2980]7!
[3039]8! Author: RV, JBC
[2980]9!=======================================================================
10
[3039]11  use time_evol_mod, only: convert_years
[2886]12
[3039]13  IMPLICIT NONE
[2886]14
[3039]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
[2886]17
[3039]18  logical :: ok
[2886]19
[3039]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
[2886]33END SUBROUTINE info_run_PEM
Note: See TracBrowser for help on using the repository browser.