Ignore:
Timestamp:
Jun 6, 2012, 10:56:42 AM (12 years ago)
Author:
emillour
Message:

Mars GCM:

  • Minor cleanup in surfini.F
  • Corrected the polar mesh surface area which was wrong in the physics (changes in phyetat0.F, calfis.F and newstart.F)

EM

File:
1 edited

Legend:

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

    r669 r697  
    22   ! to use  'getin'
    33      USE ioipsl_getincom
     4      use netcdf
    45      IMPLICIT NONE
    56c=======================================================================
     
    2021
    2122#include "datafile.h"
    22 #include "netcdf.inc"
    2323
    2424      INTEGER ngrid,ig,icap,iq,alternate
     
    5757     
    5858      REAL,SAVE :: min_icevalue = 500.
    59       PARAMETER string = 'thermal'
     59      character(len=50) :: string = 'thermal'
    6060     
    6161      character (len=100) :: zedatafile
     
    143143 
    144144       
    145         ierr =nf_open (trim(zedatafile)//'/surface.nc',
    146      &  NF_NOWRITE,nid)
    147      
    148       IF (ierr.NE.nf_noerr) THEN
     145        ierr=nf90_open(trim(zedatafile)//'/surface.nc',
     146     &  NF90_NOWRITE,nid)
     147     
     148      IF (ierr.NE.nf90_noerr) THEN
    149149       write(*,*)'Error : cannot open file surface.nc '
    150150       write(*,*)'(in phymars/surfini.F)'
     
    159159     
    160160     
    161       ierr = NF_INQ_VARID (nid, string, nvarid)
    162       if (ierr.ne.nf_noerr) then
    163         write(*,*) 'datareadnc error, cannot find ',trim(string)
     161      ierr=nf90_inq_varid(nid, string, nvarid)
     162      if (ierr.ne.nf90_noerr) then
     163        write(*,*) 'surfini error, cannot find ',trim(string)
    164164        write(*,*) ' in file ',trim(zedatafile),'/surface.nc'
     165        write(*,*)trim(nf90_strerror(ierr))
    165166        stop
    166167      endif
    167 #ifdef NC_DOUBLE
    168       ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zdata)
    169 #else
    170       ierr = NF_GET_VAR_REAL(nid, nvarid, zdata)
    171 #endif
    172       if (ierr.ne.nf_noerr) then
    173         write(*,*) 'datareadnc: error failed loading ',trim(string)
     168
     169      ierr=nf90_get_var(nid, nvarid, zdata)
     170
     171      if (ierr.ne.nf90_noerr) then
     172        write(*,*) 'surfini: error failed loading ',trim(string)
     173        write(*,*)trim(nf90_strerror(ierr))
    174174        stop
    175175      endif
    176176 
    177177                     
    178       ierr=nf_close(nid)
     178      ierr=nf90_close(nid)
    179179 
    180180
Note: See TracChangeset for help on using the changeset viewer.