My Project
Loading...
Searching...
No Matches
transi.h
Go to the documentation of this file.
1/*
2 * (C) Copyright 2014- ECMWF.
3 *
4 * This software is licensed under the terms of the Apache Licence Version 2.0
5 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 * In applying this licence, ECMWF does not waive the privileges and immunities
7 * granted to it by virtue of its status as an intergovernmental organisation
8 * nor does it submit to any jurisdiction.
9 */
10
62
75
76#ifndef ectrans_transi_h
77#define ectrans_transi_h
78
79#include <stddef.h> // size_t
80
81typedef int _bool;
82
83#ifdef __cplusplus
84extern "C" {
85#endif
86
87#include "ectrans/version.h"
88
89#define TRANS_FFT992 1
90#define TRANS_FFTW 2
91
92#define TRANS_SUCCESS 0
93
94struct Trans_t;
95struct DirTrans_t;
96struct DirTransAdj_t;
97struct InvTrans_t;
98struct InvTransAdj_t;
99struct DistGrid_t;
100struct GathGrid_t;
101struct DistSpec_t;
102struct GathSpec_t;
103struct VorDivToUV_t;
104struct SpecNorm_t;
105
106
110const char* trans_error_msg(int errcode);
111
122
132int trans_set_radius(double radius);
133
144int trans_set_nprtrv(int nprtrv);
145
156int trans_set_nprgpew(int nprgpew);
157
167int trans_set_leq_regions(_bool ldeq_regions);
168
177int trans_use_mpi(_bool);
178
190int trans_init(void);
191
207int trans_set_mpi_comm(int mpi_user_comm);
208
209int trans_set_read(struct Trans_t*, const char* filepath);
210int trans_set_write(struct Trans_t*, const char* filepath);
211int trans_set_cache(struct Trans_t*, const void*, size_t);
212
239
240
250int trans_inquire(struct Trans_t* trans, const char* varlist);
251
310int trans_dirtrans(struct DirTrans_t* dirtrans);
311
312
371int trans_dirtrans_adj(struct DirTransAdj_t* dirtransadj);
372
373
439int trans_invtrans(struct InvTrans_t* invtrans);
440
441
442
508int trans_invtrans_adj(struct InvTransAdj_t* invtrans_adj);
509
537int trans_distgrid(struct DistGrid_t* distgrid);
538
571int trans_gathgrid(struct GathGrid_t* gathgrid);
572
603int trans_distspec(struct DistSpec_t* distspec);
604
633int trans_gathspec(struct GathSpec_t* gathspec);
634
665int trans_vordiv_to_UV(struct VorDivToUV_t* vordiv_to_UV);
666
684int trans_specnorm(struct SpecNorm_t* specnorm);
685
694
695
702int trans_finalize(void);
703
704
718struct Trans_t {
719
721 int ndgl;
722 int* nloen;
724 int nlon;
725 int nsmax;
726 _bool llam;
727
728 _bool lsplit;
731 int flt;
733 int fft;
735
736 char* readfp;
737 char* writefp;
738 const void* cache;
739 size_t cachesize;
741
743 int myproc;
744 int nproc;
746
748 int handle;
750
751
753 int nspec;
754 int nspec2;
757 int nump;
758 int ngptot;
761 int* ngptotl;
763 int* nmyms;
765 int* nasm0;
767 int nprtrw;
768 int* numpp;
770 int* npossp;
772 int* nptrms;
774 int* nallms;
778 int* ndim0g;
781 int* nvalue;
783
784
792 int* nfrstlat;
794 int* nlstlat;
797 int* nptrlat;
807 int* nsta;
818 int* nonl;
821 _bool* ldsplitlat;
824
825
829 int* nultpp;
832 int* nptrls;
835 int* nnmeng;
837
838
839
841 double* rmu;
843 double* rgw;
845 double* rpnm;
847 int nlei3;
849 int* npms;
851 double* rlapin;
853 int* ndglu;
855
856
858 double pexwn;
859 double peywn;
860 double * pweight;
861 int ndgux;
862 int nmsmax;
863 int * mvalue;
865};
866
871int trans_new( struct Trans_t* );
872
880int trans_set_resol( struct Trans_t* trans, int ndgl, const int* nloen );
881
892int trans_set_resol_lonlat( struct Trans_t* trans, int nlon, int nlat );
893
902int trans_set_resol_lam( struct Trans_t* trans, int nx, int ny, double dx, double dy );
903
909int trans_set_trunc( struct Trans_t* trans, int nsmax );
910
917int trans_set_trunc_lam( struct Trans_t* trans, int trunc_x, int trunc_y );
918
919
926{
927 const double* rgp;
934 double* rspscalar;
936 double* rspvor;
938 double* rspdiv;
940 const double* rmeanu;
942 const double* rmeanv;
944 int nproma;
949 struct Trans_t* trans;
950 int count;
951};
952
957struct DirTrans_t new_dirtrans(struct Trans_t* trans);
958
959
966{
967 const double* rgp;
974 double* rspscalar;
976 double* rspvor;
978 double* rspdiv;
980 const double* rmeanu;
982 const double* rmeanv;
984 int nproma;
989 struct Trans_t* trans;
990 int count;
991};
992
997struct DirTransAdj_t new_dirtrans_adj(struct Trans_t* trans);
998
999
1006{
1007 const double* rspscalar;
1009 const double* rspvor;
1011 const double* rspdiv;
1013 const double* rmeanu;
1015 const double* rmeanv;
1017 double* rgp;
1038 struct Trans_t* trans;
1039 int count;
1040};
1041
1046struct InvTrans_t new_invtrans(struct Trans_t* trans);
1047
1048
1050
1052{
1053 double* rspscalar;
1055 double* rspvor;
1057 double* rspdiv;
1059 const double* rmeanu;
1061 const double* rmeanv;
1063 const double* rgp;
1084 struct Trans_t* trans;
1085 int count;
1086};
1087
1092struct InvTransAdj_t new_invtrans_adj(struct Trans_t* trans);
1093
1094
1095
1102{
1103 const double* rgpg;
1106 double* rgp;
1110 const int* nfrom;
1113 int nfld;
1115 struct Trans_t* trans;
1116 int count;
1117};
1118
1123struct DistGrid_t new_distgrid(struct Trans_t* trans);
1124
1131{
1132 double* rgpg;
1136 const double* rgp;
1140 const int* nto;
1143 int nfld;
1145 struct Trans_t* trans;
1146 int count;
1147};
1148
1153struct GathGrid_t new_gathgrid(struct Trans_t* trans);
1154
1161{
1162 const double* rspecg;
1165 double* rspec;
1168 const int* nfrom;
1170 int nfld;
1171 struct Trans_t* trans;
1172 int count;
1173};
1174
1179struct DistSpec_t new_distspec(struct Trans_t* trans);
1180
1187{
1188 double* rspecg;
1191 const double* rspec;
1194 const int* nto;
1196 int nfld;
1197 struct Trans_t* trans;
1198 int count;
1199};
1200
1205struct GathSpec_t new_gathspec(struct Trans_t* trans);
1206
1213{
1214 const double* rspvor;
1217 const double* rspdiv;
1220 double* rspu;
1223 double* rspv;
1226 int nfld;
1227 int nsmax;
1230 int count;
1231};
1232
1236struct VorDivToUV_t new_vordiv_to_UV(void);
1237
1238
1240{
1241 const double *rspec;
1245 const double *rmet;
1247 double* rnorm;
1249 int nfld;
1250 struct Trans_t* trans;
1251 int count;
1252};
1253
1257struct SpecNorm_t new_specnorm(struct Trans_t* trans);
1258
1259#ifdef __cplusplus
1260}
1261#endif
1262
1263#endif
Arguments structure for trans_dirtrans()
Definition transi.h:926
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:942
double * rspdiv
[output] spectral divergence
Definition transi.h:938
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:947
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:944
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:946
int lglobal
[input,default=0] rgp is a global input field --> nproma==1,ngpblks==ngptotg
Definition transi.h:948
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:949
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:945
const double * rgp
[input] gridpoint fields
Definition transi.h:927
int count
Internal storage for calls to trans_dirtrans()
Definition transi.h:950
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:940
double * rspvor
[output] spectral vorticity
Definition transi.h:936
double * rspscalar
[output] spectral scalar valued fields
Definition transi.h:934
Arguments structure for trans_dirtrans_adj()
Definition transi.h:966
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:982
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:980
double * rspscalar
[output] spectral scalar valued fields
Definition transi.h:974
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:985
int lglobal
[input,default=0] rgp is a global input field --> nproma==1,ngpblks==ngptotg
Definition transi.h:988
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:989
double * rspvor
[output] spectral vorticity
Definition transi.h:976
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:987
const double * rgp
[input] gridpoint fields
Definition transi.h:967
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:986
int count
Internal storage for calls to trans_dirtrans()
Definition transi.h:990
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:984
double * rspdiv
[output] spectral divergence
Definition transi.h:978
Arguments structure for trans_distgrid()
Definition transi.h:1102
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1116
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1115
const double * rgpg
Global gridpoint array Fortran DIMENSIONS(1:NGPTOTG,1:NFLDG) C/C++ DIMENSIONS[NFLDG][NGPTOTG].
Definition transi.h:1103
int nfld
Number of distributed fields.
Definition transi.h:1113
double * rgp
Distributed gridpoint array Fortran DIMENSIONS(1:NPROMA,1:NFLD,1:NGPBLKS) C/C++ DIMENSIONS[NGPBLKS][N...
Definition transi.h:1106
int nproma
Blocking factor for distributed gridpoint array.
Definition transi.h:1112
int ngpblks
Blocking factor for distributed gridpoint array.
Definition transi.h:1114
const int * nfrom
Processors responsible for distributing each field DIMENSIONS(1:NFLD)
Definition transi.h:1110
Arguments structure for trans_distspec()
Definition transi.h:1161
const double * rspecg
Global spectral array Fortran DIMENSIONS(1:NFLDG,1:NSPEC2G) C/C++ DIMENSIONS[NSPEC2G][NFLDG].
Definition transi.h:1162
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1172
const int * nfrom
Processors responsible for distributing each field Fortran DIMENSIONS(1:NFLD)
Definition transi.h:1168
int nfld
Number of distributed fields.
Definition transi.h:1170
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1171
double * rspec
Local spectral array Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD].
Definition transi.h:1165
Arguments structure for trans_gathgrid()
Definition transi.h:1131
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1146
int nfld
Number of distributed fields.
Definition transi.h:1143
int ngpblks
Blocking factor for distributed gridpoint array.
Definition transi.h:1144
const int * nto
Processors responsible for gathering each field Fortran DIMENSIONS(1:NFLD)
Definition transi.h:1140
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1145
double * rgpg
Global gridpoint array Fortran DIMENSIONS(1:NGPTOTG,1:NFLDG) C/C++ DIMENSIONS[NFLDG][NGPTOTG] DIMENSI...
Definition transi.h:1132
int nproma
Blocking factor for distributed gridpoint array.
Definition transi.h:1142
const double * rgp
Distributed gridpoint array Fortran DIMENSIONS(1:NPROMA,1:NFLD,1:NGPBLKS) C/C++ DIMENSIONS[NGPBLKS][N...
Definition transi.h:1136
Arguments structure for trans_gathspec()
Definition transi.h:1187
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1197
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1198
double * rspecg
Global spectral array Fortran DIMENSIONS(1:NFLDG,1:NSPEC2G) C/C++ DIMENSIONS[NSPEC2G][NFLDG].
Definition transi.h:1188
const int * nto
Processors responsible for gathering each field DIMENSIONS(1:NFLD)
Definition transi.h:1194
const double * rspec
Local spectral array Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD].
Definition transi.h:1191
int nfld
Number of distributed fields.
Definition transi.h:1196
Arguments structure for trans_invtrans()
Definition transi.h:1006
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:1030
const double * rspvor
[input] spectral vorticity
Definition transi.h:1009
int lscalarders
[input,default=0] Indicate if derivatives of scalars are requested
Definition transi.h:1033
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:1015
int lglobal
[input,default=0] rgp is a global output field --> nproma==1,ngpblks==ngptotg
Definition transi.h:1037
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:1032
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1039
double * rgp
[output] gridpoint fields
Definition transi.h:1017
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:1036
const double * rspscalar
[input,default=NULL] spectral scalar valued fields
Definition transi.h:1007
const double * rspdiv
[input] spectral divergence
Definition transi.h:1011
int luvder_EW
[input,default=0] Indicate if East-West derivative of u and v is requested
Definition transi.h:1034
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1038
int lvordivgp
[input,default=0] Indicate if grid-point vorticity and divergence is requested
Definition transi.h:1035
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:1031
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:1013
Adjoint of spectral inverse.
Definition transi.h:1052
int luvder_EW
[input,default=0] Indicate if East-West derivative of u and v is requested
Definition transi.h:1080
const double * rgp
[input] gridpoint fields
Definition transi.h:1063
int lvordivgp
[input,default=0] Indicate if grid-point vorticity and divergence is requested
Definition transi.h:1081
int count
Internal storage for calls to trans_invtrans_adj()
Definition transi.h:1085
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:1061
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:1077
int lscalarders
[input,default=0] Indicate if derivatives of scalars are requested
Definition transi.h:1079
double * rspvor
[output] spectral vorticity
Definition transi.h:1055
int lglobal
[input,default=0] rgp is a global output field --> nproma==1,ngpblks==ngptotg
Definition transi.h:1083
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:1078
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:1059
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:1082
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:1076
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1084
double * rspscalar
[output,default=NULL] spectral scalar valued fields
Definition transi.h:1053
double * rspdiv
[output] spectral divergence
Definition transi.h:1057
Definition transi.h:1240
int nmaster
Processor to receive norms (value 1 means MPI_RANK 0)
Definition transi.h:1244
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1251
int nfld
Number of fields.
Definition transi.h:1249
const double * rspec
Spectral array to compute norm of Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD].
Definition transi.h:1241
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1250
const double * rmet
metric, OPTIONAL DIMENSIONS(0:NSMAX)
Definition transi.h:1245
double * rnorm
Norms (output for processor nmaster) DIMENSIONS(1:NFLD)
Definition transi.h:1247
Struct that holds information to do transforms for one particular grid resolution.
Definition transi.h:718
int * nptrls
Pointer to first global latitude of each a-set for which it performs the Fourier calculations DIMEN...
Definition transi.h:832
int * ndim0g
Defines partitioning of global spectral fields among PEs DIMENSIONS(0:NSMAX) (global) DIMENSIONS(0:...
Definition transi.h:778
int nspec2
Number of complex spectral coefficients on this PE times 2 (real and imag)
Definition transi.h:754
int ndgux
number of latitudes not in extension zone
Definition transi.h:861
int nspec2g
global KSPEC2
Definition transi.h:755
int * nloen
Number of longitude points for each latitude DIMENSIONS(1:NDGL)
Definition transi.h:722
int n_regions_EW
Number of regions in East-West direction.
Definition transi.h:787
int * nmyms
This PEs spectral zonal wavenumbers DIMENSIONS(1:NUMP)
Definition transi.h:763
int * npossp
Defines partitioning of global spectral fields among PEs DIMENSIONS(1:NPRTRW+1)
Definition transi.h:770
int nlei3
First dimension of Legendre polynomials.
Definition transi.h:847
int ngptotg
Total number of grid columns on the Globe.
Definition transi.h:759
int nspec2mx
Maximun KSPEC2 among all PEs.
Definition transi.h:756
int * ngptotl
Number of grid columns on each PE DIMENSIONS(1:N_REGIONS_NS,1:N_REGIONS_EW)
Definition transi.h:761
double * rgw
Gaussian weights DIMENSIONS(1:NDGL)
Definition transi.h:843
int * nptrms
Pointer to the first wave number of a given a-set DIMENSIONS(1:NPRTRW)
Definition transi.h:772
int handle
Resolution tag for which info is required ,default is the first defined resulution (input)
Definition transi.h:748
int nprtrw
Number of processors in A-direction (input)
Definition transi.h:767
double * pweight
weight for distribution
Definition transi.h:860
int ndgl
Number of lattitudes.
Definition transi.h:721
int n_regions_NS
Number of regions in North-South direction.
Definition transi.h:786
int * nasm0
Address in a spectral array of (m, n=m) DIMENSIONS(0:NSMAX)
Definition transi.h:765
int fft
FFT library to use underneith FFT992 = 1 ; FFTW = 2.
Definition transi.h:733
int * ndglu
Number of active points in an hemisphere for a given wavenumber "m" DIMENSIONS(0:NSMAX)
Definition transi.h:853
int * nlstlat
Last latitude of each a-set in grid-point space DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:794
int * nvalue
n value for each KSPEC2 spectral coeffient DIMENSIONS(1:NSPEC2)
Definition transi.h:781
int myproc
Current MPI task (numbering starting at 1)
Definition transi.h:743
int * nultpp
Number of latitudes for which each a-set is calculating the FFT's. DIMENSIONS(1:NPRTRNS)
Definition transi.h:829
int * nfrstlat
First latitude of each a-set in grid-point space DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:792
int my_region_NS
My region in North-South direction.
Definition transi.h:788
int nlon
Number of longitude points for all latitudes .
Definition transi.h:724
int * numpp
No. of wave numbers each wave set is responsible for. DIMENSIONS(1:NPRTRW)
Definition transi.h:768
int nfrstloff
Offset for first lat of own a-set in grid-point space.
Definition transi.h:796
double * rlapin
Eigen-values of the inverse Laplace operator DIMENSIONS(-1:NSMAX+2)
Definition transi.h:851
int nsmax
Spectral truncation wave number.
Definition transi.h:725
int * nonl
Number of grid columns for the latitudes on a processor. Similar to nsta() in data structure....
Definition transi.h:818
double peywn
resolution in y
Definition transi.h:859
double pexwn
resolution in x
Definition transi.h:858
_bool llam
True if the corresponding resolution is LAM, false if it is global.
Definition transi.h:726
double * rpnm
Legendre polynomials DIMENSIONS(1:NLEI3,1:NSPOLEGL)
Definition transi.h:845
int ngptot
Total number of grid columns on this PE.
Definition transi.h:758
int nmsmax
spectral truncation in x direction
Definition transi.h:862
_bool lsplit
If false, the distribution does not allow latitudes to be split.
Definition transi.h:728
int nproc
Number of parallel MPI tasks.
Definition transi.h:744
int nprtrns
No. of sets in N-S direction (Fourier space) (always equal to NPRTRW)
Definition transi.h:827
_bool * ldsplitlat
True if latitude is split in grid point space over two a-sets. DIMENSIONS(1:NDGL)
Definition transi.h:821
int * nptrlstlat
Pointer to the last latitude of each a-set in NSTA and NONL arrays DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:802
int llatlon
If true, the transforms compute extra coefficients for latlon transforms.
Definition transi.h:729
double * rmu
sin(Gaussian latitudes) DIMENSIONS(1:NDGL)
Definition transi.h:841
int * nptrlat
Pointer to the start of each latitude DIMENSIONS(1:NDGL)
Definition transi.h:797
int nptrfloff
Offset for pointer to the first latitude of own a-set NSTA and NONL arrays, i.e. nptrfrstlat(myseta)-...
Definition transi.h:805
int nspolegl
Second dimension of Legendre polynomials.
Definition transi.h:848
int * npms
Adress for legendre polynomial for given M (NSMAX) DIMENSIONS(0:NSMAX)
Definition transi.h:849
int * nnmeng
associated (with NLOENG) cut-off zonal wavenumber DIMENSIONS(1:NDGL)
Definition transi.h:835
int * nsta
Position of first grid column for the latitudes on a processor. DIMENSIONS(1:NDGL+N_REGIONS_NS-1,...
Definition transi.h:807
int * n_regions
Number of East-West Regions per band of North-South Regions.
Definition transi.h:790
int ngptotmx
Maximum number of grid columns on any of the PEs.
Definition transi.h:760
int my_region_EW
My region in East-West direction.
Definition transi.h:789
int flt
If true, the Fast-Legendre-Transform method is used which is faster for higher resolutions (N1024)
Definition transi.h:731
int * nallms
Wave numbers for all wave-set concatenated together to give all wave numbers in wave-set order DIME...
Definition transi.h:774
int nspec
Number of complex spectral coefficients on this PE.
Definition transi.h:753
int nump
Number of spectral waves handled by this PE.
Definition transi.h:757
int * mvalue
wavenumbers in x direction
Definition transi.h:863
int * nptrfrstlat
Pointer to the first latitude of each a-set in NSTA and NONL arrays DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:799
Arguments structure for trans_vordiv_to_UV()
Definition transi.h:1213
double * rspu
Local spectral array for U*cos(theta) Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NF...
Definition transi.h:1220
int count
Internal storage for calls to trans_vordiv_toUV()
Definition transi.h:1230
double * rspv
Local spectral array for V*cos(theta) Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NF...
Definition transi.h:1223
const double * rspvor
Local spectral array for vorticity Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD]...
Definition transi.h:1214
const double * rspdiv
Local spectral array for divergence Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD...
Definition transi.h:1217
int ncoeff
number of spectral coefficients (equivalent to nspec2 for distributed or nspec2g for global)
Definition transi.h:1228
int nfld
Number of distributed fields.
Definition transi.h:1226
int nsmax
Spectral resolution (T)
Definition transi.h:1227
int trans_set_trunc_lam(struct Trans_t *trans, int trunc_x, int trunc_y)
Set spectral truncation wave number for trans for LAM grids.
Definition transi.c:136
int trans_specnorm(struct SpecNorm_t *specnorm)
Compute global spectral norms.
const char * trans_error_msg(int errcode)
Get error message relating to error code.
Definition transi.c:39
int trans_inquire(struct Trans_t *trans, const char *varlist)
Inquire the trans library for array values.
int trans_distgrid(struct DistGrid_t *distgrid)
Distribute global gridpoint array among processors.
int trans_dirtrans(struct DirTrans_t *dirtrans)
Direct spectral transform (from grid-point to spectral)
int trans_invtrans_adj(struct InvTransAdj_t *invtrans_adj)
Adjoint of the Inverse spectral transform (from grid-point spectral)
int trans_new(struct Trans_t *)
Constructor for Trans_t, setting default values.
Definition transi.c:60
int trans_set_resol_lonlat(struct Trans_t *trans, int nlon, int nlat)
Set gridpoint resolution for trans for longitude-latitude grids.
Definition transi.c:94
int trans_set_radius(double radius)
Set radius of planet used in trans.
int trans_delete(struct Trans_t *trans)
Remove footprint of specific resolution.
int trans_gathspec(struct GathSpec_t *gathspec)
Gather global spectral array from processors.
int trans_setup(struct Trans_t *trans)
Setup a new resolution to be used in the trans library.
int trans_invtrans(struct InvTrans_t *invtrans)
Inverse spectral transform (from spectral grid-point)
int trans_set_nprtrv(int nprtrv)
Set nprtrv for parallel distribution of fields in spectral space.
int trans_set_trunc(struct Trans_t *trans, int nsmax)
Set spectral truncation wave number for trans.
Definition transi.c:130
int trans_set_handles_limit(int limit)
Set limit on maximum simultaneously allocated transforms.
int trans_set_resol(struct Trans_t *trans, int ndgl, const int *nloen)
Set gridpoint resolution for trans.
Definition transi.c:84
int trans_use_mpi(_bool)
Use MPI in trans library.
int trans_gathgrid(struct GathGrid_t *gathgrid)
Gather global gridpoint array from processors.
int trans_vordiv_to_UV(struct VorDivToUV_t *vordiv_to_UV)
Convert Spectral vorticity & divergence to Spectral u*cos(theta) & v*cos(theta)
int trans_finalize(void)
Finalize trans library.
Definition transi_module.F90:1656
int trans_set_mpi_comm(int mpi_user_comm)
Set user-provided MPI communicator to be used by the trans library.
int trans_set_leq_regions(_bool ldeq_regions)
Set leq_regions in trans.
int trans_set_nprgpew(int nprgpew)
Set nprgpew for distribution of fields in gridpoint space.
int trans_dirtrans_adj(struct DirTransAdj_t *dirtransadj)
Adjoint of the Direct spectral transform (from spectral to grid-point)
int trans_set_resol_lam(struct Trans_t *trans, int nx, int ny, double dx, double dy)
Set gridpoint resolution for trans for LAM grids.
Definition transi.c:116
int trans_distspec(struct DistSpec_t *distspec)
Distribute global spectral array among processors.
int trans_init(void)
Initialize trans library.
Definition transi_module.F90:623