50 real(dp) :: t(0:360,-90:90)
52 real(dp) :: tam(-90:90)
54 real(dp) :: tmax(-90:90)
62 subroutine setinstemp ( o, ecc, ave, obl, sma, sa, sac, op, ct )
67 real(dp),
optional :: ecc
68 real(dp),
optional :: ave
69 real(dp),
optional :: obl
70 real(dp),
optional :: sma
71 real(dp),
optional :: sa
72 real(dp),
optional :: sac
73 real(dp),
optional :: op
74 real(dp),
optional :: ct
76 logical :: co2layer(-90:90)
77 integer(i4b) :: iphi, ipsi, year
78 integer(i4b),
parameter :: yearmax = 2
79 real(dp),
parameter :: pi = 3.141592653589793_dp, pi_180 = pi/180.0_dp
80 real(dp),
parameter :: SB = 5.67051e-8_dp
82 real(dp) :: tptd, seps, sdelta, cdelta
83 real(dp) :: albact, albact_co2, delta, du, e, eps, f, &
84 lambda, phi, psi, psi0, r
85 real(dp) :: tau0, teq, ufac, usum, w, wg
86 real(dp),
dimension(-90:90) :: co2, t
90 real(dp) :: alb, alb_co2
96 if (
present(ecc) )
then 101 if (
present(ave) )
then 106 if (
present(obl) )
then 111 if (
present(sma) )
then 116 if (
present(sa) )
then 121 if (
present(sac) )
then 126 if (
present(op) )
then 129 u = 686.95_dp*24._dp*3600._dp
131 if (
present(ct) )
then 147 r = ( a**2 - f**2 ) / ( a + f*cos(psi) )
149 if (ipsi<360) usum = usum + du
160 r = ( a**2 - f**2 ) / ( a + f*cos(psi) )
162 if (ipsi<360) usum = usum + du
164 delta = asin( seps * sin(lambda) )
169 tptd = -tan(phi) * tan(delta)
170 if ( tptd .le. -1.0_dp )
then 172 else if ( tptd .ge. 1.0_dp )
then 177 w = ( tau0*sin(phi)*sdelta + &
178 cos(phi)*cdelta*sin(tau0) ) &
179 * j0 * a**2 / ( pi * r**2 )
181 if ( t(iphi) < -999._dp )
then 188 teq = ( ( wg + (1._dp-albact) * w ) / sb )**.25_dp
189 if ( teq < tco2 )
then 190 co2layer(iphi) = .true.
191 co2(iphi) = co2(iphi) + sb * tco2**4 * du &
192 - (1._dp-albact_co2) * w * du
195 if ( co2layer(iphi) )
then 196 co2(iphi) = co2(iphi) + sb * tco2**4 * du &
197 - (1._dp-albact_co2) * w * du
198 if ( co2(iphi) .le. 0.0_dp )
then 200 co2layer(iphi) = .false.
207 if ( year .eq. yearmax ) o%t(ipsi,iphi) = t(iphi)
209 if ( year .eq. yearmax .and. ipsi .eq. 0 )
then 215 o%tmax(iphi) = max( o%tmax(iphi), t(iphi) )
219 o%tam = o%tam / 360._dp
221 o%t(:,-90) = o%t(:,-89) + ( o%t(:,-89) - o%t(:,-88) ) / 2._dp
222 o%t(:, 90) = o%t(:, 89) + ( o%t(:, 89) - o%t(:, 88) ) / 2._dp
223 o%tam(-90) = o%tam(-89) + ( o%tam(-89) - o%tam(-88) ) / 2._dp
224 o%tam( 90) = o%tam( 89) + ( o%tam( 89) - o%tam( 88) ) / 2._dp
225 o%tmax(-90) = o%tmax(-89) + ( o%tmax(-89) - o%tmax(-88) ) / 2._dp
226 o%tmax( 90) = o%tmax( 89) + ( o%tmax( 89) - o%tmax( 88) ) / 2._dp
233 function instam ( o, phi )
240 integer(i4b) :: iphi1, iphi2
242 iphi1 = nint( phi - 0.5_dp )
243 if ( iphi1 < -90 )
then 245 else if ( iphi1 > 89 )
then 249 instam = o%tam(iphi1) + ( o%tam(iphi2) - o%tam(iphi1) ) &
264 integer(i4b) :: iphi1, iphi2
266 iphi1 = nint( phi - 0.5_dp )
267 if ( iphi1 < -90 )
then 269 else if ( iphi1 > 89 )
then 273 instmax = o%tmax(iphi1) + ( o%tmax(iphi2) - o%tmax(iphi1) ) &
281 function inst ( o, psi, phi )
288 integer(i4b) :: ipsi1, ipsi2
290 ipsi1 = nint( psi - 0.5_dp )
291 if ( ipsi1 < 0 )
then 293 else if ( ipsi1 > 359 )
then 297 inst =
inst1(o,ipsi1,phi) + (
inst1(o,ipsi2,phi) -
inst1(o,ipsi1,phi) ) &
305 function inst1 ( o, ipsi, phi )
313 integer(i4b) :: iphi1, iphi2
315 iphi1 = nint( phi - 0.5_dp )
316 if ( iphi1 < -90 )
then 318 else if ( iphi1 > 89 )
then 322 inst1 = o%t(ipsi,iphi1) + ( o%t(ipsi,iphi2) - o%t(ipsi,iphi1) ) &
real(dp) function inst1(o, ipsi, phi)
Temperature at orbit position ipsi (integer) and latitude phi.
Martian surface temperatures.
Declarations of kind types for SICOPOLIS.
real(dp) function inst(o, psi, phi)
Temperature at orbit position psi and latitude phi.
real(dp) function instmax(o, phi)
Annual maximum temperature at latitude phi.
real(dp) function instam(o, phi)
Annual mean temperature at latitude phi.
Computation of the daily mean surface temperature of Mars based on obliquity, eccentricity and the an...
subroutine setinstemp(o, ecc, ave, obl, sma, sa, sac, op, ct)
Main subroutine of module mars_instemp_m.