- Timestamp:
- 08/17/11 11:00:48 (13 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/time_axe_modif_tropflux_1d_1989_2010.pro
r82 r83 1 ;+ 2 ; 3 ; .. _time_axe_modif_tropflux_1d_1989_2010.pro: 4 ; 5 ; ======================================== 6 ; time_axe_modif_tropflux_1d_1989_2010.pro 7 ; ======================================== 8 ; 9 ; .. graphviz:: 10 ; 11 ; digraph time_axe_modif_tropflux_1d_1989_2010 { 12 ; 13 ; file_inout [shape=ellipse,fontname=Courier,label="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1d_1989_2010.nc"]; 14 ; 15 ; time_axe_modif_tropflux_1d_1989_2010 [shape=box, 16 ; fontname=Courier, 17 ; color=blue, 18 ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/time_axe_modif_tropflux_1d_1989_2010.pro", 19 ; label="${PROJECT}/src/time_axe_modif_tropflux_1d_1989_2010.pro"]; 20 ; 21 ; {file_inout} -> {time_axe_modif_tropflux_1d_1989_2010} -> {file_inout} 22 ; 23 ; } 24 ; 25 ; 26 ; SEE ALSO 27 ; ======== 28 ; 29 ; :func:`julday <saxo:julday>` 30 ; 31 ; :ref:`time_axe_modif_TropFlux.pro` 32 ; 33 ; EXAMPLES 34 ; ======== 35 ; 36 ; :: 37 ; 38 ; IDL> time_axe_modif_tropflux_1d_1989_2010 39 ; 40 ; TODO 41 ; ==== 42 ; 43 ; if needed include in the whole process 44 ; 45 ; hard coded directory - usage of ${PROJECT_ID} 46 ; 47 ; coding rules 48 ; 49 ; EVOLUTIONS 50 ; ========== 51 ; 52 ; $Id$ 53 ; 54 ; $URL$ 55 ; 56 ; - fplod 20110817T084839Z aedon.locean-ipsl.upmc.fr (Darwin) 57 ; 58 ; * minimal header 59 ; 60 ; - pk 20110815 61 ; 62 ; * provided to fp 63 ; 64 ;- 1 65 pro time_axe_modif_tropflux_1d_1989_2010 2 66 … … 23 87 ncdf_control, cdfid ,/REDEF ; put in define mode 24 88 ; 25 ; reading attributs of time 89 ; reading attributs of time 26 90 ; 27 91 varid=ncdf_varid(cdfid,'time') -
trunk/src/ws_tropflux_1d_to_1m_ncdf.pro
r82 r83 1 ;+ 2 ; 3 ; .. _ws_tropflux_1d_to_1m_ncdf.pro: 4 ; 5 ; ============================= 6 ; ws_tropflux_1d_to_1m_ncdf.pro 7 ; ============================= 8 ; 9 ; DESCRIPTION 10 ; =========== 11 ; 12 ; convert wind daily file to monthly file 13 ; 14 ; :file:`${PROJECT_OD}/ws_tropflux_1d_1989_2010.nc` 15 ; containing daily ++ 16 ; has been produced by ++ 17 ; 18 ; Montly ++ 19 ; is written in 20 ; :file:`${PROJECT_OD}/ws_tropflux_1m_1989_2010.nc` 21 ; if this file not already exists. 22 ; 23 ; .. graphviz:: 24 ; 25 ; digraph ws_tropflux_1d_to_1m_ncdf { 26 ; 27 ; file_1d [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/ws_tropflux_1d_1989_2010.nc"]; 28 ; file_1m [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/ws_tropflux_1m_1989_2010.nc"]; 29 ; 30 ; ws_tropflux_1d_to_1m_ncdf [shape=box, 31 ; fontname=Courier, 32 ; color=blue, 33 ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/ws_tropflux_1d_to_1m_ncdf.pro", 34 ; label="${PROJECT}/src/ws_tropflux_1d_to_1m_ncdf.pro"]; 35 ; 36 ; {file_1d} -> {ws_tropflux_1d_to_1m_ncdf} -> {file_1m} 37 ; 38 ; } 39 ; 40 ; SEE ALSO 41 ; ======== 42 ; 43 ; :ref:`project_profile.sh` 44 ; 45 ; EXAMPLES 46 ; ======== 47 ; 48 ; :: 49 ; 50 ; IDL> ws_tropflux_1d_to_1m_ncdf 51 ; 52 ; TODO 53 ; ==== 54 ; 55 ; remove hard coded creation date 56 ; 57 ; include in the whole process 58 ; 59 ; any NCO or CDO equivalent ? 60 ; 61 ; EVOLUTIONS 62 ; ========== 63 ; 64 ; $Id$ 65 ; 66 ; $URL$ 67 ; 68 ; - fplod 20110817T084001Z aedon.locean-ipsl.upmc.fr (Darwin) 69 ; 70 ; * usage of ${PROJECT_OD} 71 ; * header 72 ; 73 ; - pk 20110815 74 ; 75 ; * provided to fp 76 ; 77 ;- 1 78 pro ws_tropflux_1d_to_1m_ncdf 2 @common 3 ;----------------------------------------------------------------------------- 4 file="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1d_1989_2010.nc" 5 initncdf, file 79 ; 80 @cm_4cal 81 @cm_4data 82 @cm_4mesh 83 @cm_4data 84 @cm_project 85 ; 86 ; test if ${PROJECT_OD} defined 87 CASE project_od_env OF 88 '' : BEGIN 89 msg = 'eee : ${PROJECT_OD} is not defined' 90 ras = report(msg) 91 STOP 92 END 93 ELSE: BEGIN 94 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 95 ras = report(msg) 96 END 97 ENDCASE 98 ; 99 ; check if output data will be possible 100 iodirout = isadirectory(project_od_env) 101 ; 102 ; existence and protection for reading 103 IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 104 msg = 'eee : the directory' + iodirout + ' is not accessible.' 105 ras = report(msg) 106 STOP 107 ENDIF 108 ; 109 ; existence and protection for writing 110 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 111 msg = 'eee : the directory' + iodirout + ' was not found.' 112 ras = report(msg) 113 STOP 114 ENDIF 115 ; 116 ; build 1d filename 117 filename="ws_tropflux_1d_1989_2010.nc" 118 ; 119 ; check if this file exists 120 fullfilename = isafile(iodirout + filename, NEW=0, /MUST_EXIST) 121 IF fullfilename[0] EQ '' THEN BEGIN 122 msg = 'eee : the file ' + fullfilename + ' was not found.' 123 ras = report(msg) 124 STOP 125 ENDIF 126 ; 127 ; build output filename 128 filename_out = 'ws_tropflux_1m_1989_2010.nc' 129 fullfilename_out = iodirout + filename_out 130 ; in order to avoid unexpected overwritten 131 IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 132 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 133 ras = report(msg) 134 STOP 135 ENDIF 136 ; 137 initncdf, fullfilename 6 138 st=19890101 & en=20101231 7 ws=read_ncdf("ws", st, en, file=f ile,/nostr)139 ws=read_ncdf("ws", st, en, file=fullfilename,/nostr) 8 140 9 141 help, ws … … 33 165 xlon=reform(glamt(firstxt:lastxt,0) ) & ylat=reform(gphit(0,firstyt:lastyt)) 34 166 35 ncfile='! /Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1m_1989_2010.nc'167 ncfile='!' + fullfilename_out 36 168 37 169 lon_attr={units:'degrees_east',long_name:'Longitude'} … … 51 183 @ncdf_quickwrite 52 184 53 ;------------------------------------------------------------54 185 return 55 186
Note: See TracChangeset
for help on using the changeset viewer.