Commit eca8458e authored by Miguel Tremblay's avatar Miguel Tremblay
Browse files

Remove the VENMIN function who had not effect on the minimum wind.

parent bcccec38
......@@ -228,7 +228,6 @@ class Metro_model(Metro_module):
lIR = wf_interpolated_data.get_matrix_col('IR').tolist()
npFA = wf_interpolated_data.get_matrix_col('FA')
lFA = npFA.tolist()
lFT = wf_interpolated_data.get_matrix_col('Time').tolist()
lPI = wf_interpolated_data.get_matrix_col('PI').tolist()
lSC = wf_interpolated_data.get_matrix_col('SC').tolist()
......@@ -306,7 +305,7 @@ class Metro_model(Metro_module):
macadam.Do_Metro(bFlat,\
fLat, fLon, \
lLayerThick, nNbrOfLayer, lLayerType, \
lAT, lQP, lWS, lAP, lSF, lIR, lFT, lFA, lPI, lSC,\
lAT, lQP, lWS, lAP, lSF, lIR, lFA, lPI, lSC,\
lAT_obs,lST_obs, lSST_obs, \
lAH, lTime_obs, lSWO, bNoObs,\
fDeltaTMetroObservation, nLenObservation, \
......
......@@ -44,9 +44,9 @@
* Auteur: Louis-Philippe Crevier
* Date: Juillet 1999
***
SUBROUTINE BALANC ( FS , FI , P0 , TA , QA , VA , TYP, FT, PR,
SUBROUTINE BALANC ( FS , FI , P0 , TA , QA , VA , TYP, PR,
* iref, ir40, NTP, NTFM, ITP, FLAT,
* FCOR, WW , ALN, ALR, FP,
* FCOR, ALN, ALR, FP,
* FSCORR , FICORR , ER1, ER2,
* EPSILON, Z0, Z0T, ZU, ZT, ECHEC, dpRT,
* dpRA, dpSN, npRC, dpIR, dpSF, dpFV, dpFC,
......@@ -74,7 +74,6 @@
* QA: Specific humidity (g/kg) at level ZT
* VA: Wind (m/s) at level ZU
* TYP: Probable type of precipitation ( 1 -> rain, 2 -> snow )
* FT: "Forecast time" (GMT)
* PR: Precipitation rate (m/s)
* NTP: Index for the start of coupling
* NTFM: Index for the end of forecast
......@@ -86,7 +85,6 @@
* EPSILON: Road emissivity
* TS0: Target temperature for the end of coupling (C)
* FCOR: Coriolis factor
* WW: Minimum winds for the day and the night (m/s)
* dpRA: Liquid accumulation on the road
* dpSN: Solid (snow/ice) accumulation on the road
* dpRC: Road condition
......@@ -116,9 +114,9 @@
INTEGER iref, ir40, NTP, NTFM
DOUBLE PRECISION FS(DTMAX), FI(DTMAX), P0(DTMAX)
DOUBLE PRECISION TA(DTMAX), QA(DTMAX), VA(DTMAX)
DOUBLE PRECISION TYP(DTMAX), FT(DTMAX), PR(DTMAX)
DOUBLE PRECISION TYP(DTMAX), PR(DTMAX)
DOUBLE PRECISION ITP(n)
DOUBLE PRECISION FCOR, WW(2)
DOUBLE PRECISION FCOR
DOUBLE PRECISION ALN, ALR, FP
DOUBLE PRECISION FSCORR, FICORR
DOUBLE PRECISION EPSILON, ZU, ZT, Z0, Z0T
......@@ -320,8 +318,6 @@
end if
RHO = REAL(P0(i) / ( RGASD * FOTVT ( TSK , QG ) ))
* wind modification
call VENMIN ( WW, FT(i), VA(i) )
* energy used/freed by the melting snow/freezing rain
call VERGLAS ( TYP(i), T(1,now), FP, FZ, PR(i), PR1, PR2, PRG )
* coefficients of heat flux
......
......@@ -42,9 +42,9 @@
* Auteur / Author: Louis-Philippe Crevier
* Date: Aout 1999 / August 1999
***
SUBROUTINE COUPLA ( FS, FI, P0, TA , QA , VA , TYP, FT, PR,
SUBROUTINE COUPLA ( FS, FI, P0, TA , QA , VA , TYP, PR,
* PVC , iref, NTP, NTP2, ITP, TSO, FLAT,
* FCOR, WW , ALN, ALR, FP,
* FCOR, ALN, ALR, FP,
* FSCORR , FICORR , ER1, ER2,
* FAIL, EPSILON, Z0, Z0T, ZU, ZT, ECHEC,
* dpRA, dpSN, npRC, dpRT, dpIR, dpSF, dpFV,
......@@ -72,7 +72,6 @@
* QA: Specific humidity (g/kg) at level ZT
* VA: Wind (m/s) at level ZU
* TYP: Probable type of precipitation ( 1 -> rain, 2 -> snow )
* FT: "Forecast time" (GMT)
* PR: Precipitation rate (m/s)
* PVC: Road condition (0 [dry] ou 1 [wet])
* iref: Number of levels in the grid
......@@ -86,7 +85,6 @@
* EPSILON: Road emissivity
* TS0: Target temperature for the end of coupling (C)
* FCOR: Coriolis factor
* WW: Minimum winds for the day and the night (m/s)
* dpRA: Liquid accumulation on the road
* dpSN: Solid (snow/ice) accumulation on the road
* dpRC: Road condition
......@@ -110,9 +108,9 @@
INTEGER iref, NTP, NTP2
DOUBLE PRECISION FS(DTMAX), FI(DTMAX), TA(DTMAX)
DOUBLE PRECISION QA(DTMAX), PR(DTMAX)
DOUBLE PRECISION VA(DTMAX), P0(DTMAX), FT(DTMAX)
DOUBLE PRECISION VA(DTMAX), P0(DTMAX)
DOUBLE PRECISION TYP(DTMAX), PVC(DTMAX)
DOUBLE PRECISION FCOR, WW(2)
DOUBLE PRECISION FCOR
DOUBLE PRECISION ALN, ALR, TSO, FP
DOUBLE PRECISION EPSILON, ZU, ZT, Z0, Z0T
DOUBLE PRECISION dpSN(DTMAX), dpRA(DTMAX)
......@@ -334,8 +332,6 @@
return
end if
RHO = REAL(P0(i) / ( RGASD * FOTVT ( TSK , QG ) ))
* Wind modification
call VENMIN ( WW, FT(i), VA(i) )
* Energy used/free by the melting snow/freezing rain
call VERGLAS ( TYP(i), T(1,now), FP, FZ, PR(i),
* PR1, PR2, PRG, FAIL )
......
......@@ -130,60 +130,6 @@
end
************************************************************************
***
* Subroutine VENMIN: Impose the minimum winds specified by the WW
* variable. WW(1) is minimum wind for the day
* WW(2) is minimum wind for the night.
* FT is Forecast Time
* VA is wind speed (Vitesse Air)
* Default is currently 0.
*
* Auteur / Author: Louis-Philippe Crevier
* Date: Decembre 1999 / December 1999
***
SUBROUTINE VENMIN ( WW, FT, VA )
IMPLICIT NONE
*** ***
* DEFINITIONS *
*** ***
***
* Input
* -------
* WW : Minimum winds for the day and the night (m/s)
* FT : Forecast time
* VA : Wind speed (m/s)
***
DOUBLE PRECISION WW(2), FT
***
* Input/Output
* ---------------
***
DOUBLE PRECISION VA
***
*
* Procedure
* =========
* Specification of a minimum wind based on the time of the day
* WARNING: UTC time. Based on East timezone
* -----------------------------------------------------
if ( FT .gt. 12.5 .and. FT .lt. 25.5 .or.
* FT .gt. 36.5 .and. FT .lt. 50.0 ) then
VA = max( WW(1), VA )
else if ( FT .ge. 11.5 .and. FT .le. 12.5 ) then
VA = max( WW(2)+(FT-11.5)*(WW(1)-WW(2)), VA )
else if ( FT .ge. 25.5 .and. FT .le. 26.5 ) then
VA = max( WW(1)+(FT-25.5)*(WW(2)-WW(1)), VA )
else if ( FT .ge. 35.5 .and. FT .le. 36.5 ) then
VA = max( WW(2)+(FT-35.5)*(WW(1)-WW(2)), VA )
else
VA = max( WW(2), VA )
end if
return
end
************************************************************************
***
* Sous-routine TSEVOL: Calcul l'evolution du profil de temperature
......
......@@ -144,7 +144,7 @@ Miguel Tremblay May 2004
***************************************************************************/
void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNbrOfZone, long* npMateriau, double* dpTA, double* dpQP, double* dpFF, double* dpPS, double* dpFS, double* dpFI, double* dpFT, double* dpFA, double* dpTYP, double* dpRC, double* dpTAO, double* dpRTO, double* dpDTO, double* dpAH, double* dpTimeO, long* npSwo, BOOL* bpNoObs, double dDeltaT, long nLenObservation, long nNbrTimeSteps, BOOL bSilent, double dSstDepth)
void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNbrOfZone, long* npMateriau, double* dpTA, double* dpQP, double* dpFF, double* dpPS, double* dpFS, double* dpFI, double* dpFA, double* dpTYP, double* dpRC, double* dpTAO, double* dpRTO, double* dpDTO, double* dpAH, double* dpTimeO, long* npSwo, BOOL* bpNoObs, double dDeltaT, long nLenObservation, long nNbrTimeSteps, BOOL bSilent, double dSstDepth)
{
/* Argument de la ligne de commande. Donne par python */
......@@ -173,7 +173,6 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
long nNtdcl;
double* dpItp;
double dDiff;
double* dpWw;
double dAln = 0.5;
double dAlr = 0.1;
double dEpsilon = 0.92;
......@@ -206,7 +205,6 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
/* double */
dpItp = (double*)malloc((nNGRILLEMAX)*sizeof(double));
dpWw = (double*)calloc((2),sizeof(double));
dpCnt = (double*)calloc((2*nNGRILLEMAX),sizeof(double));
dpCapacity = (double*)calloc((2*nNGRILLEMAX),sizeof(double));
dpConductivity = (double*)calloc((2*nNGRILLEMAX),sizeof(double));
......@@ -274,9 +272,9 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
&dDiff, &dMLon, npSwo, stTemperatureDepth.pdArray);
nNtp = - nDeltaTIndice + nNtdcl;
nNtp2 = nLenObservation - nDeltaTIndice;
f77name(coupla)(dpFS, dpFI, dpPS, dpTA, dpAH, dpFF, dpTYP, dpFT, dpQP, dpRC, \
f77name(coupla)(dpFS, dpFI, dpPS, dpTA, dpAH, dpFF, dpTYP, dpQP, dpRC, \
&stTemperatureDepth.nSize, &nNtp, &nNtp2, dpItp, \
&(dpRTO[nLenObservation]), &bFlat, &dFCorr, dpWw, \
&(dpRTO[nLenObservation]), &bFlat, &dFCorr, \
&dAln, &dAlr, &dFp, &dFsCorr, &dFiCorr, &dEr1, &dEr2, \
&bFail, &dEpsilon, &dZ0, &dZ0t, &dZu, &dZt, stEc.plArray, \
stRA.pdArray, stSN.pdArray, stRC.plArray, stRT.pdArray,\
......@@ -313,9 +311,9 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
&nIR40, &bFlat, npSwo, dpCapacity, dpConductivity);
nNtp = 0 + nNtdcl;
nNtp2 = nLenObservation - nDeltaTIndice;
f77name(coupla)(dpFS, dpFI, dpPS, dpTA, dpAH, dpFF, dpTYP, dpFT, dpQP, \
f77name(coupla)(dpFS, dpFI, dpPS, dpTA, dpAH, dpFF, dpTYP, dpQP, \
dpRC, &stTemperatureDepth.nSize, &nNtp, &nNtp2, dpItp,\
&(dpRTO[nLenObservation]), &bFlat, &dFCorr, dpWw, \
&(dpRTO[nLenObservation]), &bFlat, &dFCorr, \
&dAln, &dAlr, &dFp, &dFsCorr, &dFiCorr, &dEr1, &dEr2,\
&bFail, &dEpsilon, &dZ0, &dZ0t, &dZu, &dZt, stEc.plArray,\
stRA.pdArray, stSN.pdArray, stRC.plArray, stRT.pdArray,\
......@@ -338,10 +336,10 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
}/* End else observation complete */
/************ roadcast **************************************************/
f77name(balanc)(dpFS, dpFI, dpPS, dpTA, dpAH, dpFF, dpTYP, dpFT, dpQP,\
f77name(balanc)(dpFS, dpFI, dpPS, dpTA, dpAH, dpFF, dpTYP, dpQP,\
&stTemperatureDepth.nSize, \
&nIR40, &nNtp2, &nNbrTimeSteps, dpItp, &bFlat, &dFCorr,\
dpWw, &dAln, &dAlr, &dFp, &dFsCorr, &dFiCorr, &dEr1,\
&dAln, &dAlr, &dFp, &dFsCorr, &dFiCorr, &dEr1,\
&dEr2, &dEpsilon, &dZ0, &dZ0t, &dZu, &dZt, stEc.plArray,\
stRT.pdArray, stRA.pdArray ,stSN.pdArray, stRC.plArray,\
stIR.pdArray, stSF.pdArray, stFV.pdArray, stFC.pdArray,\
......@@ -363,8 +361,6 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
/* double */
free(dpItp);
dpItp = NULL;
free(dpWw);
dpWw = NULL;
free(dpCnt);
dpCnt = NULL;
free(dpCapacity);
......
......@@ -36,7 +36,7 @@
#define dOMEGA 0.7292e-4
/* Main call from python */
void Do_Metro(BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNbrOfZone, long* npMateriau, double* dpTA, double* dpQP, double* dpFF, double* dpPS, double* dpFsPy, double* dpFI, double* dpFT, double* dpFA, double* dpTYP, double* dpRc, double* dpTAO, double* dpRTO, double* dpDTO, double* dpAH, double* dpTimeO, long* npSWO, BOOL* bpNoObs, double dDeltaT, long nLenObservation, long nNbrTimeSteps, BOOL bSilent, double dSstDepth);
void Do_Metro(BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNbrOfZone, long* npMateriau, double* dpTA, double* dpQP, double* dpFF, double* dpPS, double* dpFsPy, double* dpFI, double* dpFA, double* dpTYP, double* dpRc, double* dpTAO, double* dpRTO, double* dpDTO, double* dpAH, double* dpTimeO, long* npSWO, BOOL* bpNoObs, double dDeltaT, long nLenObservation, long nNbrTimeSteps, BOOL bSilent, double dSstDepth);
void init_structure(long nTimeStepMax, long nGrilleLevelMax);
......@@ -54,9 +54,9 @@ extern void initial_(double* dpItp , double* dpRTO, double* dpDTO, double* dpTAO
long* nLenObservation, long* nSize, long* nIR40, \
BOOL* bFlat, long* npSwo, double* dpCapacity, double* dpConductivity);
extern void coupla_(double* dpFS, double* dpFI, double* dpPS, double* dpTA, double* dpAH, \
double* dpFF, double* dpTYP, double* dpFT, double* dpQP, double* dpRC, \
double* dpFF, double* dpTYP, double* dpQP, double* dpRC, \
long* nSize, long* nNtp, long* nNtp2, double* dpItp, double* dpRTO, \
BOOL* bFlat, double* dFCorr, double* dpWw, double* dAln, double* dAlr, \
BOOL* bFlat, double* dFCorr, double* dAln, double* dAlr, \
double* dFp, double* dFsCorr, double* dFiCorr, double* dEr1, double* dEr2, \
BOOL* bFail, double* dEpsilon, double* dZ0, double* dZ0t, double* dZu, \
double* dZt, long* stEcplArray, double* stRApdArray, double* stSNpdArray, \
......@@ -66,9 +66,9 @@ extern void coupla_(double* dpFS, double* dpFI, double* dpPS, double* dpTA, doub
extern void balanc_(double* dpFS, double* dpFI, double* dpPS, double* dpTA, double* dpAH, \
double* dpFF, double* dpTYP, double* dpFT, double * dpQP, \
double* dpFF, double* dpTYP, double * dpQP, \
long* nSize, long* nIR40, long* nNtp2, long* nNbrTimeSteps, double* dpItp,\
BOOL* bFlat, double* dFCorr, double* dpWw, double* dAln, double* dAlr, \
BOOL* bFlat, double* dFCorr, double* dAln, double* dAlr, \
double* dFp, double* dFsCorr, double* dFiCorr, double* dEr1, \
double* dEr2, double* dEpsilon, double* dZ0, double* dZ0t, double* dZu, \
double* dZt, long* stEcplArray, double* stRTpdArray, double* stRApdArray, \
......
......@@ -390,7 +390,7 @@ int print_args(char **argv) {
extern void Do_Metro(long, double, double, double*, long, long*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, long*, long*, double, long, long, long, double);
extern void Do_Metro(long, double, double, double*, long, long*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, long*, long*, double, long, long, long, double);
extern struct doubleStruct get_ra(void);
extern struct doubleStruct get_sn(void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment