A sphere with three ocean waves in differing shades of blue. Next to the sphere, there is the bolded text "Ocean Color". Under that, there are two acronyms, separated by a vertical pipe: OB.DAAC (Ocean Biology Distributed Active Archive Center) and OBPG (Ocean Biology Processing Group).
Lorem
ipsum
dolor
sit
amet
Toggle navigation
Ocean Color Science Software
Jump to content
ocssw
V2022
web
ocssw
ocssw_src
src
l1agen_czcs
day_to_ofile.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include "
time_utl.h
"
4
5
char
*
day_to_ofile
(
int
day
,
char
*floc)
6
/*******************************************************************
7
8
day_to_ofile
9
10
purpose: find the orbit file name for the julian day
11
12
Returns type: char * - file name
13
14
Parameters: (in calling order)
15
Type Name I/O Description
16
---- ---- --- -----------
17
int day I julian day
18
char * floc I file partial path
19
20
NOTE that the ful file name is gotten using the year and day out of day
21
and the partial file path this way:
22
name = <floc>YYYY/SMMR_ORB_YYDDD.dat
23
<floc> is partial path
24
YYYY, YY are 4 and 2 digit years
25
DDD is the julian day
26
27
Modification history:
28
Programmer Date Description of change
29
---------- ---- ---------------------
30
W. Robinson, SAIC 22-Sep-2005 Original development
31
32
*******************************************************************/
{
33
static
char
fname[500], *cptr;
34
int
year, doy;
35
/*
36
* get the year, day of year and create the file name
37
*/
38
jd_to_ydoy
(
day
, &year, &doy);
39
sprintf(fname,
"%s19%2d/SMMR_ORB_%2d%03d.dat"
,
40
floc, year, year, doy);
41
cptr = fname;
42
return
cptr;
43
}
day_to_ofile
char * day_to_ofile(int day, char *floc)
Definition:
day_to_ofile.c:5
day
int32_t day
Definition:
atrem_corl1v2.h:308
time_utl.h
jd_to_ydoy
int jd_to_ydoy(int jd, int *y, int *doy)
Definition:
time_utl.c:56