Ignore:
Timestamp:
Apr 12, 2018, 8:35:48 AM (7 years ago)
Author:
emillour
Message:

Mars GCM:
Code cleanup:

  • remove "comorbit.h" since it is no longer used.
  • turn "datafile.h" into module datafile_mod.F90 (and rename variable "datafile" as "datadir" since it stores the path to the datafile directory).

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/albedocaps.F90

    r1779 r1918  
    9090use geometry_mod, only: latitude, longitude ! in radians
    9191use surfdat_h, only: albedice, TESice_Ncoef, TESice_Scoef
     92use datafile_mod, only: datadir
    9293use netcdf, only: nf90_open, NF90_NOWRITE, NF90_NOERR, &
    9394                  nf90_strerror, nf90_inq_varid, nf90_get_var, nf90_close
    9495                 
    9596implicit none
    96 include"datafile.h"
    9797
    9898! arguments:
     
    151151if (firstcall) then
    152152! Load TES albedoes for Northern Hemisphere
    153   ! Note: datafile() is defined in "datafile.h"
    154   ierr=nf90_open(trim(datafile)//"/npsc_albedo.nc",NF90_NOWRITE,nid)
     153  ierr=nf90_open(trim(datadir)//"/npsc_albedo.nc",NF90_NOWRITE,nid)
    155154  IF (ierr.NE.NF90_NOERR) THEN
    156155    write(*,*)'Problem opening npsc_albedo.nc (phymars/albedocaps.F90)'
    157     write(*,*)'It should be in :',trim(datafile),'/'
     156    write(*,*)'It should be in :',trim(datadir),'/'
    158157    write(*,*)'1) You can change this directory address in callfis.def with'
    159158    write(*,*)'   datadir=/path/to/datafiles'
     
    163162    CALL ABORT
    164163  ELSE
    165     write(*,*) "albedocaps: using file ",trim(datafile)//"/npsc_albedo.nc"
     164    write(*,*) "albedocaps: using file ",trim(datadir)//"/npsc_albedo.nc"
    166165  ENDIF
    167166 
     
    225224
    226225! Load albedoes for Southern Hemisphere
    227   ierr=nf90_open(trim(datafile)//"/spsc_albedo.nc",NF90_NOWRITE,nid)
     226  ierr=nf90_open(trim(datadir)//"/spsc_albedo.nc",NF90_NOWRITE,nid)
    228227  IF (ierr.NE.NF90_NOERR) THEN
    229228    write(*,*)'Problem opening spsc_albedo.nc (phymars/albedocaps.F90)'
    230     write(*,*)'It should be in :',trim(datafile),'/'
     229    write(*,*)'It should be in :',trim(datadir),'/'
    231230    write(*,*)'1) You can change this directory address in callfis.def with'
    232231    write(*,*)'   datadir=/path/to/datafiles'
     
    236235    CALL ABORT
    237236  ELSE
    238     write(*,*) "albedocaps: using file ",trim(datafile)//"/spsc_albedo.nc"
     237    write(*,*) "albedocaps: using file ",trim(datadir)//"/spsc_albedo.nc"
    239238  ENDIF
    240239
Note: See TracChangeset for help on using the changeset viewer.