[cdftools] 131/228: JMM : fixes in cdfmkmask for -mbathy option

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jun 12 08:21:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch master
in repository cdftools.

commit 00c3fe9266832d624c57be6908d7206c47318429
Author: molines <molines at 1055176f-818a-41d9-83e1-73fbe5b947c5>
Date:   Wed Jan 25 14:03:49 2012 +0000

    JMM : fixes in cdfmkmask for -mbathy option
    
    
    git-svn-id: http://servforge.legi.grenoble-inp.fr/svn/CDFTOOLS/trunk@579 1055176f-818a-41d9-83e1-73fbe5b947c5
---
 cdfmkmask.f90 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cdfmkmask.f90 b/cdfmkmask.f90
index 9981b0b..897b622 100644
--- a/cdfmkmask.f90
+++ b/cdfmkmask.f90
@@ -41,6 +41,7 @@ PROGRAM cdfmkmask
    REAL(KIND=4)                              :: rbatmin, rbatmax         ! limit in latitude
    REAL(KIND=4)                              :: rvarmin, rvarmax         ! limit in variable
    REAL(KIND=4), DIMENSION(:)  , ALLOCATABLE :: tim                      ! time counter
+   REAL(KIND=4), DIMENSION(:)  , ALLOCATABLE :: rdep                     ! depth 
    REAL(KIND=4), DIMENSION(:,:), ALLOCATABLE :: tmask, zmask             ! 2D mask at current level
    REAL(KIND=4), DIMENSION(:,:), ALLOCATABLE :: rlon, rlat               ! latitude and longitude
    REAL(KIND=4), DIMENSION(:,:), ALLOCATABLE :: rbat                     ! bathymetry 
@@ -48,6 +49,7 @@ PROGRAM cdfmkmask
    CHARACTER(LEN=256)                        :: cf_tfil                  ! file name
    CHARACTER(LEN=256)                        :: cf_out = 'mask_sal.nc'   ! output file
    CHARACTER(LEN=256)                        :: cv_mask                  ! variable name
+   CHARACTER(LEN=256)                        :: cv_dep                   ! variable name
    CHARACTER(LEN=256)                        :: cldum                    ! dummy string
 
    TYPE (variable), DIMENSION(4)             :: stypvar                  ! output attribute
@@ -166,6 +168,7 @@ PROGRAM cdfmkmask
 
    IF (TRIM(cf_tfil)=='-mbathy') THEN
       cv_mask = 'mbathy'
+      cv_dep  = 'nav_lev'
       cf_tfil = 'bathylevel.nc'
       cn_z    = 'z'
       lmbathy = .TRUE.
@@ -178,6 +181,7 @@ PROGRAM cdfmkmask
    npjglo = getdim (cf_tfil,cn_y)
    IF ( lmbathy ) THEN
       npk  = getdim (cn_fzgr,cn_z)
+      ALLOCATE ( rdep(npk) )
    ELSE
       npk  = getdim (cf_tfil,cn_z)
    ENDIF
@@ -227,8 +231,10 @@ PROGRAM cdfmkmask
 
    ncout = create      (cf_out, cf_tfil,  npiglo, npjglo, npk)
    ierr  = createvar   (ncout,    stypvar, 4,      ipk,    id_varout )
+
    IF ( lmbathy ) THEN
-     ierr  = putheadervar(ncout,    cn_fzgr,  npiglo, npjglo, npk)
+     rdep(:) = getvare3(cn_fzgr, cv_dep ,npk)
+     ierr  = putheadervar(ncout,    cf_tfil,  npiglo, npjglo, npk, pdep=rdep, cdep='nav_lev')
    ELSE
      ierr  = putheadervar(ncout,    cf_tfil,  npiglo, npjglo, npk)
    ENDIF

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cdftools.git



More information about the debian-science-commits mailing list