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;
777 int* ndim0g;
779 int* nvalue;
781
782
790 int* nfrstlat;
792 int* nlstlat;
795 int* nptrlat;
805 int* nsta;
816 int* nonl;
819 _bool* ldsplitlat;
822
823
827 int* nultpp;
830 int* nptrls;
833 int* nnmeng;
835
836
837
839 double* rmu;
841 double* rgw;
843 double* rpnm;
845 int nlei3;
847 int* npms;
849 double* rlapin;
851 int* ndglu;
853
854
856 double pexwn;
857 double peywn;
858 double * pweight;
859 int ndgux;
860 int nmsmax;
861 int * mvalue;
863};
864
869int trans_new( struct Trans_t* );
870
878int trans_set_resol( struct Trans_t* trans, int ndgl, const int* nloen );
879
890int trans_set_resol_lonlat( struct Trans_t* trans, int nlon, int nlat );
891
900int trans_set_resol_lam( struct Trans_t* trans, int nx, int ny, double dx, double dy );
901
907int trans_set_trunc( struct Trans_t* trans, int nsmax );
908
915int trans_set_trunc_lam( struct Trans_t* trans, int trunc_x, int trunc_y );
916
917
924{
925 const double* rgp;
932 double* rspscalar;
934 double* rspvor;
936 double* rspdiv;
938 const double* rmeanu;
940 const double* rmeanv;
942 int nproma;
947 struct Trans_t* trans;
948 int count;
949};
950
955struct DirTrans_t new_dirtrans(struct Trans_t* trans);
956
957
964{
965 const double* rgp;
972 double* rspscalar;
974 double* rspvor;
976 double* rspdiv;
978 const double* rmeanu;
980 const double* rmeanv;
982 int nproma;
987 struct Trans_t* trans;
988 int count;
989};
990
995struct DirTransAdj_t new_dirtrans_adj(struct Trans_t* trans);
996
997
1004{
1005 const double* rspscalar;
1007 const double* rspvor;
1009 const double* rspdiv;
1011 const double* rmeanu;
1013 const double* rmeanv;
1015 double* rgp;
1036 struct Trans_t* trans;
1037 int count;
1038};
1039
1044struct InvTrans_t new_invtrans(struct Trans_t* trans);
1045
1046
1048
1050{
1051 double* rspscalar;
1053 double* rspvor;
1055 double* rspdiv;
1057 const double* rmeanu;
1059 const double* rmeanv;
1061 const double* rgp;
1082 struct Trans_t* trans;
1083 int count;
1084};
1085
1090struct InvTransAdj_t new_invtrans_adj(struct Trans_t* trans);
1091
1092
1093
1100{
1101 const double* rgpg;
1104 double* rgp;
1108 const int* nfrom;
1111 int nfld;
1113 struct Trans_t* trans;
1114 int count;
1115};
1116
1121struct DistGrid_t new_distgrid(struct Trans_t* trans);
1122
1129{
1130 double* rgpg;
1134 const double* rgp;
1138 const int* nto;
1141 int nfld;
1143 struct Trans_t* trans;
1144 int count;
1145};
1146
1151struct GathGrid_t new_gathgrid(struct Trans_t* trans);
1152
1159{
1160 const double* rspecg;
1163 double* rspec;
1166 const int* nfrom;
1168 int nfld;
1169 struct Trans_t* trans;
1170 int count;
1171};
1172
1177struct DistSpec_t new_distspec(struct Trans_t* trans);
1178
1185{
1186 double* rspecg;
1189 const double* rspec;
1192 const int* nto;
1194 int nfld;
1195 struct Trans_t* trans;
1196 int count;
1197};
1198
1203struct GathSpec_t new_gathspec(struct Trans_t* trans);
1204
1211{
1212 const double* rspvor;
1215 const double* rspdiv;
1218 double* rspu;
1221 double* rspv;
1224 int nfld;
1225 int nsmax;
1228 int count;
1229};
1230
1234struct VorDivToUV_t new_vordiv_to_UV(void);
1235
1236
1238{
1239 const double *rspec;
1243 const double *rmet;
1245 double* rnorm;
1247 int nfld;
1248 struct Trans_t* trans;
1249 int count;
1250};
1251
1255struct SpecNorm_t new_specnorm(struct Trans_t* trans);
1256
1257#ifdef __cplusplus
1258}
1259#endif
1260
1261#endif
Arguments structure for trans_dirtrans()
Definition transi.h:924
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:940
double * rspdiv
[output] spectral divergence
Definition transi.h:936
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:945
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:942
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:944
int lglobal
[input,default=0] rgp is a global input field --> nproma==1,ngpblks==ngptotg
Definition transi.h:946
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:947
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:943
const double * rgp
[input] gridpoint fields
Definition transi.h:925
int count
Internal storage for calls to trans_dirtrans()
Definition transi.h:948
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:938
double * rspvor
[output] spectral vorticity
Definition transi.h:934
double * rspscalar
[output] spectral scalar valued fields
Definition transi.h:932
Arguments structure for trans_dirtrans_adj()
Definition transi.h:964
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:980
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:978
double * rspscalar
[output] spectral scalar valued fields
Definition transi.h:972
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:983
int lglobal
[input,default=0] rgp is a global input field --> nproma==1,ngpblks==ngptotg
Definition transi.h:986
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:987
double * rspvor
[output] spectral vorticity
Definition transi.h:974
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:985
const double * rgp
[input] gridpoint fields
Definition transi.h:965
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:984
int count
Internal storage for calls to trans_dirtrans()
Definition transi.h:988
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:982
double * rspdiv
[output] spectral divergence
Definition transi.h:976
Arguments structure for trans_distgrid()
Definition transi.h:1100
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1114
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1113
const double * rgpg
Global gridpoint array Fortran DIMENSIONS(1:NGPTOTG,1:NFLDG) C/C++ DIMENSIONS[NFLDG][NGPTOTG].
Definition transi.h:1101
int nfld
Number of distributed fields.
Definition transi.h:1111
double * rgp
Distributed gridpoint array Fortran DIMENSIONS(1:NPROMA,1:NFLD,1:NGPBLKS) C/C++ DIMENSIONS[NGPBLKS][N...
Definition transi.h:1104
int nproma
Blocking factor for distributed gridpoint array.
Definition transi.h:1110
int ngpblks
Blocking factor for distributed gridpoint array.
Definition transi.h:1112
const int * nfrom
Processors responsible for distributing each field DIMENSIONS(1:NFLD)
Definition transi.h:1108
Arguments structure for trans_distspec()
Definition transi.h:1159
const double * rspecg
Global spectral array Fortran DIMENSIONS(1:NFLDG,1:NSPEC2G) C/C++ DIMENSIONS[NSPEC2G][NFLDG].
Definition transi.h:1160
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1170
const int * nfrom
Processors responsible for distributing each field Fortran DIMENSIONS(1:NFLD)
Definition transi.h:1166
int nfld
Number of distributed fields.
Definition transi.h:1168
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1169
double * rspec
Local spectral array Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD].
Definition transi.h:1163
Arguments structure for trans_gathgrid()
Definition transi.h:1129
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1144
int nfld
Number of distributed fields.
Definition transi.h:1141
int ngpblks
Blocking factor for distributed gridpoint array.
Definition transi.h:1142
const int * nto
Processors responsible for gathering each field Fortran DIMENSIONS(1:NFLD)
Definition transi.h:1138
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1143
double * rgpg
Global gridpoint array Fortran DIMENSIONS(1:NGPTOTG,1:NFLDG) C/C++ DIMENSIONS[NFLDG][NGPTOTG] DIMENSI...
Definition transi.h:1130
int nproma
Blocking factor for distributed gridpoint array.
Definition transi.h:1140
const double * rgp
Distributed gridpoint array Fortran DIMENSIONS(1:NPROMA,1:NFLD,1:NGPBLKS) C/C++ DIMENSIONS[NGPBLKS][N...
Definition transi.h:1134
Arguments structure for trans_gathspec()
Definition transi.h:1185
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1195
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1196
double * rspecg
Global spectral array Fortran DIMENSIONS(1:NFLDG,1:NSPEC2G) C/C++ DIMENSIONS[NSPEC2G][NFLDG].
Definition transi.h:1186
const int * nto
Processors responsible for gathering each field DIMENSIONS(1:NFLD)
Definition transi.h:1192
const double * rspec
Local spectral array Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD].
Definition transi.h:1189
int nfld
Number of distributed fields.
Definition transi.h:1194
Arguments structure for trans_invtrans()
Definition transi.h:1004
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:1028
const double * rspvor
[input] spectral vorticity
Definition transi.h:1007
int lscalarders
[input,default=0] Indicate if derivatives of scalars are requested
Definition transi.h:1031
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:1013
int lglobal
[input,default=0] rgp is a global output field --> nproma==1,ngpblks==ngptotg
Definition transi.h:1035
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:1030
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1037
double * rgp
[output] gridpoint fields
Definition transi.h:1015
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:1034
const double * rspscalar
[input,default=NULL] spectral scalar valued fields
Definition transi.h:1005
const double * rspdiv
[input] spectral divergence
Definition transi.h:1009
int luvder_EW
[input,default=0] Indicate if East-West derivative of u and v is requested
Definition transi.h:1032
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1036
int lvordivgp
[input,default=0] Indicate if grid-point vorticity and divergence is requested
Definition transi.h:1033
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:1029
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:1011
Adjoint of spectral inverse.
Definition transi.h:1050
int luvder_EW
[input,default=0] Indicate if East-West derivative of u and v is requested
Definition transi.h:1078
const double * rgp
[input] gridpoint fields
Definition transi.h:1061
int lvordivgp
[input,default=0] Indicate if grid-point vorticity and divergence is requested
Definition transi.h:1079
int count
Internal storage for calls to trans_invtrans_adj()
Definition transi.h:1083
const double * rmeanv
[input] mean value of v-wind (only for LAM)
Definition transi.h:1059
int nscalar
[input,default=0] Number of scalar fields present in RGP
Definition transi.h:1075
int lscalarders
[input,default=0] Indicate if derivatives of scalars are requested
Definition transi.h:1077
double * rspvor
[output] spectral vorticity
Definition transi.h:1053
int lglobal
[input,default=0] rgp is a global output field --> nproma==1,ngpblks==ngptotg
Definition transi.h:1081
int nvordiv
[input,default=0] Number of vorticity/divergence fields in RGP
Definition transi.h:1076
const double * rmeanu
[input] mean value of u-wind (only for LAM)
Definition transi.h:1057
int ngpblks
[input,default=1] Blocking factor for distributed gridpoint array
Definition transi.h:1080
int nproma
[input,default=ngptot] Blocking factor for distributed gridpoint array
Definition transi.h:1074
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1082
double * rspscalar
[output,default=NULL] spectral scalar valued fields
Definition transi.h:1051
double * rspdiv
[output] spectral divergence
Definition transi.h:1055
Definition transi.h:1238
int nmaster
Processor to receive norms (value 1 means MPI_RANK 0)
Definition transi.h:1242
int count
Internal storage for calls to trans_invtrans()
Definition transi.h:1249
int nfld
Number of fields.
Definition transi.h:1247
const double * rspec
Spectral array to compute norm of Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD].
Definition transi.h:1239
struct Trans_t * trans
Internal storage of trans object.
Definition transi.h:1248
const double * rmet
metric, OPTIONAL DIMENSIONS(0:NSMAX)
Definition transi.h:1243
double * rnorm
Norms (output for processor nmaster) DIMENSIONS(1:NFLD)
Definition transi.h:1245
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:830
int * ndim0g
Defines partitioning of global spectral fields among PEs DIMENSIONS(0:NSMAX)
Definition transi.h:777
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:859
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:785
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:845
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:841
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:858
int ndgl
Number of lattitudes.
Definition transi.h:721
int n_regions_NS
Number of regions in North-South direction.
Definition transi.h:784
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:851
int * nlstlat
Last latitude of each a-set in grid-point space DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:792
int * nvalue
n value for each KSPEC2 spectral coeffient DIMENSIONS(1:NSPEC2)
Definition transi.h:779
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:827
int * nfrstlat
First latitude of each a-set in grid-point space DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:790
int my_region_NS
My region in North-South direction.
Definition transi.h:786
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:794
double * rlapin
Eigen-values of the inverse Laplace operator DIMENSIONS(-1:NSMAX+2)
Definition transi.h:849
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:816
double peywn
resolution in y
Definition transi.h:857
double pexwn
resolution in x
Definition transi.h:856
_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:843
int ngptot
Total number of grid columns on this PE.
Definition transi.h:758
int nmsmax
spectral truncation in x direction
Definition transi.h:860
_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:825
_bool * ldsplitlat
True if latitude is split in grid point space over two a-sets. DIMENSIONS(1:NDGL)
Definition transi.h:819
int * nptrlstlat
Pointer to the last latitude of each a-set in NSTA and NONL arrays DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:800
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:839
int * nptrlat
Pointer to the start of each latitude DIMENSIONS(1:NDGL)
Definition transi.h:795
int nptrfloff
Offset for pointer to the first latitude of own a-set NSTA and NONL arrays, i.e. nptrfrstlat(myseta)-...
Definition transi.h:803
int nspolegl
Second dimension of Legendre polynomials.
Definition transi.h:846
int * npms
Adress for legendre polynomial for given M (NSMAX) DIMENSIONS(0:NSMAX)
Definition transi.h:847
int * nnmeng
associated (with NLOENG) cut-off zonal wavenumber DIMENSIONS(1:NDGL)
Definition transi.h:833
int * nsta
Position of first grid column for the latitudes on a processor. DIMENSIONS(1:NDGL+N_REGIONS_NS-1,...
Definition transi.h:805
int * n_regions
Number of East-West Regions per band of North-South Regions.
Definition transi.h:788
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:787
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:861
int * nptrfrstlat
Pointer to the first latitude of each a-set in NSTA and NONL arrays DIMENSIONS(1:N_REGIONS_NS)
Definition transi.h:797
Arguments structure for trans_vordiv_to_UV()
Definition transi.h:1211
double * rspu
Local spectral array for U*cos(theta) Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NF...
Definition transi.h:1218
int count
Internal storage for calls to trans_vordiv_toUV()
Definition transi.h:1228
double * rspv
Local spectral array for V*cos(theta) Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NF...
Definition transi.h:1221
const double * rspvor
Local spectral array for vorticity Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD]...
Definition transi.h:1212
const double * rspdiv
Local spectral array for divergence Fortran DIMENSIONS(1:NFLD,1:NSPEC2) C/C++ DIMENSIONS[NSPEC2][NFLD...
Definition transi.h:1215
int ncoeff
number of spectral coefficients (equivalent to nspec2 for distributed or nspec2g for global)
Definition transi.h:1226
int nfld
Number of distributed fields.
Definition transi.h:1224
int nsmax
Spectral resolution (T)
Definition transi.h:1225
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:1549
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:621