From 4f2426a8f82b81eaa6d55f1ca63b3f67aa8bfc64 Mon Sep 17 00:00:00 2001 From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr> Date: Tue, 23 Jan 2018 11:07:40 +0100 Subject: [PATCH] Philippe 23/01/2018: IO: add support for Arakawa uvw point in NC4 files (probably not used but set for completeness and future use) + small improvement for uw and vw points (more adequate choice of coordinates) --- src/LIB/SURCOUCHE/src/modd_netcdf.f90 | 2 +- src/LIB/SURCOUCHE/src/mode_netcdf.f90 | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/LIB/SURCOUCHE/src/modd_netcdf.f90 b/src/LIB/SURCOUCHE/src/modd_netcdf.f90 index 6b0c890a2..022ee3912 100644 --- a/src/LIB/SURCOUCHE/src/modd_netcdf.f90 +++ b/src/LIB/SURCOUCHE/src/modd_netcdf.f90 @@ -24,7 +24,7 @@ TYPE DIMCDF TYPE(DIMCDF), POINTER :: NEXT => NULL() END TYPE DIMCDF -TYPE(DIMCDF),DIMENSION(3,0:7) :: NCOORDID !X,Y,Z coordinates for the 8 Arakawa points +TYPE(DIMCDF),DIMENSION(3,0:8) :: NCOORDID !X,Y,Z coordinates for the Arakawa points !0 2nd-dimension is to treat NGRID=0 case without crash END MODULE MODD_NETCDF diff --git a/src/LIB/SURCOUCHE/src/mode_netcdf.f90 b/src/LIB/SURCOUCHE/src/mode_netcdf.f90 index 800498bc5..bda97e58d 100644 --- a/src/LIB/SURCOUCHE/src/mode_netcdf.f90 +++ b/src/LIB/SURCOUCHE/src/mode_netcdf.f90 @@ -140,7 +140,7 @@ IF (.NOT. ASSOCIATED(PIOCDF%DIM_LEVEL_W)) PIOCDF%DIM_LEVEL_W => GETDIMCDF(TPFILE IF (.NOT. ASSOCIATED(PIOCDF%DIMTIME)) PIOCDF%DIMTIME => GETDIMCDF(TPFILE, NF90_UNLIMITED, 'time') -! Store X,Y,Z coordinates for the 4 Arakawa points +! Store X,Y,Z coordinates for the Arakawa points ! Mass point NCOORDID(1,1) = PIOCDF%DIM_NI NCOORDID(2,1) = PIOCDF%DIM_NJ @@ -163,12 +163,16 @@ NCOORDID(2,5) = PIOCDF%DIM_NJ_V NCOORDID(3,5) = PIOCDF%DIM_LEVEL ! eta vorticity point (=uw point) NCOORDID(1,6) = PIOCDF%DIM_NI_U -NCOORDID(2,6) = PIOCDF%DIM_NJ +NCOORDID(2,6) = PIOCDF%DIM_NJ_U NCOORDID(3,6) = PIOCDF%DIM_LEVEL_W -! xi vorticity point (=vw point) -NCOORDID(1,7) = PIOCDF%DIM_NI +! zeta vorticity point (=vw point) +NCOORDID(1,7) = PIOCDF%DIM_NI_V NCOORDID(2,7) = PIOCDF%DIM_NJ_V NCOORDID(3,7) = PIOCDF%DIM_LEVEL_W +! fw point (=uvw point) +NCOORDID(1,8) = PIOCDF%DIM_NI_U +NCOORDID(2,8) = PIOCDF%DIM_NJ_V +NCOORDID(3,8) = PIOCDF%DIM_LEVEL_W END SUBROUTINE IO_SET_KNOWNDIMS_NC4 @@ -687,7 +691,7 @@ ELSE END IF END IF ! -IF(IGRID<0 .OR. IGRID>7) THEN +IF(IGRID<0 .OR. IGRID>8) THEN WRITE(YINT,'( I0 )') IGRID CALL PRINT_MSG(NVERB_FATAL,'IO','FILLVDIMS','invalid NGRID ('//TRIM(YINT)//') for field '//TRIM(TPFIELD%CMNHNAME)) END IF -- GitLab