C+ C NAME: C GTODEN C PURPOSE: C Used by EGIPSY to create density maps C CALLING SEQUENCE: function GTODEN(IDFNC,G) C INPUTS: C IDFNC integer ID for indentifying conversion formulae C if < 0 in GTODEN the inverse is applied C G real G-value to be converted C OUTPUTS: C GTODEN real Calculated density C CALLS: C BadR4 C SEE ALSO: C STRGTODEN, NRGTODEN C PROCEDURE: C To add additional conversions from G value to density, do the following C (the places where these changes should be made is indicated in the code) C > 1. Add code for the conversion. This would look like: C C else if (IDFNC .eq. ?) then C C GTODEN = C else if (IDFNC .eq. -?) then C C GTODEN = C C ? stands for the next higher IDFNC value not yet in use C > 2. Add a string descriptor for the function. This would look like: C C else if (IDFNC .eq. ?) then C cStr = '' C C ? is the same value as the one in the previous step C C > 3. Increase NRGTODEN. The line defining the new NRGTODEN will usually be: C C NRGTODEN = ? C C where ? again is the same value as in the previous steps C MODIFICATION HISTORY: C MAY-1994, Paul Hick (UCSD) C- integer IDFNC real G Bad = BadR4() if (G .eq. Bad) then GTODEN = Bad else if (IDFNC .eq. 0) then GTODEN = G else if (IDFNC .eq. 1) then GTODEN = 9.0*G*G else if (IDFNC .eq. -1) then GTODEN = sqrt(G/9.) else if (IDFNC .eq. 2) then GTODEN = 10.4*G**3.4 else if (IDFNC .eq. -2) then GTODEN = (G/10.4)**(1./3.4) else if (IDFNC .eq. 3) then GTODEN = 9.5*G**5.1 else if (IDFNC .eq. -3) then GTODEN = (G/9.5)**(1./5.1) ! 1. Insert other conversions here !!! else GTODEN = Bad end if return end