preparStep.edp 5.44 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

int CURYEARSAV=CURYEAR;

if (CURYEAR>2016){
  CURYEAR=CURYEARRAND;
}

infoFile<<"CURYEAR "<<CURYEARSAV<<" use data "<<CURYEAR<<endl;

//update gamma0
if (numDay==0)
  numDay=1;

if (numDay > 59){
    int jafter59=numDay-59;
    LoadVec(ENDDIAPOS0[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh0s"+string(jafter59));
    LoadVec(ENDDIAPOS1[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh1s"+string(jafter59));	
    LoadVec(ENDDIAPOS2[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh2s"+string(jafter59));
    LoadVec(ENDDIAPOS3[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh3s"+string(jafter59));
    LoadVec(ENDDIAPOS4[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh4s"+string(jafter59));
    LoadVec(ENDDIAPOS5[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh5s"+string(jafter59));
    LoadVec(ENDDIAPOS6[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh6s"+string(jafter59));
    LoadVec(ENDDIAPOS7[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh7s"+string(jafter59));
    LoadVec(ENDDIAPOS8[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh8s"+string(jafter59));
    LoadVec(ENDDIAPOS9[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh9s"+string(jafter59));
    LoadVec(ENDDIAPOS10[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh10s"+string(jafter59));
    LoadVec(ENDDIAPOS11[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh11s"+string(jafter59));
    LoadVec(ENDDIAPOS12[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh12s"+string(jafter59));
    LoadVec(ENDDIAPOS13[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh13s"+string(jafter59));
    LoadVec(ENDDIAPOS14[],DATASAFRAN +GDDTHRESHOLD+string(CURYEAR)+"/mesh14s"+string(jafter59));
  }else{
    ENDDIAPOS0=0;
    ENDDIAPOS1=0;
    ENDDIAPOS2=0;
    ENDDIAPOS3=0;
    ENDDIAPOS4=0;
    ENDDIAPOS5=0;
    ENDDIAPOS6=0;
    ENDDIAPOS7=0;
    ENDDIAPOS8=0;
    ENDDIAPOS9=0;
    ENDDIAPOS10=0;
    ENDDIAPOS11=0;
    ENDDIAPOS12=0;
    ENDDIAPOS13=0;
    ENDDIAPOS14=0;
  }
//if (numDay%10==0)
  //plot(ENDDIAPOS0,ENDDIAPOS1,ENDDIAPOS2,ENDDIAPOS3,ENDDIAPOS4,ENDDIAPOS5,ENDDIAPOS6,ENDDIAPOS7,ENDDIAPOS8,ENDDIAPOS9,ENDDIAPOS10,ENDDIAPOS11,ENDDIAPOS12,ENDDIAPOS13,ENDDIAPOS14,cmm="diapose end "+string(numDay),value=true,fill=true,wait=false);
//update GP and GT
  if (numDay<365/2){
    GP0=1;
    GP1=1;
    GP2=1;
    GP3=1;
    GP4=1;
    GP5=1;
    GP6=1;
    GP7=1;
    GP8=1;
    GP9=1;
    GP10=1;
    GP11=1;
    GP12=1;
    GP13=1;
    GP14=1;
  }else{
    LoadVec(GP0[],DATASAFRAN +"GP_BY_DAY/"+"gp0s"+string(numDay));
    LoadVec(GP1[],DATASAFRAN +"GP_BY_DAY/"+"gp1s"+string(numDay));	
    LoadVec(GP2[],DATASAFRAN +"GP_BY_DAY/"+"gp2s"+string(numDay));
    LoadVec(GP3[],DATASAFRAN +"GP_BY_DAY/"+"gp3s"+string(numDay));
    LoadVec(GP4[],DATASAFRAN +"GP_BY_DAY/"+"gp4s"+string(numDay));
    LoadVec(GP5[],DATASAFRAN +"GP_BY_DAY/"+"gp5s"+string(numDay));
    LoadVec(GP6[],DATASAFRAN +"GP_BY_DAY/"+"gp6s"+string(numDay));
    LoadVec(GP7[],DATASAFRAN +"GP_BY_DAY/"+"gp7s"+string(numDay));
    LoadVec(GP8[],DATASAFRAN +"GP_BY_DAY/"+"gp8s"+string(numDay));
    LoadVec(GP9[],DATASAFRAN +"GP_BY_DAY/"+"gp9s"+string(numDay));
    LoadVec(GP10[],DATASAFRAN +"GP_BY_DAY/"+"gp10s"+string(numDay));
    LoadVec(GP11[],DATASAFRAN +"GP_BY_DAY/"+"gp11s"+string(numDay));
    LoadVec(GP12[],DATASAFRAN +"GP_BY_DAY/"+"gp12s"+string(numDay));
    LoadVec(GP13[],DATASAFRAN +"GP_BY_DAY/"+"gp13s"+string(numDay));
    LoadVec(GP14[],DATASAFRAN +"GP_BY_DAY/"+"gp14s"+string(numDay));
  }
  
  LoadVec(GT0[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh0s"+string(numDay));
  LoadVec(GT1[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh1s"+string(numDay));	
  LoadVec(GT2[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh2s"+string(numDay));
  LoadVec(GT3[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh3s"+string(numDay));
  LoadVec(GT4[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh4s"+string(numDay));
  LoadVec(GT5[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh5s"+string(numDay));
  LoadVec(GT6[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh6s"+string(numDay));
  LoadVec(GT7[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh7s"+string(numDay));
  LoadVec(GT8[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh8s"+string(numDay));
  LoadVec(GT9[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh9s"+string(numDay));
  LoadVec(GT10[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh10s"+string(numDay));
  LoadVec(GT11[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh11s"+string(numDay));
  LoadVec(GT12[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh12s"+string(numDay));
  LoadVec(GT13[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh13s"+string(numDay));
  LoadVec(GT14[],DATASAFRAN +"GT_BY_DAY/"+string(CURYEAR)+"/mesh14s"+string(numDay));

  //update R
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
  RR0=GT0*GP0;
  RR1=GT1*GP1;
  RR2=GT2*GP2;
  RR3=GT3*GP3;
  RR4=GT4*GP4;
  RR5=GT5*GP5;
  RR6=GT6*GP6;
  RR7=GT7*GP7;
  RR8=GT8*GP8;
  RR9=GT9*GP9;
  RR10=GT10*GP10;
  RR11=GT11*GP11;
  RR12=GT12*GP12;
  RR13=GT13*GP13;
  RR14=GT14*GP14;
117
118
119
//if (numDay%10==0)
//  plot(RR0,RR1,RR2,RR3,RR4,RR5,RR6,RR7,RR8,RR9,RR10,RR11,RR12,RR13,RR14,cmm="rr "+string(numDay),value=true,fill=true,wait=true);
  //update gammaw1s1
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
  gammaw1s0=GT0*(1-GP0);
  gammaw1s1=GT1*(1-GP1);
  gammaw1s2=GT2*(1-GP2);
  gammaw1s3=GT3*(1-GP3);
  gammaw1s4=GT4*(1-GP4);
  gammaw1s5=GT5*(1-GP5);
  gammaw1s6=GT6*(1-GP6);
  gammaw1s7=GT7*(1-GP7);
  gammaw1s8=GT8*(1-GP8);
  gammaw1s9=GT9*(1-GP9);
  gammaw1s10=GT10*(1-GP10);
  gammaw1s11=GT11*(1-GP11);
  gammaw1s12=GT12*(1-GP12);
  gammaw1s13=GT13*(1-GP13);
  gammaw1s14=GT14*(1-GP14);
135
136
137


CURYEAR=CURYEARSAV;