Changeset 48


Ignore:
Timestamp:
04/21/11 17:58:31 (13 years ago)
Author:
pinsard
Message:

consolidation of RAMA/TAO/PIRATA get tools and doc

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/adm/guides/data_content.rst

    r44 r48  
    99.. ========== 
    1010.. 
     11.. - fplod 20110421T085807Z aedon.locean-ipsl.upmc.fr (Darwin) 
     12.. 
     13..   * add biblio on TAO/TRITION, PIRATA, and RAMA 
     14..   * add contact section 
     15.. 
    1116.. - fplod 20110407T093006Z aedon.locean-ipsl.upmc.fr (Darwin) 
    1217.. 
     
    6469OAFLUX 
    6570~~~~~~ 
     71 
     72Contact 
     73^^^^^^^ 
     74 
     75Documentation 
     76^^^^^^^^^^^^^ 
    6677 
    6778Reference files 
     
    102113~~~~~ 
    103114 
     115Contact 
     116^^^^^^^ 
     117 
     118Documentation 
     119^^^^^^^^^^^^^ 
     120 
    104121Between 1989-now 
    105122 
     
    127144OLR 
    128145~~~ 
     146 
     147Contact 
     148^^^^^^^ 
     149 
     150Documentation 
     151^^^^^^^^^^^^^ 
    129152 
    130153Interpolated 
     
    146169~~~~~~ 
    147170 
    148 URL : +todo+ 
     171Contact 
     172^^^^^^^ 
     173 
     174atlasrt@noaa.gov 
     175 
     176Documentation 
     177^^^^^^^^^^^^^ 
     178 
     179[BourlesLumpkinEtAL:BAMS:2008]_ 
     180 
     181http://www.pmel.noaa.gov/tao/data_deliv/deliv.html 
    149182 
    150183list of variables : +todo+ 
    151184 
    152185list of sites : +todo+ 
     186 
     187Tools 
     188^^^^^ 
    153189 
    154190:ref:`get_pirata_netcdf.sh` 
     
    159195~~~~ 
    160196 
    161 URL : +todo+ 
     197Contact 
     198^^^^^^^ 
     199 
     200atlasrt@noaa.gov 
     201 
     202Documentation 
     203^^^^^^^^^^^^^ 
     204 
     205[McPhadenMeyersEtAl:BAMS:2009]_ 
     206 
     207http://www.pmel.noaa.gov/tao/data_deliv/deliv.html 
    162208 
    163209list of variables : +todo+ 
    164210 
    165211list of sites : +todo+ 
     212 
     213Tools 
     214^^^^^ 
    166215 
    167216:ref:`get_rama_netcdf.sh` 
     
    172221.. _data_in_tao: 
    173222 
    174 URL : +todo+ 
     223Contact 
     224^^^^^^^ 
     225 
     226atlasrt@noaa.gov 
     227 
     228Documentation 
     229^^^^^^^^^^^^^ 
     230 
     231[McPhadenBusalacchiEtAL:JGR:1998]_ 
     232 
     233http://www.pmel.noaa.gov/tao/data_deliv/deliv.html 
    175234 
    176235list of variables : +todo+ 
     
    178237list of sites : +todo+ 
    179238 
     239Tools 
     240^^^^^ 
     241 
    180242:ref:`get_tao_netcdf.sh` 
    181243 
  • trunk/adm/guides/generate_statistics.rst

    r4 r48  
    3232 
    3333 
    34 Praveen will have to send you his netcdf codes to make the plts that we use to 
     34Praveen will have to send you his netcdf codes to make the plots that we use to 
    3535derive the bias corrections that we apply. 
  • trunk/adm/makefile

    r42 r48  
    1313# 
    1414# add -W to sphinx command when encoding problems are solved 
     15# 
     16# deux biblio : une dans guide et une dans website : actuellement seule celle de# website est vu dans html_dev 
    1517# 
    1618# usage of sphinx/source/Makefile 
     
    103105 
    104106LIST_RST_GUIDES = \ 
    105 $(shell find $(DIRADM)/guides/ -name "*.rst") 
     107$(shell find $(DIRADM)/guides/ -name "*.rst") \ 
     108$(shell find $(DIRADM)/website/ -name "*.rst") \ 
    106109 
    107110LIST_SRCSH = \ 
     
    185188html_dev \ 
    186189html_dev_sphinx \ 
     190html_dev_sphinx_one \ 
    187191html_user \ 
    188192pdf \ 
  • trunk/adm/website/_templates/layout.html

    r36 r48  
    1313<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px"> 
    1414<a href="{{ pathto('index') }}"><img src="{{ 
    15 pathto("_static/logo.png", 1) }}" border="0" alt="py4sci"/></a> 
     15pathto("_static/logo.png", 1) }}" border="0" alt="tropflux logo"/></a> 
    1616</div> 
    1717{{ super() }} 
  • trunk/adm/website/bibliography.rst

    r38 r48  
    1414.. EVOLUTIONS 
    1515.. ========== 
     16.. 
     17.. - fplod 20110421T085259Z aedon.locean-ipsl.upmc.fr (Darwin) 
     18.. 
     19..   * add references about TAO/TRITION, PIRATA, and RAMA 
    1620.. 
    1721.. - fplod 20110407T084904Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    4751============ 
    4852 
    49 .. [PraveenkumarVialard:CD:2010submitted] B. Praveen Kumar, J. Vialard, M. Lengaigne, V.S.N. Murty, M.J. McPhaden *TropFlux:  Air-Sea Fluxes for the Global Tropical Oceans - Description and evaluation against observations*, *Climate Dynamics*, 2010, submitted `TropFlux_Climate_Dynamics_r.pdf <https://www.locean-ipsl.upmc.fr/~jv/data/TropFlux_Climate_Dynamics_r.pdf>`_ 
     53.. [PraveenkumarVialard:CD:2010submitted] B. Praveen Kumar, J. Vialard, M. Lengaigne, V.S.N. Murty, M.J. McPhaden *TropFlux: Air-Sea Fluxes for the Global Tropical Oceans - Description and evaluation against observations*, *Climate Dynamics*, 2010, submitted `TropFlux_Climate_Dynamics_r.pdf <https://www.locean-ipsl.upmc.fr/~jv/data/TropFlux_Climate_Dynamics_r.pdf>`_ 
    5054 
    5155.. [LiebmannSmith:BAMS:1996] Liebmann B. and C.A. Smith, 1996: Description of a Complete (Interpolated) Outgoing Longwave Radiation Dataset. Bulletin of the American Meteorological Society, 77, 1275-1277. `OLRinterpolated.pdf <http://www.esrl.noaa.gov/psd/data/gridded/OLRinterpolated.pdf>`_ 
     56 
     57.. [McPhadenBusalacchiEtAL:JGR:1998] McPhaden, M.J., A.J. Busalacchi, R. Cheney, J.R. Donguy, K.S. Gage, D. Halpern, M. Ji, P. Julian, G. Meyers, G.T. Mitchum, P.P. Niiler, J. Picaut, R.W. Reynolds, N. Smith, K. Takeuchi, 1998: The Tropical Ocean-Global Atmosphere (TOGA) observing system: A decade of progress. J. Geophys. Res., 103, 14, 169-14,240. 
     58 
     59.. [BourlesLumpkinEtAL:BAMS:2008] Bourles, B., R. Lumpkin, M.J. McPhaden, F. Hernandez, P. Nobre, E.Campos, L. Yu, S. Planton, A. Busalacchi, A.D. Moura, J. Servain, and J. Trotte, 2008: The PIRATA Program: History, Accomplishments, and Future Directions. Bull. Amer. Meteor. Soc., 89, 1111-1125. 
     60 
     61.. [McPhadenMeyersEtAl:BAMS:2009] McPhaden, M.J., G. Meyers, K. Ando,Y. Masumoto, V.S.N. Murty, M. Ravichandran, F. Syamsudin, J. Vialard, L. Yu, and W. Yu, 2009: RAMA: The Research Moored Array for African-Asian-Australian Monsoon Analysis and Prediction. Bull. Am. Meteorol. Soc., 90, 459-480, doi:10.1175/2008BAMS2608.1 
  • trunk/src/get_oaflux.sh

    r33 r48  
    4646#           fontname=Courier, 
    4747#           color=blue, 
    48 #           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/get_oaflux.pro" 
    49 #           label="${TROPFLUX}/src/get_oaflux.pro"]; 
     48#           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/get_oaflux.sh" 
     49#           label="${TROPFLUX}/src/get_oaflux.sh"]; 
    5050# 
    5151#           {oaflux_ref} -> {get_oaflux} -> {file_oaflux} 
     
    8282# EVOLUTIONS 
    8383# ========== 
     84# 
     85# - fplod 20110421T125407Z aedon.locean-ipsl.upmc.fr (Darwin) 
     86# 
     87#   * typo 
    8488# 
    8589# - fplod 20101216T152647Z aedon.locean-ipsl.upmc.fr (Darwin) 
  • trunk/src/get_pirata_netcdf.sh

    r4 r48  
    1010# ================================================== 
    1111# 
    12 #  
     12# 
    1313# SYNOPSIS 
    1414# ======== 
     
    2323# ``get_pirata_netcdf.sh`` get PIRATA reference files 
    2424# 
     25# bf 
     26#   buoyancy flux 
     27# d 
     28#   sigma-theta 
     29# dyn 
     30#   dynamic height 
     31# emp 
     32#   e-p 
     33# iso 
     34#   20C depth 
     35# met 
     36#   wind (u,v,speed,direction),  airT, hum rel, SST   (= w + airt + rh) 
     37# pos 
     38#   lon, lat 
     39# rad 
     40#   shortwave down 
     41# rf 
     42#   rain heat flux 
     43# w 
     44#   wind 
     45# 
     46# Log file is written on :file:`${TROPFLUX_LOG}/get_pirata_netcdf.log.{YYYYMMDDTHHMMSSZ}` 
     47# 
     48#     .. graphviz:: 
     49# 
     50#        digraph get_pirata_netcdf { 
     51#           graph [ 
     52#           rankdir="TB", 
     53#           ] 
     54# 
     55#           pirata_ref [shape=diamond,fontname=Courier,label="ftp://ftp.pmel.noaa.gov/cdf/sites/daily/*_*_dy.cdf"]; 
     56# 
     57#           file_pirata  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/*_*_dy.cdf"]; 
     58# 
     59#           get_pirata_netcdf [shape=box, 
     60#           fontname=Courier, 
     61#           color=blue, 
     62#           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/get_pirata_netcdf.sh" 
     63#           label="${TROPFLUX}/src/get_pirata_netcdf.sh"]; 
     64# 
     65#           {pirata_ref} -> {get_pirata_netcdf} -> {file_pirata} 
     66# 
     67#          } 
     68# 
     69# EXAMPLES 
     70# ======== 
     71# 
     72# You don't have any PIRATA reference data, you just have to run this tool :: 
     73# 
     74#  $ get_pirata_netcdf.sh 
     75# 
     76# And look at log file with :: 
     77# 
     78#  $ tlogd.sh get_pirata_netcdf 
     79# 
     80# and of course on files in ${TROPFLUX_ID}. 
     81# 
    2582# SEE ALSO 
    2683# ======== 
     
    2885# :ref:`guide data PIRATA <data_in_pirata>` 
    2986# 
     87# :ref:`tropflux_profile.sh` 
     88# 
    3089# TODO 
    3190# ==== 
    3291# 
    33 # trace 
    34 # 
    35 # hard coded directory - usage of ${TROPFLUX_ID} 
    36 # 
    37 # coding rules 
     92# list of variables and sites in DESCRIPTION 
     93# 
     94# do we really need all these variables and sites 
     95# 
     96# study wget status (no exit now on non null wget status) 
    3897# 
    3998# EVOLUTIONS 
    4099# ========== 
    41100# 
     101# $Id$ 
     102# 
     103# - fplod 20110421T125622Z aedon.locean-ipsl.upmc.fr (Darwin) 
     104# 
     105#   * consolidation 
     106# 
    42107# - fplod 20101213T160729Z aedon.locean-ipsl.upmc.fr (Darwin) 
    43108# 
     
    49114# 
    50115#- 
    51 dir=/Users/jv/data/PIRATA/data/ 
    52  
    53 # bf  : buoyancy flux 
    54 # d   : sigma-theta 
    55 # dyn : dynamic height 
    56 # emp : e-p 
    57 # iso : 20C depth 
    58 # met : wind (u,v,speed,direction),  airT, hum rel, SST   (= w + airt + rh) 
    59 # pos : lon, lat 
    60 # rad : shortwave down 
    61 # rf  : rain heat flux 
    62 # w   : wind 
    63  
     116system=$(uname) 
     117case "${system}" in 
     118   AIX|IRIX64) 
     119      echo "www : no specific posix checking" 
     120   ;; 
     121   *) 
     122     set -o posix 
     123   ;; 
     124esac 
     125unset system 
     126# 
     127LANG=POSIX 
     128# 
     129command=$(basename ${0}) 
     130log_date=$(date -u +"%Y%m%dT%H%M%SZ") 
     131# 
     132usage=" Usage : ${command}" 
     133# 
     134hostname=$(hostname) 
     135# 
     136# default 
     137# N.A. because no parameters 
     138# 
     139set -u 
     140# 
     141# test if wget available 
     142tool=wget 
     143type ${tool} 1> /dev/null 2>&1 
     144status=${?} 
     145if [ ${status} -ne 0 ] 
     146then 
     147   echo "${command} : eee : tool ${tool} not found" 
     148   exit 1 
     149fi 
     150unset status 
     151unset tool 
     152# 
     153# check for ${TROPFLUX_LOG} definition 
     154if [ "${TROPFLUX_LOG}" = "" ] 
     155then 
     156   echo "${command} : eee : \${TROPFLUX_LOG} not defined" 
     157   exit 1 
     158fi 
     159# 
     160# check for ${TROPFLUX_LOG} existence 
     161if [ ! -d ${TROPFLUX_LOG} ] 
     162then 
     163   echo "${command} : eee : ${TROPFLUX_LOG} not found" 
     164   exit 1 
     165fi 
     166# 
     167# check for permission access on TROPFLUX_LOG 
     168if [ ! -x ${TROPFLUX_LOG} ] 
     169then 
     170   echo "${command} : eee : ${TROPFLUX_LOG} not reachable" 
     171   exit 1 
     172fi 
     173# 
     174# check for write permission on TROPFLUX_LOG 
     175if [ ! -w ${TROPFLUX_LOG} ] 
     176then 
     177   echo "${command} : eee : ${TROPFLUX_LOG} not writable" 
     178   exit 1 
     179fi 
     180# 
     181log=${TROPFLUX_LOG}/$(basename ${0} .sh).log.${log_date} 
     182echo "[Context]" 1>> ${log} 
     183echo "command=$(basename ${0})" 1>>${log} 
     184echo "hostname=${hostname}" 1>> ${log} 
     185echo "runtime=${log_date}" 1>> ${log} 
     186unset log_date 
     187echo "" 1>> ${log} 
     188# 
    64189varlist="adcp airt bf bp cur d dyn emp evap heat iso lw lwnet met pos qlat qnet qsen rad rain rf rh s ssd sss sst swnet t tau w" 
    65190sitelist="          0n0e" 
    66 sitelist="$sitelist 10s10w 6s10w 0n10w" 
    67 sitelist="$sitelist 0n23w 4n23w 12n23w 21n23w" 
    68 sitelist="$sitelist 19s34w 14s32w 8s30w 0n35w" 
    69 sitelist="$sitelist 4n38w 8n38w 12n38w 15n38w 20n38w"  
    70  
    71 cd $dir 
    72 for site in $sitelist ; do 
    73  for var in $varlist ; do 
    74   wget --password=G10b@LCh@Ng3 ftp://taopmelftp@ftp.pmel.noaa.gov/cdf/sites/daily/${var}${site}_dy.cdf 
    75  done 
     191sitelist="${sitelist} 10s10w 6s10w 0n10w" 
     192sitelist="${sitelist} 0n23w 4n23w 12n23w 21n23w" 
     193sitelist="${sitelist} 19s34w 14s32w 8s30w 0n35w" 
     194sitelist="${sitelist} 4n38w 8n38w 12n38w 15n38w 20n38w" 
     195# 
     196locref="ftp://ftp.pmel.noaa.gov/cdf/sites/daily" 
     197# 
     198list_url="" 
     199# 
     200# build URL = f(site,var) 
     201for site in ${sitelist} 
     202do 
     203   for var in ${varlist} 
     204   do 
     205       list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 
     206   done 
    76207done 
    77  
    78 ls -l 
     208unset site 
     209unset var 
     210unset varlist 
     211unset sitelist 
     212unset locref 
     213# 
     214# if file is not already in ${TROPFLUX_ID}, get it 
     215for url in ${list_url} 
     216do 
     217  file=${TROPFLUX_ID}/$(basename ${url}) 
     218  if [ ! -f ${file} ] 
     219  then 
     220     wget --tries=1 --no-verbose -P ${TROPFLUX_ID} \ 
     221        --user=taopmelftp \ 
     222        --password=G10b@LCh@Ng3 \ 
     223        ${url} >> ${log} 2>&1 
     224     wget_status=${?} 
     225     if [ ${wget_status} -ne 0 ] 
     226     then 
     227        echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
     228        # ++ exit 1 
     229     else 
     230        echo "${command} : iii : ${url} found" >> ${log} 2>&1 
     231     fi 
     232     unset wget_status 
     233  else 
     234     echo "iii : ${file} exists" >> ${log} 
     235  fi 
     236done 
     237unset file 
     238unset url 
     239unset list_url 
     240# 
     241unset command 
     242unset log 
     243unset hostname 
     244unset usage 
     245# 
     246# end 
     247set 
     248exit 0 
  • trunk/src/get_rama_netcdf.sh

    r4 r48  
    1010# ============================================== 
    1111# 
    12 # 
    1312# SYNOPSIS 
    1413# ======== 
     
    2322# ``get_rama_netcdf.sh`` get RAMA reference files 
    2423# 
     24# bf 
     25#   buoyancy flux 
     26# d 
     27#   sigma-theta 
     28# dyn 
     29#   dynamic height 
     30# emp 
     31#   e-p 
     32# iso 
     33#   20C depth 
     34# met 
     35#   wind (u,v,speed,direction),  airT, hum rel, SST   (= w + airt + rh) 
     36# pos 
     37#   lon, lat 
     38# rad 
     39#   shortwave down 
     40# rf 
     41#   rain heat flux 
     42# w 
     43#   wind 
     44# 
     45# Log file is written on :file:`${TROPFLUX_LOG}/get_rama_netcdf.log.{YYYYMMDDTHHMMSSZ}` 
     46# 
     47#     .. graphviz:: 
     48# 
     49#        digraph get_rama_netcdf { 
     50#           graph [ 
     51#           rankdir="TB", 
     52#           ] 
     53# 
     54#           rama_ref [shape=diamond,fontname=Courier,label="ftp://ftp.pmel.noaa.gov/cdf/sites/daily/*_*_dy.cdf"]; 
     55# 
     56#           file_rama  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/*_*_dy.cdf"]; 
     57# 
     58#           get_rama_netcdf [shape=box, 
     59#           fontname=Courier, 
     60#           color=blue, 
     61#           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/get_rama_netcdf.sh" 
     62#           label="${TROPFLUX}/src/get_rama_netcdf.sh"]; 
     63# 
     64#           {rama_ref} -> {get_rama_netcdf} -> {file_rama} 
     65# 
     66#          } 
     67# 
     68# EXAMPLES 
     69# ======== 
     70# 
     71# You don't have any RAMA reference data, you just have to run this tool :: 
     72# 
     73#  $ get_rama_netcdf.sh 
     74# 
     75# And look at log file with :: 
     76# 
     77#  $ tlogd.sh get_rama_netcdf 
     78# 
     79# and of course on files in ${TROPFLUX_ID}. 
     80# 
    2581# SEE ALSO 
    2682# ======== 
     
    2884# :ref:`guide data RAMA <data_in_rama>` 
    2985# 
     86# :ref:`tropflux_profile.sh` 
     87# 
    3088# TODO 
    3189# ==== 
    3290# 
    33 # trace 
    34 # 
    35 # hard coded directory - usage of ${TROPFLUX_ID} 
    36 # 
    37 # coding rules 
     91# list of variables and sites in DESCRIPTION 
     92# 
     93# do we really need all these variables and sites 
     94# 
     95# Liste complète de RAMA:: 
     96# 
     97#  sitelist="                   16s55e    12s55e    8s55e    4s55e    1.5s55e    0n55e    1.5n55e    4n55e" 
     98#  sitelist="${sitelist}                                                                               15n65e" 
     99#  sitelist="${sitelist}                    12s67e     8s67e    4s67e    1.5s67e    0n67e     1.5n67e    4n67e    8n67e" 
     100#  sitelist="${sitelist}  16s80.5e 12s80.5e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 4n80.5e" 
     101#  sitelist="${sitelist}               1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 
     102#  sitelist="${sitelist}  16s95e 12s95e 8s95e  5s95e" 
     103# 
     104# study wget status (no exit now on non null wget status) 
    38105# 
    39106# EVOLUTIONS 
    40107# ========== 
    41108# 
     109# $Id$ 
     110# 
     111# - fplod 20110421T133632Z aedon.locean-ipsl.upmc.fr (Darwin) 
     112# 
     113#   * consolidation 
     114# 
    42115# - fplod 20101213T160928Z aedon.locean-ipsl.upmc.fr (Darwin) 
    43116# 
     
    49122# 
    50123#- 
    51  
    52  
    53 dir=/Users/jv/data/RAMA/data/ 
    54  
    55 # bf  : buoyancy flux 
    56 # d   : sigma-theta 
    57 # dyn : dynamic height 
    58 # emp : e-p 
    59 # iso : 20C depth 
    60 # met : wind (u,v,speed,direction),  airT, hum rel, SST   (= w + airt + rh) 
    61 # pos : lon, lat 
    62 # rad : shortwave down 
    63 # rf  : rain heat flux 
    64 # w   : wind 
    65  
     124system=$(uname) 
     125case "${system}" in 
     126   AIX|IRIX64) 
     127      echo "www : no specific posix checking" 
     128   ;; 
     129   *) 
     130     set -o posix 
     131   ;; 
     132esac 
     133unset system 
     134# 
     135LANG=POSIX 
     136# 
     137command=$(basename ${0}) 
     138log_date=$(date -u +"%Y%m%dT%H%M%SZ") 
     139# 
     140usage=" Usage : ${command}" 
     141# 
     142hostname=$(hostname) 
     143# 
     144# default 
     145# N.A. because no parameters 
     146# 
     147set -u 
     148# 
     149# test if wget available 
     150tool=wget 
     151type ${tool} 1> /dev/null 2>&1 
     152status=${?} 
     153if [ ${status} -ne 0 ] 
     154then 
     155   echo "${command} : eee : tool ${tool} not found" 
     156   exit 1 
     157fi 
     158unset status 
     159unset tool 
     160# 
     161# check for ${TROPFLUX_LOG} definition 
     162if [ "${TROPFLUX_LOG}" = "" ] 
     163then 
     164   echo "${command} : eee : \${TROPFLUX_LOG} not defined" 
     165   exit 1 
     166fi 
     167# 
     168# check for ${TROPFLUX_LOG} existence 
     169if [ ! -d ${TROPFLUX_LOG} ] 
     170then 
     171   echo "${command} : eee : ${TROPFLUX_LOG} not found" 
     172   exit 1 
     173fi 
     174# 
     175# check for permission access on TROPFLUX_LOG 
     176if [ ! -x ${TROPFLUX_LOG} ] 
     177then 
     178   echo "${command} : eee : ${TROPFLUX_LOG} not reachable" 
     179   exit 1 
     180fi 
     181# 
     182# check for write permission on TROPFLUX_LOG 
     183if [ ! -w ${TROPFLUX_LOG} ] 
     184then 
     185   echo "${command} : eee : ${TROPFLUX_LOG} not writable" 
     186   exit 1 
     187fi 
     188# 
     189log=${TROPFLUX_LOG}/$(basename ${0} .sh).log.${log_date} 
     190echo "[Context]" 1>> ${log} 
     191echo "command=$(basename ${0})" 1>>${log} 
     192echo "hostname=${hostname}" 1>> ${log} 
     193echo "runtime=${log_date}" 1>> ${log} 
     194unset log_date 
     195echo "" 1>> ${log} 
     196# 
    66197varlist="adcp airt bf bp cur d dyn emp evap heat iso lw lwnet met pos qlat qnet qsen rad rain rf rh s ssd sss sst swnet t tau w" 
     198# 
    67199sitelist="12s55e 8s55e 8s67e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 5s95e" 
    68200 
    69 cd $dir 
    70 for site in $sitelist ; do 
    71  for var in $varlist ; do 
    72   wget --password=G10b@LCh@Ng3 ftp://taopmelftp@ftp.pmel.noaa.gov/cdf/sites/daily/${var}${site}_dy.cdf 
    73  done 
    74 done 
    75  
    76 ls -l 
    77  
    78201# 
    79202#Liste complète de RAMA: 
    80203#sitelist="                   16s55e    12s55e    8s55e    4s55e    1.5s55e    0n55e    1.5n55e    4n55e" 
    81 #siteliste="$sitelist                                                                               15n65e" 
    82 #siteliste="$sitelist                    12s67e     8s67e    4s67e    1.5s67e    0n67e     1.5n67e    4n67e    8n67e" 
    83 #siteliste="$sitelist  16s80.5e 12s80.5e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 4n80.5e" 
    84 #siteliste="$sitelist               1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 
    85 #siteliste="$sitelist  16s95e 12s95e 8s95e  5s95e" 
    86 # 
     204#sitelist="${sitelist}                                                                               15n65e" 
     205#sitelist="${sitelist}                    12s67e     8s67e    4s67e    1.5s67e    0n67e     1.5n67e    4n67e    8n67e" 
     206#sitelist="${sitelist}  16s80.5e 12s80.5e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 4n80.5e" 
     207#sitelist="${sitelist}               1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 
     208#sitelist="${sitelist}  16s95e 12s95e 8s95e  5s95e" 
     209# 
     210# 
     211locref="ftp://ftp.pmel.noaa.gov/cdf/sites/daily" 
     212# 
     213list_url="" 
     214# 
     215# build URL = f(site,var) 
     216for site in ${sitelist} 
     217do 
     218   for var in ${varlist} 
     219   do 
     220       list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 
     221   done 
     222done 
     223unset site 
     224unset var 
     225unset varlist 
     226unset sitelist 
     227unset locref 
     228# 
     229# if file is not already in ${TROPFLUX_ID}, get it 
     230for url in ${list_url} 
     231do 
     232  file=${TROPFLUX_ID}/$(basename ${url}) 
     233  if [ ! -f ${file} ] 
     234  then 
     235     wget --tries=1 --no-verbose -P ${TROPFLUX_ID} \ 
     236        --user=taopmelftp \ 
     237        --password=G10b@LCh@Ng3 \ 
     238        ${url} >> ${log} 2>&1 
     239     wget_status=${?} 
     240     if [ ${wget_status} -ne 0 ] 
     241     then 
     242        echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
     243        # ++ exit 1 
     244     else 
     245        echo "${command} : iii : ${url} found" >> ${log} 2>&1 
     246     fi 
     247     unset wget_status 
     248  else 
     249     echo "iii : ${file} exists" >> ${log} 
     250  fi 
     251done 
     252unset file 
     253unset url 
     254unset list_url 
     255# 
     256unset command 
     257unset log 
     258unset hostname 
     259unset usage 
     260# 
     261# end 
     262set 
     263exit 0 
  • trunk/src/get_tao_netcdf.sh

    r4 r48  
    1010# ============================================ 
    1111# 
    12 # 
    1312# SYNOPSIS 
    1413# ======== 
     
    2322# ``get_tao_netcdf.sh`` get TAO reference files 
    2423# 
     24# bf 
     25#   buoyancy flux 
     26# d 
     27#   sigma-theta 
     28# dyn 
     29#   dynamic height 
     30# emp 
     31#   e-p 
     32# iso 
     33#   20C depth 
     34# met 
     35#   wind (u,v,speed,direction),  airT, hum rel, SST   (= w + airt + rh) 
     36# pos 
     37#   lon, lat 
     38# rad 
     39#   shortwave down 
     40# rf 
     41#   rain heat flux 
     42# w 
     43#   wind 
     44# 
     45# Log file is written on :file:`${TROPFLUX_LOG}/get_tao_netcdf.log.{YYYYMMDDTHHMMSSZ}` 
     46# 
     47#     .. graphviz:: 
     48# 
     49#        digraph get_tao_netcdf { 
     50#           graph [ 
     51#           rankdir="TB", 
     52#           ] 
     53# 
     54#           tao_ref [shape=diamond,fontname=Courier,label="ftp://ftp.pmel.noaa.gov/cdf/sites/daily/*_*_dy.cdf"]; 
     55# 
     56#           file_tao  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/*_*_dy.cdf"]; 
     57# 
     58#           get_tao_netcdf [shape=box, 
     59#           fontname=Courier, 
     60#           color=blue, 
     61#           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/get_tao_netcdf.sh" 
     62#           label="${TROPFLUX}/src/get_tao_netcdf.sh"]; 
     63# 
     64#           {tao_ref} -> {get_tao_netcdf} -> {file_tao} 
     65# 
     66#          } 
     67# 
     68# EXAMPLES 
     69# ======== 
     70# 
     71# You don't have any TAO reference data, you just have to run this tool :: 
     72# 
     73#  $ get_tao_netcdf.sh 
     74# 
     75# And look at log file with :: 
     76# 
     77#  $ tlogd.sh get_tao_netcdf 
     78# 
     79# and of course on files in ${TROPFLUX_ID}. 
     80# 
    2581# SEE ALSO 
    2682# ======== 
     
    2884# :ref:`guide data TAO <data_in_tao>` 
    2985# 
     86# :ref:`tropflux_profile.sh` 
     87# 
    3088# TODO 
    3189# ==== 
    3290# 
    33 # trace 
    34 # 
    35 # hard coded directory - usage of ${TROPFLUX_ID} 
    36 # 
    37 # coding rules 
     91# list of variables and sites in DESCRIPTION 
     92# 
     93# do we really need all these variables and sites 
     94# 
     95# study wget status (no exit now on non null wget status) 
    3896# 
    3997# EVOLUTIONS 
    4098# ========== 
    4199# 
     100# $Id$ 
     101# 
     102# - fplod 20110421T154046Z aedon.locean-ipsl.upmc.fr (Darwin) 
     103# 
     104#   * consolidation 
     105# 
    42106# - fplod 20101213T161152Z aedon.locean-ipsl.upmc.fr (Darwin) 
    43107# 
     
    49113# 
    50114#- 
    51 dir=/Users/jv/data/TAO/data/ 
    52  
    53 # bf  : buoyancy flux 
    54 # d   : sigma-theta 
    55 # dyn : dynamic height 
    56 # emp : e-p 
    57 # iso : 20C depth 
    58 # met : wind (u,v,speed,direction),  airT, hum rel, SST   (= w + airt + rh) 
    59 # pos : lon, lat 
    60 # rad : shortwave down 
    61 # rf  : rain heat flux 
    62 # w   : wind 
    63  
     115system=$(uname) 
     116case "${system}" in 
     117   AIX|IRIX64) 
     118      echo "www : no specific posix checking" 
     119   ;; 
     120   *) 
     121     set -o posix 
     122   ;; 
     123esac 
     124unset system 
     125# 
     126LANG=POSIX 
     127# 
     128command=$(basename ${0}) 
     129log_date=$(date -u +"%Y%m%dT%H%M%SZ") 
     130# 
     131usage=" Usage : ${command}" 
     132# 
     133hostname=$(hostname) 
     134# 
     135# default 
     136# N.A. because no parameters 
     137# 
     138set -u 
     139# 
     140# test if wget available 
     141tool=wget 
     142type ${tool} 1> /dev/null 2>&1 
     143status=${?} 
     144if [ ${status} -ne 0 ] 
     145then 
     146   echo "${command} : eee : tool ${tool} not found" 
     147   exit 1 
     148fi 
     149unset status 
     150unset tool 
     151# 
     152# check for ${TROPFLUX_LOG} definition 
     153if [ "${TROPFLUX_LOG}" = "" ] 
     154then 
     155   echo "${command} : eee : \${TROPFLUX_LOG} not defined" 
     156   exit 1 
     157fi 
     158# 
     159# check for ${TROPFLUX_LOG} existence 
     160if [ ! -d ${TROPFLUX_LOG} ] 
     161then 
     162   echo "${command} : eee : ${TROPFLUX_LOG} not found" 
     163   exit 1 
     164fi 
     165# 
     166# check for permission access on TROPFLUX_LOG 
     167if [ ! -x ${TROPFLUX_LOG} ] 
     168then 
     169   echo "${command} : eee : ${TROPFLUX_LOG} not reachable" 
     170   exit 1 
     171fi 
     172# 
     173# check for write permission on TROPFLUX_LOG 
     174if [ ! -w ${TROPFLUX_LOG} ] 
     175then 
     176   echo "${command} : eee : ${TROPFLUX_LOG} not writable" 
     177   exit 1 
     178fi 
     179# 
     180log=${TROPFLUX_LOG}/$(basename ${0} .sh).log.${log_date} 
     181echo "[Context]" 1>> ${log} 
     182echo "command=$(basename ${0})" 1>>${log} 
     183echo "hostname=${hostname}" 1>> ${log} 
     184echo "runtime=${log_date}" 1>> ${log} 
     185unset log_date 
     186echo "" 1>> ${log} 
     187# 
    64188varlist="adcp airt bf bp cur d dyn emp evap heat iso lw lwnet met pos qlat qnet qsen rad rain rf rh s ssd sss sst swnet t tau w" 
    65 sitelist=                                       "2n137e 5n137e 8n137e" 
    66 sitelist="$sitelist                      0n147e 2n147e 5n147e" 
    67 sitelist="$sitelist        5s156e 2s156e 0n156e 2n156e 5n156e 8n156e" 
    68 sitelist="$sitelist 8s165e 5s165e 2s165e 0n165e 2n165e 5n165e 8n165e" 
    69 sitelist="$sitelist 8s180w 5s180w 2s180w 0n180w 2n180w 5n180w 8n180w" 
    70 sitelist="$sitelist 8s170w 5s170w 2s170w 0n170w 2n170w 5n170w 8n170w" 
    71 sitelist="$sitelist 8s155w 5s155w 2s155w 0n155w 2n155w 5n155w 8n155w" 
    72 sitelist="$sitelist        5s140w 2s140w 0n140w 2n140w 5n140w 9n140w" 
    73 sitelist="$sitelist 8s125w 5s125w 2s125w 0n125w 2n125w 5n125w 8n125w" 
    74 sitelist="$sitelist 8s110w 5s110w 2s110w 0n110w 2n110w 5n110w 8n110w" 
    75 sitelist="$sitelist 8s95w  5s95w  2s95w  0n95w  2n95w  5n95w  8n95w " 
    76  
    77 echo $sitelist 
    78  
    79 cd $dir 
    80 for site in $sitelist ; do 
    81  for var in $varlist ; do 
    82   wget --password=G10b@LCh@Ng3 ftp://taopmelftp@ftp.pmel.noaa.gov/cdf/sites/daily/${var}${site}_dy.cdf 
    83  done 
     189# 
     190sitelist="                                        2n137e 5n137e 8n137e" 
     191sitelist="${sitelist}                      0n147e 2n147e 5n147e" 
     192sitelist="${sitelist}        5s156e 2s156e 0n156e 2n156e 5n156e 8n156e" 
     193sitelist="${sitelist} 8s165e 5s165e 2s165e 0n165e 2n165e 5n165e 8n165e" 
     194sitelist="${sitelist} 8s180w 5s180w 2s180w 0n180w 2n180w 5n180w 8n180w" 
     195sitelist="${sitelist} 8s170w 5s170w 2s170w 0n170w 2n170w 5n170w 8n170w" 
     196sitelist="${sitelist} 8s155w 5s155w 2s155w 0n155w 2n155w 5n155w 8n155w" 
     197sitelist="${sitelist}        5s140w 2s140w 0n140w 2n140w 5n140w 9n140w" 
     198sitelist="${sitelist} 8s125w 5s125w 2s125w 0n125w 2n125w 5n125w 8n125w" 
     199sitelist="${sitelist} 8s110w 5s110w 2s110w 0n110w 2n110w 5n110w 8n110w" 
     200sitelist="${sitelist} 8s95w  5s95w  2s95w  0n95w  2n95w  5n95w  8n95w " 
     201# 
     202locref="ftp://ftp.pmel.noaa.gov/cdf/sites/daily" 
     203# 
     204list_url="" 
     205# 
     206# build URL = f(site,var) 
     207for site in ${sitelist} 
     208do 
     209   for var in ${varlist} 
     210   do 
     211       list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 
     212   done 
    84213done 
    85  
    86 ls -l 
     214unset site 
     215unset var 
     216unset varlist 
     217unset sitelist 
     218unset locref 
     219# 
     220# if file is not already in ${TROPFLUX_ID}, get it 
     221for url in ${list_url} 
     222do 
     223  file=${TROPFLUX_ID}/$(basename ${url}) 
     224  if [ ! -f ${file} ] 
     225  then 
     226     wget --tries=1 --no-verbose -P ${TROPFLUX_ID} \ 
     227        --user=taopmelftp \ 
     228        --password=G10b@LCh@Ng3 \ 
     229        ${url} >> ${log} 2>&1 
     230     wget_status=${?} 
     231     if [ ${wget_status} -ne 0 ] 
     232     then 
     233        echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
     234        # ++ exit 1 
     235     else 
     236        echo "${command} : iii : ${url} found" >> ${log} 2>&1 
     237     fi 
     238     unset wget_status 
     239  else 
     240     echo "iii : ${file} exists" >> ${log} 
     241  fi 
     242done 
     243unset file 
     244unset url 
     245unset list_url 
     246# 
     247unset command 
     248unset log 
     249unset hostname 
     250unset usage 
     251# 
     252# end 
     253set 
     254exit 0 
Note: See TracChangeset for help on using the changeset viewer.