Ignore:
Timestamp:
Oct 24, 2024, 1:55:38 PM (27 hours ago)
Author:
abarral
Message:

Replace F77 netcdf library by F90 netcdf library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3dmem/guide_loc_mod.f90

    r5268 r5270  
    1111  USE getparam, only: ini_getparam, fin_getparam, getpar
    1212  USE Write_Field_loc
    13   use netcdf, only: nf90_nowrite, nf90_open, nf90_inq_varid, nf90_close, &
    14                     nf90_inq_dimid, nf90_inquire_dimension
     13  USE netcdf, ONLY: nf90_nowrite, nf90_open, nf90_inq_varid, nf90_close, &
     14          nf90_inq_dimid, nf90_inquire_dimension, nf90_inq_dimid, &
     15          nf90_inquire_dimension, nf90_enddef, nf90_def_dim, nf90_put_var, nf90_noerr, nf90_close, nf90_inq_varid, &
     16          nf90_redef, nf90_write, nf90_unlimited, nf90_float, nf90_clobber, nf90_64bit_offset, nf90_float, &
     17          nf90_create, nf90_def_var, nf90_open
    1518  USE parallel_lmdz
    1619  USE pres2lev_mod, only: pres2lev
     
    8184    INCLUDE "dimensions.h"
    8285    INCLUDE "paramet.h"
    83     INCLUDE "netcdf.inc"
    8486
    8587    INTEGER                :: error,ncidpl,rid,rcod
     
    177179       if (ncidpl.eq.-99) then
    178180          rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl)
    179           if (rcod.NE.NF_NOERR) THEN
     181          if (rcod.NE.nf90_noerr) THEN
    180182             abort_message=' Nudging error -> no file apbp.nc'
    181183             CALL abort_gcm(modname,abort_message,1)
     
    185187       if (ncidpl.EQ.-99) then
    186188          rcod=nf90_open('P.nc',Nf90_NOWRITe,ncidpl)
    187           if (rcod.NE.NF_NOERR) THEN
     189          if (rcod.NE.nf90_noerr) THEN
    188190             abort_message=' Nudging error -> no file P.nc'
    189191             CALL abort_gcm(modname,abort_message,1)
     
    194196       if (ncidpl.eq.-99) then
    195197          rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl)
    196           if (rcod.NE.NF_NOERR) THEN
     198          if (rcod.NE.nf90_noerr) THEN
    197199             abort_message=' Nudging error -> no file u.nc'
    198200             CALL abort_gcm(modname,abort_message,1)
     
    205207       if (ncidpl.eq.-99) then
    206208          rcod=nf90_open('v.nc',nf90_nowrite,ncidpl)
    207           if (rcod.NE.NF_NOERR) THEN
     209          if (rcod.NE.nf90_noerr) THEN
    208210             abort_message=' Nudging error -> no file v.nc'
    209211             CALL abort_gcm(modname,abort_message,1)
     
    215217       if (ncidpl.eq.-99) then
    216218          rcod=nf90_open('T.nc',nf90_nowrite,ncidpl)
    217           if (rcod.NE.NF_NOERR) THEN
     219          if (rcod.NE.nf90_noerr) THEN
    218220             abort_message=' Nudging error -> no file T.nc'
    219221             CALL abort_gcm(modname,abort_message,1)
     
    226228       if (ncidpl.eq.-99) then
    227229          rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl)
    228           if (rcod.NE.NF_NOERR) THEN
     230          if (rcod.NE.nf90_noerr) THEN
    229231             abort_message=' Nudging error -> no file hur.nc'
    230232             CALL abort_gcm(modname,abort_message,1)
     
    234236
    235237    endif
    236     error=NF_INQ_DIMID(ncidpl,'LEVEL',rid)
    237     IF (error.NE.NF_NOERR) error=NF_INQ_DIMID(ncidpl,'PRESSURE',rid)
    238     IF (error.NE.NF_NOERR) THEN
     238    error=nf90_inq_dimid(ncidpl,'LEVEL',rid)
     239    IF (error.NE.nf90_noerr) error=nf90_inq_dimid(ncidpl,'PRESSURE',rid)
     240    IF (error.NE.nf90_noerr) THEN
    239241        abort_message='Nudging: error reading pressure levels'
    240242        CALL abort_gcm(modname,abort_message,1)
    241243    ENDIF
    242     error=NF_INQ_DIMLEN(ncidpl,rid,nlevnc)
     244    error=nf90_inquire_dimension(ncidpl,rid,len=nlevnc)
    243245    write(*,*)trim(modname)//' : number of vertical levels nlevnc', nlevnc
    244246    rcod = nf90_close(ncidpl)
     
    15751577    USE netcdf, ONLY: nf90_put_var
    15761578    IMPLICIT NONE
    1577 
    1578     include "netcdf.inc"
    15791579    include "dimensions.h"
    15801580    include "paramet.h"
     
    16051605             write(*,*),trim(modname)//' Reading nudging on model levels'
    16061606             rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl)
    1607              IF (rcode.NE.NF_NOERR) THEN
     1607             IF (rcode.NE.nf90_noerr) THEN
    16081608              abort_message='Nudging: error -> no file apbp.nc'
    16091609              CALL abort_gcm(modname,abort_message,1)
    16101610             ENDIF
    16111611             rcode = nf90_inq_varid(ncidpl, 'AP', varidap)
    1612              IF (rcode.NE.NF_NOERR) THEN
     1612             IF (rcode.NE.nf90_noerr) THEN
    16131613              abort_message='Nudging: error -> no AP variable in file apbp.nc'
    16141614              CALL abort_gcm(modname,abort_message,1)
    16151615             ENDIF
    16161616             rcode = nf90_inq_varid(ncidpl, 'BP', varidbp)
    1617              IF (rcode.NE.NF_NOERR) THEN
     1617             IF (rcode.NE.nf90_noerr) THEN
    16181618              abort_message='Nudging: error -> no BP variable in file apbp.nc'
    16191619              CALL abort_gcm(modname,abort_message,1)
     
    16251625         if (guide_plevs.EQ.2) then
    16261626             rcode = nf90_open('P.nc', nf90_nowrite, ncidp)
    1627              IF (rcode.NE.NF_NOERR) THEN
     1627             IF (rcode.NE.nf90_noerr) THEN
    16281628              abort_message='Nudging: error -> no file P.nc'
    16291629              CALL abort_gcm(modname,abort_message,1)
    16301630             ENDIF
    16311631             rcode = nf90_inq_varid(ncidp, 'PRES', varidp)
    1632              IF (rcode.NE.NF_NOERR) THEN
     1632             IF (rcode.NE.nf90_noerr) THEN
    16331633              abort_message='Nudging: error -> no PRES variable in file P.nc'
    16341634              CALL abort_gcm(modname,abort_message,1)
     
    16411641         if (guide_u) then
    16421642             rcode = nf90_open('u.nc', nf90_nowrite, ncidu)
    1643              IF (rcode.NE.NF_NOERR) THEN
     1643             IF (rcode.NE.nf90_noerr) THEN
    16441644              abort_message='Nudging: error -> no file u.nc'
    16451645              CALL abort_gcm(modname,abort_message,1)
    16461646             ENDIF
    16471647             rcode = nf90_inq_varid(ncidu, 'UWND', varidu)
    1648              IF (rcode.NE.NF_NOERR) THEN
     1648             IF (rcode.NE.nf90_noerr) THEN
    16491649              abort_message='Nudging: error -> no UWND variable in file u.nc'
    16501650              CALL abort_gcm(modname,abort_message,1)
     
    16731673         if (guide_v) then
    16741674             rcode = nf90_open('v.nc', nf90_nowrite, ncidv)
    1675              IF (rcode.NE.NF_NOERR) THEN
     1675             IF (rcode.NE.nf90_noerr) THEN
    16761676              abort_message='Nudging: error -> no file v.nc'
    16771677              CALL abort_gcm(modname,abort_message,1)
    16781678             ENDIF
    16791679             rcode = nf90_inq_varid(ncidv, 'VWND', varidv)
    1680              IF (rcode.NE.NF_NOERR) THEN
     1680             IF (rcode.NE.nf90_noerr) THEN
    16811681              abort_message='Nudging: error -> no VWND variable in file v.nc'
    16821682              CALL abort_gcm(modname,abort_message,1)
     
    17061706         if (guide_T) then
    17071707             rcode = nf90_open('T.nc', nf90_nowrite, ncidt)
    1708              IF (rcode.NE.NF_NOERR) THEN
     1708             IF (rcode.NE.nf90_noerr) THEN
    17091709              abort_message='Nudging: error -> no file T.nc'
    17101710              CALL abort_gcm(modname,abort_message,1)
    17111711             ENDIF
    17121712             rcode = nf90_inq_varid(ncidt, 'AIR', varidt)
    1713              IF (rcode.NE.NF_NOERR) THEN
     1713             IF (rcode.NE.nf90_noerr) THEN
    17141714              abort_message='Nudging: error -> no AIR variable in file T.nc'
    17151715              CALL abort_gcm(modname,abort_message,1)
     
    17371737         if (guide_Q) then
    17381738             rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ)
    1739              IF (rcode.NE.NF_NOERR) THEN
     1739             IF (rcode.NE.nf90_noerr) THEN
    17401740              abort_message='Nudging: error -> no file hur.nc'
    17411741              CALL abort_gcm(modname,abort_message,1)
    17421742             ENDIF
    17431743             rcode = nf90_inq_varid(ncidQ, 'RH', varidQ)
    1744              IF (rcode.NE.NF_NOERR) THEN
     1744             IF (rcode.NE.nf90_noerr) THEN
    17451745              abort_message='Nudging: error -> no RH variable in file hur.nc'
    17461746              CALL abort_gcm(modname,abort_message,1)
     
    17691769         if ((guide_P).OR.(guide_plevs.EQ.1)) then
    17701770             rcode = nf90_open('ps.nc', nf90_nowrite, ncidps)
    1771              IF (rcode.NE.NF_NOERR) THEN
     1771             IF (rcode.NE.nf90_noerr) THEN
    17721772              abort_message='Nudging: error -> no file ps.nc'
    17731773              CALL abort_gcm(modname,abort_message,1)
    17741774             ENDIF
    17751775             rcode = nf90_inq_varid(ncidps, 'SP', varidps)
    1776              IF (rcode.NE.NF_NOERR) THEN
     1776             IF (rcode.NE.nf90_noerr) THEN
    17771777              abort_message='Nudging: error -> no SP variable in file ps.nc'
    17781778              CALL abort_gcm(modname,abort_message,1)
     
    18941894    USE netcdf, ONLY: nf90_put_var
    18951895    IMPLICIT NONE
    1896 
    1897     include "netcdf.inc"
    18981896    include "dimensions.h"
    18991897    include "paramet.h"
     
    19271925           write(*,*)trim(modname)//' Reading nudging on model levels'
    19281926           rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl)
    1929            IF (rcode.NE.NF_NOERR) THEN
     1927           IF (rcode.NE.nf90_noerr) THEN
    19301928             abort_message='Nudging: error -> no file apbp.nc'
    19311929           CALL abort_gcm(modname,abort_message,1)
    19321930           ENDIF
    19331931           rcode = nf90_inq_varid(ncidpl, 'AP', varidap)
    1934            IF (rcode.NE.NF_NOERR) THEN
     1932           IF (rcode.NE.nf90_noerr) THEN
    19351933             abort_message='Nudging: error -> no AP variable in file apbp.nc'
    19361934           CALL abort_gcm(modname,abort_message,1)
    19371935           ENDIF
    19381936           rcode = nf90_inq_varid(ncidpl, 'BP', varidbp)
    1939            IF (rcode.NE.NF_NOERR) THEN
     1937           IF (rcode.NE.nf90_noerr) THEN
    19401938             abort_message='Nudging: error -> no BP variable in file apbp.nc'
    19411939             CALL abort_gcm(modname,abort_message,1)
     
    19461944         if (guide_plevs.EQ.2) then
    19471945           rcode = nf90_open('P.nc', nf90_nowrite, ncidp)
    1948            IF (rcode.NE.NF_NOERR) THEN
     1946           IF (rcode.NE.nf90_noerr) THEN
    19491947             abort_message='Nudging: error -> no file P.nc'
    19501948             CALL abort_gcm(modname,abort_message,1)
    19511949           ENDIF
    19521950           rcode = nf90_inq_varid(ncidp, 'PRES', varidp)
    1953            IF (rcode.NE.NF_NOERR) THEN
     1951           IF (rcode.NE.nf90_noerr) THEN
    19541952             abort_message='Nudging: error -> no PRES variable in file P.nc'
    19551953             CALL abort_gcm(modname,abort_message,1)
     
    19611959         if (guide_u) then
    19621960           rcode = nf90_open('u.nc', nf90_nowrite, ncidu)
    1963            IF (rcode.NE.NF_NOERR) THEN
     1961           IF (rcode.NE.nf90_noerr) THEN
    19641962             abort_message='Nudging: error -> no file u.nc'
    19651963             CALL abort_gcm(modname,abort_message,1)
    19661964           ENDIF
    19671965           rcode = nf90_inq_varid(ncidu, 'UWND', varidu)
    1968            IF (rcode.NE.NF_NOERR) THEN
     1966           IF (rcode.NE.nf90_noerr) THEN
    19691967             abort_message='Nudging: error -> no UWND variable in file u.nc'
    19701968             CALL abort_gcm(modname,abort_message,1)
     
    19771975         if (guide_v) then
    19781976           rcode = nf90_open('v.nc', nf90_nowrite, ncidv)
    1979            IF (rcode.NE.NF_NOERR) THEN
     1977           IF (rcode.NE.nf90_noerr) THEN
    19801978             abort_message='Nudging: error -> no file v.nc'
    19811979             CALL abort_gcm(modname,abort_message,1)
    19821980           ENDIF
    19831981           rcode = nf90_inq_varid(ncidv, 'VWND', varidv)
    1984            IF (rcode.NE.NF_NOERR) THEN
     1982           IF (rcode.NE.nf90_noerr) THEN
    19851983             abort_message='Nudging: error -> no VWND variable in file v.nc'
    19861984             CALL abort_gcm(modname,abort_message,1)
     
    19921990         if (guide_T) then
    19931991           rcode = nf90_open('T.nc', nf90_nowrite, ncidt)
    1994            IF (rcode.NE.NF_NOERR) THEN
     1992           IF (rcode.NE.nf90_noerr) THEN
    19951993             abort_message='Nudging: error -> no file T.nc'
    19961994             CALL abort_gcm(modname,abort_message,1)
    19971995           ENDIF
    19981996           rcode = nf90_inq_varid(ncidt, 'AIR', varidt)
    1999            IF (rcode.NE.NF_NOERR) THEN
     1997           IF (rcode.NE.nf90_noerr) THEN
    20001998             abort_message='Nudging: error -> no AIR variable in file T.nc'
    20011999             CALL abort_gcm(modname,abort_message,1)
     
    20072005         if (guide_Q) then
    20082006           rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ)
    2009            IF (rcode.NE.NF_NOERR) THEN
     2007           IF (rcode.NE.nf90_noerr) THEN
    20102008             abort_message='Nudging: error -> no file hur.nc'
    20112009             CALL abort_gcm(modname,abort_message,1)
    20122010           ENDIF
    20132011           rcode = nf90_inq_varid(ncidQ, 'RH', varidQ)
    2014            IF (rcode.NE.NF_NOERR) THEN
     2012           IF (rcode.NE.nf90_noerr) THEN
    20152013             abort_message='Nudging: error -> no RH,variable in file hur.nc'
    20162014             CALL abort_gcm(modname,abort_message,1)
     
    20222020         if ((guide_P).OR.(guide_plevs.EQ.1)) then
    20232021           rcode = nf90_open('ps.nc', nf90_nowrite, ncidps)
    2024            IF (rcode.NE.NF_NOERR) THEN
     2022           IF (rcode.NE.nf90_noerr) THEN
    20252023             abort_message='Nudging: error -> no file ps.nc'
    20262024             CALL abort_gcm(modname,abort_message,1)
    20272025           ENDIF
    20282026           rcode = nf90_inq_varid(ncidps, 'SP', varidps)
    2029            IF (rcode.NE.NF_NOERR) THEN
     2027           IF (rcode.NE.nf90_noerr) THEN
    20302028             abort_message='Nudging: error -> no SP variable in file ps.nc'
    20312029             CALL abort_gcm(modname,abort_message,1)
     
    21772175    INCLUDE "dimensions.h"
    21782176    INCLUDE "paramet.h"
    2179     INCLUDE "netcdf.inc"
    21802177    INCLUDE "comgeom2.h"
    21812178
     
    22342231! ----------------------------------------------
    22352232! Ouverture du fichier
    2236         ierr=NF_CREATE("guide_ins.nc",IOR(NF_CLOBBER,NF_64BIT_OFFSET),nid)
     2233        ierr=nf90_create("guide_ins.nc",IOR(nf90_clobber,nf90_64bit_offset),nid)
    22372234! Definition des dimensions
    2238         ierr=NF_DEF_DIM(nid,"LONU",iip1,id_lonu)
    2239         ierr=NF_DEF_DIM(nid,"LONV",iip1,id_lonv)
    2240         ierr=NF_DEF_DIM(nid,"LATU",jjp1,id_latu)
    2241         ierr=NF_DEF_DIM(nid,"LATV",jjm,id_latv)
    2242         ierr=NF_DEF_DIM(nid,"LEVEL",llm,id_lev)
    2243         ierr=NF_DEF_DIM(nid,"TIME",NF_UNLIMITED,id_tim)
     2235        ierr=nf90_def_dim(nid,"LONU",iip1,id_lonu)
     2236        ierr=nf90_def_dim(nid,"LONV",iip1,id_lonv)
     2237        ierr=nf90_def_dim(nid,"LATU",jjp1,id_latu)
     2238        ierr=nf90_def_dim(nid,"LATV",jjm,id_latv)
     2239        ierr=nf90_def_dim(nid,"LEVEL",llm,id_lev)
     2240        ierr=nf90_def_dim(nid,"TIME",nf90_unlimited,id_tim)
    22442241
    22452242! Creation des variables dimensions
    2246         ierr=NF_DEF_VAR(nid,"LONU",NF_FLOAT,1,id_lonu,vid_lonu)
    2247         ierr=NF_DEF_VAR(nid,"LONV",NF_FLOAT,1,id_lonv,vid_lonv)
    2248         ierr=NF_DEF_VAR(nid,"LATU",NF_FLOAT,1,id_latu,vid_latu)
    2249         ierr=NF_DEF_VAR(nid,"LATV",NF_FLOAT,1,id_latv,vid_latv)
    2250         ierr=NF_DEF_VAR(nid,"LEVEL",NF_FLOAT,1,id_lev,vid_lev)
    2251         ierr=NF_DEF_VAR(nid,"cu",NF_FLOAT,2,(/id_lonu,id_latu/),vid_cu)
    2252         ierr=NF_DEF_VAR(nid,"cv",NF_FLOAT,2,(/id_lonv,id_latv/),vid_cv)
    2253         ierr=NF_DEF_VAR(nid,"au",NF_FLOAT,2,(/id_lonu,id_latu/),vid_au)
    2254         ierr=NF_DEF_VAR(nid,"av",NF_FLOAT,2,(/id_lonv,id_latv/),vid_av)
     2243        ierr=nf90_def_var(nid,"LONU",nf90_float,id_lonu,vid_lonu)
     2244        ierr=nf90_def_var(nid,"LONV",nf90_float,id_lonv,vid_lonv)
     2245        ierr=nf90_def_var(nid,"LATU",nf90_float,id_latu,vid_latu)
     2246        ierr=nf90_def_var(nid,"LATV",nf90_float,id_latv,vid_latv)
     2247        ierr=nf90_def_var(nid,"LEVEL",nf90_float,id_lev,vid_lev)
     2248        ierr=nf90_def_var(nid,"cu",nf90_float,(/id_lonu,id_latu/),vid_cu)
     2249        ierr=nf90_def_var(nid,"cv",nf90_float,(/id_lonv,id_latv/),vid_cv)
     2250        ierr=nf90_def_var(nid,"au",nf90_float,(/id_lonu,id_latu/),vid_au)
     2251        ierr=nf90_def_var(nid,"av",nf90_float,(/id_lonv,id_latv/),vid_av)
    22552252        call nf95_def_var(nid, "alpha_T", nf90_float, (/id_lonv, id_latu/), &
    22562253             varid_alpha_t)
     
    22582255             varid_alpha_q)
    22592256
    2260         ierr=NF_ENDDEF(nid)
     2257        ierr=nf90_enddef(nid)
    22612258
    22622259! Enregistrement des variables dimensions
     
    22752272! Cr�ation des variables sauvegard�es
    22762273! --------------------------------------------------------------------
    2277         ierr = NF_REDEF(nid)
     2274        ierr = nf90_redef(nid)
    22782275! Pressure (GCM)
    22792276        dim4=(/id_lonv,id_latu,id_lev,id_tim/)
    2280         ierr = NF_DEF_VAR(nid,"SP",NF_FLOAT,4,dim4,varid)
     2277        ierr = nf90_def_var(nid,"SP",nf90_float,dim4,varid)
    22812278! Surface pressure (guidage)
    22822279        IF (guide_P) THEN
    22832280            dim3=(/id_lonv,id_latu,id_tim/)
    2284             ierr = NF_DEF_VAR(nid,"ps",NF_FLOAT,3,dim3,varid)
     2281            ierr = nf90_def_var(nid,"ps",nf90_float,dim3,varid)
    22852282        ENDIF
    22862283! Zonal wind
    22872284        IF (guide_u) THEN
    22882285            dim4=(/id_lonu,id_latu,id_lev,id_tim/)
    2289             ierr = NF_DEF_VAR(nid,"u",NF_FLOAT,4,dim4,varid)
    2290             ierr = NF_DEF_VAR(nid,"ua",NF_FLOAT,4,dim4,varid)
    2291             ierr = NF_DEF_VAR(nid,"ucov",NF_FLOAT,4,dim4,varid)
     2286            ierr = nf90_def_var(nid,"u",nf90_float,dim4,varid)
     2287            ierr = nf90_def_var(nid,"ua",nf90_float,dim4,varid)
     2288            ierr = nf90_def_var(nid,"ucov",nf90_float,dim4,varid)
    22922289        ENDIF
    22932290! Merid. wind
    22942291        IF (guide_v) THEN
    22952292            dim4=(/id_lonv,id_latv,id_lev,id_tim/)
    2296             ierr = NF_DEF_VAR(nid,"v",NF_FLOAT,4,dim4,varid)
    2297             ierr = NF_DEF_VAR(nid,"va",NF_FLOAT,4,dim4,varid)
    2298             ierr = NF_DEF_VAR(nid,"vcov",NF_FLOAT,4,dim4,varid)
     2293            ierr = nf90_def_var(nid,"v",nf90_float,dim4,varid)
     2294            ierr = nf90_def_var(nid,"va",nf90_float,dim4,varid)
     2295            ierr = nf90_def_var(nid,"vcov",nf90_float,dim4,varid)
    22992296        ENDIF
    23002297! Pot. Temperature
    23012298        IF (guide_T) THEN
    23022299            dim4=(/id_lonv,id_latu,id_lev,id_tim/)
    2303             ierr = NF_DEF_VAR(nid,"teta",NF_FLOAT,4,dim4,varid)
     2300            ierr = nf90_def_var(nid,"teta",nf90_float,dim4,varid)
    23042301        ENDIF
    23052302! Specific Humidity
    23062303        IF (guide_Q) THEN
    23072304            dim4=(/id_lonv,id_latu,id_lev,id_tim/)
    2308             ierr = NF_DEF_VAR(nid,"q",NF_FLOAT,4,dim4,varid)
     2305            ierr = nf90_def_var(nid,"q",nf90_float,dim4,varid)
    23092306        ENDIF
    23102307
    2311         ierr = NF_ENDDEF(nid)
    2312         ierr = NF_CLOSE(nid)
     2308        ierr = nf90_enddef(nid)
     2309        ierr = nf90_close(nid)
    23132310    ENDIF ! timestep=0
    23142311
     
    23172314! --------------------------------------------------------------------
    23182315
    2319     ierr=NF_OPEN("guide_ins.nc",NF_WRITE,nid)
     2316    ierr=nf90_open("guide_ins.nc",nf90_write,nid)
    23202317
    23212318    IF (varname=="SP") timestep=timestep+1
    23222319
    2323     ierr = NF_INQ_VARID(nid,varname,varid)
     2320    ierr = nf90_inq_varid(nid,varname,varid)
    23242321    SELECT CASE (varname)
    23252322    CASE ("SP","ps")
     
    23602357
    23612358    ierr = nf90_put_var(nid, varid, field_glo, start, count)
    2362     ierr = NF_CLOSE(nid)
     2359    ierr = nf90_close(nid)
    23632360
    23642361       DEALLOCATE(field_glo)
Note: See TracChangeset for help on using the changeset viewer.