Opened 10 years ago

Closed 5 years ago

# Inialization problem of qsfrict array

Reported by: Owned by: dsolyga jpolcher minor ORCHIDEE 2.0 Physical processes orchidee_1_9_6 cleaning, qsat_moisture jpolcher

### Description

In qsfrict_init subroutine (in qsat_moisture module), the array qsfrict is initialized partially :

• Firstly, the elements 100 to 370 by :
```      DO ji=100,max_temp ! Loop over size(qsfrict) : each position of qsfrict matches a temperature

ztemperature = FLOAT(ji)
!-
IF (ztemperature < 273._r_std) THEN
zqsat = zrapp*10.0_r_std**(2.07023_r_std-zcorr*ztemperature &
&             -2484.896/ztemperature+3.56654*LOG10(ztemperature)) ! Equilibrium water vapor - solid
ELSE
zqsat = zrapp*10.0**(23.8319-2948.964/ztemperature &
&              -5.028*LOG10(ztemperature) &
&              -29810.16*EXP(-0.0699382*ztemperature) &
&              +25.21935*EXP(-2999.924/ztemperature)) ! Equilibrium water vapor - liquid
ENDIF !(ztemperature < 273._r_std)
!-
qsfrict (ji) = zqsat

ENDDO ! Loop over size(qsfrict)
```
• Then the elements 1 to 100 by zero :
```qsfrict(1:100) = zero
```

So qsfrict(100) is reset to 0 after is has been calculated.

### Solutions proposed

There are 2 ways to solve this problem :

1. Set the 99 first elements of qsfrict to 0
```qsfrict(1:99) = zero
```

or

1. Replace the loop going from 100 to 370 by a loop going from 101 from 370.
```     Do ij = 101, max_temp
```

### comment:1 Changed 10 years ago by peylin

• Owner changed from dsolyga to jpolcher
• Status changed from new to assigned

### comment:2 Changed 5 years ago by jgipsl

• Resolution set to fixed
• Status changed from assigned to closed

qsfrict(100) corresponds to the water vapor pressure at saturation at 100K and will probably never be used.

Solution 1 has been done but should not make any difference. [4681]

Note: See TracTickets for help on using tickets.