#include "ReferenceAero.h" #include #include extern "C" void update_ref_aerosol( float* zt, float **qmix, int* isl, int* iel, int *igas, int *ngas, int* ichando, int* nchn, int* igdo, int *ngdo) { assert( *isl > 0 && *isl <= *iel) ; h2 aerosols; /* int* i1 = std::find( ichando, ichando+ *nchn, *iref_band); if( i1 == ichando+ *nchn) return; assert( *iref_band >= 8 && *iref_band <= 10) ; */ int idg; for (int i = 0; i < *ngdo; ++i) { if( igdo[i] > 10000) { idg = igdo[i] / 10000; } else { idg = igas[i] ; } if( idg >= 9000) { int* j = std::find(igas,igas+ *ngas, igdo[i]); int k = (int)std::distance(igas,j); aerosols.zalt = std::vector(zt+ *isl-1,zt+ *iel-1); aerosols.extinc = std::vector(&qmix[i][*isl-1], &qmix[i][*iel-1]); for(int ich=0; ich< *nchn; ++ich) ::gRefAero[ ichando[ich] ] = aerosols; } } }