[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:56:11 UTC 2009
The following commit has been merged in the upstream branch:
commit f2dee414ad4c97cbf5b1a9f813403bd2d1186f61
Author: Stephane Popinet <popinet at users.sf.net>
Date: Tue Feb 3 11:00:35 2009 +1100
Applied patch by Laurent Roblou to FES2004 library
darcs-hash:20090203000035-d4795-9d7d92697761dcde20f13dda8b1c1831e14839dd.gz
diff --git a/modules/fes2004/fes2004_init.c b/modules/fes2004/fes2004_init.c
index c67abcd..8f6960f 100644
--- a/modules/fes2004/fes2004_init.c
+++ b/modules/fes2004/fes2004_init.c
@@ -276,9 +276,9 @@ void init_admittance_coeff(int *sindice,int *aindice,int *nb,int GROUPE)
sindice[1]=6;
sindice[2]=8;
aindice[0]=31;
- aindice[0]=32;
- aindice[0]=33;
- aindice[0]=34;
+ aindice[1]=32;// LR, modif: 2008/12/18
+ aindice[2]=33;// LR, modif: 2008/12/18
+ aindice[3]=34;// LR, modif: 2008/12/18
*nb=4;
break;
}
diff --git a/modules/fes2004/fes2004_kernel.c b/modules/fes2004/fes2004_kernel.c
index d1db9bb..560330a 100644
--- a/modules/fes2004/fes2004_kernel.c
+++ b/modules/fes2004/fes2004_kernel.c
@@ -296,17 +296,20 @@ double predic_and_admit(float *data_amp,float *data_phi,int pt,mega_struct *P,do
/*------------------------------------------------------------------------------*/
/* spline admittance coefficients for semi-diurnal tidal waves */
/*------------------------------------------------------------------------------*/
- compute_admittance(P->Mat,P->Perm,P->sec_r,P->sec_i,P->res_r,P->res_i,P->spectrum, SEMI_DIURNAL,P->sindice,P->aindice);
+ // compute_admittance(P->Mat,P->Perm,P->sec_r,P->sec_i,P->res_r,P->res_i,P->spectrum, SEMI_DIURNAL,P->sindice,P->aindice); LR, change: 2008/12/17
+ compute_admittance(P->Mat,P->Perm,P->sec_r,P->sec_i,P->res_r,P->res_i,P->spectrum, SEMI_DIURNAL,P->sindice,P->aindice,P->time[P->cnt]);
/*------------------------------------------------------------------------------*/
/* spline admittance coefficients for diurnal tidal waves */
/*------------------------------------------------------------------------------*/
- compute_admittance(P->Mat,P->Perm,P->sec_r,P->sec_i,P->res_r,P->res_i,P->spectrum, DIURNAL,P->sindice,P->aindice);
+ // compute_admittance(P->Mat,P->Perm,P->sec_r,P->sec_i,P->res_r,P->res_i,P->spectrum, DIURNAL,P->sindice,P->aindice); LR, change: 2008/12/17
+ compute_admittance(P->Mat,P->Perm,P->sec_r,P->sec_i,P->res_r,P->res_i,P->spectrum, DIURNAL,P->sindice,P->aindice,P->time[P->cnt]);
/*------------------------------------------------------------------------------*/
/* spline admittance coefficients for long period tidal waves */
/*------------------------------------------------------------------------------*/
- compute_admittance(P->Mat,P->Perm,P->sec_r,P->sec_i,P->res_r,P->res_i,P->spectrum, LONG,P->sindice,P->aindice);
+ // compute_admittance(P->Mat,P->Perm,P->sec_r,P->sec_i,P->res_r,P->res_i,P->spectrum, LONG,P->sindice,P->aindice); LR, change: 2008/12/17
+ compute_admittance(P->Mat,P->Perm,P->sec_r,P->sec_i,P->res_r,P->res_i,P->spectrum, LONG,P->sindice,P->aindice,P->time[P->cnt]);
/*------------------------------------------------------------------------------*/
/* compute prediction for Ssa tidal wave */
@@ -448,7 +451,7 @@ int interpolation_w_mask(double lon,double lat,int indice_x,int indice_y,double
/* */
/*####################################################*/
-void compute_admittance(gsl_matrix *Mat,gsl_permutation *Perm,gsl_vector *sec_r,gsl_vector *sec_i,gsl_vector *res_r,gsl_vector *res_i,spectrum_struct *spectrum,int GROUPE,int *sindice ,int *aindice)
+void compute_admittance(gsl_matrix *Mat,gsl_permutation *Perm,gsl_vector *sec_r,gsl_vector *sec_i,gsl_vector *res_r,gsl_vector *res_i,spectrum_struct *spectrum,int GROUPE,int *sindice ,int *aindice, double time)
{
int i,n,gsl_out;
@@ -483,7 +486,7 @@ void compute_admittance(gsl_matrix *Mat,gsl_permutation *Perm,gsl_vector *sec_r,
spectrum[aindice[i]].Z.reel=(gsl_vector_get(res_r,0)*cos(tau*omega*d2r)+gsl_vector_get(res_r,1)*sin(tau*omega*d2r)+gsl_vector_get(res_r,2))*spectrum[aindice[i]].wave.Ap;
spectrum[aindice[i]].Z.imag=(gsl_vector_get(res_i,0)*cos(tau*omega*d2r)+gsl_vector_get(res_i,1)*sin(tau*omega*d2r)+gsl_vector_get(res_i,2))*spectrum[aindice[i]].wave.Ap;
- spectrum[aindice[i]].prediction=Tide_prediction(spectrum[aindice[i]].time,spectrum[aindice[i]].wave,spectrum[aindice[i]].Z,0,spectrum[aindice[i]].CTO);
+ spectrum[aindice[i]].prediction=Tide_prediction(time,spectrum[aindice[i]].wave,spectrum[aindice[i]].Z,0,spectrum[aindice[i]].CTO);
}
}
diff --git a/modules/fes2004/fes2004_lib.h b/modules/fes2004/fes2004_lib.h
index dde064d..24ddeb0 100644
--- a/modules/fes2004/fes2004_lib.h
+++ b/modules/fes2004/fes2004_lib.h
@@ -178,7 +178,7 @@ extern void * pred_coeur(void *);
extern void * extract_coeur(void *);
extern double predic_and_admit(float *,float *,int ,mega_struct *,double ,double );
extern int interpolation_w_mask(double ,double ,int ,int ,double *,float *);
-extern void compute_admittance(gsl_matrix *,gsl_permutation *,gsl_vector *,gsl_vector *,gsl_vector *,gsl_vector *,spectrum_struct *,int ,int * ,int *);
+extern void compute_admittance(gsl_matrix *,gsl_permutation *,gsl_vector *,gsl_vector *,gsl_vector *,gsl_vector *,spectrum_struct *,int ,int * ,int *,double);
extern double geo_d_km(double ,double ,double ,double );
//##############################################################################################################################
// the next functions are a part of the Aktarus tide library developped
diff --git a/modules/fes2004/fes2004_main.c b/modules/fes2004/fes2004_main.c
index 6385122..ea7cbea 100644
--- a/modules/fes2004/fes2004_main.c
+++ b/modules/fes2004/fes2004_main.c
@@ -343,7 +343,7 @@ int main(int argc, char *argv[])
{
if(LOAD_cdf_filename!=NULL)sprintf(netcdf_filename,"%s",LOAD_cdf_filename);
else {printf("=======>> The load Netcdf file was not given\n");usage();}
- rstatus=fes2004_prediction(netcdf_filename,0,nb_position,lat,lon,time,prediction,1);
+ rstatus=fes2004_prediction(netcdf_filename,time_reference,nb_position,lat,lon,time,prediction,1);
sprintf(output_filename,"loading.pred");
rstatus=prediction_output(nb_position,prediction,lat,lon,time,time_reference,output_filename);
}
@@ -352,7 +352,7 @@ int main(int argc, char *argv[])
if(TIDE_cdf_filename!=NULL)sprintf(netcdf_filename,"%s",TIDE_cdf_filename);
else {printf("=======>> The tide Netcdf file was not given do not forget the -A option !!!!\n");usage();printf("=======>> The tide Netcdf file was not given do not forget the -A option !!!!\n");}
printf("entering in the prediction function ...\n");
- rstatus=fes2004_prediction(netcdf_filename,0,nb_position,lat,lon,time,prediction,1);
+ rstatus=fes2004_prediction(netcdf_filename,time_reference,nb_position,lat,lon,time,prediction,1);
sprintf(output_filename,"tide.pred");
rstatus=prediction_output(nb_position,prediction,lat,lon,time,time_reference,output_filename);
}
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list