[cdftools] 43/228: RD : netcdf output for cdficediags, cdfmaxmoc, cdfmean, cdfsigtrp, cdfhflx becomes the standard behavior
Alastair McKinstry
mckinstry at moszumanska.debian.org
Fri Jun 12 08:21:26 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 6d9cc1432fafe039a49ea126898ef31ea04f8006
Author: dussin <dussin at 1055176f-818a-41d9-83e1-73fbe5b947c5>
Date: Wed May 19 10:19:07 2010 +0000
RD : netcdf output for cdficediags, cdfmaxmoc, cdfmean, cdfsigtrp, cdfhflx becomes the standard behavior
git-svn-id: http://servforge.legi.grenoble-inp.fr/svn/CDFTOOLS/trunk@319 1055176f-818a-41d9-83e1-73fbe5b947c5
---
cdfhflx.f90 | 30 +++++++++---------------------
cdficediags.f90 | 31 ++++++++++---------------------
cdfmaxmoc.f90 | 19 +++++--------------
cdfmean.f90 | 13 +++----------
cdfsigtrp.f90 | 5 +----
5 files changed, 28 insertions(+), 70 deletions(-)
diff --git a/cdfhflx.f90 b/cdfhflx.f90
index daef8a7..f229051 100644
--- a/cdfhflx.f90
+++ b/cdfhflx.f90
@@ -57,26 +57,18 @@ PROGRAM cdfhflx
CHARACTER(LEN=256) :: cfilet , cfileout='hflx.out'
CHARACTER(LEN=256) :: coordhgr='mesh_hgr.nc',cbasinmask='new_maskglo.nc'
! added to write in netcdf
- CHARACTER(LEN=256) :: cfileoutnc='cdfhflx.nc' , cflagcdf
+ CHARACTER(LEN=256) :: cfileoutnc='cdfhflx.nc'
CHARACTER(LEN=256) :: cdunits, cdlong_name, cdshort_name
LOGICAL :: llglo = .FALSE. !: indicator for presence of new_maskglo.nc file
! added to write in netcdf
- LOGICAL :: lwrtcdf=.FALSE.
+ LOGICAL :: lwrtcdf=.TRUE.
INTEGER :: istatus
!! Read command line and output usage message if not compliant.
narg= iargc()
- IF ( narg == 0 ) THEN
- PRINT *,' Usage : cdfhflx T file [cdfout]'
- PRINT *,' Computes the MHT from heat fluxes '
- PRINT *,' Files mesh_hgr.nc, new_maskglo.nc must be in the current directory'
- PRINT *,' Output on hflx.out (ascii file )'
- STOP
- ENDIF
-
- IF ( narg >= 1 ) THEN
+ IF ( narg == 1 ) THEN
CALL getarg (1, cfilet)
npiglo= getdim (cfilet,'x')
npjglo= getdim (cfilet,'y')
@@ -85,16 +77,12 @@ PROGRAM cdfhflx
PRINT *, 'npiglo=', npiglo
PRINT *, 'npjglo=', npjglo
PRINT *, 'npk =', npk
- ENDIF
-
- IF ( narg == 2 ) THEN
- CALL getarg (2, cflagcdf)
- IF (cflagcdf == 'cdfout') THEN
- lwrtcdf=.TRUE.
- ELSE
- PRINT *,'Uncorrect second argument'
- PRINT *,'second argument must be "cdfout" to write in NetCDF'
- ENDIF
+ ELSE
+ PRINT *,' Usage : cdfhflx T-file '
+ PRINT *,' Computes the MHT from heat fluxes '
+ PRINT *,' Files mesh_hgr.nc, new_maskglo.nc must be in the current directory '
+ PRINT *,' Output on hflx.out (ascii file ) and hflx.nc '
+ STOP
ENDIF
! Detects newmaskglo file
diff --git a/cdficediags.f90 b/cdficediags.f90
index af21f9e..9eac68c 100644
--- a/cdficediags.f90
+++ b/cdficediags.f90
@@ -47,9 +47,9 @@ PROGRAM cdficediag
CHARACTER(LEN=256) :: cfilev , cdum
CHARACTER(LEN=256) :: coordhgr='mesh_hgr.nc', cmask='mask.nc'
! added to write in netcdf
- CHARACTER(LEN=256) :: cfileoutnc='icediags.nc' , cflagcdf
+ CHARACTER(LEN=256) :: cfileoutnc='icediags.nc'
! added to write in netcdf
- LOGICAL :: lwrtcdf=.FALSE.
+ LOGICAL :: lwrtcdf=.TRUE.
INTEGER :: istatus
@@ -57,29 +57,18 @@ PROGRAM cdficediag
!! Read command line and output usage message if not compliant.
narg= iargc()
- IF ( narg == 0 .OR. narg >= 3 ) THEN
- PRINT *,' Usage : cdficediag ncfile [cdfout]'
+ IF ( narg == 1) THEN
+ CALL getarg (1, cfilev)
+ npiglo= getdim (cfilev,'x')
+ npjglo= getdim (cfilev,'y')
+ ELSE
+ PRINT *,' Usage : cdficediag ncfile '
PRINT *,' Files mesh_hgr.nc, mask.nc '
- PRINT *,' must be in the current directory'
- PRINT *,' Output on standard output'
- PRINT *,' Optional Output in NetCDF with cdfout option'
+ PRINT *,' must be in the current directory'
+ PRINT *,' Output on standard output and icediags.nc '
STOP
ENDIF
- CALL getarg (1, cfilev)
-
- npiglo= getdim (cfilev,'x')
- npjglo= getdim (cfilev,'y')
-
- IF ( narg == 2 ) THEN
- CALL getarg (2, cflagcdf)
- IF (cflagcdf=='cdfout') THEN
- lwrtcdf=.TRUE.
- ELSE
- PRINT *, 'unknown option'
- ENDIF
- ENDIF
-
ALLOCATE ( zmask(npiglo,npjglo) ,ff(npiglo,npjglo) )
ALLOCATE ( ricethick(npiglo,npjglo) )
ALLOCATE ( riceldfra(npiglo,npjglo) )
diff --git a/cdfmaxmoc.f90 b/cdfmaxmoc.f90
index 285489a..5c67cf8 100644
--- a/cdfmaxmoc.f90
+++ b/cdfmaxmoc.f90
@@ -45,13 +45,13 @@ PROGRAM cdfmaxmoc
!
CHARACTER(LEN=256) :: cdum, cfile, comment, cbasin, cvar
! added to write in netcdf
- CHARACTER(LEN=256) :: cfileoutnc='maxmoc.nc' , cflagcdf
+ CHARACTER(LEN=256) :: cfileoutnc='maxmoc.nc'
! added to write in netcdf
- LOGICAL :: lwrtcdf=.FALSE.
+ LOGICAL :: lwrtcdf=.TRUE.
! * main program
narg=iargc()
- IF (narg >= 6 .AND. narg <= 7 ) THEN
+ IF (narg == 6) THEN
CALL getarg(1,cfile)
CALL getarg(2,cbasin)
CALL getarg(3,cdum)
@@ -62,22 +62,13 @@ PROGRAM cdfmaxmoc
READ(cdum,*) depmin
CALL getarg(6,cdum)
READ(cdum,*) depmax
- IF (narg==7) THEN
- CALL getarg(7,cdum)
- READ(cdum,*) cflagcdf
- ENDIF
ELSE
- PRINT *,' USAGE: cdfmaxmoc ''ovt_file.nc'' cbasin latmin latmax depmin depmax [cdfout]'
+ PRINT *,' USAGE: cdfmaxmoc ''ovt_file.nc'' cbasin latmin latmax depmin depmax '
PRINT *,' cbasin is one of atl glo inp ind or pac '
- PRINT *,' Output on standard output by default'
- PRINT *,' Output on netcdf is available adding cdfout as last argument'
+ PRINT *,' Output on standard output by default and maxmoc.nc '
STOP
ENDIF
- IF(cflagcdf=='cdfout') THEN
- lwrtcdf=.TRUE.
- ENDIF
-
npjglo=getdim(cfile,'y')
npk=getdim(cfile,'depth')
diff --git a/cdfmean.f90 b/cdfmean.f90
index 2023372..8c2dd50 100644
--- a/cdfmean.f90
+++ b/cdfmean.f90
@@ -51,10 +51,10 @@ PROGRAM cdfmean
CHARACTER(LEN=20) :: ce1, ce2, ce3, cvmask, cvtype
CHARACTER(LEN=256) :: cfilout='out.txt'
! added to write in netcdf
- CHARACTER(LEN=256) :: cfileoutnc='cdfmean.nc' , cflagcdf
+ CHARACTER(LEN=256) :: cfileoutnc='cdfmean.nc'
CHARACTER(LEN=256) :: cdunits, cdlong_name, cdshort_name
! added to write in netcdf
- LOGICAL :: lwrtcdf=.FALSE.
+ LOGICAL :: lwrtcdf=.TRUE.
INTEGER :: istatus
@@ -84,7 +84,7 @@ PROGRAM cdfmean
CALL getarg (3, cvartype)
IF (narg > 3 ) THEN
- IF ( narg < 9 .OR. narg > 10 ) THEN
+ IF ( narg /= 9 ) THEN
PRINT *, ' ERROR : You must give 6 optional values (imin imax jmin jmax kmin kmax)'
STOP
ELSE
@@ -95,16 +95,9 @@ PROGRAM cdfmean
CALL getarg ( 7,cdum) ; READ(cdum,*) jmax
CALL getarg ( 8,cdum) ; READ(cdum,*) kmin
CALL getarg ( 9,cdum) ; READ(cdum,*) kmax
- IF ( narg==10 ) THEN
- CALL getarg (10,cdum) ; READ(cdum,*) cflagcdf
- ENDIF
ENDIF
ENDIF
- IF(cflagcdf=='cdfout') THEN
- lwrtcdf=.TRUE.
- ENDIF
-
cdep='none'
npiglo= getdim (cfilev,'x')
npjglo= getdim (cfilev,'y')
diff --git a/cdfsigtrp.f90 b/cdfsigtrp.f90
index b87725f..940f717 100644
--- a/cdfsigtrp.f90
+++ b/cdfsigtrp.f90
@@ -88,7 +88,7 @@ PROGRAM cdfsigtrp
LOGICAL :: l_print=.FALSE. !: flag for printing additional results
LOGICAL :: l_bimg=.FALSE. !: flag for bimg output
! added to write in netcdf
- LOGICAL :: lwrtcdf=.FALSE.
+ LOGICAL :: lwrtcdf=.TRUE.
CHARACTER(LEN=80) :: cfor9000, cfor9001, cfor9002, cfor9003
@@ -103,7 +103,6 @@ PROGRAM cdfsigtrp
PRINT *,' Possible options :'
PRINT *,' -print :additional output is send to std output'
PRINT *,' -bimg : 2D (x=lat/lon, y=sigma) output on bimg file for hiso, cumul trp, trp'
- PRINT *,' cdfout : output in small netcdf files'
PRINT *,' Files mesh_hgr.nc, mesh_zgr.nc must be in the current directory'
PRINT *,' File section.dat must also be in the current directory '
PRINT *,' Output on trpsig.txt and on standard output '
@@ -125,8 +124,6 @@ PROGRAM cdfsigtrp
l_print = .TRUE.
CASE ('-bimg')
l_bimg = .TRUE.
- CASE ('cdfout')
- lwrtcdf = .TRUE.
CASE DEFAULT
PRINT *,' Unknown option ', TRIM(cdum),' ... ignored'
END SELECT
--
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