/dports/science/cdo/cdo-2.0.0/src/ |
H A D | specspace.cc | 22 const long nlat = gridInqYsize(gridIDin); in grid2spec() local 26 std::vector<double> fpwork(nlat * nfc * nlev); in grid2spec() 43 const long nlat = gridInqYsize(gridIDout); in spec2grid() local 47 std::vector<double> fpwork(nlat * nfc * nlev); in spec2grid() 63 const long nlat = spTrans.nlat; in four2spec() local 76 const long nlat = nfc_to_nlat(nfc, ntr); in spec2four() local 89 const long nlat = gridInqYsize(gridIDout); in four2grid() local 105 const long nlat = gridInqYsize(gridIDin); in grid2four() local 144 const long nlat = gridInqYsize(gridID1); in trans_uv2dv() local 180 const long nlat = gridInqYsize(gridID2); in trans_dv2uv() local [all …]
|
H A D | Invert.cc | 103 const auto nlat = gridInqYsize(gridID); in invertLatCoord() local 104 const auto size = (gridtype == GRID_CURVILINEAR) ? nlon * nlat : nlat; in invertLatCoord() 128 for (size_t ilat = 0; ilat < nlat; ilat++) yv2[nlat - ilat - 1] = yv1[ilat]; in invertLatCoord() 139 const auto size = (gridtype == GRID_CURVILINEAR) ? nv * nlon * nlat : nv * nlat; in invertLatCoord() 193 const auto nlat = gridInqYsize(gridID1); in invertLonData() local 195 if (nlat > 0) in invertLonData() 197 std::vector<double *> field1(nlat), field2(nlat); in invertLonData() 218 const auto nlat = gridInqYsize(gridID1); in invertLatData() local 220 if (nlat > 0) in invertLatData() 222 std::vector<double *> field1(nlat), field2(nlat); in invertLatData() [all …]
|
H A D | grid_from_name.cc | 123 grid.yvals.resize(nlat); in gen_grid_zonal() 128 grid.ysize = nlat; in gen_grid_zonal() 138 if (nlat > 1) grid_gen_bounds(nlat, grid.yvals, grid.ybounds); in gen_grid_zonal() 219 grid.yvals.resize(nlat); in gen_grid_lonlat() 227 grid.ysize = nlat; in gen_grid_lonlat() 337 std::vector<double> latw(nlat), latw_cumsum(nlat); in gaussian_latitudes_in_degrees() 348 lat_bounds[nlat] = -1.0; in gaussian_latitudes_in_degrees() 370 if (nlat % 2) nlat++; in gen_grid_gea() 372 std::vector<double> lats(nlat), lat_bounds(nlat + 1); in gen_grid_gea() 409 grid.ysize = nlat; in gen_grid_gea() [all …]
|
H A D | after_sptrans.cc | 245 Varray<double> gmu(nlat), gwt(nlat); in after_legini_full() 267 for (long jgl = 0; jgl < nlat; ++jgl) in after_legini_full() 294 jsp += nlat; in after_legini_full() 394 auto fai = far + nlat; in sp2fc() 397 sp2fc_kernel(nlat, polt + jfc * nlat, salt + jfc * 2, far, fai); in sp2fc() 418 auto fai = far + nlat; in sp2fc() 421 sp2fc_kernel(nlat, polt + jfc * nlat, salt + jfc * 2, far, fai); in sp2fc() 470 auto fai = far + nlat; in fc2sp() 473 fc2sp_kernel(nlat, polt + jfc * nlat, far, fai, salt + jfc * 2); in fc2sp() 493 auto fai = far + nlat; in fc2sp() [all …]
|
H A D | grid_read_pingo.cc | 77 int nlon, nlat; in grid_read_pingo() local 79 if (!input_ival(gfp, nlat)) return gridID; in grid_read_pingo() 83 if (nlon > 0 && nlon < 99999 && nlat > 0 && nlat < 99999) in grid_read_pingo() 88 grid.ysize = nlat; in grid_read_pingo() 123 if (!input_ival(gfp, nlat)) return gridID; in grid_read_pingo() 124 if (nlat == 2) in grid_read_pingo() 129 else if (nlat == (int) grid.ysize) in grid_read_pingo() 131 if (input_darray(gfp, nlat, grid.yvals) != (size_t) nlat) return gridID; in grid_read_pingo() 136 …if (grid.yvals[0] > 90.001 || grid.yvals[nlat - 1] > 90.001 || grid.yvals[0] < -90.001 || grid.yva… in grid_read_pingo() 142 for (i = 0; i < nlat - 1; i++) in grid_read_pingo() [all …]
|
H A D | cdo_fctrans.cc | 22 fc2gp(const double *fc, double *gp, long nlat, long nlon, long nlev, long nfc) in fc2gp() argument 47 auto gpx = gp + ilev * nlon * nlat; in fc2gp() 48 auto fcx = fc + ilev * nfc * nlat; in fc2gp() 52 for (long ilat = 0; ilat < nlat; ++ilat) in fc2gp() 60 in_fft[ifc][0] = fcx[2 * ifc * nlat + ilat]; in fc2gp() 61 in_fft[ifc][1] = fcx[(2 * ifc + 1) * nlat + ilat]; in fc2gp() 113 auto gpx = gp + ilev * nlon * nlat; in gp2fc() 114 auto fcx = fc + ilev * nfc * nlat; in gp2fc() 118 for (long ilat = 0; ilat < nlat; ++ilat) in gp2fc() 130 fcx[2 * ifc * nlat + ilat] = norm * out_fft[ifc][0]; in gp2fc() [all …]
|
H A D | Info.cc | 58 printGridIndex(int nlon, int nlat, int i) in printGridIndex() argument 60 const int index = nlat < 10 ? 2 : nlat < 100 ? 3 : nlat < i ? 4 : 5; in printGridIndex() 117 printf("%.*s", nlat < 10 ? 2 : nlat < 100 ? 3 : nlat < 1000 ? 4 : 5, " "); in printMap() 124 printf("%.*s", nlat < 10 ? 2 : nlat < 100 ? 3 : nlat < 1000 ? 4 : 5, " "); in printMap() 131 printf("%.*s", nlat < 10 ? 2 : nlat < 100 ? 3 : nlat < 1000 ? 4 : 5, " "); in printMap() 136 printf("%.*s", nlat < 10 ? 2 : nlat < 100 ? 3 : nlat < 1000 ? 4 : 5, " "); in printMap() 141 for (int ilat = 0; ilat < nlat; ilat++) in printMap() 143 printf("%0*d ", nlat < 10 ? 1 : nlat < 100 ? 2 : nlat < 1000 ? 3 : 4, ilat + 1); in printMap() 206 printf(" %0*d\n", nlat < 10 ? 1 : nlat < 100 ? 2 : nlat < 1000 ? 3 : 4, ilat + 1); in printMap() 213 if (nlon >= current) printGridIndex(nlon, nlat, current); in printMap() [all …]
|
H A D | Mrotuv.cc | 147 for (long j = 0; j < nlat; j++) in p_to_uv_grid() 163 for (long j = 0; j < nlat; j++) in p_to_uv_grid() 167 if (jp1 > nlat - 1) jp1 = nlat - 1; in p_to_uv_grid() 228 const auto nlat = gridInqYsize(gridID1); in Mrotuv() local 248 gridDefYsize(gridIDu, nlat); in Mrotuv() 255 gridDefYsize(gridIDv, nlat); in Mrotuv() 342 for (size_t j = 0; j < nlat; j++) in Mrotuv() 350 for (size_t j = 0; j < nlat; j++) in Mrotuv() 359 for (size_t j = 0; j < nlat; j++) in Mrotuv() 365 for (size_t j = 0; j < nlat - 1; j++) in Mrotuv() [all …]
|
H A D | Mrotuvb.cc | 153 Varray2D<double> gxhelp(nlat, Varray<double>(nlon + 2)), gyhelp(nlat, Varray<double>(nlon + 2)); in uv_to_p_grid() 156 for (size_t j = 0; j < nlat; j++) in uv_to_p_grid() 164 for (size_t j = 0; j < nlat; j++) in uv_to_p_grid() 173 for (size_t j = 0; j < nlat; j++) in uv_to_p_grid() 186 for (size_t j = 0; j < nlat; j++) in uv_to_p_grid() 194 for (size_t j = 0; j < nlat; j++) in uv_to_p_grid() 203 for (size_t j = 1; j < nlat - 1; j++) in uv_to_p_grid() 268 const auto nlat = gridInqYsize(gridID1); in Mrotuvb() local 303 gridDefYsize(gridID3, nlat); in Mrotuvb() 345 const auto gridsizex = (nlon + 2) * nlat; in Mrotuvb() [all …]
|
H A D | FC.cc | 60 auto nlat = gridInqYsize(gridID1); in fourier2grid() local 118 auto nlat = gridInqYsize(gridID1); in grid2fourier() local 176 size_t nlon = 0, nlat = 0; in FC() local 224 nlat = nfc_to_nlat(nfc, ntr); in FC() 238 nlon = 2 * nlat; in FC() 251 nlat = ntr_to_nlat(ntr); in FC() 266 nlon = 2 * nlat; in FC() 278 nlat = gridInqYsize(gridID1); in FC() 279 ntr = nlat_to_ntr(nlat); in FC() 304 nlat = nfc_to_nlat(nfc, ntr); in FC() [all …]
|
H A D | transform.h | 4 void after_legini_full(long ntr, long nlat, double *poli, double *pold, double *pdev, double *pol2,… 8 void fc2gp(const double *trig, const long *ifax, double *fc, double *gp, long nlat, long nlon, long… 9 void gp2fc(const double *trig, const long *ifax, const double *gp, double *fc, long nlat, long nlon… 13 void sp2fc(const double *sa, double *fa, const double *poli, long nlev, long nlat, long nfc, long n… 14 void fc2sp(const double *fa, double *sa, const double *poli, long klev, long nlat, long nfc, long n… 19 void scaluv(double *fu, const double *rclat, long nlat, long lot); 20 …t double *fv, double *sd, double *sv, const double *pol2, const double *pol3, long klev, long nlat,
|
H A D | Selbox.cc | 59 xvals1.resize(nlon * nlat); in gengridxyvals() 60 yvals1.resize(nlon * nlat); in gengridxyvals() 68 if (lyvals) yvals1.resize(nlat); in gengridxyvals() 125 xbounds1.resize(4 * nlon * nlat); in gengridXboundsCurvi() 150 ybounds1.resize(4 * nlon * nlat); in gengridYboundsCurvi() 206 ybounds1.resize(2 * nlat); in gengridYboundsRect2D() 459 if (nlat > 0) in genlonlatboxReg2d() 492 if (nlat > 0) in genlonlatboxReg2d() 494 if (yvals[0] > yvals[nlat - 1]) in genlonlatboxReg2d() 544 const size_t gridsize = nlon * nlat; in genlonlatboxCurv() [all …]
|
/dports/devel/plan9port/plan9port-1f098efb7370a0b28306d10681e21883fb1c1507/src/cmd/map/libmap/ |
H A D | zcoord.c | 43 deg2rad(lat,&p->nlat); in latlon() 99 if(p->nlat.s == 1.) { in norm() 108 m.nlat.s = p->nlat.s * g->nlat.s in norm() 109 + p->nlat.c * g->nlat.c * g->wlon.c; in norm() 110 m.nlat.c = sqrt(1. - m.nlat.s * m.nlat.s); in norm() 111 m.nlat.l = atan2(m.nlat.s, m.nlat.c); in norm() 112 m.wlon.s = g->nlat.c * g->wlon.s; in norm() 113 m.wlon.c = p->nlat.c * g->nlat.s in norm() 114 - p->nlat.s * g->nlat.c * g->wlon.c; in norm() 130 g->nlat.l,g->nlat.s,g->nlat.c,g->wlon.l,g->wlon.s,g->wlon.c); in printp()
|
H A D | gilbert.c | 10 q.nlat.s = tan(0.5*(p->nlat.l)); in Xgilbert() 11 if(q.nlat.s > 1) q.nlat.s = 1; in Xgilbert() 12 if(q.nlat.s < -1) q.nlat.s = -1; in Xgilbert() 13 q.nlat.c = sqrt(1 - q.nlat.s*q.nlat.s); in Xgilbert() 17 *y = q.nlat.s; in Xgilbert() 18 *x = -q.wlon.s*q.nlat.c; in Xgilbert()
|
H A D | polyconic.c | 10 if(fabs(place->nlat.l) > .01) { in Xpolyconic() 11 r = place->nlat.c / place->nlat.s; in Xpolyconic() 12 alpha = place->wlon.l * place->nlat.s; in Xpolyconic() 13 *y = place->nlat.l + r*(1 - cos(alpha)); in Xpolyconic() 17 lat2 = place->nlat.l * place->nlat.l; in Xpolyconic() 18 *y = place->nlat.l * (1+(lon2/2)*(1-(8+lon2)*lat2/12)); in Xpolyconic()
|
H A D | guyou.c | 66 if(g->nlat.c<.7071||og->nlat.c<.7071) in guycut() 78 if(place->nlat.l<0) { in Xsquare() 79 p.nlat.l = -p.nlat.l; in Xsquare() 80 p.nlat.s = -p.nlat.s; in Xsquare() 82 if(p.nlat.l<FUZZ && fabs(p.wlon.l)>PI-FUZZ){ in Xsquare() 91 if(place->nlat.l<0) in Xsquare()
|
H A D | lagrange.c | 12 if(place->nlat.l<0) { in Xlagrange() 13 p.nlat.l = -p.nlat.l; in Xlagrange() 14 p.nlat.s = -p.nlat.s; in Xlagrange() 21 if(place->nlat.l<0) in Xlagrange()
|
H A D | hex.c | 39 ns = place->nlat.l >= 0; in Xhex() 41 p.nlat.l = -p.nlat.l; in Xhex() 42 p.nlat.s = -p.nlat.s; in Xhex() 44 if(p.nlat.l<HFUZZ) { in Xhex() 56 p.nlat.l = HFUZZ; in Xhex() 57 sincos(&p.nlat); in Xhex() 115 if(g->nlat.l>=-HFUZZ&&og->nlat.l>=-HFUZZ) in hexcut()
|
/dports/science/cdo/cdo-2.0.0/libcdi/examples/ |
H A D | cdi_write_hybrid.c | 5 #define nlat 6 // Number of latitudes macro 16 double lats[nlat] = {-75, -45, -15, 15, 45, 75}; in main() 20 double var1[nlon*nlat]; in main() 21 double var2[nlon*nlat*nflev]; in main() 22 double var3[nlon*nlat*nhlev]; in main() 23 double var4[nlon*nlat*nflev]; in main() 27 gridID = gridCreate(GRID_LONLAT, nlon*nlat); in main() 29 gridDefYsize(gridID, nlat); in main() 98 for ( size_t i = 0; i < nlon*nlat; ++i ) var2[i+k*nlon*nlat] = 2.2+k; in main() 100 for ( size_t i = 0; i < nlon*nlat; ++i ) var3[i+k*nlon*nlat] = -2.2-k; in main() [all …]
|
H A D | cdi_write_f2003.f90 | 9 INTEGER(c_size_t) :: nlon, nlat, nmiss variable 11 PARAMETER (nlat = 6) ! Number of latitudes 18 DOUBLE PRECISION lons(nlon), lats(nlat), levs(nlev) 19 DOUBLE PRECISION var1(nlon*nlat), var2(nlon*nlat*nlev) 30 gridID = gridCreate(GRID_LONLAT, nlon*nlat) 32 CALL gridDefYsize(gridID, nlat) 82 DO i = 1, nlon*nlat 85 DO i = 1, nlon*nlat*nlev
|
H A D | cdi_write_const.c | 5 #define nlat 6 // Number of latitudes macro 14 double lats[nlat] = {-75, -45, -15, 15, 45, 75}; in main() 16 double var1[nlon*nlat]; in main() 17 double var2[nlon*nlat*nlev]; in main() 21 gridID = gridCreate(GRID_LONLAT, nlon*nlat); in main() 23 gridDefYsize(gridID, nlat); in main() 59 for ( i = 0; i < nlon*nlat; i++ ) var1[i] = 1.1; in main() 60 for ( i = 0; i < nlon*nlat*nlev; i++ ) var2[i] = 2.2; in main()
|
H A D | cdi_write_local.c | 5 #define nlat 6 // Number of latitudes macro 15 double lats[nlat] = {-75, -45, -15, 15, 45, 75}; in main() 17 double var1[nlon*nlat]; in main() 18 double var2[nlon*nlat*nlev]; in main() 22 gridID = gridCreate(GRID_LONLAT, nlon*nlat); in main() 24 gridDefYsize(gridID, nlat); in main() 86 for ( size_t i = 0; i < nlon*nlat; i++ ) var1[i] = 1.1; in main() 87 for ( size_t i = 0; i < nlon*nlat*nlev; i++ ) var2[i] = 2.2; in main()
|
H A D | cdi_write.c | 8 nlat = 6, // Number of latitudes in main() enumerator 16 double var1[nlon*nlat]; in main() 17 double var2[nlon*nlat*nlev]; in main() 21 int gridID = gridCreate(GRID_LONLAT, nlon*nlat); in main() 23 gridDefYsize(gridID, nlat); in main() 73 for (size_t i = 0; i < nlon*nlat; i++) var1[i] = 1.1; in main() 74 for (size_t i = 0; i < nlon*nlat*nlev; i++) var2[i] = 2.2; in main()
|
/dports/science/afni/afni-AFNI_21.3.16/src/ |
H A D | rhdd.h | 8 int nlat ; member 83 nlat = (rt-rb+1)*(qt-qb+1)*(pt-pb+1) ; in create_LAT_func() 84 lfun->xlat = (float *)malloc(sizeof(float)*nlat) ; in create_LAT_func() 85 lfun->ylat = (float *)malloc(sizeof(float)*nlat) ; in create_LAT_func() 86 lfun->zlat = (float *)malloc(sizeof(float)*nlat) ; in create_LAT_func() 87 nlat = 0 ; in create_LAT_func() 97 lfun->xlat[nlat] = xx; lfun->ylat[nlat] = yy; lfun->zlat[nlat] = zz; in create_LAT_func() 98 nlat++ ; in create_LAT_func() 105 lfun->xdis = (float *)calloc(sizeof(float),nlat) ; in create_LAT_func() 106 lfun->ydis = (float *)calloc(sizeof(float),nlat) ; in create_LAT_func() [all …]
|
/dports/science/grib_api/grib_api-1.28.0-Source/src/ |
H A D | grib_geography.c | 72 long nlat = trunc*2; in grib_get_gaussian_latitudes() local 79 denom = sqrt( ((((double)nlat)+0.5)*(((double)nlat)+0.5)) + convval ); in grib_get_gaussian_latitudes() 96 for(legi = 0; legi < nlat; legi++) in grib_get_gaussian_latitudes() 104 conv = legfonc / ((((double)nlat) * (mem2 - root * legfonc) ) / (1.0 - (root *root))); in grib_get_gaussian_latitudes() 116 lats[nlat-1-jlat] = -lats[jlat]; in grib_get_gaussian_latitudes() 119 if( nlat != (trunc*2) ) in grib_get_gaussian_latitudes()
|