source: trunk/LMDZ.COMMON/libf/evolution/info_run_PEM_mod.F90 @ 3093

Last change on this file since 3093 was 3076, checked in by jbclement, 2 years ago

PEM:
Big cleaning/improvements of the PEM:

  • Conversion of "abort_pem.F" and "soil_settings_PEM.F" into Fortran 90;
  • Transformation of every PEM subroutines into module;
  • Rewriting of many subroutines with modern Fortran syntax;
  • Correction of a bug in "pem.F90" when calling 'recomp_tend_co2_slope'. The arguments were given in disorder and emissivity was missing;
  • Update of "launch_pem.sh" in deftank.

JBC

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