NCEPLIBS-bufr 11.7.1
cpmstabs.c
Go to the documentation of this file.
1
5#include "bufrlib.h"
6#include "mstabs.h"
7
47void cpmstabs( f77int *pnmtb,
48 f77int *pibfxyn, char (*pcbscl)[4],
49 char (*pcbsref)[12], char (*pcbbw)[4],
50 char (*pcbunit)[24], char (*pcbmnem)[8],
51 char (*pcbelem)[120],
52 f77int *pnmtd,
53 f77int *pidfxyn, char (*pcdseq)[120],
54 char (*pcdmnem)[8], f77int *pndelem,
55 f77int *pidefxy, f77int *maxcd )
56{
57
58 f77int ii, jj, idx;
59
60 MSTABS_BASE(nmtb) = *pnmtb;
61 for ( ii = 0; ii < *pnmtb; ii++ ) {
62 MSTABS_BASE(ibfxyn)[ii] = pibfxyn[ii];
63 for ( jj = 0; jj < 4; jj++ ) {
64 MSTABS_BASE(cbscl)[ii][jj] = pcbscl[ii][jj];
65 MSTABS_BASE(cbbw)[ii][jj] = pcbbw[ii][jj];
66 }
67 for ( jj = 0; jj < 8; jj++ ) {
68 MSTABS_BASE(cbmnem)[ii][jj] = pcbmnem[ii][jj];
69 }
70 for ( jj = 0; jj < 12; jj++ ) {
71 MSTABS_BASE(cbsref)[ii][jj] = pcbsref[ii][jj];
72 }
73 for ( jj = 0; jj < 24; jj++ ) {
74 MSTABS_BASE(cbunit)[ii][jj] = pcbunit[ii][jj];
75 }
76 for ( jj = 0; jj < 120; jj++ ) {
77 MSTABS_BASE(cbelem)[ii][jj] = pcbelem[ii][jj];
78 }
79 }
80
81 MSTABS_BASE(nmtd) = *pnmtd;
82 for ( ii = 0; ii < *pnmtd; ii++ ) {
83 MSTABS_BASE(idfxyn)[ii] = pidfxyn[ii];
84 MSTABS_BASE(ndelem)[ii] = pndelem[ii];
85 for ( jj = 0; jj < pndelem[ii]; jj++ ) {
86 idx = icvidx( &ii, &jj, maxcd );
87 MSTABS_BASE(idefxy)[idx] = pidefxy[idx];
88 }
89 for ( jj = 0; jj < 8; jj++ ) {
90 MSTABS_BASE(cdmnem)[ii][jj] = pcdmnem[ii][jj];
91 }
92 for ( jj = 0; jj < 120; jj++ ) {
93 MSTABS_BASE(cdseq)[ii][jj] = pcdseq[ii][jj];
94 }
95 }
96
97}
98
Define signatures to enable a number of BUFRLIB subprograms to be called directly from C application ...
void cpmstabs(f77int *pnmtb, f77int *pibfxyn, char(*pcbscl)[4], char(*pcbsref)[12], char(*pcbbw)[4], char(*pcbunit)[24], char(*pcbmnem)[8], char(*pcbelem)[120], f77int *pnmtd, f77int *pidfxyn, char(*pcdseq)[120], char(*pcdmnem)[8], f77int *pndelem, f77int *pidefxy, f77int *maxcd)
This subroutine copies relevant information from the Fortran module MODA_MSTABS arrays to new arrays ...
Definition: cpmstabs.c:47
f77int icvidx(f77int *ii, f77int *jj, f77int *numjj)
C C SUBPROGRAM: ICVIDX C PRGMMR: ATOR ORG: NP12 DATE: 2009-03-23 C C ABSTRACT: THIS ROUTINE COMPUTES ...
Definition: icvidx.c:41
Define signatures and declare variables for internal storage of master Table B and Table D entries.
integer nmtd
Number of master Table D entries (up to a maximum of MXMTBD).
Definition: moda_mstabs.F:61
integer, dimension(:), allocatable ndelem
Numbers of child descriptors corresponding to idfxyn.
Definition: moda_mstabs.F:72
integer, dimension(:), allocatable idfxyn
Bit-wise representations of FXY numbers for master Table D.
Definition: moda_mstabs.F:69
character, dimension(:,:), allocatable cdseq
Sequence names corresponding to idfxyn.
Definition: moda_mstabs.F:70
integer, dimension(:), allocatable idefxy
Bit-wise representations of child descriptors corresponding to idfxyn.
Definition: moda_mstabs.F:73
character, dimension(:,:), allocatable cbscl
Scale factors corresponding to ibfxyn.
Definition: moda_mstabs.F:63
character, dimension(:,:), allocatable cbmnem
Mnemonics corresponding to ibfxyn.
Definition: moda_mstabs.F:67
integer nmtb
Number of master Table B entries (up to a maximum of MXMTBB).
Definition: moda_mstabs.F:60
character, dimension(:,:), allocatable cbsref
Reference values corresponding to ibfxyn.
Definition: moda_mstabs.F:64
character, dimension(:,:), allocatable cbelem
Element names corresponding to ibfxyn.
Definition: moda_mstabs.F:68
character, dimension(:,:), allocatable cbunit
Units corresponding to ibfxyn.
Definition: moda_mstabs.F:66
character, dimension(:,:), allocatable cdmnem
Mnemonics corresponding to idfxyn.
Definition: moda_mstabs.F:71
integer, dimension(:), allocatable ibfxyn
Bit-wise representations of FXY numbers for master Table B.
Definition: moda_mstabs.F:62
character, dimension(:,:), allocatable cbbw
Bit widths corresponding to ibfxyn.
Definition: moda_mstabs.F:65
integer, public maxcd
Maximum number of child descriptors that can be included within the sequence definition of a Table D ...
Definition: modv_MAXCD.f90:18