4 |
|
|
5 |
contains |
contains |
6 |
|
|
7 |
SUBROUTINE readsulfate(r_day, first, sulfate) |
SUBROUTINE readsulfate(dayvrai, time, first, sulfate) |
8 |
|
|
9 |
! From LMDZ4/libf/phylmd/readsulfate.F, version 1.2 2005/05/19 |
! From LMDZ4/libf/phylmd/readsulfate.F, version 1.2 2005/05/19 |
10 |
! 08:27:15 fairhead |
! 08:27:15 fairhead |
33 |
|
|
34 |
! Input: |
! Input: |
35 |
|
|
36 |
real, intent(in):: r_day ! Day of integration |
integer, intent(in):: dayvrai |
37 |
|
! current day number, based at value 1 on January 1st of annee_ref |
38 |
|
|
39 |
|
REAL, intent(in):: time ! heure de la journ\'ee en fraction de jour |
40 |
|
|
41 |
LOGICAL, intent(in):: first ! First timestep |
LOGICAL, intent(in):: first ! First timestep |
42 |
! (and therefore initialization necessary) |
! (and therefore initialization necessary) |
43 |
|
|
49 |
! Local Variables: |
! Local Variables: |
50 |
|
|
51 |
INTEGER i, ig, k, it |
INTEGER i, ig, k, it |
52 |
INTEGER j, iday, ny, iyr, iyr1, iyr2 |
INTEGER j, iday, iyr, iyr1, iyr2 |
|
parameter (ny=jjm+1) |
|
53 |
|
|
54 |
CHARACTER(len=4) cyear |
CHARACTER(len=4) cyear |
55 |
|
|
68 |
|
|
69 |
!-------------------------------------------------------------------- |
!-------------------------------------------------------------------- |
70 |
|
|
71 |
iday = INT(r_day) |
iday = dayvrai |
72 |
|
|
73 |
! Get the year of the run |
! Get the year of the run |
74 |
iyr = iday/360 |
iyr = iday/360 |
77 |
iday = iday-iyr*360 |
iday = iday-iyr*360 |
78 |
|
|
79 |
! 0.02 is about 0.5/24, namly less than half an hour |
! 0.02 is about 0.5/24, namly less than half an hour |
80 |
lnewday = (r_day-FLOAT(iday).LT.0.02) |
lnewday = time < 0.02 |
81 |
|
|
82 |
! All has to be done only, if a new day begins! |
! All has to be done only, if a new day begins! |
83 |
|
|