source: trunk/src/sbcgyre_emp1.h @ 186

Last change on this file since 186 was 64, checked in by jbrlod, 13 years ago

make kt the effective time step

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1
2/***************************************************************************
3                 module classe sbcgyre_emp1.h  -  description
4***************************************************************************/
5// Mohamed Berrada
6// locean-ipsl.upmc, Paris, Mars 18, 2009
7// (jul) Evaporation minus Precipitation
8//===========================================================================
9//                          methode forward
10forward ()
11{ /*
12    norm(emp1Y-emp1F)=9.634516907597773e-20
13    norm(emp1Y-emp1F)/norm(empF)=1.944745312977350e-16
14*/
15  if(Yt==TU)
16    YS1=0.;
17  else{
18    //      ! current day (in hours) since january the 1st of the current year
19    /*    double  ztime = double(Yt-TU) * rdt / (rmmss * rhhmm)  //       !  total incrementation (in hours)
20      - (nyear  - 1) * rjjhh * raajj;  //           !  minus years since beginning of experiment (in hours)
21    */
22    double  ztime = kt * rdt / (rmmss * rhhmm)  //       !  total incrementation (in hours)
23      - (nyear  - 1) * rjjhh * raajj;  //           !  minus years since beginning of experiment (in hours)
24    double  ztimemax1 = ((5.*30.)+21.)* 24.;//                     ! 21th june     at 24h in hours
25    double  ztimemin1 = ztimemax1 + rjjhh * raajj / 2.;//            ! 21th december        in hours
26    //double  ztimemax2 = ((6.*30.)+21.)* 24.;//                      ! 21th july     at 24h in hours
27    //double  ztimemin2 = ztimemax2 - rjjhh * raajj / 2;//            ! 21th january         in hours
28    // !                                                    ! NB: rjjhh * raajj / 4 = one seasonal cycle in hours
29   
30    //  ! amplitudes
31    double  zemp_S    = 0.7;//       ! intensity of COS in the South
32    double  zemp_N    = 0.8;//       ! intensity of COS in the North
33    double  zemp_sais = 0.1;//
34   
35    //      ! 1/2 period between 21th June and 21th December and between 21th July and 21th January
36    double  zcos_sais1 = cos( (ztime - ztimemax1) / (ztimemin1 - ztimemax1) * rpi );
37    //double  zcos_sais2 = cos( (ztime - ztimemax2) / (ztimemax2 - ztimemin2) * rpi );
38   
39    double  zconv = 3.16e-5;      //! convertion factor: 1 m/yr => 3.16e-5 mm/s
40   
41    if( gphit(Yi,Yj) >= 14.845 && 37.2 >= gphit(Yi,Yj)) //    ! zero at 37.8 deg, max at 24.6 deg
42      YS1 = zemp_S*zconv*sin(rpi/2.*(gphit(Yi,Yj)-37.2)/(24.6-37.2))*(1.-zemp_sais/zemp_S*zcos_sais1);
43    else 
44      YS1 = -zemp_N*zconv*sin(rpi/2.*(gphit(Yi,Yj)-37.2)/(46.8-37.2))*(1.-zemp_sais/zemp_N*zcos_sais1);
45  }
46
47  //
48}
49
50//===========================================================================
51//                         methode  backward
52
53backward ()
54{
55 
56 }
57
58  //===========================================================================
59//********************* FIN DU MODULE sbc_gyre_emp1 **********************
60
Note: See TracBrowser for help on using the repository browser.