Changeset 2079

Show
Ignore:
Timestamp:
05/17/08 09:51:43 (6 months ago)
Author:
rjrw
Message:

Merged from trunk r2022:2078

Location:
branches/newmole/source
Files:
34 modified

Legend:

Unmodified
Added
Removed
  • branches/newmole/source/atmdat_chianti.cpp

    r1942 r2079  
    1818        /* type is set to 0 for non chianti and 1 for chianti*/ 
    1919        long int i,j,nMolLevs,intCollTran,intcollindex,ipLo,ipHi; 
    20         FILE *atmolLevDATA , *atmolTraDATA=NULL,*atmolEleColDATA=NULL; 
     20        FILE *atmolLevDATA , *atmolTraDATA=NULL,*atmolEleColDATA=NULL,*atmolProColDATA=NULL; 
    2121        realnum  fstatwt,fenergyK,fenergyWN,fWLAng,fenergy,feinsteina; 
    2222        double fScalingParam,fEnergyDiff,fGF,*xs,*spl,*spl2; 
     
    4040        long int *intNewIndex=NULL,*intOldIndex=NULL; 
    4141        int interror; 
    42         bool lgEneLevOrder; 
     42        bool lgProtonData=false,lgEneLevOrder; 
    4343 
    4444        /*This is to identify where the fields start */ 
     
    9999        if( trace.lgTrace ) 
    100100                fprintf( ioQQQ," moldat_readin opening %s:",chProColFilename); 
     101        /*We will set a flag here to indicate if the proton collision strengths are available */ 
     102        if( ( atmolProColDATA = fopen( chProColFilename , "r" ) ) != NULL ) 
     103        { 
     104                lgProtonData = true; 
     105        } 
     106        else 
     107        { 
     108                lgProtonData = false; 
     109        } 
    101110 
    102111        nMolLevs = 0; 
     
    146155        for( intcollindex = 0; intcollindex<NUM_COLLIDERS; intcollindex++ ) 
    147156        { 
    148                 CollRatesArray[intNS][intcollindex] = (double**)MALLOC((nMolLevs)*sizeof(double*)); 
     157                CollRatesArray[intNS][intcollindex] = NULL; 
     158        } 
     159        /*Allocating space just for the electron*/ 
     160        CollRatesArray[intNS][0] = (double**)MALLOC((nMolLevs)*sizeof(double*)); 
     161        for( ipHi = 0; ipHi<nMolLevs; ipHi++ ) 
     162        { 
     163                CollRatesArray[intNS][0][ipHi] = (double*)MALLOC((unsigned long)(nMolLevs)*sizeof(double)); 
     164                for( ipLo = 0; ipLo<nMolLevs; ipLo++) 
     165                { 
     166                        CollRatesArray[intNS][0][ipHi][ipLo] = 0.0; 
     167                } 
     168        } 
     169        /*Allocating space for the proton*/ 
     170        if(lgProtonData) 
     171        { 
     172                CollRatesArray[intNS][1] = (double**)MALLOC((nMolLevs)*sizeof(double*)); 
    149173                for( ipHi = 0; ipHi<nMolLevs; ipHi++ ) 
    150174                { 
    151                         CollRatesArray[intNS][intcollindex][ipHi] = (double*)MALLOC((unsigned long)(nMolLevs)*sizeof(double)); 
     175                        CollRatesArray[intNS][1][ipHi] = (double*)MALLOC((unsigned long)(nMolLevs)*sizeof(double)); 
    152176                        for( ipLo = 0; ipLo<nMolLevs; ipLo++) 
    153177                        { 
    154                                 CollRatesArray[intNS][intcollindex][ipHi][ipLo] = 0.0; 
    155                         } 
    156                 } 
    157         } 
    158  
     178                                CollRatesArray[intNS][1][ipHi][ipLo] = 0.0; 
     179                        } 
     180                } 
     181        } 
    159182        /*Rewind the energy levels files*/ 
    160183        if( fseek( atmolLevDATA , 0 , SEEK_SET ) != 0 ) 
  • branches/newmole/source/atmdat_lamda.cpp

    r1942 r2079  
    113113        for( intcollindex = 0; intcollindex <NUM_COLLIDERS; intcollindex++ ) 
    114114        { 
    115                 CollRatesArray[intNS][intcollindex] = (double**)MALLOC((unsigned long)(ngMolLevs) * sizeof(double*)); 
    116                 for( ipHi = 0; ipHi<ngMolLevs; ipHi++ ) 
    117                 { 
    118                         CollRatesArray[intNS][intcollindex][ipHi] = (double*)MALLOC((unsigned long)(ngMolLevs) * sizeof(double)); 
    119                         for( ipLo = 0; ipLo<ngMolLevs; ipLo++ ) 
    120                         { 
    121                                 CollRatesArray[intNS][intcollindex][ipHi][ipLo] = 0.0; 
    122                         } 
    123                 } 
    124         } 
     115                CollRatesArray[intNS][intcollindex] = NULL; 
     116        } 
     117 
    125118 
    126119        if(read_whole_line( chLine , (int)sizeof(chLine) , atmolLevDATA ) == NULL ) 
     
    342335                        TotalInsanity(); 
    343336                } 
     337                /*This is where we allocate memory if the collider exists*/ 
     338                /*Needed to take care of the he collisions*/ 
     339                CollRatesArray[intNS][intCollIndex] = (double**)MALLOC((unsigned long)(ngMolLevs) * sizeof(double*)); 
     340                for( ipHi = 0; ipHi<ngMolLevs; ipHi++ ) 
     341                { 
     342                        CollRatesArray[intNS][intCollIndex][ipHi] = (double*)MALLOC((unsigned long)(ngMolLevs) * sizeof(double)); 
     343                        for( ipLo = 0; ipLo<ngMolLevs; ipLo++ ) 
     344                        { 
     345                                CollRatesArray[intNS][intCollIndex][ipHi][ipLo] = 0.0; 
     346                        } 
     347                } 
    344348                if(read_whole_line( chLine , (int)sizeof(chLine)  , atmolLevDATA ) == NULL ) 
    345349                { 
  • branches/newmole/source/cddrive.h

    r1918 r2079  
    536536         3                      the reflected continuum, same units 
    537537         
    538          4                      diffuse continuous emission outward direction 
    539          5                      diffuse continuous emission, reflected 
     538         4                      diffuse emission outward direction 
     539         5                      diffuse emission, reflected 
    540540         
    541541         6                      collisional+recombination lines, outward 
     
    547547          
    548548        \param nEnergy the number of cells + 1 
     549        \param ipLoEnergy 
     550        \param ipHiEnergy 
    549551        \param ReturnedSpectrum[] the returned spectrum, same size is two energy spectra (see option), returns nEnergy -1 pts 
    550552 */  
     
    552554        int Option , 
    553555    long int nEnergy , 
     556        long int ipLoEnergy, 
     557        long int ipHiEnergy, 
    554558    realnum ReturnedSpectrum[] ); 
    555559 
  • branches/newmole/source/cdspec.cpp

    r1780 r2079  
    318318         * 3    the reflected continuum, same units 
    319319         * 
    320          * 4    diffuse continuous emission outward direction 
    321          * 5    diffuse continuous emission, reflected 
    322          * 
    323          * 6    collisional+recombination lines, outward 
    324          * 7    collisional+recombination lines, reflected 
     320         * 4    diffuse emission, lines + continuum, outward 
     321         * 5    diffuse emission, lines + continuum, reflected 
     322         * 
     323         * 6    diffuse continuous emission outward direction 
     324         * 7    diffuse continuous emission, reflected 
    325325         * 
    326326         * 8    total transmitted, lines and continuum 
     
    333333        int nOption , 
    334334 
    335         /* the number of cells + 1*/ 
    336         long int nEnergy , 
     335        /* the number of cells */ 
     336        long int nEnergy, 
     337 
     338        /* the index of the lowest and highest energy bounds to use. */ 
     339        long ipLoEnergy, 
     340        long ipHiEnergy, 
    337341 
    338342        /* the returned spectrum, same size is two energy spectra (see option), returns nEnergy -1 pts */ 
     
    340344 
    341345{ 
    342         /* this pointer will bet set to one of the cloudy continuum arrays */ 
    343         realnum *cont ,  
    344                 refac; 
    345         long int ncell , j; 
    346  
    347         /* flag saying whether we will need to free cont at the end */ 
    348         bool lgFREE; 
     346        realnum refac; 
    349347 
    350348        DEBUG_ENTRY( "cdSPEC2()" ); 
    351349 
     350        ASSERT( ipLoEnergy >= 0 ); 
     351        ASSERT( ipLoEnergy < ipHiEnergy ); 
     352        ASSERT( ipHiEnergy < rfield.nupper ); 
     353        ASSERT( nEnergy == (ipHiEnergy-ipLoEnergy+1) ); 
     354        ASSERT( nEnergy >= 2 ); 
     355 
    352356        ASSERT( nOption <= NUM_OUTPUT_TYPES ); 
    353357 
    354         if( nOption == 1 ) 
    355         { 
    356                 /* this is the incident continuum, col 2 of punch continuum command */ 
    357                 cont = rfield.flux_total_incident; 
    358                 lgFREE = false; 
    359         } 
    360         else if( nOption == 2 ) 
    361         { 
    362                 /* the attenuated transmitted continuum, no diffuse emission, 
    363                  * col 3 of punch continuum command */ 
    364                 cont = rfield.flux; 
    365                 lgFREE = false; 
    366         } 
    367         else if( nOption == 3 ) 
    368         { 
    369                 /* reflected incident continuum, col 6 of punch continuum command */ 
    370                 lgFREE = false; 
    371                 cont = rfield.ConRefIncid; 
    372         } 
    373         else if( nOption == 4 ) 
    374         { 
    375                 /* diffuse continuous emission outward direction  */ 
    376                 cont = (realnum*)MALLOC( sizeof(realnum)*(size_t)rfield.nupper ); 
    377                 /* need to free the vector once done */ 
    378                 lgFREE = true; 
    379                 refac = (realnum)radius.r1r0sq*geometry.covgeo; 
    380                 for( j=0; j<rfield.nflux; ++j) 
    381                 { 
    382                         cont[j] = rfield.ConEmitOut[j]*refac; 
    383                 } 
    384         } 
    385         else if( nOption == 5 ) 
    386         { 
    387                 /* reflected diffuse continuous emission */ 
    388                 cont = (realnum*)MALLOC( sizeof(realnum)*(size_t)rfield.nupper ); 
    389                 /* need to free the vector once done */ 
    390                 lgFREE = true; 
    391                 for( j=0; j<rfield.nflux; ++j) 
    392                 { 
    393                         cont[j] = rfield.ConEmitReflec[j]; 
    394                 } 
    395         } 
    396         else if( nOption == 6 ) 
    397         { 
    398                 /* all outward lines,   */ 
    399                 cont = (realnum*)MALLOC( sizeof(realnum)*(size_t)rfield.nupper ); 
    400                 /* need to free the vector once done */ 
    401                 lgFREE = true; 
    402                 /* correct back to inner radius */ 
    403                 refac = (realnum)radius.r1r0sq*geometry.covgeo; 
    404                 for( j=0; j<rfield.nflux; ++j) 
    405                 { 
    406                         cont[j] = rfield.outlin[j]*refac; 
    407                 } 
    408         } 
    409         else if( nOption == 7 ) 
    410         { 
    411                 /* all reflected lines */ 
    412                 if( geometry.lgSphere ) 
    413                 { 
    414                         refac = 0.; 
    415                 } 
    416                 else 
    417                 { 
    418                         refac = 1.; 
    419                 } 
    420  
    421                 cont = (realnum*)MALLOC( sizeof(realnum)*(size_t)rfield.nupper ); 
    422                 /* need to free the vector once done */ 
    423                 lgFREE = true; 
    424                 for( j=0; j<rfield.nflux; ++j) 
    425                 { 
    426                         /* units of lines here are to cancel out with tricks applied to continuum cells 
    427                          * when finally extracted below */ 
    428                         cont[j] = rfield.reflin[j]*refac; 
    429                 } 
    430         } 
    431         else if( nOption == 8 ) 
    432         { 
    433                 /* total transmitted continuum */ 
    434                 cont = (realnum*)MALLOC( sizeof(realnum)*(size_t)rfield.nupper ); 
    435                 /* need to free the vector once done */ 
    436                 lgFREE = true; 
    437                 /* correct back to inner radius */ 
    438                 refac = (realnum)radius.r1r0sq*geometry.covgeo; 
    439                 for( j=0; j<rfield.nflux; ++j) 
    440                 { 
    441                         /* units of lines here are to cancel out with tricks applied to continuum cells 
    442                          * when finally extracted below */ 
    443                         cont[j] = (rfield.ConEmitOut[j]+ rfield.outlin[j])*refac 
    444                                           + rfield.flux[j]*(realnum)radius.r1r0sq; 
    445                 } 
    446         } 
    447         else if( nOption == 9 ) 
    448         { 
    449                 /* total reflected continuum */ 
    450                 cont = (realnum*)MALLOC( sizeof(realnum)*(size_t)rfield.nupper ); 
    451                 /* need to free the vector once done */ 
    452                 lgFREE = true; 
    453                 for( j=0; j<rfield.nflux; ++j) 
    454                 { 
    455                         /* units of lines here are to cancel out with tricks applied to continuum cells 
    456                          * when finally extracted below */ 
    457                         cont[j] = ((rfield.ConRefIncid[j]+rfield.ConEmitReflec[j]) + 
     358        for( long i = 0; i < nEnergy; i++ ) 
     359        { 
     360                long j = ipLoEnergy + i; 
     361 
     362                if( j >= rfield.nflux ) 
     363                { 
     364                        ReturnedSpectrum[i] = SMALLFLOAT; 
     365                        continue; 
     366                } 
     367 
     368                if( nOption == 1 ) 
     369                { 
     370                        /* this is the incident continuum, col 2 of punch continuum command */ 
     371                        ReturnedSpectrum[i] = rfield.flux_total_incident[j]; 
     372                } 
     373                else if( nOption == 2 ) 
     374                { 
     375                        /* the attenuated transmitted continuum, no diffuse emission, 
     376                         * col 3 of punch continuum command */ 
     377                        ReturnedSpectrum[i] = rfield.flux[j]; 
     378                } 
     379                else if( nOption == 3 ) 
     380                { 
     381                        /* reflected incident continuum, col 6 of punch continuum command */ 
     382                        ReturnedSpectrum[i] = rfield.ConRefIncid[j]; 
     383                } 
     384                else if( nOption == 4 ) 
     385                { 
     386                        /* correct back to inner radius */ 
     387                        refac = (realnum)radius.r1r0sq*geometry.covgeo; 
     388                        ReturnedSpectrum[i] = (rfield.outlin[j]+rfield.ConEmitOut[j])*refac; 
     389                } 
     390                else if( nOption == 5 ) 
     391                { 
     392                        /* all reflected diffuse emission */ 
     393                        if( geometry.lgSphere ) 
     394                        { 
     395                                refac = 0.; 
     396                        } 
     397                        else 
     398                        { 
     399                                refac = 1.; 
     400                        } 
     401 
     402                        ReturnedSpectrum[i] = (rfield.reflin[j]+rfield.ConEmitReflec[j])*refac; 
     403                } 
     404                else if( nOption == 6 ) 
     405                { 
     406                        /* correct back to inner radius */ 
     407                        refac = (realnum)radius.r1r0sq*geometry.covgeo; 
     408                        ReturnedSpectrum[i] = rfield.outlin[j]*refac; 
     409                } 
     410                else if( nOption == 7 ) 
     411                { 
     412                        /* all reflected line emission */ 
     413                        if( geometry.lgSphere ) 
     414                        { 
     415                                refac = 0.; 
     416                        } 
     417                        else 
     418                        { 
     419                                refac = 1.; 
     420                        } 
     421 
     422                        ReturnedSpectrum[i] = rfield.reflin[j]*refac; 
     423                } 
     424                else if( nOption == 8 ) 
     425                { 
     426                        /* total transmitted continuum */ 
     427                        /* correct back to inner radius */ 
     428                        refac = (realnum)radius.r1r0sq*geometry.covgeo; 
     429                        ReturnedSpectrum[i] = (rfield.ConEmitOut[j]+ rfield.outlin[j])*refac 
     430                                + rfield.flux[j]*(realnum)radius.r1r0sq; 
     431                } 
     432                else if( nOption == 9 ) 
     433                { 
     434                        /* total reflected continuum */ 
     435                        ReturnedSpectrum[i] = ((rfield.ConRefIncid[j]+rfield.ConEmitReflec[j]) + 
    458436                                rfield.reflin[j]); 
    459437                } 
    460         } 
    461         else if( nOption == 10 ) 
    462         { 
    463                 /* this is exp(-tau) */ 
    464                 cont = (realnum*)MALLOC( sizeof(realnum)*(size_t)rfield.nupper ); 
    465                 /* need to free the vector once done */ 
    466                 lgFREE = true; 
    467                 for( j=0; j<nEnergy; ++j) 
    468                 { 
     438                else if( nOption == 10 ) 
     439                { 
     440                        /* this is exp(-tau) */ 
    469441                        /* This is the TOTAL attenuation in both the continuum and lines.   
    470442                         * Jon Miller discovered that the line attenuation was missing in 07.02 */ 
    471                         cont[j] = opac.ExpmTau[j]*rfield.trans_coef_total[j]; 
    472                 } 
    473         } 
    474         else 
    475         { 
    476                 fprintf(ioQQQ," cdSPEC called with impossible nOption (%i)\n", nOption); 
    477                 cdEXIT(EXIT_FAILURE); 
    478         } 
    479  
    480         /* now generate the continua */ 
    481         for( ncell = 0; ncell < nEnergy; ++ncell ) 
    482         { 
    483         if( ncell >= rfield.nflux ) 
    484                 { 
    485                         ReturnedSpectrum[ncell] = SMALLFLOAT; 
     443                        ReturnedSpectrum[i] = opac.ExpmTau[j]*rfield.trans_coef_total[j]; 
    486444                } 
    487445                else 
    488446                { 
    489                         ReturnedSpectrum[ncell] = cont[ncell]; 
    490                 } 
    491                 ASSERT( ReturnedSpectrum[ncell] >=0.f ); 
    492         } 
    493  
    494         /* need to free the vector once done if this flag was set */ 
    495         if( lgFREE ) 
    496         { 
    497                 free(cont); 
    498         } 
     447                        fprintf(ioQQQ," cdSPEC called with impossible nOption (%i)\n", nOption); 
     448                        cdEXIT(EXIT_FAILURE); 
     449                } 
     450 
     451                ASSERT( ReturnedSpectrum[i] >=0.f ); 
     452        } 
     453 
    499454        return; 
    500455} 
  • branches/newmole/source/cont_createmesh.cpp

    r2023 r2079  
    457457         *  
    458458         * TeLowestFineOpacity of 1e4 K is temperature were line width is  
    459          * evaluationed.  Tests were done using the stop temperature in its place 
     459         * evaluated.  Tests were done using the stop temperature in its place 
    460460         * Te below 1e4 K made fine opacity grid huge  
    461461         * do not let temp get higher than 1e4 either - code run with stop temp 10 set 
    462462         * stop temp of 1e10K and assert thrown at line 204 of cont_createpointers.c  
    463463         * simply use 1e4 K as a characteristic temperature */ 
     464        /** \todo       1       set temp of 1e4K will be too coarse a line for PDRs where 
     465         * H2 line overlap is very important */ 
    464466        double TeLowestFineOpacity = 1e4; 
    465467        rfield.fine_opac_velocity_width =  
    466468                (realnum)sqrt(2.*BOLTZMANN/ATOMIC_MASS_UNIT*TeLowestFineOpacity/ 
    467                 /* TurbVel/5 will divide line into 5 cells when turbulence-dominated */ 
    468                 dense.AtomicWeight[rfield.fine_opac_nelem] + POW2(DoppVel.TurbVel/5.)) /  
     469                dense.AtomicWeight[rfield.fine_opac_nelem] ) /  
    469470                /* we want fine_opac_nresolv continuum elements across this line 
    470471                 * default is 1, changed with SET FINE CONTINUUM command */ 
  • branches/newmole/source/cpu.cpp

    r2023 r2079  
    359359 
    360360        /* >>chng 01 oct 09, disable gradual underflow on ultrasparc whith g++ 
    361          * (only needed for versions prior to 3.1, see Note 1). 
     361         * (only needed for versions < 3.1 or >= 4.3.0, see Note 1). 
    362362         * 
    363363         * compile this module with: 
    364          *     g++ [ other options... ] -I<include-dir> -DHAVE_SUNMATH -c setfpenv.c 
     364         *     g++ [ other options... ] -I<include-dir> -DHAVE_SUNMATH -c cpu.cpp 
    365365         * link the program with: 
    366366         *     g++ -L<library-dir> -o cloudy.exe *.o -lsunmath 
     
    379379         * g++ [ other options... ] -funsafe-math-optimizations -c *.c 
    380380         * g++ [ other options... ] -funsafe-math-optimizations -o cloudy.exe *.o 
     381         * 
     382         * Starting with g++ 4.3.0 the -funsafe-math-optimizations option can no longer be 
     383         * used as it implicitly enables -fno-trapping-math, which is unsafe for Cloudy 
     384         * because we do trap floating point exceptions. 
    381385         * 
    382386         * Note 2: Don't use nonstandard_arithmetic() with CC (the SunWorks/Forte compiler); 
     
    439443        string FileName( fname ); 
    440444        vector<string>::size_type begin, end; 
    441         bool lgAbort = ( scheme == AS_DATA_ONLY || scheme == AS_DATA_LOCAL || 
     445        bool lgAbort = ( scheme == AS_DATA_ONLY || scheme == AS_DATA_OPTIONAL || scheme == AS_DATA_LOCAL || 
    442446                         scheme == AS_LOCAL_DATA || scheme == AS_LOCAL_ONLY ); 
    443447 
     
    446450        case AS_DATA_ONLY: 
    447451        case AS_DATA_ONLY_TRY: 
     452        case AS_DATA_OPTIONAL: 
    448453                begin = 1; 
    449454                end = cpu.chSearchPath.size()-1; 
     
    480485        if( handle == NULL && lgAbort ) 
    481486        { 
    482                 // failed on very first open -> probably path is not correct 
    483                 fprintf( ioQQQ, "\nPROBLEM DISASTER I could not open the data file %s\n\n", fname ); 
    484                 fprintf( ioQQQ, "Although there may be other reasons you have received this error,\n"); 
    485                 fprintf( ioQQQ, "the most likely are that the path has not been properly set\n"); 
    486                 fprintf( ioQQQ, "or that the path points to an old version of the data.\n\n"); 
    487                 fprintf( ioQQQ, "Please have a look at the file path.h in the source directory\n"); 
    488                 fprintf( ioQQQ, "to check how the variable CLOUDY_DATA_PATH is set - \n"); 
    489                 fprintf( ioQQQ, "it should give the location of the data files I need.\n"); 
    490                 fprintf( ioQQQ, "These are the files in the data download from the web site.\n\n"); 
    491                 fprintf( ioQQQ, "Recompile the code with the correct data path set in path.h\n"); 
    492                 fprintf( ioQQQ, "or use the shell command \"set CLOUDY_DATA_PATH=path\" to set the\n"); 
    493                 fprintf( ioQQQ, "path from a command prompt.\n\n"); 
    494                 cpu.printDataPath(); 
    495  
    496                 fprintf( ioQQQ, " These are all the paths I tried:\n" ); 
    497                 for( vector<string>::size_type i=begin; i < end; ++i ) 
    498                 { 
    499                         if( cpu.chSearchPath[i].length() > 0 ) 
    500                                 fprintf( ioQQQ, "   ==%s==\n", cpu.chSearchPath[i].c_str() ); 
    501                         else 
    502                                 fprintf( ioQQQ, "   ==<local directory>==\n" ); 
     487                if( scheme == AS_DATA_OPTIONAL ) 
     488                        // presence is optional -> make warning less scary... 
     489                        fprintf( ioQQQ, "\nI could not open the data file %s\n\n", fname ); 
     490                else 
     491                        fprintf( ioQQQ, "\nPROBLEM DISASTER I could not open the data file %s\n\n", fname ); 
     492                if( cpu.nFileDone == 0 || scheme == AS_DATA_ONLY ) 
     493                { 
     494                        // failed on very first open -> most likely path is not correct 
     495                        // failed on AS_DATA_ONLY -> CLOUDY_DATA_PATH may point to obsolete data dir 
     496                        fprintf( ioQQQ, "Although there may be other reasons you have received this error,\n"); 
     497                        fprintf( ioQQQ, "the most likely are that the path has not been properly set\n"); 
     498                        fprintf( ioQQQ, "or that the path points to an old version of the data.\n\n"); 
     499                        fprintf( ioQQQ, "Please have a look at the file path.h in the source directory\n"); 
     500                        fprintf( ioQQQ, "to check how the variable CLOUDY_DATA_PATH is set - \n"); 
     501                        fprintf( ioQQQ, "it should give the location of the data files I need.\n"); 
     502                        fprintf( ioQQQ, "These are the files in the data download from the web site.\n\n"); 
     503                        fprintf( ioQQQ, "Recompile the code with the correct data path set in path.h\n"); 
     504                        fprintf( ioQQQ, "or use the shell command \"export CLOUDY_DATA_PATH=path\" to set the\n"); 
     505                        fprintf( ioQQQ, "path from a bash command prompt.\n\n"); 
     506                        cpu.printDataPath(); 
     507                } 
     508                else 
     509                { 
     510                        // failed on search including local directory -> most likely the file name 
     511                        // was mistyped on a compile command, or Cloudy is run in the wrong directory 
     512                        // if scheme == AS_DATA_OPTIONAL, this most likely is a stellar grid that is not installed. 
     513                        fprintf( ioQQQ, "These are all the paths I tried:\n" ); 
     514