Ignore:
Timestamp:
Nov 10, 2011, 3:08:51 PM (13 years ago)
Author:
emillour
Message:

Generic GCM: Upgrade: The location of the 'datagcm' directory can now be given in the callphys.def file ( datadir = /absolute/path/to/datagcm ). Changed "datafile.h" into a F90 module "datafile_mod.F90" and spread this change to all routines that used to use "datafile.h".
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/setspv.F90

    r253 r374  
    2626      use radcommon_h, only: BWNV,BLAMV,WNOV,DWNV,WAVEV, &
    2727                             STELLARF,TAURAY,gastype
     28      use datafile_mod, only: datadir
    2829
    2930      implicit none
     
    3132#include "comcstfi.h"
    3233#include "callkeys.h"
    33 #include "datafile.h"
    3434
    3535      logical file_ok
     
    5252      write(temp1,'(i2.2)') L_NSPECTV
    5353      file_id='/corrk_data/'//trim(adjustl(banddir))//'/narrowbands_VI.in'
    54       file_path=datafile(1:LEN_TRIM(datafile))//file_id(1:LEN_TRIM(file_id))
     54      file_path=TRIM(datadir)//TRIM(file_id)
    5555
    5656      ! check that the file exists
    5757      inquire(FILE=file_path,EXIST=file_ok)
    5858      if(.not.file_ok) then
    59          write(*,*)'The file ',file_path(1:LEN_TRIM(file_path))
     59         write(*,*)'The file ',TRIM(file_path)
    6060         write(*,*)'was not found by setspv.F90, exiting.'
     61         write(*,*)'Check that your path to datagcm:',trim(datadir)
     62         write(*,*)' is correct. You can change it in callphys.def with:'
     63         write(*,*)' datadir = /absolute/path/to/datagcm'
     64         write(*,*)'Also check that the corrkdir you chose in callphys.def exists.'
    6165         call abort
    6266      endif
     
    7074
    7175      if(file_entries-1.ne.L_NSPECTV) then
    72          write(*,*) 'L_NSPECTV = ',L_NSPECTV, 'in the model, but there are '
     76         write(*,*) 'setspv: L_NSPECTV = ',L_NSPECTV, 'in the model, but there are '
    7377         write(*,*) file_entries-1,'entries in ', &
    74               file_path(1:LEN_TRIM(file_path)),', exiting.'
     78              TRIM(file_path),', exiting.'
    7579         call abort
    7680      endif
     
    8892
    8993
    90       print*,'VI band limits:'
     94      print*,'setspv: VI band limits:'
    9195      do M=1,L_NSPECTV+1
    9296         print*,m,'-->',BWNV(M),' cm^-1'
     
    109113!     Set up stellar spectrum
    110114
    111       write(*,*)'Interpolating stellar spectrum from the hires data...'
     115      write(*,*)'setspv: Interpolating stellar spectrum from the hires data...'
    112116      call ave_stelspec(STELLAR)
    113117
     
    118122         sum         = sum+STELLARF(N)
    119123      end do
    120       write(6,'(" Stellar flux at 1 AU = ",f7.2," W m-2")') sum
     124      write(6,'("setspv: Stellar flux at 1 AU = ",f7.2," W m-2")') sum
    121125      print*,' '
    122126
     
    130134         call calc_rayleigh
    131135      else
    132          print*,'No Rayleigh scattering, check for NaN in output!'
     136         print*,'setspv: No Rayleigh scattering, check for NaN in output!'
    133137         do N=1,L_NSPECTV
    134138            TAURAY(N) = 1E-16
Note: See TracChangeset for help on using the changeset viewer.