--- trunk/Sources/dyn3d/dynetat0.f 2015/07/16 17:39:10 156 +++ trunk/dyn3d/dynetat0.f 2018/03/20 09:35:59 265 @@ -1,6 +1,6 @@ module dynetat0_m - use dimens_m, only: iim, jjm + use dimensions, only: iim, jjm IMPLICIT NONE @@ -45,6 +45,7 @@ REAL xprimm025(iim + 1), xprimp025(iim + 1) REAL rlatu1(jjm), rlatu2(jjm), yprimu1(jjm), yprimu2(jjm) + REAL ang0, etot0, ptot0, ztot0, stot0 save @@ -58,9 +59,8 @@ use comconst, only: dtvr use conf_gcm_m, only: raz_date - use dimens_m, only: iim, jjm, llm, nqmx + use dimensions, only: iim, jjm, llm, nqmx use disvert_m, only: pa - use ener, only: etot0, ang0, ptot0, stot0, ztot0 use iniadvtrac_m, only: tname use netcdf, only: NF90_NOWRITE, NF90_NOERR use netcdf95, only: NF95_GET_VAR, nf95_open, nf95_inq_varid, NF95_CLOSE, & @@ -79,7 +79,7 @@ ! Local variables: INTEGER iq - REAL, pointer:: tab_cntrl(:) ! tableau des param\`etres du run + REAL, allocatable:: tab_cntrl(:) ! tableau des param\`etres du run INTEGER ierr, ncid, varid namelist /dynetat0_nml/ day_ref, annee_ref @@ -148,8 +148,6 @@ print *, "day_ini = ", day_ini - deallocate(tab_cntrl) ! pointer - call NF95_INQ_VARID (ncid, "rlonu", varid) call NF95_GET_VAR(ncid, varid, rlonu) @@ -186,7 +184,7 @@ CALL nf95_inq_varid(ncid, 'yprimu2', varid) CALL nf95_get_var(ncid, varid, yprimu2) - call NF95_INQ_VARID (ncid, "phisinit", varid) + call NF95_INQ_VARID (ncid, "phis", varid) call NF95_GET_VAR(ncid, varid, phis) call NF95_INQ_VARID (ncid, "ucov", varid) @@ -200,12 +198,12 @@ DO iq = 1, nqmx call NF95_INQ_VARID(ncid, tname(iq), varid, ierr) - IF (ierr /= NF90_NOERR) THEN + IF (ierr == NF90_NOERR) THEN + call NF95_GET_VAR(ncid, varid, q(:, :, :, iq)) + ELSE PRINT *, 'dynetat0: "' // tname(iq) // '" not found, ' // & "setting it to zero..." q(:, :, :, iq) = 0. - ELSE - call NF95_GET_VAR(ncid, varid, q(:, :, :, iq)) ENDIF ENDDO