-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into hotfix/add_missing_doc_page
- Loading branch information
Showing
9 changed files
with
253 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# cv headaer list | ||
|
||
A simple tool that reads a binary _cv_ file and lists relevant header data. | ||
|
||
## Usage | ||
```shell | ||
user@localhost:~$ cv_header_list -h | ||
|
||
NAME | ||
cv_header_list - list cv header | ||
|
||
USAGE | ||
cv_header_list -i <cv-file> | ||
[ -h ] | ||
|
||
DESCRIPTION | ||
Script to start new LBC processing suite | ||
|
||
OPTIONS | ||
|
||
-i cv-file | ||
cv file | ||
|
||
-h Help! Print usage information. | ||
|
||
user@localhost:~$ | ||
|
||
``` | ||
|
||
## Example | ||
```shell | ||
user@localhost:~$ cv_header_list -i /home/ewhelan/stab_40h1_IRELAND25_064_480.cv | ||
|
||
JPDAYS :: 480 | ||
SW(lon-lat) :: -19.520623099467286 42.575525141583732 | ||
NE(lon-lat) :: 4.3664253929474990 63.303769438767112 | ||
REF(lon-lat) :: 5.0000001489527870 53.500001593794821 | ||
NDGL :: 800 | ||
NDLON :: 800 | ||
NDGUX :: 789 | ||
NDLUX :: 789 | ||
NSMAX :: 399 | ||
NMSMAX :: 399 | ||
NFLEVG :: 65 | ||
|
||
user@localhost:~$ | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script will write stats from Jb files in ASCII | ||
# suitable for plotting ... | ||
|
||
bold=$(tput bold) | ||
normal=$(tput sgr0) | ||
unline=$(tput smul) | ||
|
||
PROGNAME=`basename $0` | ||
|
||
# Define a usage function | ||
usage() { | ||
|
||
cat << USAGE | ||
${bold}NAME${normal} | ||
${PROGNAME} - list cv header | ||
${bold}USAGE${normal} | ||
${PROGNAME} -i <cv-file> | ||
[ -h ] | ||
${bold}DESCRIPTION${normal} | ||
Script to start new LBC processing suite | ||
${bold}OPTIONS${normal} | ||
-i ${unline}cv-file${normal} | ||
cv file | ||
-h Help! Print usage information. | ||
USAGE | ||
} | ||
|
||
CVFILE=DUMMY | ||
# | ||
# Where am I? | ||
# | ||
this_script_loc="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
appdir=$(dirname ${this_script_loc}) | ||
bindir=${appdir}/bin | ||
libdir=${appdir}/lib | ||
exedir=${appdir}/libexec | ||
levdir=${appdir}/share/levdef | ||
|
||
if [ ${#} -eq 0 ]; then | ||
echo "No command line arguments provided" | ||
echo "Try '${PROGNAME} -h' for more information" | ||
exit 1 | ||
fi | ||
|
||
while getopts i:h option | ||
do | ||
case $option in | ||
i) | ||
CVFILE=$OPTARG | ||
;; | ||
h) | ||
usage | ||
exit 0 | ||
;; | ||
*) | ||
echo | ||
echo "Try '${PROGNAME} -h' for more information" | ||
;; | ||
esac | ||
done | ||
|
||
if [ ${CVFILE} == "DUMMY" ]; then | ||
echo "Please define cv-file using -i" | ||
echo "Try '${PROGNAME} -h' for more information" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -s ${CVFILE} ]; then | ||
echo "cv-file, ${CVFILE}, not found" | ||
echo "Try '${PROGNAME} -h' for more information" | ||
exit 1 | ||
fi | ||
|
||
# | ||
# Create soft links for cv_header_list.x | ||
# | ||
ln -sf ${CVFILE} stabal96.cv | ||
|
||
${exedir}/cv_header_list.x | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
program cv_header_list | ||
! | ||
implicit none | ||
! | ||
! Geometry definition | ||
! | ||
real(kind=8) :: gsize_in | ||
integer(kind=4) :: nlev_nl | ||
integer(kind=4) :: jpnlev_nl | ||
parameter (jpnlev_nl=200) | ||
real(kind=8) :: ahalf_nl(jpnlev_nl+1),bhalf_nl(jpnlev_nl+1) | ||
integer(kind=4) :: printlev | ||
namelist/namjbconv/ gsize_in,nlev_nl,ahalf_nl,bhalf_nl,printlev | ||
|
||
integer(kind=4) :: nlon_in,nlat_in | ||
real(kind=8) :: lon0_in,lat0_in | ||
real(kind=8) :: lon1_in,lat1_in,lon2_in,lat2_in | ||
real(kind=8) :: afull_nl(jpnlev_nl),bfull_nl(jpnlev_nl) | ||
real(kind=8) :: pfull_nl(jpnlev_nl) | ||
! | ||
! Variables read from input file or written to output file | ||
! | ||
character :: clid*10,clcom*70 | ||
integer(kind=4) :: iorig,idate,itime,inbset | ||
integer(kind=4) :: inbmat,iweight,itypmat,isetdist,ilendef | ||
integer(kind=4) :: idim1,idim2,ipar1,ipar2,itypdi1,itypdi2 | ||
real(kind=8) :: zlon1,zlat1,zlon2,zlat2,zlon0,zlat0 | ||
integer(kind=4) :: idgl,idlon,idgux,idlux,iismax,imsmax,iflevg,ichkwd | ||
real(kind=8),allocatable :: zfcovtps_in(:,:,:),zfcovq_in(:,:,:),zfcovp_in(:,:,:),zfcovd_in(:,:,:) | ||
real(kind=8),allocatable :: zpdat_in(:) | ||
real(kind=8),allocatable :: sdiv_in(:,:,:), stps_in(:,:,:),shum_in(:,:,:), bfact_in(:) | ||
real(kind=8),allocatable :: bfact_iso(:) | ||
! | ||
! File unit numbers | ||
! | ||
integer(kind=4) :: nuljb_in,nulout,nulnam | ||
! | ||
! Other local variables | ||
! | ||
integer(kind=4) :: itrunc,nflevg | ||
integer(kind=4) :: jn,jk,jj,jl | ||
integer(kind=4) :: nsmax_jb_in,nmsmax_jb_in | ||
integer(kind=4),allocatable :: isorel2_in(:),isodor2_in(:) | ||
integer(kind=4) :: ispec2_in,iii | ||
character :: fnspdens*15 | ||
real(kind=8) :: zsumcov,zsumvar1,zsumvar2,pi,zscale | ||
! | ||
! Initialize some work variables | ||
! | ||
nuljb_in=10 | ||
nulout=06 | ||
nulnam=05 | ||
printlev=1 | ||
pi=atan(1.)*4. | ||
|
||
! Open input covariance file | ||
! | ||
open(nuljb_in,file='stabal96.cv',form='unformatted') | ||
! | ||
! Read GSA file header | ||
! | ||
read(nuljb_in) clid | ||
read(nuljb_in) clcom | ||
read(nuljb_in) iorig,idate,itime,inbset | ||
write(nulout,*) '' | ||
! | ||
! Read GSA set 0 header : model geometry definition (LAM case !) | ||
! | ||
read(nuljb_in) inbmat,iweight,itypmat,isetdist,ilendef | ||
read(nuljb_in) idim1,idim2,ipar1,ipar2,itypdi1,itypdi2 | ||
read(nuljb_in) | ||
read(nuljb_in) | ||
read(nuljb_in) zlon1,zlat1,zlon2,zlat2,zlon0,zlat0,& | ||
& idgl,idlon,idgux,idlux,iismax,imsmax,iflevg,ichkwd | ||
|
||
write(nulout,*) 'JPDAYS :: ',iweight | ||
write(nulout,*) 'SW(lon-lat) :: ',zlon1,zlat1 | ||
write(nulout,*) 'NE(lon-lat) :: ',zlon2,zlat2 | ||
write(nulout,*) 'REF(lon-lat) :: ',zlon0,zlat0 | ||
write(nulout,*) 'NDGL :: ',idgl | ||
write(nulout,*) 'NDLON :: ',idlon | ||
write(nulout,*) 'NDGUX :: ',idgux | ||
write(nulout,*) 'NDLUX :: ',idlux | ||
write(nulout,*) 'NSMAX :: ',iismax | ||
write(nulout,*) 'NMSMAX :: ',imsmax | ||
write(nulout,*) 'NFLEVG :: ',iflevg | ||
! | ||
stop | ||
end program cv_header_list |
Oops, something went wrong.