Ignore:
Timestamp:
Jun 8, 2011, 12:04:26 PM (13 years ago)
Author:
emillour
Message:

Mars GCM:

minor bug fix in lect_start_archive.F (using wrong surface temp. array).

+ swiched output messages to english and added that tracers not found
in file must be initialized by user.

minor bug fix in datareadnc.F : 'datafile' path must be initialized.

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/datareadnc.F

    r38 r146  
    4141c                   (rlatvd de 89 a -89)
    4242c=======================================================================
     43
     44! to use  'getin'
     45       use ioipsl_getincom
    4346
    4447      implicit none
     
    7780      REAL        zthe(imdp1*jmdp1)
    7881
    79       INTEGER   lnblnk, ierr
    80       EXTERNAL    lnblnk
     82      INTEGER     ierr
    8183
    8284      INTEGER   unit,nvarid
     
    9597      DIMENSION string(4)
    9698
    97       CHARACTER*80    file
    9899
    99100#include "lmdstd.h"
     
    109110c    Lecture NetCDF des donnees latitude et longitude
    110111c-----------------------------------------------------------------------
    111       write(*,*) 'ouverture du fichier surface.nc'
    112 
    113       ierr = NF_OPEN (datafile(1:lnblnk(datafile))//'/surface.nc',
     112      write(*,*) 'datareadnc: opening file surface.nc'
     113
     114      datafile="/u/forget/WWW/datagcm/datafile" ! default path to surface.nc
     115      call getin("datadir",datafile) ! but users may specify another path
     116     
     117      ierr = NF_OPEN (trim(datafile)//'/surface.nc',
    114118     &  NF_NOWRITE,unit)
    115119      IF (ierr.NE.NF_NOERR) THEN
    116120        write(*,*)'Error : cannot open file surface.nc '
    117121        write(*,*)'(in phymars/datareadnc.F)'
    118         write(*,*)'It should be in :',datafile(1:lnblnk(datafile)),'/'
    119         write(*,*)'1) You can change this directory address in '
    120         write(*,*)'   file phymars/datafile.h'
     122        write(*,*)'It should be in :',trim(datafile),'/'
     123        write(*,*)'1) You can set this path in the callphys.def file:'
     124        write(*,*)'   datadir=/path/to/the/datafiles'
    121125        write(*,*)'2) If necessary surface.nc (and other datafiles)'
    122126        write(*,*)'   can be obtained online on:'
     
    176180      string(2) = 'thermal'
    177181      if (relief.ne.'pla') then
    178         write(*,*) ' La topographie est celle de MOLA'
     182        write(*,*) ' MOLA topography'
    179183        relief = 'MOL'
    180184          string(3) = 'z'//relief
     
    282286            phisinit(i)=1000.*phisinit(i)
    283287      ENDDO
    284       CALL dump2d(iimp1,jjp1,phisinit,'Altitude en m')
     288      CALL dump2d(iimp1,jjp1,phisinit,'Altitude in m')
    285289      CALL multscal(iimp1*jjp1,phisinit,g,phisinit)
    286290
Note: See TracChangeset for help on using the changeset viewer.