[6] | 1 | ;+ |
---|
| 2 | ; |
---|
| 3 | ; .. _time_axe_modif_TropFlux.pro: |
---|
| 4 | ; |
---|
| 5 | ; =========================== |
---|
| 6 | ; time_axe_modif_TropFlux.pro |
---|
| 7 | ; =========================== |
---|
| 8 | ; |
---|
[9] | 9 | ; .. graphviz:: |
---|
| 10 | ; |
---|
| 11 | ; digraph time_axe_modif_TropFlux { |
---|
| 12 | ; |
---|
| 13 | ; file_inout [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"]; |
---|
| 14 | ; |
---|
[19] | 15 | ; time_axe_modif_TropFlux [shape=box, |
---|
[9] | 16 | ; fontname=Courier, |
---|
| 17 | ; color=blue, |
---|
| 18 | ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/time_axe_modif_TropFlux.pro", |
---|
[50] | 19 | ; label="${PROJECT}/src/time_axe_modif_TropFlux.pro"]; |
---|
[9] | 20 | ; |
---|
| 21 | ; {file_inout} -> {time_axe_modif_TropFlux} -> {file_inout} |
---|
| 22 | ; |
---|
| 23 | ; } |
---|
| 24 | ; |
---|
[6] | 25 | ; SEE ALSO |
---|
| 26 | ; ======== |
---|
| 27 | ; |
---|
[20] | 28 | ; :func:`julday <saxo:julday>` |
---|
| 29 | ; |
---|
[6] | 30 | ; EXAMPLES |
---|
| 31 | ; ======== |
---|
| 32 | ; |
---|
| 33 | ; :: |
---|
| 34 | ; |
---|
| 35 | ; IDL> time_axe_modif_tropflux |
---|
| 36 | ; |
---|
| 37 | ; TODO |
---|
| 38 | ; ==== |
---|
| 39 | ; |
---|
[50] | 40 | ; hard coded directory - usage of ${PROJECT_ID} |
---|
[6] | 41 | ; |
---|
| 42 | ; coding rules |
---|
| 43 | ; |
---|
[27] | 44 | ; why 1950 whereas "hours since 1957-01-01 00:00:0.0" can be read in |
---|
| 45 | ; 20c3m_erai_t2_TROP_1989_2009.nc |
---|
| 46 | ; |
---|
[97] | 47 | ; no change off attributs : wrong info vs data on time |
---|
[27] | 48 | ; |
---|
[6] | 49 | ; EVOLUTIONS |
---|
| 50 | ; ========== |
---|
| 51 | ; |
---|
[85] | 52 | ; $Id$ |
---|
| 53 | ; |
---|
| 54 | ; $URL$ |
---|
| 55 | ; |
---|
[9] | 56 | ; - fplod 20101215T114847Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 57 | ; |
---|
| 58 | ; * add graph in header |
---|
| 59 | ; |
---|
[6] | 60 | ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 61 | ; |
---|
| 62 | ; * minimal header |
---|
| 63 | ; |
---|
| 64 | ; - pbk 2008 |
---|
| 65 | ; |
---|
| 66 | ; * creation |
---|
| 67 | ; |
---|
| 68 | ;- |
---|
[5] | 69 | pro time_axe_modif_TropFlux |
---|
[97] | 70 | ; |
---|
[5] | 71 | dir_out='/Users/pkb/data/TropFlux/' |
---|
| 72 | ;dir_out='/Users/pkb/data/heat_budget/oscar_global/global/' |
---|
| 73 | file='TropFlux_19890101_20091231.nc' |
---|
| 74 | ;file='TropFlux_sst_19890101_20091231.nc' |
---|
| 75 | ;file='TropFlux_swr_19890101_20071231_DT_v50.nc' |
---|
| 76 | ;file='TropFlux_swr_19890101_20091231_NRT_v50.nc' |
---|
| 77 | ;file='oscar_1993_2009_intrpltd_1day.nc' |
---|
| 78 | ;file='oscar_19890101_20091231.nc' |
---|
| 79 | ;file='TropFlux_swr_19890101_20091231_BLND.nc' |
---|
| 80 | ;file="TropFlux_19890101_20091231_v51.nc" |
---|
| 81 | ;file='TropFlux_t2m_19890101_20091231_v50.nc' |
---|
| 82 | fic=dir_out+file |
---|
[97] | 83 | ; |
---|
[5] | 84 | print, '' |
---|
| 85 | print, 'File in : ',fic |
---|
| 86 | print, ' ' |
---|
| 87 | ; |
---|
| 88 | ; opening the file to modify the time axis |
---|
| 89 | ; |
---|
| 90 | cdfid=NCDF_OPEN(fic,/write) |
---|
| 91 | NCDF_VARGET, cdfid, 'time', tt |
---|
| 92 | ;NCDF_VARGET, cdfid, 'tt', tt |
---|
| 93 | ncdf_control, cdfid ,/REDEF ; put in define mode |
---|
| 94 | ; |
---|
[6] | 95 | ; reading attributs of time |
---|
[5] | 96 | ; |
---|
| 97 | varid=ncdf_varid(cdfid,'time') |
---|
| 98 | ;varid=ncdf_varid(cdfid,'tt') |
---|
| 99 | ; |
---|
[97] | 100 | ; |
---|
[5] | 101 | ncdf_control, cdfid ,/endef |
---|
| 102 | ntt=n_elements(tt) |
---|
| 103 | ttt=(julday(01, 01, 1989,12)-julday(01, 01, 1950,0))+findgen(ntt) |
---|
[97] | 104 | ; |
---|
[5] | 105 | NCDF_VARPUT, cdfid, 'time', ttt |
---|
| 106 | ;NCDF_VARPUT, cdfid, 'tt', ttt |
---|
| 107 | NCDF_CLOSE, cdfid |
---|
[97] | 108 | ; |
---|
[5] | 109 | END |
---|