Changeset 50 for trunk/src/get_oaflux.sh
- Timestamp:
- 04/29/11 11:09:12 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_oaflux.sh
r48 r50 20 20 # =========== 21 21 # 22 # Put in ${ TROPFLUX_ID} OAFLUX reference file22 # Put in ${PROJECT_ID} OAFLUX reference file 23 23 # 24 24 # Once this tool executed :ref:`oaflux_mask_30N30S.pro` can be launched. 25 25 # 26 # Log file is written on :file:`${ TROPFLUX_LOG}/get_oaflux.log.{YYYYMMDDTHHMMSSZ}`26 # Log file is written on :file:`${PROJECT_LOG}/get_oaflux.log.{YYYYMMDDTHHMMSSZ}` 27 27 # 28 28 # … … 36 36 # oaflux_ref [shape=diamond,fontname=Courier,label="ftp://ftp.whoi.edu/pub/science/oaflux/data_v3/monthly/turbulence/lh_oaflux_2004.nc.gz"]; 37 37 # 38 # file_oaflux [shape=ellipse,fontname=Courier,label="${ TROPFLUX_ID}/lh_oaflux_2004.nc"];38 # file_oaflux [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lh_oaflux_2004.nc"]; 39 39 # 40 40 # get_oaflux [shape=box, … … 42 42 # color=blue, 43 43 # URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/get_oaflux.sh" 44 # label="${ TROPFLUX}/src/get_oaflux.sh"];44 # label="${PROJECT}/src/get_oaflux.sh"]; 45 45 # get_oaflux [shape=box, 46 46 # fontname=Courier, 47 47 # color=blue, 48 48 # URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/get_oaflux.sh" 49 # label="${ TROPFLUX}/src/get_oaflux.sh"];49 # label="${PROJECT}/src/get_oaflux.sh"]; 50 50 # 51 51 # {oaflux_ref} -> {get_oaflux} -> {file_oaflux} … … 66 66 # $ tlogd.sh get_oaflux 67 67 # 68 # and of course on files in ${ TROPFLUX_ID}.68 # and of course on files in ${PROJECT_ID}. 69 69 # 70 70 # TODO … … 76 76 # :ref:`guide data OAFLUX <data_in_oaflux>` 77 77 # 78 # :ref:` tropflux_profile.sh`78 # :ref:`project_profile.sh` 79 79 # 80 80 # :ref:`oaflux_mask_30N30S.pro` … … 141 141 unset tool 142 142 # 143 # check for ${ TROPFLUX_LOG} definition144 if [ "${ TROPFLUX_LOG}" = "" ]145 then 146 echo "${command} : eee : \${ TROPFLUX_LOG} not defined"147 exit 1 148 fi 149 # 150 # check for ${ TROPFLUX_LOG} existence151 if [ ! -d ${ TROPFLUX_LOG} ]152 then 153 echo "${command} : eee : ${ TROPFLUX_LOG} not found"154 exit 1 155 fi 156 # 157 # check for permission access on TROPFLUX_LOG158 if [ ! -x ${ TROPFLUX_LOG} ]159 then 160 echo "${command} : eee : ${ TROPFLUX_LOG} not reachable"161 exit 1 162 fi 163 # 164 # check for write permission on TROPFLUX_LOG165 if [ ! -w ${ TROPFLUX_LOG} ]166 then 167 echo "${command} : eee : ${ TROPFLUX_LOG} not writable"168 exit 1 169 fi 170 # 171 log=${ TROPFLUX_LOG}/$(basename ${0} .sh).log.${log_date}143 # check for ${PROJECT_LOG} definition 144 if [ "${PROJECT_LOG}" = "" ] 145 then 146 echo "${command} : eee : \${PROJECT_LOG} not defined" 147 exit 1 148 fi 149 # 150 # check for ${PROJECT_LOG} existence 151 if [ ! -d ${PROJECT_LOG} ] 152 then 153 echo "${command} : eee : ${PROJECT_LOG} not found" 154 exit 1 155 fi 156 # 157 # check for permission access on PROJECT_LOG 158 if [ ! -x ${PROJECT_LOG} ] 159 then 160 echo "${command} : eee : ${PROJECT_LOG} not reachable" 161 exit 1 162 fi 163 # 164 # check for write permission on PROJECT_LOG 165 if [ ! -w ${PROJECT_LOG} ] 166 then 167 echo "${command} : eee : ${PROJECT_LOG} not writable" 168 exit 1 169 fi 170 # 171 log=${PROJECT_LOG}/$(basename ${0} .sh).log.${log_date} 172 172 echo "[Context]" 1>> ${log} 173 173 echo "command=$(basename ${0})" 1>>${log} … … 180 180 fileref_gz=${fileref}.gz 181 181 locref=ftp://ftp.whoi.edu/pub/science/oaflux/data_v3/monthly/turbulence/ 182 if [ -f ${ TROPFLUX_ID}/${fileref} ]183 then 184 echo "${command} : iii : ${ TROPFLUX_ID}/${fileref} exist" 1>> ${log}182 if [ -f ${PROJECT_ID}/${fileref} ] 183 then 184 echo "${command} : iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log} 185 185 echo "${command} : iii : nothing done" 1>> ${log} 186 186 else 187 wget --tries=1 --no-verbose -P ${ TROPFLUX_ID} ${locref}/${fileref_gz} 1>> ${log} 2>&1187 wget --tries=1 --no-verbose -P ${PROJECT_ID} ${locref}/${fileref_gz} 1>> ${log} 2>&1 188 188 wget_status=${?} 189 189 if [ ${wget_status} -ne 0 ] … … 197 197 # 198 198 # decompress 199 gunzip ${ TROPFLUX_ID}${fileref_gz}199 gunzip ${PROJECT_ID}${fileref_gz} 200 200 gunzip_status=${?} 201 201 if [ ${gunzip_status} -ne 0 ]
Note: See TracChangeset
for help on using the changeset viewer.