- Timestamp:
- 02/11/14 18:41:24 (10 years ago)
- Location:
- trunk/src
- Files:
-
- 99 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/add_19890101.sh
r199 r203 7 7 # .. _add_19890101.sh: 8 8 # 9 # =============== ===10 # add_19890101.sh 11 # =============== ===9 # =============== 10 # add_19890101.sh 11 # =============== 12 12 # 13 13 # SYNOPSIS 14 14 # ======== 15 15 # 16 # ::17 # 18 # $add_19890101.sh [--debug]16 # .. code-block:: bash 17 # 18 # add_19890101.sh [--debug] 19 19 # 20 20 # DESCRIPTION … … 28 28 # 29 29 # :file:`${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc` 30 # containing 30 # containing 31 31 # ++ 32 32 # has been produced by 33 33 # :func:`interp_erai_lwr`. 34 # repeat the first time step in 34 # repeat the first time step in 35 35 # 36 36 # File :file:`${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc` … … 38 38 # if this file not already exists. 39 39 # 40 # This output file 40 # This output file 41 41 # :file:`${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc` 42 # must be processed after by 42 # must be processed after by 43 43 # :func:`lwr_correction_ncdf`. 44 # 44 # 45 45 # Log file is written on :file:`${PROJECT_LOG}/add_19890101.sh.log.{YYYYMMDDTHHMMSSZ}` 46 46 # … … 49 49 # digraph add_19890101 { 50 50 # 51 # filein [shape=ellipse,fontname=Courier,label="$ PROJECT_OD/erai_lwr_19890102_20091231_oafluxgrid.nc"];52 # fileout [shape=ellipse,fontname=Courier,label="$ PROJECT_OD/erai_lwr_19890101_20091231_oafluxgrid.nc"];51 # filein [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc"]; 52 # fileout [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc"]; 53 53 # 54 54 # add_19890101 [shape=box, … … 65 65 # ======== 66 66 # 67 # To produce $PROJECT_OD/erai_lwr_19890101_20091231_oafluxgrid.nc 68 # from $PROJECT_OD/erai_lwr_19890102_20091231_oafluxgrid.nc :: 69 # 70 # $ add_19890101.sh --debug 71 # 72 # And look at log file with :: 73 # 74 # $ tlogd.sh add_19890101 67 # To produce ${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc 68 # from ${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc : 69 # 70 # .. code-block:: bash 71 # 72 # add_19890101.sh --debug 73 # 74 # And look at log file with : 75 # 76 # .. code-block:: bash 77 # 78 # tlogd.sh add_19890101 75 79 # 76 80 # and of course on files in ${PROJECT_OD}. … … 79 83 # ==== 80 84 # 81 # To see the 3 first time values in input and files:: 82 # 83 # $ ncks -s "%16.10f\n" -v tt -d time,0,2 ${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc 85 # To see the 3 first time values in input and files: 86 # 87 # .. code-block:: bash 88 # 89 # ncks -s "%16.10f\n" -v tt -d time,0,2 ${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc 90 # 91 # .. parsed-literal:: 92 # 84 93 # 14246.0000000005 85 94 # 14247.0000000005 86 95 # 14248.0000000005 87 96 # 88 # $ ncks -s "%16.10f\n" -v tt -d time,0,2 ${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc 97 # .. code-block:: bash 98 # 99 # ncks -s "%16.10f\n" -v tt -d time,0,2 ${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc 100 # 101 # .. parsed-literal:: 102 # 89 103 # 14245.0000000005 90 104 # 14246.0000000005 … … 93 107 # while : 94 108 # 95 # $ idl 96 # print, julday(01, 01, 1989,12)-julday(01, 01, 1950,0) 97 # 14245.500 98 # print, julday(01, 01, 1989,12)-julday(01, 01, 1950,0) +1 99 # 14246.500 109 # .. code-block:: idl 110 # 111 # print, julday(01, 01, 1989,12)-julday(01, 01, 1950,0) 112 # 113 # .. parsed-literal:: 114 # 115 # 14245.500 116 # 117 # .. code-block:: idl 118 # 119 # print, julday(01, 01, 1989,12)-julday(01, 01, 1950,0) +1 120 # 121 # .. parsed-literal:: 122 # 123 # 14246.500 100 124 # 101 125 # SEE ALSO … … 116 140 # coding rules 117 141 # 118 # won't it be more conveniant to add this articifial time step in 142 # won't it be more conveniant to add this articifial time step in 119 143 # the IDL creation tool interp_erai_lwr_1989_2009.pro. 120 144 # It will allow to avoid a shell interruption in the IDL processing chain. … … 128 152 # remove hard coded end time 129 153 # 130 # get rid of this long mesage on cratos:: 131 # 132 # ncrcat: WARNING Variable lwr has attribute "missing_value" but not "_FillValue". To 154 # get rid of this long mesage on cratos: 155 # 156 # .. parsed-literal:: 157 # 158 # ncrcat: WARNING Variable lwr has attribute "missing_value" but not "_FillValue". To 133 159 # comply with netCDF conventions, NCO ignores values that equal the _FillValue attribu 134 160 # te when performing arithmetic. Confusingly, values equal to the missing_value should 135 # also be neglected. However, it is tedious and (possibly) computationally expensive 161 # also be neglected. However, it is tedious and (possibly) computationally expensive 136 162 # to check each value against multiple missing values during arithmetic on large varia 137 163 # bles. So NCO thinks that processing variables with a "missing_value" attribute and n … … 150 176 # valeurs manquantes dans les softs IDL !!! 151 177 # 152 #153 178 # EVOLUTIONS 154 179 # ========== … … 166 191 system=$(uname) 167 192 case "${system}" in 168 AIX|IRIX64)169 echo "www : no specific posix checking"170 date_cmd=date171 ;;172 Darwin)173 set -o posix174 date_cmd=gdate175 ;;176 Linux)177 set -o posix178 date_cmd=date179 ;;180 *)181 set -o posix182 ;;193 AIX|IRIX64) 194 echo "www : no specific posix checking" 195 date_cmd=date 196 ;; 197 Darwin) 198 set -o posix 199 date_cmd=gdate 200 ;; 201 Linux) 202 set -o posix 203 date_cmd=date 204 ;; 205 *) 206 set -o posix 207 ;; 183 208 esac 184 209 unset system … … 201 226 if [ ${#} -lt ${minargcount} ] 202 227 then 203 echo "${command} : eee : not enought arguments"204 echo "${usage}"205 exit 1228 echo "${command} : eee : not enought arguments" 229 echo "${usage}" 230 exit 1 206 231 fi 207 232 # 208 233 while [ ${#} -gt 0 ] 209 234 do 210 case ${1} in211 --debug)212 debug=1213 ;;214 *)215 # anything else216 echo "${command} : eee : unknown option ${1}"217 echo "${command} : eee : ${usage}"218 exit 1219 ;;220 esac221 # next flag222 shift235 case ${1} in 236 --debug) 237 debug=1 238 ;; 239 *) 240 # anything else 241 echo "${command} : eee : unknown option ${1}" 242 echo "${command} : eee : ${usage}" 243 exit 1 244 ;; 245 esac 246 # next flag 247 shift 223 248 done 224 249 # … … 231 256 if [ ${status} -ne 0 ] 232 257 then 233 echo "${command} : eee : tool ${tool} not found"234 exit 1258 echo "${command} : eee : tool ${tool} not found" 259 exit 1 235 260 fi 236 261 unset status … … 242 267 if [ ${status} -ne 0 ] 243 268 then 244 echo "${command} : eee : tool ${tool} not found"245 exit 1269 echo "${command} : eee : tool ${tool} not found" 270 exit 1 246 271 fi 247 272 unset status … … 253 278 if [ ${status} -ne 0 ] 254 279 then 255 echo "${command} : eee : tool ${tool} not found"256 exit 1280 echo "${command} : eee : tool ${tool} not found" 281 exit 1 257 282 fi 258 283 unset status … … 262 287 if [ "${PROJECT_LOG}" = "" ] 263 288 then 264 echo "${command} : eee : \${PROJECT_LOG} not defined"265 exit 1289 echo "${command} : eee : \${PROJECT_LOG} not defined" 290 exit 1 266 291 fi 267 292 # … … 269 294 if [ ! -d ${PROJECT_LOG} ] 270 295 then 271 echo "${command} : eee : ${PROJECT_LOG} not found"272 exit 1296 echo "${command} : eee : ${PROJECT_LOG} not found" 297 exit 1 273 298 fi 274 299 # … … 276 301 if [ ! -x ${PROJECT_LOG} ] 277 302 then 278 echo "${command} : eee : ${PROJECT_LOG} not reachable"279 exit 1303 echo "${command} : eee : ${PROJECT_LOG} not reachable" 304 exit 1 280 305 fi 281 306 # … … 283 308 if [ ! -w ${PROJECT_LOG} ] 284 309 then 285 echo "${command} : eee : ${PROJECT_LOG} not writable"286 exit 1310 echo "${command} : eee : ${PROJECT_LOG} not writable" 311 exit 1 287 312 fi 288 313 # … … 304 329 then 305 330 echo " eee : ${filein} not found" 1>> ${log} 306 exit 1 331 exit 1 307 332 fi 308 333 fileout=${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc 309 334 if [ -f ${fileout} ] 310 335 then 311 312 336 echo "eee : ${fileout} already exists" 1>>${log} 337 exit 1 313 338 fi 314 339 # … … 331 356 # substract 1 to tt to simulate 19890101 332 357 ncap2 -h -s "tt=tt-1" \ 333 334 335 status=${?} 336 if [ ${status} -ne 0 ] 358 ${PROJECT_OD}/erai_lwr_step19890102.nc \ 359 ${PROJECT_OD}/erai_lwr_step19890101.nc 360 status=${?} 361 if [ ${status} -ne 0 ] 337 362 then 338 363 echo "eee : pb with ncap2" >> ${log} 2>&1 339 364 ncdump -h ${PROJECT_OD}/erai_lwr_step19890102.nc >> ${log} 2>&1 340 365 exit 1 341 fi 366 fi 342 367 unset status 343 368 ls -l ${PROJECT_OD}/erai_lwr_step19890102.nc >> ${log} 2>&1 … … 345 370 # 346 371 # ++ check if tt[0] is really 19890101 347 # 372 # 348 373 rm ${fileout}_bad_timerange 2> /dev/null 349 374 ncrcat -h \ 350 351 352 353 status=${?} 354 if [ ${status} -ne 0 ] 375 ${PROJECT_OD}/erai_lwr_step19890101.nc \ 376 ${filein} \ 377 ${fileout}_bad_timerange >> ${log} 2>&1 378 status=${?} 379 if [ ${status} -ne 0 ] 355 380 then 356 381 echo "eee : pb with ncrcat" >> ${log} 2>&1 … … 358 383 ncdump -h ${filein} >> ${log} 2>&1 359 384 exit 1 360 fi 385 fi 361 386 unset status 362 387 # 363 388 ncatted -h -a timerange,global,o,c,"19890101 - 20091231" \ 364 365 389 ${fileout}_bad_timerange \ 390 ${fileout} >> ${log} 2>&1 366 391 status=${?} 367 392 if [ ${status} -ne 0 ] … … 370 395 ncdump -h ${fileout}_bad_timerange >> ${log} 2>&1 371 396 exit 1 372 fi 397 fi 373 398 unset status 374 399 # -
trunk/src/basic_variable_evaluation_tpr_timeseries.pro
r180 r203 31 31 ; ======== 32 32 ; 33 ; ::33 ; .. code-block:: idl 34 34 ; 35 ; date1 = 20000101L36 ; date2 = 20091231L37 ; basic_variable_evaluation_tpr_timeseries, date1, date235 ; date1 = 20000101L 36 ; date2 = 20091231L 37 ; basic_variable_evaluation_tpr_timeseries, date1, date2 38 38 ; 39 39 ; EVOLUTIONS … … 130 130 131 131 132 133 134 132 extract_tpr_location,var,box, $ 133 var_tpr 134 var_tpr=reform(var_tpr) 135 135 136 137 136 stats_5d, tpr,var_tpr, $ ;; tpr=TPR observation and var_tpr=gridded product extracted at TPR location 137 cor, bias, std, rmsd 138 138 139 140 141 139 printf, 1, x, y, cor, bias, std, rmsd, format='(f6.2, 3x, f6.2, 3x, f4.2, 3x, f7.2, 3x, f4.2, 3x, f5.2)' 140 cstat=string(cor, bias, std, rmsd, format='(f4.2,3x,f7.2,3x,f4.2,3x,f5.2)') 141 print, cstat 142 142 143 ;; 144 145 146 147 148 149 150 151 143 ;; PLOTTING THE TIME-SERIES 144 array=[tpr, var_tpr] & mi=min(array,/nan) & ma=max(array,/nan) & int=(ma-mi)/3. 145 pltt, ts_smooth(tpr,5,/nan), "t",/rempl, small=[1,3,1], lct=65, $ 146 title='Five day stats are shown below. TPR (black) and Product (red) at'+csite+' ', charsize=1., $ 147 subtitle=cstat 148 ind=where(finite(tpr,/nan)) & var_tpr(ind)=!Values.f_nan 149 pltt, ts_smooth(var_tpr,5,/nan), "t",/ov1d, color=250 150 erase 151 mooring=[mooring,tpr] & product=[product,var_tpr] 152 152 endif 153 153 endfor -
trunk/src/change_creation_date.sh
r202 r203 14 14 # ======== 15 15 # 16 # ::17 # 18 # $change_creation_date.sh [--debug] -c yyyymmdd -d directory16 # .. code-block:: bash 17 # 18 # change_creation_date.sh [--debug] -c yyyymmdd -d directory 19 19 # 20 20 # DESCRIPTION … … 54 54 # ======== 55 55 # 56 # To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/:: 57 # 58 # $ change_creation_date.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -c 20130725 59 # 60 # And look at log file with :: 61 # 62 # $ tlogd.sh change_creation_date 56 # To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/: 57 # 58 # .. code-block:: bash 59 # 60 # change_creation_date.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -c 20130725 61 # 62 # And look at log file with : 63 # 64 # .. code-block:: bash 65 # 66 # tlogd.sh change_creation_date 63 67 # 64 68 # TIPS … … 99 103 system=$(uname) 100 104 case "${system}" in 101 AIX|IRIX64)102 echo "www : no specific posix checking"103 date_cmd=date104 ;;105 Darwin)106 set -o posix107 date_cmd=gdate108 ;;109 Linux)110 set -o posix111 date_cmd=date112 ;;113 *)114 set -o posix115 ;;105 AIX|IRIX64) 106 echo "www : no specific posix checking" 107 date_cmd=date 108 ;; 109 Darwin) 110 set -o posix 111 date_cmd=gdate 112 ;; 113 Linux) 114 set -o posix 115 date_cmd=date 116 ;; 117 *) 118 set -o posix 119 ;; 116 120 esac 117 121 unset system … … 134 138 if [ ${#} -lt ${minargcount} ] 135 139 then 136 echo "${command} : eee : not enought arguments"137 echo "${usage}"138 exit 1140 echo "${command} : eee : not enought arguments" 141 echo "${usage}" 142 exit 1 139 143 fi 140 144 # 141 145 while [ ${#} -gt 0 ] 142 146 do 143 case ${1} in144 -c)145 yyyymmdd=${2}146 shift147 ;;148 -d)149 dirin=${2}150 shift151 ;;152 --debug)153 debug=1154 ;;155 *)156 # anything else157 echo "${command} : eee : unknown option ${1}"158 echo "${command} : eee : ${usage}"159 exit 1160 ;;161 esac162 # next flag163 shift147 case ${1} in 148 -c) 149 yyyymmdd=${2} 150 shift 151 ;; 152 -d) 153 dirin=${2} 154 shift 155 ;; 156 --debug) 157 debug=1 158 ;; 159 *) 160 # anything else 161 echo "${command} : eee : unknown option ${1}" 162 echo "${command} : eee : ${usage}" 163 exit 1 164 ;; 165 esac 166 # next flag 167 shift 164 168 done 165 169 # … … 167 171 if [ ! -d ${dirin} ] 168 172 then 169 echo " eee : ${dirin} not found"170 exit 1173 echo " eee : ${dirin} not found" 174 exit 1 171 175 fi 172 176 # … … 174 178 if [ ! -x ${dirin} ] 175 179 then 176 echo " eee : ${dirin} not reachable"177 exit 1180 echo " eee : ${dirin} not reachable" 181 exit 1 178 182 fi 179 183 #++ check yyyymmdd validity … … 184 188 if [ ${status} -ne 0 ] 185 189 then 186 echo "${command} : ${LINENO} : eee : tool ${tool} not found"187 exit 1190 echo "${command} : ${LINENO} : eee : tool ${tool} not found" 191 exit 1 188 192 fi 189 193 unset status … … 193 197 if [ "${PROJECT_LOG}" = "" ] 194 198 then 195 echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined"196 exit 1199 echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined" 200 exit 1 197 201 fi 198 202 # … … 200 204 if [ ! -d ${PROJECT_LOG} ] 201 205 then 202 echo "${command} : eee : ${PROJECT_LOG} not found"203 exit 1206 echo "${command} : eee : ${PROJECT_LOG} not found" 207 exit 1 204 208 fi 205 209 # … … 207 211 if [ ! -x ${PROJECT_LOG} ] 208 212 then 209 echo "${command} : eee : ${PROJECT_LOG} not reachable"210 exit 1213 echo "${command} : eee : ${PROJECT_LOG} not reachable" 214 exit 1 211 215 fi 212 216 # … … 214 218 if [ ! -w ${PROJECT_LOG} ] 215 219 then 216 echo "${command} : eee : ${PROJECT_LOG} not writable"217 exit 1220 echo "${command} : eee : ${PROJECT_LOG} not writable" 221 exit 1 218 222 fi 219 223 # … … 236 240 period_list="daily monthly" 237 241 list_filein="" 238 for var in $ varlist242 for var in ${varlist} 239 243 do 240 241 242 243 244 for period in ${period_list} 245 do 246 if [ "${period}" == "daily" ] 247 then 244 248 suffix=1d 245 249 else 246 250 suffix=1m 247 248 249 250 251 252 253 254 255 256 257 251 fi 252 filein=${dirin}/${period}/${var}_tropflux_${suffix}_1979_2013.nc 253 if [ ! -f ${filein} ] 254 then 255 echo " eee : ${filein} not found" 1>> ${log} 256 exit 1 257 else 258 list_filein=${list_filein}" ${filein}" 259 fi 260 done 261 unset period 258 262 done 259 263 unset period_list -
trunk/src/change_time_range.sh
r202 r203 14 14 # ======== 15 15 # 16 # ::17 # 18 # $change_time_range.sh [--debug] -b yyyymmddb -e yyyymmdde -d directory16 # .. code-block:: bash 17 # 18 # change_time_range.sh [--debug] -b yyyymmddb -e yyyymmdde -d directory 19 19 # 20 20 # DESCRIPTION … … 58 58 # ======== 59 59 # 60 # To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/:: 61 # 62 # $ change_time_range.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -b 19790101 -e 20130331 63 # 64 # And look at log file with :: 65 # 66 # $ tlogd.sh change_time_range 60 # To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/: 61 # 62 # .. code-block:: bash 63 # 64 # change_time_range.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -b 19790101 -e 20130331 65 # 66 # And look at log file with : 67 # 68 # .. code-block:: bash 69 # 70 # tlogd.sh change_time_range 67 71 # 68 72 # TIPS … … 105 109 system=$(uname) 106 110 case "${system}" in 107 AIX|IRIX64)108 echo "www : no specific posix checking"109 date_cmd=date110 ;;111 Darwin)112 set -o posix113 date_cmd=gdate114 ;;115 Linux)116 set -o posix117 date_cmd=date118 ;;119 *)120 set -o posix121 ;;111 AIX|IRIX64) 112 echo "www : no specific posix checking" 113 date_cmd=date 114 ;; 115 Darwin) 116 set -o posix 117 date_cmd=gdate 118 ;; 119 Linux) 120 set -o posix 121 date_cmd=date 122 ;; 123 *) 124 set -o posix 125 ;; 122 126 esac 123 127 unset system … … 140 144 if [ ${#} -lt ${minargcount} ] 141 145 then 142 echo "${command} : eee : not enought arguments"143 echo "${usage}"144 exit 1146 echo "${command} : eee : not enought arguments" 147 echo "${usage}" 148 exit 1 145 149 fi 146 150 # 147 151 while [ ${#} -gt 0 ] 148 152 do 149 case ${1} in150 -b)151 yyyymmddb=${2}152 shift153 ;;154 -e)155 yyyymmdde=${2}156 shift157 ;;158 -d)159 dirin=${2}160 shift161 ;;162 --debug)163 debug=1164 ;;165 *)166 # anything else167 echo "${command} : eee : unknown option ${1}"168 echo "${command} : eee : ${usage}"169 exit 1170 ;;171 esac172 # next flag173 shift153 case ${1} in 154 -b) 155 yyyymmddb=${2} 156 shift 157 ;; 158 -e) 159 yyyymmdde=${2} 160 shift 161 ;; 162 -d) 163 dirin=${2} 164 shift 165 ;; 166 --debug) 167 debug=1 168 ;; 169 *) 170 # anything else 171 echo "${command} : eee : unknown option ${1}" 172 echo "${command} : eee : ${usage}" 173 exit 1 174 ;; 175 esac 176 # next flag 177 shift 174 178 done 175 179 # … … 177 181 if [ ! -d ${dirin} ] 178 182 then 179 echo " eee : ${dirin} not found"180 exit 1183 echo " eee : ${dirin} not found" 184 exit 1 181 185 fi 182 186 # … … 184 188 if [ ! -x ${dirin} ] 185 189 then 186 echo " eee : ${dirin} not reachable"187 exit 1190 echo " eee : ${dirin} not reachable" 191 exit 1 188 192 fi 189 193 #++ check yyyymmddb and yyyymmddb validity … … 194 198 if [ ${status} -ne 0 ] 195 199 then 196 echo "${command} : ${LINENO} : eee : tool ${tool} not found"197 exit 1200 echo "${command} : ${LINENO} : eee : tool ${tool} not found" 201 exit 1 198 202 fi 199 203 unset status … … 203 207 if [ "${PROJECT_LOG}" = "" ] 204 208 then 205 echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined"206 exit 1209 echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined" 210 exit 1 207 211 fi 208 212 # … … 210 214 if [ ! -d ${PROJECT_LOG} ] 211 215 then 212 echo "${command} : eee : ${PROJECT_LOG} not found"213 exit 1216 echo "${command} : eee : ${PROJECT_LOG} not found" 217 exit 1 214 218 fi 215 219 # … … 217 221 if [ ! -x ${PROJECT_LOG} ] 218 222 then 219 echo "${command} : eee : ${PROJECT_LOG} not reachable"220 exit 1223 echo "${command} : eee : ${PROJECT_LOG} not reachable" 224 exit 1 221 225 fi 222 226 # … … 224 228 if [ ! -w ${PROJECT_LOG} ] 225 229 then 226 echo "${command} : eee : ${PROJECT_LOG} not writable"227 exit 1230 echo "${command} : eee : ${PROJECT_LOG} not writable" 231 exit 1 228 232 fi 229 233 # … … 247 251 period_list="daily monthly" 248 252 list_filein="" 249 for var in $ varlist253 for var in ${varlist} 250 254 do 251 252 253 254 255 for period in ${period_list} 256 do 257 if [ "${period}" == "daily" ] 258 then 255 259 suffix=1d 256 260 else 257 261 suffix=1m 258 259 260 261 262 263 264 265 266 267 268 262 fi 263 filein=${dirin}/${period}/${var}_tropflux_${suffix}_1979_2013.nc 264 if [ ! -f ${filein} ] 265 then 266 echo " eee : ${filein} not found" 1>> ${log} 267 exit 1 268 else 269 list_filein=${list_filein}" ${filein}" 270 fi 271 done 272 unset period 269 273 done 270 274 unset period_list … … 290 294 do 291 295 echo "iii : change time_range in ${filein}" >> ${log} 2>&1 292 period=$(basename $(dirname $ filein))296 period=$(basename $(dirname ${filein})) 293 297 if [ "${period}" == "daily" ] 294 298 then 295 time_range=${time_ranged}299 time_range=${time_ranged} 296 300 else 297 time_range=${time_rangem}301 time_range=${time_rangem} 298 302 fi 299 303 ncatted -O -h -a time_range,global,o,c,"${time_range}" ${filein} >> ${log} 2>&1 -
trunk/src/compute_erai_daily_region_2d.sh
r199 r203 8 8 # 9 9 # =============================== 10 # compute_erai_daily_region_2d.sh 10 # compute_erai_daily_region_2d.sh 11 11 # =============================== 12 12 # … … 14 14 # ======== 15 15 # 16 # ::17 # 18 # $compute_erai_daily_region_2d.sh [--debug] [--diff_cmd arg] -b yyyymmdd -e yyyymmdd16 # .. code-block:: bash 17 # 18 # compute_erai_daily_region_2d.sh [--debug] [--diff_cmd arg] -b yyyymmdd -e yyyymmdd 19 19 # 20 20 # DESCRIPTION … … 23 23 # .. option:: --diff_cmd <arg> 24 24 # 25 # By default :samp:`ncflint` command is used to compute difference 25 # By default :samp:`ncflint` command is used to compute difference 26 26 # between NetCDF files 27 27 # … … 77 77 # 78 78 # On climserv only if you don't have any ERA-I reference data, 79 # you just have to run this tool :: 80 # 81 # $ compute_erai_daily_region_2d.sh -b 19890102 -e 20091231 82 # 83 # And look at log file with :: 84 # 85 # $ tlogd.sh compute_erai_daily_region_2d 79 # you just have to run this tool : 80 # 81 # .. code-block:: bash 82 # 83 # compute_erai_daily_region_2d.sh -b 19890102 -e 20091231 84 # 85 # And look at log file with : 86 # 87 # .. code-block:: bash 88 # 89 # tlogd.sh compute_erai_daily_region_2d 86 90 # 87 91 # and of course on files in ${PROJECT_ID}. … … 117 121 # catalog 118 122 # 119 # improve log 123 # improve log 120 124 # 121 125 # handle dd parameter : now from 1 to end of month … … 137 141 # same idea for day min and max - some time hard coded with 01 or 31 (avoid yyyy0231 !!) 138 142 # 139 # solve this kind of warning:: 140 # 141 # ncrcat: WARNING Intra-file non-monotonicity. Record coordinate "time" does not monotonically decrease between (input file /homedata/pinsard/log//compute_erai_daily_region_2d.20110126T154235Z.temp//temp_int_str_199012.nc record indices: 29, 30) (output file /homedata/pinsard/tropflux_d//erai_TROP_1d_19900101_19901231_str_gridOrig.nc record indices 363, 364) record coordinate values -0.000278, -0.000278 143 # solve this kind of warning: 144 # 145 # .. parsed-literal:: 146 # 147 # ncrcat: WARNING Intra-file non-monotonicity. Record coordinate "time" does not monotonically decrease between (input file /homedata/pinsard/log//compute_erai_daily_region_2d.20110126T154235Z.temp//temp_int_str_199012.nc record indices: 29, 30) (output file /homedata/pinsard/tropflux_d//erai_TROP_1d_19900101_19901231_str_gridOrig.nc record indices 363, 364) record coordinate values -0.000278, -0.000278 142 148 # 143 149 # this seems to be solved by using cdo instead of ncflint. to be confirmed ! … … 146 152 # is it normal ? 147 153 # 148 # check units of str :: 149 # 150 # str:long_name = "Surface thermal radiation" ; 151 # str:units = "W/m^2 s" 154 # check units of str : 155 # 156 # .. parsed-literal:: 157 # 158 # str:long_name = "Surface thermal radiation" ; 159 # str:units = "W/m^2 s" 152 160 # 153 161 # still true after ncflint/cdo arithmetic ? … … 222 230 system=$(uname) 223 231 case "${system}" in 224 AIX|IRIX64)225 echo "www : no specific posix checking"226 date_cmd=date227 ;;228 Darwin)229 set -o posix230 date_cmd=gdate231 ;;232 Linux)233 set -o posix234 date_cmd=date235 ;;236 *)237 set -o posix238 ;;232 AIX|IRIX64) 233 echo "www : no specific posix checking" 234 date_cmd=date 235 ;; 236 Darwin) 237 set -o posix 238 date_cmd=gdate 239 ;; 240 Linux) 241 set -o posix 242 date_cmd=date 243 ;; 244 *) 245 set -o posix 246 ;; 239 247 esac 240 248 unset system … … 268 276 if [ ${#} -lt ${minargcount} ] 269 277 then 270 echo "${command} : eee : not enought arguments"271 echo "${usage}"272 exit 1278 echo "${command} : eee : not enought arguments" 279 echo "${usage}" 280 exit 1 273 281 fi 274 282 # 275 283 while [ ${#} -gt 0 ] 276 284 do 277 case ${1} in278 --debug)279 debug=1280 ;;281 --diff_cmd)282 diff_cmd=${2}283 shift284 ;;285 -b)286 # first date to get287 yyyymmddb=${2}288 shift289 ;;290 -e)291 # last date to get292 yyyymmdde=${2}293 shift294 ;;295 *)296 # anything else297 echo "${command} : eee : unknown option ${1}"298 echo "${command} : eee : ${usage}"299 exit 1300 ;;301 esac302 # next flag303 shift285 case ${1} in 286 --debug) 287 debug=1 288 ;; 289 --diff_cmd) 290 diff_cmd=${2} 291 shift 292 ;; 293 -b) 294 # first date to get 295 yyyymmddb=${2} 296 shift 297 ;; 298 -e) 299 # last date to get 300 yyyymmdde=${2} 301 shift 302 ;; 303 *) 304 # anything else 305 echo "${command} : eee : unknown option ${1}" 306 echo "${command} : eee : ${usage}" 307 exit 1 308 ;; 309 esac 310 # next flag 311 shift 304 312 done 305 313 # … … 310 318 if [ ${status_date} -ne 0 ] 311 319 then 312 313 320 echo "${command} : eee : yyyymmddb ${yyyymmddb} argument invalid" 321 exit 1 314 322 fi 315 323 unset status_date … … 317 325 if [[ "${yyyymmddb}" < "${yyyymmddb_min}" ]] 318 326 then 319 320 327 echo "${command} : eee : yyyymmddb ${yyyymmddb} must be equal or greater than ${yyyymmddb_min}" 328 exit 1 321 329 fi 322 330 # … … 325 333 if [ ${status_date} -ne 0 ] 326 334 then 327 328 335 echo "${command} : eee : yyyymmdde ${yyyymmdde} argument invalid" 336 exit 1 329 337 fi 330 338 unset status_date … … 332 340 if [[ "${yyyymmdde}" > "${yyyymmdde_max}" ]] 333 341 then 334 echo "${command} : eee : yyyymmdde ${yyyymmdde} must be lower or equal to ${yyyymmdde_max}" 335 exit 1 336 fi 337 # 342 echo "${command} : eee : yyyymmdde ${yyyymmdde} must be lower or equal to ${yyyymmdde_max}" 343 exit 1 344 fi 338 345 # 339 346 if [[ "${yyyymmdde}" < "${yyyymmddb}" ]] 340 347 then 341 342 343 fi 344 # 348 echo "${command} : eee : yyyymmdde ${yyyymmdde} must be equal or greater than yyyymmddb ${yyyymmddb}" 349 exit 1 350 fi 351 # 345 352 # test if diff_cmd valid 346 353 case ${diff_cmd} in 347 ncflint) 348 # test if ncflint available 349 tool=ncflint 350 type ${tool} 1> /dev/null 2>&1 351 status=${?} 352 if [ ${status} -ne 0 ] 353 then 354 echo "${command} : eee : ${tool} not found" 355 exit 1 356 fi 357 unset status 358 ;; 359 cdo) 360 # test if cdo available 361 tool=cdo 362 type ${tool} 1> /dev/null 2>&1 363 status=${?} 364 if [ ${status} -ne 0 ] 365 then 366 echo "${command} : eee : ${tool} not found" 367 exit 1 368 fi 369 unset status 370 ;; 371 *) 372 echo "${command} : eee : diff_cmd ${diff_cmd} argument invalid" 373 exit 1 354 ncflint) 355 # test if ncflint available 356 tool=ncflint 357 type ${tool} 1> /dev/null 2>&1 358 status=${?} 359 if [ ${status} -ne 0 ] 360 then 361 echo "${command} : eee : ${tool} not found" 362 exit 1 363 fi 364 unset status 365 ;; 366 cdo) 367 # test if cdo available 368 tool=cdo 369 type ${tool} 1> /dev/null 2>&1 370 status=${?} 371 if [ ${status} -ne 0 ] 372 then 373 echo "${command} : eee : ${tool} not found" 374 exit 1 375 fi 376 unset status 377 ;; 378 *) 379 echo "${command} : eee : diff_cmd ${diff_cmd} argument invalid" 380 exit 1 381 ;; 374 382 esac 375 383 # 376 384 # check for ${PROJECT_LOG} definition 377 385 if [ "${PROJECT_LOG}" = "" ] 378 386 then 379 echo "${command} : eee : \${PROJECT_LOG} not defined"380 exit 1387 echo "${command} : eee : \${PROJECT_LOG} not defined" 388 exit 1 381 389 fi 382 390 # … … 384 392 if [ ! -d ${PROJECT_LOG} ] 385 393 then 386 echo "${command} : eee : ${PROJECT_LOG} not found"387 exit 1394 echo "${command} : eee : ${PROJECT_LOG} not found" 395 exit 1 388 396 fi 389 397 # … … 391 399 if [ ! -x ${PROJECT_LOG} ] 392 400 then 393 echo "${command} : eee : ${PROJECT_LOG} not reachable"394 exit 1401 echo "${command} : eee : ${PROJECT_LOG} not reachable" 402 exit 1 395 403 fi 396 404 # … … 398 406 if [ ! -w ${PROJECT_LOG} ] 399 407 then 400 echo "${command} : eee : ${PROJECT_LOG} not writable"401 exit 1408 echo "${command} : eee : ${PROJECT_LOG} not writable" 409 exit 1 402 410 fi 403 411 # … … 434 442 if [ ! -d ${dirin} ] 435 443 then 436 echo "${command} : eee : ${dirin} not found"437 exit 1444 echo "${command} : eee : ${dirin} not found" 445 exit 1 438 446 fi 439 447 # … … 441 449 if [ ! -x ${dirin} ] 442 450 then 443 echo "${command} : eee : ${dirin} not reachable"444 exit 1451 echo "${command} : eee : ${dirin} not reachable" 452 exit 1 445 453 fi 446 454 # 447 455 # str = Surface thermal radiation 448 for var in str ; do 449 yyyy=${yearmin} 450 while [ ${yyyy} -le ${yearmax} ] 451 do 452 month=${monthmin} 453 while [ ${month} -le ${monthmax} ] 454 do 455 cmonth=$(printf "%2.2d" ${month}) 456 daymin=1 457 daymax=$(cal ${month} ${yyyy} | grep . | fmt -1 | tail -1) 458 day=${daymin} 459 while [ ${day} -le ${daymax} ] 460 do 461 echo "iii : ${yyyy}${cmonth}${day}" 462 cday=$(printf "%2.2d" ${day}) 463 if [ -f ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc ] 456 for var in str 457 do 458 yyyy=${yearmin} 459 while [ ${yyyy} -le ${yearmax} ] 460 do 461 month=${monthmin} 462 while [ ${month} -le ${monthmax} ] 463 do 464 cmonth=$(printf "%2.2d" ${month}) 465 daymin=1 466 daymax=$(cal ${month} ${yyyy} | grep . | fmt -1 | tail -1) 467 day=${daymin} 468 while [ ${day} -le ${daymax} ] 469 do 470 echo "iii : ${yyyy}${cmonth}${day}" 471 cday=$(printf "%2.2d" ${day}) 472 if [ -f ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc ] 473 then 474 if [ ${debug} -eq 1 ] 475 then 476 ncdump -v time ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc >> ${log} 2>&1 477 fi 478 ncpdq -U ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}${cday}.temp.GLOBAL_075.nc 479 if [ ${debug} -eq 1 ] 480 then 481 ncdump -v time ${dirtemp}/${var}.${yyyy}${cmonth}${cday}.temp.GLOBAL_075.nc >> ${log} 2>&1 482 fi 483 else 484 echo "${command} : iii : no files ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}*" >> ${log} 485 fi 486 day=$(( ${day} + 1 )) 487 done 488 exist_temp_files=$(find ${dirtemp} -name "${var}.${yyyy}${cmonth}*temp*") 489 if [ "${exist_temp_files}" != "" ] 464 490 then 465 if [ ${debug} -eq 1 ] 466 then 467 ncdump -v time ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc >> ${log} 2>&1 468 fi 469 ncpdq -U ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}${cday}.temp.GLOBAL_075.nc 470 if [ ${debug} -eq 1 ] 471 then 472 ncdump -v time ${dirtemp}/${var}.${yyyy}${cmonth}${cday}.temp.GLOBAL_075.nc >> ${log} 2>&1 473 fi 491 # concatenation of daily files 492 ncrcat -O ${dirtemp}/${var}.${yyyy}${cmonth}??.temp.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 493 if [ ${debug} -eq 1 ] 494 then 495 ncdump -v time ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc >> ${log} 2>&1 496 fi 497 rm ${dirtemp}/${var}.${yyyy}${cmonth}??.temp.GLOBAL_075.nc 2> /dev/null 498 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,5 ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time0.nc 499 if [ ${debug} -eq 1 ] 500 then 501 ncdump -v time ${dirtemp}/temp_time0.nc >> ${log} 2>&1 502 fi 503 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,4,,5 ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 504 if [ ${debug} -eq 1 ] 505 then 506 ncdump -v time ${dirtemp}/temp_time4.nc >> ${log} 2>&1 507 fi 508 case "${diff_cmd}" in 509 ncflint) 510 # différence entre les forcast a 36 et a 12h (pour avoir des flux par jour) et la constante suivant le -w permet de se ramener a des unites connues 511 ncflint -w 1.1574074,-1.1574074 ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc 512 if [ ${debug} -eq 1 ] 513 then 514 ncdump -v time ${dirtemp}/temp_time.nc >> ${log} 2>&1 515 fi 516 # La deuxieme permet uniquement de passer en seconde. 1.1574074*.00001=1/86400. (jour a seconde) 517 ncflint -w 0.00001,0.0 ${dirtemp}/temp_time.nc ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc 518 if [ ${debug} -eq 1 ] 519 then 520 ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 521 fi 522 ;; 523 cdo) 524 cdo sub ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc >> ${log} 2>&1 525 if [ ${debug} -eq 1 ] 526 then 527 ncdump -v time ${dirtemp}/temp_time.nc >> ${log} 2>&1 528 fi 529 cdo divc,86400. ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 530 if [ ${debug} -eq 1 ] 531 then 532 ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 533 fi 534 ;; 535 esac 536 rm ${dirtemp}/temp_time* 2> /dev/null 537 rm ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 2> /dev/null 474 538 else 475 echo "${command} : iii : no files ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}*" >> ${log}539 echo "${command} : iii : no files ${dirtemp}/${var}.${yyyy}${cmonth}*temp*" >> ${log} 476 540 fi 477 day=$(( ${day} + 1 )) 478 done 479 exist_temp_files=$(find ${dirtemp} -name "${var}.${yyyy}${cmonth}*temp*") 480 if [ "${exist_temp_files}" != "" ] 481 then 482 # concatenation of daily files 483 ncrcat -O ${dirtemp}/${var}.${yyyy}${cmonth}??.temp.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 484 if [ ${debug} -eq 1 ] 485 then 486 ncdump -v time ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc >> ${log} 2>&1 487 fi 488 rm ${dirtemp}/${var}.${yyyy}${cmonth}??.temp.GLOBAL_075.nc 2> /dev/null 489 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,5 ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time0.nc 490 if [ ${debug} -eq 1 ] 491 then 492 ncdump -v time ${dirtemp}/temp_time0.nc >> ${log} 2>&1 493 fi 494 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,4,,5 ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 495 if [ ${debug} -eq 1 ] 496 then 497 ncdump -v time ${dirtemp}/temp_time4.nc >> ${log} 2>&1 498 fi 499 case "${diff_cmd}" in 500 ncflint) 501 # différence entre les forcast a 36 et a 12h (pour avoir des flux par jour) et la constante suivant le -w permet de se ramener a des unites connues 502 ncflint -w 1.1574074,-1.1574074 ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc 503 if [ ${debug} -eq 1 ] 504 then 505 ncdump -v time ${dirtemp}/temp_time.nc >> ${log} 2>&1 506 fi 507 # La deuxieme permet uniquement de passer en seconde. 1.1574074*.00001=1/86400. (jour a seconde) 508 ncflint -w 0.00001,0.0 ${dirtemp}/temp_time.nc ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc 509 if [ ${debug} -eq 1 ] 510 then 511 ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 512 fi 513 ;; 514 cdo) 515 cdo sub ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc >> ${log} 2>&1 516 if [ ${debug} -eq 1 ] 517 then 518 ncdump -v time ${dirtemp}/temp_time.nc >> ${log} 2>&1 519 fi 520 cdo divc,86400. ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 521 if [ ${debug} -eq 1 ] 522 then 523 ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 524 fi 525 ;; 526 esac 527 rm ${dirtemp}/temp_time* 2> /dev/null 528 rm ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 2> /dev/null 529 else 530 echo "${command} : iii : no files ${dirtemp}/${var}.${yyyy}${cmonth}*temp*" >> ${log} 531 fi 532 unset exist_temp_files 533 month=$(( ${month} + 1 )) 534 done 535 # concatenation of monthly files 536 if [ ${debug} -eq 1 ] 537 then 538 ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}??.nc 1>> ${log} 2>&1 539 fi 540 ncrcat -O ${dirtemp}/temp_int_${var}_${yyyy}??.nc ${PROJECT_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc 1>> ${log} 2>&1 541 rm ${dirtemp}/temp_int_${var}_${yyyy}* 2> /dev/null 542 yyyy=$(( ${yyyy} + 1 )) 543 done 541 unset exist_temp_files 542 month=$(( ${month} + 1 )) 543 done 544 # concatenation of monthly files 545 if [ ${debug} -eq 1 ] 546 then 547 ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}??.nc 1>> ${log} 2>&1 548 fi 549 ncrcat -O ${dirtemp}/temp_int_${var}_${yyyy}??.nc ${PROJECT_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc 1>> ${log} 2>&1 550 rm ${dirtemp}/temp_int_${var}_${yyyy}* 2> /dev/null 551 yyyy=$(( ${yyyy} + 1 )) 552 done 544 553 done 545 554 # … … 550 559 # u10 = 10m U wind component 551 560 # v10 = 10m V wind component 552 for var in msl sstk t2 d2 u10 v10 ; do 553 yyyy=${yearmin} 554 while [ ${yyyy} -le ${yearmax} ] 555 do 556 month=${monthmin} 557 while [ ${month} -le ${monthmax} ] 558 do 559 cmonth=$(printf "%2.2d" ${month}) 560 if [ -f ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ] 561 then 562 ncpdq -U ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc 563 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time1.nc 564 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,1,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time2.nc 565 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,2,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time3.nc 566 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,3,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 567 ncea ${dirtemp}/temp_time* ${dirtemp}/temp_int_${yyyy}${cmonth}.nc 568 rm ${dirtemp}/temp_time* 2> /dev/null 569 rm ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc 2> /dev/null 570 month=$(( ${month} + 1 )) 571 else 572 echo "${command} : iii : no file ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc " >> ${log} 573 fi 574 done 575 # concatenation of monthly files 576 if [ ${debug} -eq 1 ] 577 then 578 ncdump -v time ${dirtemp}/temp_int_${yyyy}??.nc >> ${log} 2>&1 579 fi 580 ncrcat -O ${dirtemp}/temp_int_${yyyy}??.nc ${PROJECT_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc >> ${log} 2>&1 581 rm ${dirtemp}/temp_int_${yyyy}* 2> /dev/null 582 yyyy=$(( ${yyyy} + 1 )) 583 done 561 for var in msl sstk t2 d2 u10 v10 562 do 563 yyyy=${yearmin} 564 while [ ${yyyy} -le ${yearmax} ] 565 do 566 month=${monthmin} 567 while [ ${month} -le ${monthmax} ] 568 do 569 cmonth=$(printf "%2.2d" ${month}) 570 if [ -f ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ] 571 then 572 ncpdq -U ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc 573 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time1.nc 574 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,1,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time2.nc 575 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,2,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time3.nc 576 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,3,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 577 ncea ${dirtemp}/temp_time* ${dirtemp}/temp_int_${yyyy}${cmonth}.nc 578 rm ${dirtemp}/temp_time* 2> /dev/null 579 rm ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc 2> /dev/null 580 month=$(( ${month} + 1 )) 581 else 582 echo "${command} : iii : no file ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc " >> ${log} 583 fi 584 done 585 # concatenation of monthly files 586 if [ ${debug} -eq 1 ] 587 then 588 ncdump -v time ${dirtemp}/temp_int_${yyyy}??.nc >> ${log} 2>&1 589 fi 590 ncrcat -O ${dirtemp}/temp_int_${yyyy}??.nc ${PROJECT_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc >> ${log} 2>&1 591 rm ${dirtemp}/temp_int_${yyyy}* 2> /dev/null 592 yyyy=$(( ${yyyy} + 1 )) 593 done 584 594 done 585 595 # debug to check if clean is done 586 596 if [ ${debug} -eq 1 ] 587 597 then 588 ls ${dirtemp}/ >> ${log} 2>&1598 ls ${dirtemp}/ >> ${log} 2>&1 589 599 fi 590 600 # end -
trunk/src/concat_eraiy.sh
r199 r203 8 8 # 9 9 # =============== 10 # concat_eraiy.sh 10 # concat_eraiy.sh 11 11 # =============== 12 12 # … … 14 14 # ======== 15 15 # 16 # ::17 # 18 # $concat_eraiy.sh [--debug] -b yyyymmdd -e yyyymmdd16 # .. code-block:: bash 17 # 18 # concat_eraiy.sh [--debug] -b yyyymmdd -e yyyymmdd 19 19 # 20 20 # DESCRIPTION … … 29 29 # .. option:: -e end date <yyyymmdd> 30 30 # 31 # Concatane yearly ERA-I files located 31 # Concatane yearly ERA-I files located 32 32 # in :file:`/net/adonis/usr/adonis/varclim/tropflux_v1/input` 33 33 # in ${PROJECT_ID} 34 34 # 35 # Log file is written on 35 # Log file is written on 36 36 # :file:`${PROJECT_LOG}/concat_eraiy.log.{YYYYMMDDTHHMMSSZ}` 37 37 # … … 74 74 # 75 75 # On cratos only if you don't have any ERA-I data, 76 # you just have to run this tool :: 77 # 78 # $ concat_eraiy.sh -b 19890102 -e 20091231 79 # 80 # And look at log file with :: 81 # 82 # $ tlogd.sh concat_eraiy 76 # you just have to run this tool : 77 # 78 # .. code-block:: bash 79 # 80 # concat_eraiy.sh -b 19890102 -e 20091231 81 # 82 # And look at log file with : 83 # 84 # .. code-block:: bash 85 # 86 # tlogd.sh concat_eraiy 83 87 # 84 88 # and of course on files in ${PROJECT_ID}. … … 106 110 # ==== 107 111 # 108 # pour l'instant à cause de :: 109 # 110 # has attribute "missing_value" but not "_FillValue" 112 # pour l'instant à cause de : 113 # 114 # .. parsed-literal:: 115 # 116 # has attribute "missing_value" but not "_FillValue" 111 117 # 112 118 # ncrcat renvoie systématiquement un status différent de 0 mais il produit … … 120 126 # catalog 121 127 # 122 # improve log 128 # improve log 123 129 # 124 130 # handle dd parameter : now from 1 to end of month … … 148 154 system=$(uname) 149 155 case "${system}" in 150 AIX|IRIX64)151 echo "www : no specific posix checking"152 date_cmd=date153 ;;154 Darwin)155 set -o posix156 date_cmd=gdate157 ;;158 Linux)159 set -o posix160 date_cmd=date161 ;;162 *)163 set -o posix164 ;;156 AIX|IRIX64) 157 echo "www : no specific posix checking" 158 date_cmd=date 159 ;; 160 Darwin) 161 set -o posix 162 date_cmd=gdate 163 ;; 164 Linux) 165 set -o posix 166 date_cmd=date 167 ;; 168 *) 169 set -o posix 170 ;; 165 171 esac 166 172 unset system … … 188 194 if [ ${#} -lt ${minargcount} ] 189 195 then 190 echo "${command} : eee : not enought arguments"191 echo "${usage}"192 exit 1196 echo "${command} : eee : not enought arguments" 197 echo "${usage}" 198 exit 1 193 199 fi 194 200 # 195 201 while [ ${#} -gt 0 ] 196 202 do 197 case ${1} in198 --debug)199 debug=1200 ;;201 -b)202 # first date to get203 yyyymmddb=${2}204 shift205 ;;206 -e)207 # last date to get208 yyyymmdde=${2}209 shift210 ;;211 *)212 # anything else213 echo "${command} : eee : unknown option ${1}"214 echo "${command} : eee : ${usage}"215 exit 1216 ;;217 esac218 # next flag219 shift203 case ${1} in 204 --debug) 205 debug=1 206 ;; 207 -b) 208 # first date to get 209 yyyymmddb=${2} 210 shift 211 ;; 212 -e) 213 # last date to get 214 yyyymmdde=${2} 215 shift 216 ;; 217 *) 218 # anything else 219 echo "${command} : eee : unknown option ${1}" 220 echo "${command} : eee : ${usage}" 221 exit 1 222 ;; 223 esac 224 # next flag 225 shift 220 226 done 221 227 # … … 226 232 if [ ${status_date} -ne 0 ] 227 233 then 228 229 234 echo "${command} : eee : yyyymmddb ${yyyymmddb} argument invalid" 235 exit 1 230 236 fi 231 237 unset status_date … … 233 239 if [[ "${yyyymmddb}" < "${yyyymmddb_min}" ]] 234 240 then 235 236 241 echo "${command} : eee : yyyymmddb ${yyyymmddb} must be equal or greater than ${yyyymmddb_min}" 242 exit 1 237 243 fi 238 244 # … … 241 247 if [ ${status_date} -ne 0 ] 242 248 then 243 244 249 echo "${command} : eee : yyyymmdde ${yyyymmdde} argument invalid" 250 exit 1 245 251 fi 246 252 unset status_date … … 248 254 if [[ "${yyyymmdde}" > "${yyyymmdde_max}" ]] 249 255 then 250 echo "${command} : eee : yyyymmdde ${yyyymmdde} must be lower or equal to ${yyyymmdde_max}" 251 exit 1 252 fi 253 # 256 echo "${command} : eee : yyyymmdde ${yyyymmdde} must be lower or equal to ${yyyymmdde_max}" 257 exit 1 258 fi 254 259 # 255 260 if [[ "${yyyymmdde}" < "${yyyymmddb}" ]] 256 261 then 257 258 259 fi 260 # 262 echo "${command} : eee : yyyymmdde ${yyyymmdde} must be equal or greater than yyyymmddb ${yyyymmddb}" 263 exit 1 264 fi 265 # 261 266 # test if cdo available 262 267 tool=cdo … … 265 270 if [ ${status} -ne 0 ] 266 271 then 267 echo "${command} : eee : ${tool} not found"268 exit 1272 echo "${command} : eee : ${tool} not found" 273 exit 1 269 274 fi 270 275 unset status … … 273 278 if [ "${PROJECT_LOG}" = "" ] 274 279 then 275 echo "${command} : eee : \${PROJECT_LOG} not defined"276 exit 1280 echo "${command} : eee : \${PROJECT_LOG} not defined" 281 exit 1 277 282 fi 278 283 # … … 280 285 if [ ! -d ${PROJECT_LOG} ] 281 286 then 282 echo "${command} : eee : ${PROJECT_LOG} not found"283 exit 1287 echo "${command} : eee : ${PROJECT_LOG} not found" 288 exit 1 284 289 fi 285 290 # … … 287 292 if [ ! -x ${PROJECT_LOG} ] 288 293 then 289 echo "${command} : eee : ${PROJECT_LOG} not reachable"290 exit 1294 echo "${command} : eee : ${PROJECT_LOG} not reachable" 295 exit 1 291 296 fi 292 297 # … … 294 299 if [ ! -w ${PROJECT_LOG} ] 295 300 then 296 echo "${command} : eee : ${PROJECT_LOG} not writable"297 exit 1301 echo "${command} : eee : ${PROJECT_LOG} not writable" 302 exit 1 298 303 fi 299 304 # … … 321 326 if [ ! -d ${dirin} ] 322 327 then 323 echo "${command} : eee : ${dirin} not found"324 exit 1328 echo "${command} : eee : ${dirin} not found" 329 exit 1 325 330 fi 326 331 # … … 328 333 if [ ! -x ${dirin} ] 329 334 then 330 echo "${command} : eee : ${dirin} not reachable"331 exit 1335 echo "${command} : eee : ${dirin} not reachable" 336 exit 1 332 337 fi 333 338 # … … 335 340 for var in ${list_var} 336 341 do 337 fileout=${PROJECT_ID}/erai_${var}_${yyyymin}_${yyyymax}.nc338 if [ ${yyyymin} -eq ${yyyymax} ]339 then340 list_filein=${dirin}/erai_${var}_${yyyymin}.nc341 cp ${list_filein} ${fileout} 1>> ${log} 2>&1342 else343 list_filein=$(seq -f "${dirin}/erai_${var}_%g.nc" ${yyyymin} ${yyyymax})344 # concatenation of files345 ncrcat -O -o ${fileout} ${list_filein} 1>> ${log} 2>&1346 status_ncrcat=${?}347 if [ ${status_ncrcat} -ne 0 ]348 then349 echo "${command} : www : pb with ncrcat : ${status_ncrcat} " 2>> ${log}350 #++exit 1351 else352 echo "${command} : iii : ncrcat ok " 1>> ${log}353 echo "${command} : iii : see ${fileout} " 1>> ${log}354 fi355 unset status_ncrcat356 fi357 if [ ${debug} -eq 1 ]358 then359 ncdump -v time ${fileout} >> ${log} 2>&1360 cdo showdate ${fileout} >> ${log} 2>&1361 fi362 unset list_filein363 unset fileout342 fileout=${PROJECT_ID}/erai_${var}_${yyyymin}_${yyyymax}.nc 343 if [ ${yyyymin} -eq ${yyyymax} ] 344 then 345 list_filein=${dirin}/erai_${var}_${yyyymin}.nc 346 cp ${list_filein} ${fileout} 1>> ${log} 2>&1 347 else 348 list_filein=$(seq -f "${dirin}/erai_${var}_%g.nc" ${yyyymin} ${yyyymax}) 349 # concatenation of files 350 ncrcat -O -o ${fileout} ${list_filein} 1>> ${log} 2>&1 351 status_ncrcat=${?} 352 if [ ${status_ncrcat} -ne 0 ] 353 then 354 echo "${command} : www : pb with ncrcat : ${status_ncrcat} " 2>> ${log} 355 #++exit 1 356 else 357 echo "${command} : iii : ncrcat ok " 1>> ${log} 358 echo "${command} : iii : see ${fileout} " 1>> ${log} 359 fi 360 unset status_ncrcat 361 fi 362 if [ ${debug} -eq 1 ] 363 then 364 ncdump -v time ${fileout} >> ${log} 2>&1 365 cdo showdate ${fileout} >> ${log} 2>&1 366 fi 367 unset list_filein 368 unset fileout 364 369 done 365 370 unset var -
trunk/src/cor30a.pro
r181 r203 44 44 ; ======== 45 45 ; 46 ; ::46 ; .. parsed-literal:: 47 47 ; 48 48 ; u us ts ta qs qa Qsw IRd r pbl Ps zu zt zq lat … … 50 50 ; x=cor30a(5.5,0,28.7,27.2,24.2,18.5,141.,419.,0.,600.,1010.,15.,15.,15.,0.,1,1,5.,1.) 51 51 ; 52 ; Result with these sample values with Matlab code:: 52 ; Result with these sample values with Matlab code: 53 ; 54 ; .. parsed-literal:: 53 55 ; 54 56 ; 8.64830 101.640 0.0352910 2.17780e-05 0.000115000 0.000115000 … … 57 59 ; 0.000941350 0.00107910 0.00107910 0.780060 58 60 ; 59 ; Result obtained with this idl routine:: 60 ; 61 ; Result obtained with this idl routine: 62 ; 63 ; .. parsed-literal:: 64 61 65 ; 8.64829 101.640 0.0352913 2.17780e-05 0.000115000 0.000115000 62 66 ; -29.5802 0.175432 -0.0423667 -0.000205610 0.250948 0.000351304 … … 223 227 hlb=-rhoa*LLe*usr*qsr 224 228 qout=Rnl+hsb+hlb 225 dels=Rns*(.065+11*tkt-6.6e-5/tkt*(1-exp(-tkt/8.0e-4))) 229 dels=Rns*(.065+11*tkt-6.6e-5/tkt*(1-exp(-tkt/8.0e-4))) ; Eq.16 Shortwave 226 230 qcol=qout-dels 227 alq=Al*qcol+be*hlb*cpw/LLe 231 alq=Al*qcol+be*hlb*cpw/LLe ; Eq. 7 Buoy flux water 228 232 229 233 ; if (alq gt 0) then begin 230 ; xlamx=6./(1+(bigc*alq/usr^4)^.75)^.333 231 ; tkt=xlamx*visw/(sqrt(rhoa/rhow)*usr) 234 ; xlamx=6./(1+(bigc*alq/usr^4)^.75)^.333 ; Eq 13 Saunders 235 ; tkt=xlamx*visw/(sqrt(rhoa/rhow)*usr) ;Eq.11 Sub. thk 232 236 ; endif else begin 233 237 ; xlamx=6.0 234 ; tkt=min([.01,xlamx*visw/(sqrt(rhoa/rhow)*usr)]) 238 ; tkt=min([.01,xlamx*visw/(sqrt(rhoa/rhow)*usr)]) ;Eq.11 Sub. thk 235 239 ; tkt=(xlamx*visw/(sqrt(rhoa/rhow)*usr) < .01) 236 240 ; … … 253 257 254 258 ;**************** rain heat flux ******** 255 dwat=2.11e-5*((t+tdk)/tdk)^1.94 256 dtmp=(1.+3.309e-3*t-1.44e-6*t*t)*0.02411/(rhoa*cpa) 257 alfac= 1/(1+(wetc*LLe*dwat)/(cpa*dtmp)) 259 dwat=2.11e-5*((t+tdk)/tdk)^1.94 ;! water vapour diffusivity 260 dtmp=(1.+3.309e-3*t-1.44e-6*t*t)*0.02411/(rhoa*cpa) ;!heat diffusivity 261 alfac= 1/(1+(wetc*LLe*dwat)/(cpa*dtmp)) ;! wet bulb factor 258 262 RF= rain*alfac*cpw*((ts-t-dter*jcool)+(Qs-Q-dqer*jcool)*LLe/cpa)/3600. 259 263 … … 262 266 263 267 ;**************** Webb et al. correection ************ 264 ;wbar=1.61*hlb/LLe/(1+1.61*Q)/rhoa+hsb/rhoa/cpa/ta 268 ;wbar=1.61*hlb/LLe/(1+1.61*Q)/rhoa+hsb/rhoa/cpa/ta ;formulation in hlb already includes webb 265 269 ;hl_webb=rhoa*wbar*Q*LLe 266 270 ;************** compute transfer coeffs relative to ut @meas. ht ********** -
trunk/src/correct_terminology.sh
r202 r203 14 14 # ======== 15 15 # 16 # ::17 # 18 # $correct_terminology.sh [--debug] -good goodend -bad badend -d directory16 # .. code-block:: bash 17 # 18 # correct_terminology.sh [--debug] -good goodend -bad badend -d directory 19 19 # 20 20 # DESCRIPTION … … 59 59 # 60 60 # To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ because files are not named 61 # :file:`var_tropflux_1d_${yyyy}_{yyyy}.nc` but :file:`var_tropflux_1d_{yyyy}_{month}{yyyy}.nc`:: 62 # 63 # $ correct_terminology.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -good "1979_2013" -bad "1979_march2013" 64 # 65 # And look at log file with :: 66 # 67 # $ tlogd.sh correct_terminology 61 # :file:`var_tropflux_1d_${yyyy}_{yyyy}.nc` but :file:`var_tropflux_1d_{yyyy}_{month}{yyyy}.nc`: 62 # 63 # .. code-block:: bash 64 # 65 # correct_terminology.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -good "1979_2013" -bad "1979_march2013" 66 # 67 # And look at log file with : 68 # 69 # .. code-block:: bash 70 # 71 # tlogd.sh correct_terminology 68 72 # 69 73 # SEE ALSO … … 99 103 system=$(uname) 100 104 case "${system}" in 101 AIX|IRIX64)102 echo "www : no specific posix checking"103 date_cmd=date104 ;;105 Darwin)106 set -o posix107 date_cmd=gdate108 ;;109 Linux)110 set -o posix111 date_cmd=date112 ;;113 *)114 set -o posix115 ;;105 AIX|IRIX64) 106 echo "www : no specific posix checking" 107 date_cmd=date 108 ;; 109 Darwin) 110 set -o posix 111 date_cmd=gdate 112 ;; 113 Linux) 114 set -o posix 115 date_cmd=date 116 ;; 117 *) 118 set -o posix 119 ;; 116 120 esac 117 121 unset system … … 134 138 if [ ${#} -lt ${minargcount} ] 135 139 then 136 echo "${command} : eee : not enought arguments"137 echo "${usage}"138 exit 1140 echo "${command} : eee : not enought arguments" 141 echo "${usage}" 142 exit 1 139 143 fi 140 144 # 141 145 while [ ${#} -gt 0 ] 142 146 do 143 case ${1} in144 -good)145 goodend=${2}146 shift147 ;;148 -bad)149 badend=${2}150 shift151 ;;152 -d)153 dirin=${2}154 shift155 ;;156 --debug)157 debug=1158 ;;159 *)160 # anything else161 echo "${command} : eee : unknown option ${1}"162 echo "${command} : eee : ${usage}"163 exit 1164 ;;165 esac166 # next flag167 shift147 case ${1} in 148 -good) 149 goodend=${2} 150 shift 151 ;; 152 -bad) 153 badend=${2} 154 shift 155 ;; 156 -d) 157 dirin=${2} 158 shift 159 ;; 160 --debug) 161 debug=1 162 ;; 163 *) 164 # anything else 165 echo "${command} : eee : unknown option ${1}" 166 echo "${command} : eee : ${usage}" 167 exit 1 168 ;; 169 esac 170 # next flag 171 shift 168 172 done 169 173 # … … 171 175 if [ ! -d ${dirin} ] 172 176 then 173 echo " eee : ${dirin} not found"174 exit 1177 echo " eee : ${dirin} not found" 178 exit 1 175 179 fi 176 180 # … … 178 182 if [ ! -x ${dirin} ] 179 183 then 180 echo " eee : ${dirin} not reachable"181 exit 1184 echo " eee : ${dirin} not reachable" 185 exit 1 182 186 fi 183 187 #++ check good validity … … 186 190 if [ "${PROJECT_LOG}" = "" ] 187 191 then 188 echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined"189 exit 1192 echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined" 193 exit 1 190 194 fi 191 195 # … … 193 197 if [ ! -d ${PROJECT_LOG} ] 194 198 then 195 echo "${command} : eee : ${PROJECT_LOG} not found"196 exit 1199 echo "${command} : eee : ${PROJECT_LOG} not found" 200 exit 1 197 201 fi 198 202 # … … 200 204 if [ ! -x ${PROJECT_LOG} ] 201 205 then 202 echo "${command} : eee : ${PROJECT_LOG} not reachable"203 exit 1206 echo "${command} : eee : ${PROJECT_LOG} not reachable" 207 exit 1 204 208 fi 205 209 # … … 207 211 if [ ! -w ${PROJECT_LOG} ] 208 212 then 209 echo "${command} : eee : ${PROJECT_LOG} not writable"210 exit 1213 echo "${command} : eee : ${PROJECT_LOG} not writable" 214 exit 1 211 215 fi 212 216 # … … 230 234 period_list="daily monthly" 231 235 list_filein="" 232 for var in $ varlist236 for var in ${varlist} 233 237 do 234 235 236 237 238 for period in ${period_list} 239 do 240 if [ "${period}" == "daily" ] 241 then 238 242 suffix=1d 239 243 else 240 244 suffix=1m 241 242 243 244 245 246 247 248 249 250 251 245 fi 246 filein=${dirin}/${period}/${var}_tropflux_${suffix}_${badend}.nc 247 if [ ! -f ${filein} ] 248 then 249 echo " eee : ${filein} not found" 1>> ${log} 250 exit 1 251 else 252 list_filein=${list_filein}" ${filein}" 253 fi 254 done 255 unset period 252 256 done 253 257 unset period_list -
trunk/src/cronin_gustiness_ncdf.pro
r180 r203 44 44 ; ======== 45 45 ; 46 ; ::47 ; 48 ; yyyymmddb = 20000101L49 ; yyyymmdde = 20001231L50 ; result = cronin_gustiness_ncdf(yyyymmddb, yyyymmdde)51 ; print, result46 ; .. code-block:: idl 47 ; 48 ; yyyymmddb = 20000101L 49 ; yyyymmdde = 20001231L 50 ; result = cronin_gustiness_ncdf(yyyymmddb, yyyymmdde) 51 ; print, result 52 52 ; 53 53 ; SEE ALSO … … 117 117 ;- 118 118 function cronin_gustiness_ncdf $ 119 120 119 , yyyymmddb $ 120 , yyyymmdde 121 121 ; 122 122 ;++ compile_opt idl2, strictarrsubs, logical_predicate -
trunk/src/d2m_to_q2m_erai.pro
r180 r203 94 94 ; ======== 95 95 ; 96 ; ::97 ; 98 ; yyyymmddb = 20000101L99 ; yyyymmdde = 20001231L100 ; result = d2m_to_q2m_erai(yyyymmddb, yyyymmdde)101 ; print, result96 ; .. code-block:: idl 97 ; 98 ; yyyymmddb = 20000101L 99 ; yyyymmdde = 20001231L 100 ; result = d2m_to_q2m_erai(yyyymmddb, yyyymmdde) 101 ; print, result 102 102 ; 103 103 ; TODO 104 104 ; ==== 105 105 ; 106 ; fix time pb:: 107 ; 108 ; % the time axis has no date before date 2: 20000302 109 ; d2m first date 29811221 110 ; d2m last date 29851224 106 ; fix time pb: 107 ; 108 ; .. parsed-literal:: 109 ; 110 ; % the time axis has no date before date 2: 20000302 111 ; d2m first date 29811221 112 ; d2m last date 29851224 111 113 ; 112 114 ; compare time between d2m and t2m and msl after reading 113 115 ; 114 ; pb on cratos idl7 even if output file is written:: 115 ; 116 ; % Program caused arithmetic error: Floating overflow 117 ; % Program caused arithmetic error: Floating illegal operand 116 ; pb on cratos idl7 even if output file is written: 117 ; 118 ; .. parsed-literal:: 119 ; 120 ; % Program caused arithmetic error: Floating overflow 121 ; % Program caused arithmetic error: Floating illegal operand 118 122 ; 119 123 ; related to occurence of NaNf in ncdump output ? do no yet … … 175 179 ;- 176 180 function d2m_to_q2m_erai $ 177 178 181 , yyyymmddb $ 182 , yyyymmdde 179 183 ; 180 184 compile_opt idl2, strictarrsubs, logical_predicate -
trunk/src/dew_temp_airt_rel_humidity_jv.pro
r181 r203 16 16 ; ======== 17 17 ; 18 ; ::18 ; .. code-block:: idl 19 19 ; 20 20 ; t = +todo+ -
trunk/src/ecmwf.py
r180 r203 48 48 '_version' : self.version} 49 49 params.update(args) 50 50 51 51 data = urllib.urlencode(params) 52 52 req = urllib2.Request(self.portal, data) … … 72 72 print 73 73 74 75 74 def retrieve(self,args): 76 75 self.put("ECMWF data server batch tool version",self.version); … … 86 85 text = r['status'] + '.' 87 86 if 'info' in r and r['info'] != None: 88 text = text + ' ' + r['info'] 87 text = text + ' ' + r['info'] 89 88 90 89 if text != last: … … 113 112 114 113 self._call('delete',{'request':rid}) 115 114 116 115 if r['status'] == 'aborted': 117 116 raise RuntimeError("Request aborted") 118 117 119 118 def _transfer(self,url,path): 120 119 result = urllib.urlretrieve(url,path) 121 120 return long(result[1]['content-length']) 122 123 def _bytename(self,size): 121 122 def _bytename(self,size): 124 123 next = {'':'K','K':'M','M':'G','G':'T','T':'P'} 125 124 l = '' -
trunk/src/flux_evaluation_tpr_map.pro
r180 r203 23 23 ; 24 24 ; uncomment var 25 ; 25 ; 26 26 ; coding rules 27 27 ; … … 29 29 ; ======== 30 30 ; 31 ; ::32 ; 33 ; date1 = 20000101L34 ; date2 = 20091231L35 ; flux_evaluation_tpr_map, date1, date231 ; .. code-block:: idl 32 ; 33 ; date1 = 20000101L 34 ; date2 = 20091231L 35 ; flux_evaluation_tpr_map, date1, date2 36 36 ; 37 37 ; EVOLUTIONS … … 114 114 115 115 plt, msk,realcont=2,/nocont,/nofill,xminor=1,yminor=1,lct=64,cor_mi, cor_ma,int=cor_int, $ 116 117 118 NN=n_elements(lat) 119 120 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 121 122 for n=0,NN-1 do begin 123 x=lon(n)124 y=lat(n)125 c=cor(n)126 cmi=cor_mi & cma=cor_ma & dc=cma-cmi127 col=((10+244*(c-cmi)/dc) > 10) < 254128 plots, x,y,psym=8,symsize=1.5,color=col129 endfor 130 131 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 132 133 for n=0,NN-1 do begin 134 x=lon(n)135 y=lat(n)136 c=cor(n)137 plots, x,y,psym=8,symsize=1.5,color=0116 title='1) Correlation ', subtitle='', small=[1,4,1],/rempl,marge=marge1 117 118 NN=n_elements(lat) 119 120 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 121 122 for n=0,NN-1 do begin 123 x=lon(n) 124 y=lat(n) 125 c=cor(n) 126 cmi=cor_mi & cma=cor_ma & dc=cma-cmi 127 col=((10+244*(c-cmi)/dc) > 10) < 254 128 plots, x,y,psym=8,symsize=1.5,color=col 129 endfor 130 131 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 132 133 for n=0,NN-1 do begin 134 x=lon(n) 135 y=lat(n) 136 c=cor(n) 137 plots, x,y,psym=8,symsize=1.5,color=0 138 138 endfor 139 139 140 140 plt,msk,realcont=2,/nocont,/nofill,xminor=1,yminor=1,lct=64,bias_mi, bias_ma, int=bias_int,/noer, marge=marge1, $ 141 142 143 NN=n_elements(lat) 144 145 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 146 147 for n=0,NN-1 do begin 148 x=lon(n)149 y=lat(n)150 c=bias(n)151 cmi=bias_mi & cma=bias_ma & dc=cma-cmi152 col=((10+244*(c-cmi)/dc) > 10) < 254153 plots, x,y,psym=8,symsize=1.5,color=col154 endfor 155 156 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 157 158 for n=0,NN-1 do begin 159 x=lon(n)160 y=lat(n)161 c=bias(n)162 plots, x,y,psym=8,symsize=1.5,color=0141 title='2) Mean bias', subtitle='', small=[1,4,2],/rempl 142 143 NN=n_elements(lat) 144 145 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 146 147 for n=0,NN-1 do begin 148 x=lon(n) 149 y=lat(n) 150 c=bias(n) 151 cmi=bias_mi & cma=bias_ma & dc=cma-cmi 152 col=((10+244*(c-cmi)/dc) > 10) < 254 153 plots, x,y,psym=8,symsize=1.5,color=col 154 endfor 155 156 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 157 158 for n=0,NN-1 do begin 159 x=lon(n) 160 y=lat(n) 161 c=bias(n) 162 plots, x,y,psym=8,symsize=1.5,color=0 163 163 endfor 164 164 plt,msk,realcont=2,/nocont,/nofill,xminor=1,yminor=1,lct=64,rmsd_mi, rmsd_ma, int=rmsd_int,/noer, $ 165 166 167 NN=n_elements(lat) 168 169 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 170 171 for n=0,NN-1 do begin 172 x=lon(n)173 y=lat(n)174 c=rmsd(n)175 cmi=rmsd_mi & cma=rmsd_ma & dc=cma-cmi176 col=((10+244*(c-cmi)/dc) > 10) < 254177 plots, x,y,psym=8,symsize=1.5,color=col178 endfor 179 180 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 181 for n=0,NN-1 do begin 182 x=lon(n)183 y=lat(n)184 c=rmsd(n)185 plots, x,y,psym=8,symsize=1.5,color=0165 title='3) RMSD ', subtitle='', small=[1,4,3],/rempl, marge=marge1 166 167 NN=n_elements(lat) 168 169 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 170 171 for n=0,NN-1 do begin 172 x=lon(n) 173 y=lat(n) 174 c=rmsd(n) 175 cmi=rmsd_mi & cma=rmsd_ma & dc=cma-cmi 176 col=((10+244*(c-cmi)/dc) > 10) < 254 177 plots, x,y,psym=8,symsize=1.5,color=col 178 endfor 179 180 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 181 for n=0,NN-1 do begin 182 x=lon(n) 183 y=lat(n) 184 c=rmsd(n) 185 plots, x,y,psym=8,symsize=1.5,color=0 186 186 endfor 187 187 plt,msk,realcont=2,/nocont,/nofill,xminor=1,yminor=1,lct=64,std_mi, std_ma, int=std_int,/noer, $ 188 189 190 NN=n_elements(lat) 191 192 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 193 194 for n=0,NN-1 do begin 195 x=lon(n)196 y=lat(n)197 c=std(n)198 cmi=std_mi & cma=std_ma & dc=cma-cmi199 col=((10+244*(c-cmi)/dc) > 10) < 254200 plots, x,y,psym=8,symsize=1.5,color=col201 endfor 202 203 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 204 205 for n=0,NN-1 do begin 206 x=lon(n)207 y=lat(n)208 c=std(n)209 plots, x,y,psym=8,symsize=1.5,color=0188 title='4) STD ratio', subtitle='', small=[1,4,4],/rempl, marge=marge1 189 190 NN=n_elements(lat) 191 192 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 193 194 for n=0,NN-1 do begin 195 x=lon(n) 196 y=lat(n) 197 c=std(n) 198 cmi=std_mi & cma=std_ma & dc=cma-cmi 199 col=((10+244*(c-cmi)/dc) > 10) < 254 200 plots, x,y,psym=8,symsize=1.5,color=col 201 endfor 202 203 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 204 205 for n=0,NN-1 do begin 206 x=lon(n) 207 y=lat(n) 208 c=std(n) 209 plots, x,y,psym=8,symsize=1.5,color=0 210 210 endfor 211 211 … … 218 218 pdf=fltarr(nx,ny) 219 219 for i=0, nx-2 do begin 220 for j=0,ny-2 do begin221 xmi=xx(i) & xma=xx(i+1)222 ymi=yy(j) & yma=yy(j+1)223 ind=where((x ge xmi) and (x le xma) and (y ge ymi) and (y le yma))224 pdf(i,j)=float(n_elements(ind))225 ; print, xmi,xma,ymi,yma,n_elements(ind)226 endfor220 for j=0,ny-2 do begin 221 xmi=xx(i) & xma=xx(i+1) 222 ymi=yy(j) & yma=yy(j+1) 223 ind=where((x ge xmi) and (x le xma) and (y ge ymi) and (y le yma)) 224 pdf(i,j)=float(n_elements(ind)) 225 ; print, xmi,xma,ymi,yma,n_elements(ind) 226 endfor 227 227 endfor 228 228 229 229 scontour, pdf,xx,yy ,small=[2,1,1],/noer, charsize=1, nlevels=30,/fill, $ 230 230 xtitle='TAO Flux', ytitle='Product', title='PDF' 231 231 xyouts, 0, -150, cstat, charsize=1.2 232 232 -
trunk/src/flux_evaluation_tpr_timeseries.pro
r180 r203 25 25 ; ======== 26 26 ; 27 ; ::27 ; .. code-block:: idl 28 28 ; 29 ; date1 = 20000101L30 ; date2 = 20091231L31 ; flux_evaluation_tpr_timeseries, date1, date229 ; date1 = 20000101L 30 ; date2 = 20091231L 31 ; flux_evaluation_tpr_timeseries, date1, date2 32 32 ; 33 33 ; EVOLUTIONS … … 131 131 132 132 133 134 135 133 extract_tpr_location,var,box, $ 134 var_tpr 135 var_tpr=reform(var_tpr) 136 136 137 138 137 stats_5d, tpr,var_tpr, $ ;; tpr=TPR observation and var_tpr=gridded product extracted at TPR location 138 cor, bias, std, rmsd 139 139 140 141 142 140 printf, 1, x, y, cor, bias, std, rmsd, format='(f6.2, 3x, f6.2, 3x, f4.2, 3x, f7.2, 3x, f4.2, 3x, f5.2)' 141 cstat=string(cor, bias, std, rmsd, format='(f4.2,3x,f7.2,3x,f4.2,3x,f5.2)') 142 print, cstat 143 143 144 ;; 145 146 147 148 149 150 151 152 144 ;; PLOTTING THE TIME-SERIES 145 array=[tpr, var_tpr] & mi=min(array,/nan) & ma=max(array,/nan) & int=(ma-mi)/3. 146 pltt, ts_smooth(tpr,5,/nan), "t",/rempl, small=[1,3,1], lct=65, $ 147 title='Five day stats are shown below. TPR (black) and Product (red) at'+csite+' ', charsize=1., $ 148 subtitle=cstat 149 ind=where(finite(tpr,/nan)) & var_tpr(ind)=!Values.f_nan 150 pltt, ts_smooth(var_tpr,5,/nan), "t",/ov1d, color=250 151 erase 152 mooring=[mooring,tpr] & product=[product,var_tpr] 153 153 endif 154 154 endfor -
trunk/src/get_erai.py
r176 r203 15 15 ======== 16 16 17 :: 18 19 $get_erai.py --begin yyyymmdd --end yyyymmdd17 .. code-block:: bash 18 19 get_erai.py --begin yyyymmdd --end yyyymmdd 20 20 21 21 EXAMPLES 22 22 ======== 23 23 24 :: 25 26 $get_erai.py --verbose --begin 20010101 --end 2001033024 .. code-block:: bash 25 26 get_erai.py --verbose --begin 20010101 --end 20010330 27 27 28 28 SEE ALSO … … 47 47 ==== 48 48 49 To convet a GRIB file to a NetCDF file :: 50 51 $ cdo -f nc copy data.grib data.nc 49 To convet a GRIB file to a NetCDF file : 50 51 .. code-block:: bash 52 53 cdo -f nc copy data.grib data.nc 52 54 53 55 TODO -
trunk/src/get_oaflux.sh
r188 r203 13 13 # ======== 14 14 # 15 # ::16 # 17 # $get_oaflux.sh15 # .. code-block:: bash 16 # 17 # get_oaflux.sh 18 18 # 19 19 # DESCRIPTION … … 25 25 # 26 26 # Log file is written on :file:`${PROJECT_LOG}/get_oaflux.log.{YYYYMMDDTHHMMSSZ}` 27 #28 27 # 29 28 # .. graphviz:: … … 55 54 # 56 55 # If you are working on LOCEAN machine and you don't have any reference data, 57 # you just have to run this tool :: 58 # 59 # $ get_oaflux.sh 60 # 61 # And look at log file with :: 62 # 63 # $ tlogd.sh get_oaflux 56 # you just have to run this tool : 57 # 58 # .. code-block:: bash 59 # 60 # get_oaflux.sh 61 # 62 # And look at log file with : 63 # 64 # .. code-block:: bash 65 # 66 # tlogd.sh get_oaflux 64 67 # 65 68 # and of course on files in ${PROJECT_ID}. … … 68 71 # ==== 69 72 # 70 # get ftp://ftp.whoi.edu/pub/science/oaflux/data_v3/daily/radiation_1985-2007/sw_isccp_yyyy.nc.gz and generate $ PROJECT_ID/swr_oafluxgrid_1985_2007.nc somewhere else73 # get ftp://ftp.whoi.edu/pub/science/oaflux/data_v3/daily/radiation_1985-2007/sw_isccp_yyyy.nc.gz and generate ${PROJECT_ID}/swr_oafluxgrid_1985_2007.nc somewhere else 71 74 # 72 75 # SEE ALSO … … 93 96 system=$(uname) 94 97 case "${system}" in 95 AIX|IRIX64)96 echo "www : no specific posix checking"97 ;;98 *)99 set -o posix100 ;;98 AIX|IRIX64) 99 echo "www : no specific posix checking" 100 ;; 101 *) 102 set -o posix 103 ;; 101 104 esac 102 105 unset system … … 122 125 if [ ${status} -ne 0 ] 123 126 then 124 echo "${command} : eee : tool ${tool} not found"125 exit 1127 echo "${command} : eee : tool ${tool} not found" 128 exit 1 126 129 fi 127 130 unset status … … 134 137 if [ ${status} -ne 0 ] 135 138 then 136 echo "${command} : eee : tool ${tool} not found"137 exit 1139 echo "${command} : eee : tool ${tool} not found" 140 exit 1 138 141 fi 139 142 unset status … … 143 146 if [ "${PROJECT_LOG}" = "" ] 144 147 then 145 echo "${command} : eee : \${PROJECT_LOG} not defined"146 exit 1148 echo "${command} : eee : \${PROJECT_LOG} not defined" 149 exit 1 147 150 fi 148 151 # … … 150 153 if [ ! -d ${PROJECT_LOG} ] 151 154 then 152 echo "${command} : eee : ${PROJECT_LOG} not found"153 exit 1155 echo "${command} : eee : ${PROJECT_LOG} not found" 156 exit 1 154 157 fi 155 158 # … … 157 160 if [ ! -x ${PROJECT_LOG} ] 158 161 then 159 echo "${command} : eee : ${PROJECT_LOG} not reachable"160 exit 1162 echo "${command} : eee : ${PROJECT_LOG} not reachable" 163 exit 1 161 164 fi 162 165 # … … 164 167 if [ ! -w ${PROJECT_LOG} ] 165 168 then 166 echo "${command} : eee : ${PROJECT_LOG} not writable"167 exit 1169 echo "${command} : eee : ${PROJECT_LOG} not writable" 170 exit 1 168 171 fi 169 172 # … … 182 185 if [ -f ${PROJECT_ID}/${fileref} ] 183 186 then 184 echo "${command} : iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log}185 echo "${command} : iii : nothing done" 1>> ${log}187 echo "${command} : iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log} 188 echo "${command} : iii : nothing done" 1>> ${log} 186 189 else 187 wget --tries=1 --no-verbose -P ${PROJECT_ID} ${locref}/${fileref_gz} 1>> ${log} 2>&1188 wget_status=${?}189 if [ ${wget_status} -ne 0 ]190 then191 echo "${command} : eee : ${locref}/${fileref_gz} not found" >> ${log} 2>&1192 # exit 1 #++193 else194 echo "${command} : iii : ${locref}/${fileref_gz} found" >> ${log} 2>&1195 fi196 unset wget_status197 #198 # decompress199 gunzip ${PROJECT_ID}${fileref_gz}200 gunzip_status=${?}201 if [ ${gunzip_status} -ne 0 ]202 then203 echo "${command} : eee : ${locref}/${fileref_gz} not found" >> ${log} 2>&1204 # exit 1 #++205 else206 echo "${command} : iii : ${locref}/${fileref_gz} found" >> ${log} 2>&1207 fi190 wget --tries=1 --no-verbose -P ${PROJECT_ID} ${locref}/${fileref_gz} 1>> ${log} 2>&1 191 wget_status=${?} 192 if [ ${wget_status} -ne 0 ] 193 then 194 echo "${command} : eee : ${locref}/${fileref_gz} not found" >> ${log} 2>&1 195 # exit 1 #++ 196 else 197 echo "${command} : iii : ${locref}/${fileref_gz} found" >> ${log} 2>&1 198 fi 199 unset wget_status 200 # 201 # decompress 202 gunzip ${PROJECT_ID}${fileref_gz} 203 gunzip_status=${?} 204 if [ ${gunzip_status} -ne 0 ] 205 then 206 echo "${command} : eee : ${locref}/${fileref_gz} not found" >> ${log} 2>&1 207 # exit 1 #++ 208 else 209 echo "${command} : iii : ${locref}/${fileref_gz} found" >> ${log} 2>&1 210 fi 208 211 fi 209 212 unset fileref -
trunk/src/get_olr.sh
r199 r203 13 13 # ======== 14 14 # 15 # ::15 # .. code-block:: bash 16 16 # 17 # $get_olr.sh17 # get_olr.sh 18 18 # 19 19 # DESCRIPTION … … 65 65 66 66 wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 67 67 ftp://ftp.cdc.noaa.gov/Datasets/interp_OLR/olr.day.mean.nc 68 68 69 69 #ftp -n <<@DELIM -
trunk/src/get_olrnint.sh
r97 r203 13 13 # ======== 14 14 # 15 # ::15 # .. code-block:: bash 16 16 # 17 # $get_olrnint.sh17 # get_olrnint.sh 18 18 # 19 19 # DESCRIPTION … … 50 50 # 51 51 #- 52 53 52 wget ftp://ftp.cdc.noaa.gov/Datasets/uninterp_OLR/olr.day.mean.nc 54 53 mv olr.day.mean.nc olr_nint.day.mean.nc 55 54 #~/data/OLR_NRT/extract_indian 56 55 #~/data/OLR_NRT/extract_indopac 57 -
trunk/src/get_pirata_netcdf.sh
r199 r203 13 13 # ======== 14 14 # 15 # ::16 # 17 # $get_pirata_netcdf.sh15 # .. code-block:: bash 16 # 17 # get_pirata_netcdf.sh 18 18 # 19 19 # DESCRIPTION … … 66 66 # ======== 67 67 # 68 # You don't have any PIRATA reference data, you just have to run this tool :: 69 # 70 # $ get_pirata_netcdf.sh 71 # 72 # And look at log file with :: 73 # 74 # $ tlogd.sh get_pirata_netcdf 68 # You don't have any PIRATA reference data, you just have to run this tool : 69 # 70 # .. code-block:: bash 71 # 72 # get_pirata_netcdf.sh 73 # 74 # And look at log file with : 75 # 76 # .. code-block:: bash 77 # 78 # tlogd.sh get_pirata_netcdf 75 79 # 76 80 # and of course on files in ${PROJECT_ID}. … … 112 116 system=$(uname) 113 117 case "${system}" in 114 AIX|IRIX64)115 echo "www : no specific posix checking"116 ;;117 *)118 set -o posix119 ;;118 AIX|IRIX64) 119 echo "www : no specific posix checking" 120 ;; 121 *) 122 set -o posix 123 ;; 120 124 esac 121 125 unset system … … 141 145 if [ ${status} -ne 0 ] 142 146 then 143 echo "${command} : eee : tool ${tool} not found"144 exit 1147 echo "${command} : eee : tool ${tool} not found" 148 exit 1 145 149 fi 146 150 unset status … … 150 154 if [ "${PROJECT_LOG}" = "" ] 151 155 then 152 echo "${command} : eee : \${PROJECT_LOG} not defined"153 exit 1156 echo "${command} : eee : \${PROJECT_LOG} not defined" 157 exit 1 154 158 fi 155 159 # … … 157 161 if [ ! -d ${PROJECT_LOG} ] 158 162 then 159 echo "${command} : eee : ${PROJECT_LOG} not found"160 exit 1163 echo "${command} : eee : ${PROJECT_LOG} not found" 164 exit 1 161 165 fi 162 166 # … … 164 168 if [ ! -x ${PROJECT_LOG} ] 165 169 then 166 echo "${command} : eee : ${PROJECT_LOG} not reachable"167 exit 1170 echo "${command} : eee : ${PROJECT_LOG} not reachable" 171 exit 1 168 172 fi 169 173 # … … 171 175 if [ ! -w ${PROJECT_LOG} ] 172 176 then 173 echo "${command} : eee : ${PROJECT_LOG} not writable"174 exit 1177 echo "${command} : eee : ${PROJECT_LOG} not writable" 178 exit 1 175 179 fi 176 180 # … … 198 202 for site in ${sitelist} 199 203 do 200 for var in ${varlist}201 do202 list_url="${list_url} ${locref}/${var}${site}_dy.cdf"203 done204 for var in ${varlist} 205 do 206 list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 207 done 204 208 done 205 209 unset site … … 212 216 for url in ${list_url} 213 217 do 214 file=${PROJECT_ID}/$(basename ${url})215 if [ ! -f ${file} ]216 then217 wget --tries=1 --no-verbose -P ${PROJECT_ID} \218 file=${PROJECT_ID}/$(basename ${url}) 219 if [ ! -f ${file} ] 220 then 221 wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 218 222 --user=taopmelftp \ 219 223 --password=G10b@LCh@Ng3 \ 220 224 ${url} >> ${log} 2>&1 221 wget_status=${?}222 if [ ${wget_status} -ne 0 ]223 then224 echo "${command} : eee : ${url} not found" >> ${log} 2>&1225 # ++ exit 1226 else227 echo "${command} : iii : ${url} found" >> ${log} 2>&1228 fi229 unset wget_status230 else231 echo "iii : ${file} exists" >> ${log}232 fi225 wget_status=${?} 226 if [ ${wget_status} -ne 0 ] 227 then 228 echo "${command} : eee : ${url} not found" >> ${log} 2>&1 229 # ++ exit 1 230 else 231 echo "${command} : iii : ${url} found" >> ${log} 2>&1 232 fi 233 unset wget_status 234 else 235 echo "iii : ${file} exists" >> ${log} 236 fi 233 237 done 234 238 unset file -
trunk/src/get_rama_netcdf.sh
r199 r203 13 13 # ======== 14 14 # 15 # ::16 # 17 # $get_rama_netcdf.sh15 # .. code-block:: bash 16 # 17 # get_rama_netcdf.sh 18 18 # 19 19 # DESCRIPTION … … 66 66 # ======== 67 67 # 68 # You don't have any RAMA reference data, you just have to run this tool :: 69 # 70 # $ get_rama_netcdf.sh 71 # 72 # And look at log file with :: 73 # 74 # $ tlogd.sh get_rama_netcdf 68 # You don't have any RAMA reference data, you just have to run this tool : 69 # 70 # .. code-block:: bash 71 # 72 # get_rama_netcdf.sh 73 # 74 # And look at log file with : 75 # 76 # .. code-block:: bash 77 # 78 # tlogd.sh get_rama_netcdf 75 79 # 76 80 # and of course on files in ${PROJECT_ID}. … … 90 94 # do we really need all these variables and sites 91 95 # 92 # Liste complète de RAMA:: 93 # 94 # sitelist=" 16s55e 12s55e 8s55e 4s55e 1.5s55e 0n55e 1.5n55e 4n55e" 95 # sitelist="${sitelist} 15n65e" 96 # sitelist="${sitelist} 12s67e 8s67e 4s67e 1.5s67e 0n67e 1.5n67e 4n67e 8n67e" 97 # sitelist="${sitelist} 16s80.5e 12s80.5e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 4n80.5e" 98 # sitelist="${sitelist} 1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 99 # sitelist="${sitelist} 16s95e 12s95e 8s95e 5s95e" 96 # Liste complète de RAMA: 97 # 98 # .. code-block:: bash 99 # 100 # sitelist="16s55e 12s55e 8s55e 4s55e 1.5s55e 0n55e 1.5n55e 4n55e" 101 # sitelist="${sitelist} 15n65e" 102 # sitelist="${sitelist} 12s67e 8s67e 4s67e 1.5s67e 0n67e 1.5n67e 4n67e 8n67e" 103 # sitelist="${sitelist} 16s80.5e 12s80.5e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 4n80.5e" 104 # sitelist="${sitelist} 1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 105 # sitelist="${sitelist} 16s95e 12s95e 8s95e 5s95e" 100 106 # 101 107 # study wget status (no exit now on non null wget status) … … 121 127 system=$(uname) 122 128 case "${system}" in 123 AIX|IRIX64)124 echo "www : no specific posix checking"125 ;;126 *)127 set -o posix128 ;;129 AIX|IRIX64) 130 echo "www : no specific posix checking" 131 ;; 132 *) 133 set -o posix 134 ;; 129 135 esac 130 136 unset system … … 150 156 if [ ${status} -ne 0 ] 151 157 then 152 echo "${command} : eee : tool ${tool} not found"153 exit 1158 echo "${command} : eee : tool ${tool} not found" 159 exit 1 154 160 fi 155 161 unset status … … 159 165 if [ "${PROJECT_LOG}" = "" ] 160 166 then 161 echo "${command} : eee : \${PROJECT_LOG} not defined"162 exit 1167 echo "${command} : eee : \${PROJECT_LOG} not defined" 168 exit 1 163 169 fi 164 170 # … … 166 172 if [ ! -d ${PROJECT_LOG} ] 167 173 then 168 echo "${command} : eee : ${PROJECT_LOG} not found"169 exit 1174 echo "${command} : eee : ${PROJECT_LOG} not found" 175 exit 1 170 176 fi 171 177 # … … 173 179 if [ ! -x ${PROJECT_LOG} ] 174 180 then 175 echo "${command} : eee : ${PROJECT_LOG} not reachable"176 exit 1181 echo "${command} : eee : ${PROJECT_LOG} not reachable" 182 exit 1 177 183 fi 178 184 # … … 180 186 if [ ! -w ${PROJECT_LOG} ] 181 187 then 182 echo "${command} : eee : ${PROJECT_LOG} not writable"183 exit 1188 echo "${command} : eee : ${PROJECT_LOG} not writable" 189 exit 1 184 190 fi 185 191 # … … 214 220 for site in ${sitelist} 215 221 do 216 for var in ${varlist}217 do218 list_url="${list_url} ${locref}/${var}${site}_dy.cdf"219 done222 for var in ${varlist} 223 do 224 list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 225 done 220 226 done 221 227 unset site … … 228 234 for url in ${list_url} 229 235 do 230 file=${PROJECT_ID}/$(basename ${url})231 if [ ! -f ${file} ]232 then233 wget --tries=1 --no-verbose -P ${PROJECT_ID} \236 file=${PROJECT_ID}/$(basename ${url}) 237 if [ ! -f ${file} ] 238 then 239 wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 234 240 --user=taopmelftp \ 235 241 --password=G10b@LCh@Ng3 \ 236 242 ${url} >> ${log} 2>&1 237 wget_status=${?}238 if [ ${wget_status} -ne 0 ]239 then240 echo "${command} : eee : ${url} not found" >> ${log} 2>&1241 # ++ exit 1242 else243 echo "${command} : iii : ${url} found" >> ${log} 2>&1244 fi245 unset wget_status246 else247 echo "iii : ${file} exists" >> ${log}248 fi243 wget_status=${?} 244 if [ ${wget_status} -ne 0 ] 245 then 246 echo "${command} : eee : ${url} not found" >> ${log} 2>&1 247 # ++ exit 1 248 else 249 echo "${command} : iii : ${url} found" >> ${log} 2>&1 250 fi 251 unset wget_status 252 else 253 echo "iii : ${file} exists" >> ${log} 254 fi 249 255 done 250 256 unset file -
trunk/src/get_swr.sh
r199 r203 13 13 # ======== 14 14 # 15 # ::16 # 17 # $get_swr.sh15 # .. code-block:: bash 16 # 17 # get_swr.sh 18 18 # 19 19 # DESCRIPTION … … 45 45 # ======== 46 46 # 47 # You don't have any RAMA reference data, you just have to run this tool :: 48 # 49 # $ get_swr.sh 50 # 51 # And look at log file with :: 52 # 53 # $ tlogd.sh get_swr 47 # You don't have any RAMA reference data, you just have to run this tool : 48 # 49 # .. code-block:: bash 50 # 51 # get_swr.sh 52 # 53 # And look at log file with : 54 # 55 # .. code-block:: bash 56 # 57 # tlogd.sh get_swr 54 58 # 55 59 # and of course on files in ${PROJECT_ID}. … … 92 96 system=$(uname) 93 97 case "${system}" in 94 AIX|IRIX64)95 echo "www : no specific posix checking"96 date_cmd=date97 ;;98 Darwin)99 set -o posix100 date_cmd=gdate101 ;;102 Linux)103 set -o posix104 date_cmd=date105 ;;106 *)107 set -o posix108 ;;98 AIX|IRIX64) 99 echo "www : no specific posix checking" 100 date_cmd=date 101 ;; 102 Darwin) 103 set -o posix 104 date_cmd=gdate 105 ;; 106 Linux) 107 set -o posix 108 date_cmd=date 109 ;; 110 *) 111 set -o posix 112 ;; 109 113 esac 110 114 unset system … … 130 134 if [ ${status} -ne 0 ] 131 135 then 132 echo "${command} : eee : tool ${tool} not found"133 exit 1136 echo "${command} : eee : tool ${tool} not found" 137 exit 1 134 138 fi 135 139 unset status … … 139 143 if [ "${PROJECT_LOG}" = "" ] 140 144 then 141 echo "${command} : eee : \${PROJECT_LOG} not defined"142 exit 1145 echo "${command} : eee : \${PROJECT_LOG} not defined" 146 exit 1 143 147 fi 144 148 # … … 146 150 if [ ! -d ${PROJECT_LOG} ] 147 151 then 148 echo "${command} : eee : ${PROJECT_LOG} not found"149 exit 1152 echo "${command} : eee : ${PROJECT_LOG} not found" 153 exit 1 150 154 fi 151 155 # … … 153 157 if [ ! -x ${PROJECT_LOG} ] 154 158 then 155 echo "${command} : eee : ${PROJECT_LOG} not reachable"156 exit 1159 echo "${command} : eee : ${PROJECT_LOG} not reachable" 160 exit 1 157 161 fi 158 162 # … … 160 164 if [ ! -w ${PROJECT_LOG} ] 161 165 then 162 echo "${command} : eee : ${PROJECT_LOG} not writable"163 exit 1166 echo "${command} : eee : ${PROJECT_LOG} not writable" 167 exit 1 164 168 fi 165 169 # … … 186 190 while [ ${yyyy} -le ${yearmax} ] 187 191 do 188 for var in ${varlist}189 do190 list_url="${list_url} ${locref}/${var}_isccp_${yyyy}.nc.gz"191 done192 unset var193 yyyy=$(( ${yyyy} + 1 ))192 for var in ${varlist} 193 do 194 list_url="${list_url} ${locref}/${var}_isccp_${yyyy}.nc.gz" 195 done 196 unset var 197 yyyy=$(( ${yyyy} + 1 )) 194 198 done 195 199 unset varlist … … 199 203 for url in ${list_url} 200 204 do 201 file_gz=${PROJECT_ID}/$(basename ${url})202 file=${PROJECT_ID}/$(basename ${file_gz} .gz)203 if [ ! -f ${file} ]204 then205 if [ ! -f ${file_gz} ]206 then207 wget --tries=1 --no-verbose -P ${PROJECT_ID} \205 file_gz=${PROJECT_ID}/$(basename ${url}) 206 file=${PROJECT_ID}/$(basename ${file_gz} .gz) 207 if [ ! -f ${file} ] 208 then 209 if [ ! -f ${file_gz} ] 210 then 211 wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 208 212 ${url} >> ${log} 2>&1 209 wget_status=${?}210 if [ ${wget_status} -ne 0 ]211 then212 echo "${command} : eee : ${url} not found" >> ${log} 2>&1213 # ++ exit 1214 else215 echo "${command} : iii : ${url} found" >> ${log} 2>&1216 fi217 unset wget_status218 else219 echo "iii : ${file_gz} exists" >> ${log}220 gunzip -c ${file_gz} > ${file}221 fi222 else223 echo "iii : ${file} exists" >> ${log}224 fi213 wget_status=${?} 214 if [ ${wget_status} -ne 0 ] 215 then 216 echo "${command} : eee : ${url} not found" >> ${log} 2>&1 217 # ++ exit 1 218 else 219 echo "${command} : iii : ${url} found" >> ${log} 2>&1 220 fi 221 unset wget_status 222 else 223 echo "iii : ${file_gz} exists" >> ${log} 224 gunzip -c ${file_gz} > ${file} 225 fi 226 else 227 echo "iii : ${file} exists" >> ${log} 228 fi 225 229 done 226 230 unset file_gz -
trunk/src/get_tao_netcdf.sh
r199 r203 13 13 # ======== 14 14 # 15 # ::16 # 17 # $get_tao_netcdf.sh15 # .. code-block:: bash 16 # 17 # get_tao_netcdf.sh 18 18 # 19 19 # DESCRIPTION … … 66 66 # ======== 67 67 # 68 # You don't have any TAO reference data, you just have to run this tool :: 69 # 70 # $ get_tao_netcdf.sh 71 # 72 # And look at log file with :: 73 # 74 # $ tlogd.sh get_tao_netcdf 68 # You don't have any TAO reference data, you just have to run this tool : 69 # 70 # .. code-block:: bash 71 # 72 # get_tao_netcdf.sh 73 # 74 # And look at log file with : 75 # 76 # .. code-block:: bash 77 # 78 # tlogd.sh get_tao_netcdf 75 79 # 76 80 # and of course on files in ${PROJECT_ID}. … … 112 116 system=$(uname) 113 117 case "${system}" in 114 AIX|IRIX64)115 echo "www : no specific posix checking"116 ;;117 *)118 set -o posix119 ;;118 AIX|IRIX64) 119 echo "www : no specific posix checking" 120 ;; 121 *) 122 set -o posix 123 ;; 120 124 esac 121 125 unset system … … 141 145 if [ ${status} -ne 0 ] 142 146 then 143 echo "${command} : eee : tool ${tool} not found"144 exit 1147 echo "${command} : eee : tool ${tool} not found" 148 exit 1 145 149 fi 146 150 unset status … … 150 154 if [ "${PROJECT_LOG}" = "" ] 151 155 then 152 echo "${command} : eee : \${PROJECT_LOG} not defined"153 exit 1156 echo "${command} : eee : \${PROJECT_LOG} not defined" 157 exit 1 154 158 fi 155 159 # … … 157 161 if [ ! -d ${PROJECT_LOG} ] 158 162 then 159 echo "${command} : eee : ${PROJECT_LOG} not found"160 exit 1163 echo "${command} : eee : ${PROJECT_LOG} not found" 164 exit 1 161 165 fi 162 166 # … … 164 168 if [ ! -x ${PROJECT_LOG} ] 165 169 then 166 echo "${command} : eee : ${PROJECT_LOG} not reachable"167 exit 1170 echo "${command} : eee : ${PROJECT_LOG} not reachable" 171 exit 1 168 172 fi 169 173 # … … 171 175 if [ ! -w ${PROJECT_LOG} ] 172 176 then 173 echo "${command} : eee : ${PROJECT_LOG} not writable"174 exit 1177 echo "${command} : eee : ${PROJECT_LOG} not writable" 178 exit 1 175 179 fi 176 180 # … … 205 209 for site in ${sitelist} 206 210 do 207 for var in ${varlist}208 do209 list_url="${list_url} ${locref}/${var}${site}_dy.cdf"210 done211 for var in ${varlist} 212 do 213 list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 214 done 211 215 done 212 216 unset site … … 219 223 for url in ${list_url} 220 224 do 221 file=${PROJECT_ID}/$(basename ${url})222 if [ ! -f ${file} ]223 then224 wget --tries=1 --no-verbose -P ${PROJECT_ID} \225 file=${PROJECT_ID}/$(basename ${url}) 226 if [ ! -f ${file} ] 227 then 228 wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 225 229 --user=taopmelftp \ 226 230 --password=G10b@LCh@Ng3 \ 227 231 ${url} >> ${log} 2>&1 228 wget_status=${?}229 if [ ${wget_status} -ne 0 ]230 then231 echo "${command} : eee : ${url} not found" >> ${log} 2>&1232 # ++ exit 1233 else234 echo "${command} : iii : ${url} found" >> ${log} 2>&1235 fi236 unset wget_status237 else238 echo "iii : ${file} exists" >> ${log}239 fi232 wget_status=${?} 233 if [ ${wget_status} -ne 0 ] 234 then 235 echo "${command} : eee : ${url} not found" >> ${log} 2>&1 236 # ++ exit 1 237 else 238 echo "${command} : iii : ${url} found" >> ${log} 2>&1 239 fi 240 unset wget_status 241 else 242 echo "iii : ${file} exists" >> ${log} 243 fi 240 244 done 241 245 unset file -
trunk/src/interp_erai_dewt.pro
r191 r203 92 92 ; ======== 93 93 ; 94 ; With ERA-I type 1:: 95 ; 96 ; .compile file_interp 97 ; yyyymmddb = 20000101L 98 ; yyyymmdde = 20001231L 99 ; eraitype = 1 100 ; result = interp_erai_dewt(yyyymmddb, yyyymmdde, eraitype) 101 ; print, result 102 ; 103 ; With ERA-I type 2:: 104 ; 105 ; .compile file_interp 106 ; yyyymmddb = 20000101L 107 ; yyyymmdde = 20001231L 108 ; eraitype = 2 109 ; result = interp_erai_dewt(yyyymmddb, yyyymmdde, eraitype) 110 ; print, result 94 ; With ERA-I type 1: 95 ; 96 ; .. code-block:: idl 97 ; 98 ; .compile file_interp 99 ; yyyymmddb = 20000101L 100 ; yyyymmdde = 20001231L 101 ; eraitype = 1 102 ; result = interp_erai_dewt(yyyymmddb, yyyymmdde, eraitype) 103 ; print, result 104 ; 105 ; With ERA-I type 2: 106 ; 107 ; .. code-block:: idl 108 ; 109 ; .compile file_interp 110 ; yyyymmddb = 20000101L 111 ; yyyymmdde = 20001231L 112 ; eraitype = 2 113 ; result = interp_erai_dewt(yyyymmddb, yyyymmdde, eraitype) 114 ; print, result 111 115 ; 112 116 ; TIPS 113 117 ; ==== 114 118 ; 115 ; To see some values of variable :: 116 ; 117 ; $ ncks -v d2m -d time,0,1 -d latitude,0,1 -d longitude,0,1 \ 118 ; $PROJECT_ID/erai_d2m_19890101_20091231_oafluxgrid.nc 119 ; To see some values of variable : 120 ; 121 ; .. code-block:: bash 122 ; 123 ; ncks -v d2m -d time,0,1 -d latitude,0,1 -d longitude,0,1 \ 124 ; $PROJECT_ID/erai_d2m_19890101_20091231_oafluxgrid.nc 119 125 ; 120 126 ; TODO … … 230 236 ras = report(msg) 231 237 return, result 232 233 ELSE: BEGIN234 msg = 'iii : ${PROJECT_ID} is ' + project_id_env235 ras = report(msg)236 238 END 239 ELSE: BEGIN 240 msg = 'iii : ${PROJECT_ID} is ' + project_id_env 241 ras = report(msg) 242 END 237 243 ENDCASE 238 244 ; … … 241 247 ; existence and protection of ${PROJECT_ID} 242 248 IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 243 msg = 'eee : the directory' + iodirin + ' is not accessible.'244 ras = report(msg)245 return, result249 msg = 'eee : the directory' + iodirin + ' is not accessible.' 250 ras = report(msg) 251 return, result 246 252 ENDIF 247 253 ; … … 254 260 fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 255 261 IF fullfilename_msk[0] EQ '' THEN BEGIN 256 msg = 'eee : the file ' + fullfilename_msk + ' was not found.'257 ras = report(msg)258 return, result262 msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 263 ras = report(msg) 264 return, result 259 265 ENDIF 260 266 ; … … 280 286 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 281 287 IF fullfilename[0] EQ '' THEN BEGIN 282 msg = 'eee : the file ' + fullfilename + ' was not found.'283 ras = report(msg)284 return, result288 msg = 'eee : the file ' + fullfilename + ' was not found.' 289 ras = report(msg) 290 return, result 285 291 ENDIF 286 292 ; 287 293 ; test if ${PROJECT_OD} defined 288 294 CASE project_od_env OF 289 '' : BEGIN295 '' : BEGIN 290 296 msg = 'eee : ${PROJECT_OD} is not defined' 291 297 ras = report(msg) 292 298 return, result 293 294 ELSE: BEGIN299 END 300 ELSE: BEGIN 295 301 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 296 302 ras = report(msg) 297 298 303 END 304 ENDCASE 299 305 ; 300 306 ; check if output data will be possible … … 313 319 ; in order to avoid unexpected overwritten 314 320 IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN 315 msg = 'eee : the file ' + fullfilename_out + ' already exists.'316 ras = report(msg)317 return, result321 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 322 ras = report(msg) 323 return, result 318 324 ENDIF 319 325 ; … … 350 356 d2mout=fltarr(jpi,jpj,jptin) 351 357 for jt=0,jptin-1 do begin 352 ; ++ print, 'Interpolation jt=',jt,' / ',jptin-1353 tab=reform(d2min[*,*,jt])354 d2mout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $358 ; ++ print, 'Interpolation jt=',jt,' / ',jptin-1 359 tab=reform(d2min[*,*,jt]) 360 d2mout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 355 361 , lonout,latout,method='bilinear' $ 356 362 , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 357 d2mout[*,*,jt]=d2mout[*,*,jt]*mskout+(1.-mskout)*1.e20363 d2mout[*,*,jt]=d2mout[*,*,jt]*mskout+(1.-mskout)*1.e20 358 364 endfor 359 365 ; -
trunk/src/interp_erai_lwr.pro
r191 r203 92 92 ; ======== 93 93 ; 94 ; With ERA-I type 1:: 95 ; 96 ; .compile file_interp 97 ; eraitype = 1 98 ; yyyymmddb = 20000101L 99 ; yyyymmdde = 20001231L 100 ; result = interp_erai_lwr(yyyymmddb, yyyymmdde, eraitype) 101 ; print, result 102 ; 103 ; With ERA-I type 2:: 104 ; 105 ; .compile file_interp 106 ; eraitype = 2 107 ; yyyymmddb = 20000101L 108 ; yyyymmdde = 20001231L 109 ; result = interp_erai_lwr(yyyymmddb, yyyymmdde, eraitype) 110 ; print, result 94 ; With ERA-I type 1: 95 ; 96 ; .. code-block:: idl 97 ; 98 ; .compile file_interp 99 ; eraitype = 1 100 ; yyyymmddb = 20000101L 101 ; yyyymmdde = 20001231L 102 ; result = interp_erai_lwr(yyyymmddb, yyyymmdde, eraitype) 103 ; print, result 104 ; 105 ; With ERA-I type 2: 106 ; 107 ; .. code-block:: idl 108 ; 109 ; .compile file_interp 110 ; eraitype = 2 111 ; yyyymmddb = 20000101L 112 ; yyyymmdde = 20001231L 113 ; result = interp_erai_lwr(yyyymmddb, yyyymmdde, eraitype) 114 ; print, result 111 115 ; 112 116 ; TODO … … 119 123 ; reach end but bad values (all NaN) 120 124 ; 121 ; make it work : pb on loholt1 idl6:: 122 ; 123 ; lwr[longitude,latitude,time]=lwrout:lwr_attr; longitude[]=xlon:lon_attr; latitude[]=ylat:lat_attr; tt[*time]=tt:time_attr @ globattr 124 ; % NCDF_VARPUT: Operation Failed, bad file (4) or variable [0] id ? 125 ; make it work : pb on loholt1 idl6: 126 ; 127 ; .. parsed-literal:: 128 ; 129 ; lwr[longitude,latitude,time]=lwrout:lwr_attr; longitude[]=xlon:lon_attr; latitude[]=ylat:lat_attr; tt[*time]=tt:time_attr @ globattr 130 ; % NCDF_VARPUT: Operation Failed, bad file (4) or variable [0] id ? 125 131 ; (NC_ERROR=-31) 126 ; % Stop encountered: INTERP_ERAI_LWR_1989_2009 1127 ; /home/pinsard/tropflux_ws/src/interp_erai_lwr_1989_2009.pro132 ; % Stop encountered: INTERP_ERAI_LWR_1989_2009 1 133 ; /home/pinsard/tropflux_ws/src/interp_erai_lwr_1989_2009.pro 128 134 ; 129 135 ; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call … … 195 201 ; .. note:: 196 202 ; 197 ; IDL do not warn when asking size of an undefined array:: 198 ; 199 ; IDL> must_crash=size(ginette) 203 ; IDL do not warn when asking size of an undefined array: 204 ; 205 ; .. code-block:: idl 206 ; 207 ; must_crash=size(ginette) 200 208 ; 201 209 ; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux) … … 241 249 nparam = N_PARAMS() 242 250 IF (nparam NE 3) THEN BEGIN 243 ras = report(['Incorrect number of arguments.' $251 ras = report(['Incorrect number of arguments.' $ 244 252 + '!C' $ 245 253 + 'Usage : ' + usage]) 246 return, result254 return, result 247 255 ENDIF 248 256 ; … … 255 263 ras = report(msg) 256 264 return, result 257 258 ELSE: BEGIN265 END 266 ELSE: BEGIN 259 267 msg = 'iii : ${PROJECT_ID} is ' + project_id_env 260 268 ras = report(msg) 261 269 END 262 270 ENDCASE 263 271 ; … … 266 274 ; existence and protection of ${PROJECT_ID} 267 275 IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 268 msg = 'eee : the directory' + iodirin + ' is not accessible.'269 ras = report(msg)270 return, result276 msg = 'eee : the directory' + iodirin + ' is not accessible.' 277 ras = report(msg) 278 return, result 271 279 ENDIF 272 280 ; … … 279 287 fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 280 288 IF fullfilename_msk[0] EQ '' THEN BEGIN 281 msg = 'eee : the file ' + fullfilename_msk + ' was not found.'282 ras = report(msg)283 return, result289 msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 290 ras = report(msg) 291 return, result 284 292 ENDIF 285 293 ; … … 308 316 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 309 317 IF fullfilename[0] EQ '' THEN BEGIN 310 msg = 'eee : the file ' + fullfilename + ' was not found.'311 ras = report(msg)312 return, result318 msg = 'eee : the file ' + fullfilename + ' was not found.' 319 ras = report(msg) 320 return, result 313 321 ENDIF 314 322 ; 315 323 ; test if ${PROJECT_OD} defined 316 324 CASE project_od_env OF 317 '' : BEGIN325 '' : BEGIN 318 326 msg = 'eee : ${PROJECT_OD} is not defined' 319 327 ras = report(msg) 320 328 return, result 321 322 ELSE: BEGIN329 END 330 ELSE: BEGIN 323 331 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 324 332 ras = report(msg) 325 326 333 END 334 ENDCASE 327 335 ; 328 336 ; check if output data will be possible … … 341 349 ; in order to avoid unexpected overwritten 342 350 IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN 343 msg = 'eee : the file ' + fullfilename_out + ' already exists.'344 ras = report(msg)345 return, result351 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 352 ras = report(msg) 353 return, result 346 354 ENDIF 347 355 ; … … 379 387 ; 380 388 for jt=0,jptin-1 do begin 381 ; ++print, 'Interpolation jt=',jt,' / ',jptin-1382 ;383 tab=reform(lwrin[*,*,jt])384 lwrout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $385 386 387 lwrout[*,*,jt]=lwrout[*,*,jt]*mskout+(1.-mskout)*1.e20388 ;389 ; ++print, 'Interpolation jt=',jt,' / ',jptin-1 390 ; 391 tab=reform(lwrin[*,*,jt]) 392 lwrout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 393 , lonout,latout,method='bilinear' $ 394 , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 395 lwrout[*,*,jt]=lwrout[*,*,jt]*mskout+(1.-mskout)*1.e20 396 ; 389 397 endfor 390 398 ; -
trunk/src/interp_erai_msl.pro
r191 r203 93 93 ; ======== 94 94 ; 95 ; With ERA-I type 1:: 96 ; 97 ; .compile file_interp 98 ; yyyymmddb = 20000101L 99 ; yyyymmdde = 20001231L 100 ; eraitype = 1 101 ; result = interp_erai_msl(yyyymmddb, yyyymmdde, eraitype) 102 ; print, result 103 ; 104 ; With ERA-I type 2:: 105 ; 106 ; .compile file_interp 107 ; yyyymmddb = 20000101L 108 ; yyyymmdde = 20001231L 109 ; eraitype = 2 110 ; result = interp_erai_msl(yyyymmddb, yyyymmdde, eraitype) 111 ; print, result 95 ; With ERA-I type 1: 96 ; 97 ; .. code-block:: idl 98 ; 99 ; .compile file_interp 100 ; yyyymmddb = 20000101L 101 ; yyyymmdde = 20001231L 102 ; eraitype = 1 103 ; result = interp_erai_msl(yyyymmddb, yyyymmdde, eraitype) 104 ; print, result 105 ; 106 ; With ERA-I type 2: 107 ; 108 ; .. code-block:: idl 109 ; 110 ; .compile file_interp 111 ; yyyymmddb = 20000101L 112 ; yyyymmdde = 20001231L 113 ; eraitype = 2 114 ; result = interp_erai_msl(yyyymmddb, yyyymmdde, eraitype) 115 ; print, result 112 116 ; 113 117 ; TODO -
trunk/src/interp_erai_sst.pro
r191 r203 92 92 ; ======== 93 93 ; 94 ; With ERA-I type 1:: 95 ; 96 ; .compile file_interp 97 ; yyyymmddb = 20000101L 98 ; yyyymmdde = 20001231L 99 ; eraitype = 1 100 ; result = interp_erai_sst(yyyymmddb, yyyymmdde, eraitype) 101 ; print, result 102 ; 103 ; With ERA-I type 2:: 104 ; 105 ; .compile file_interp 106 ; yyyymmddb = 20000101L 107 ; yyyymmdde = 20001231L 108 ; eraitype = 2 109 ; result = interp_erai_sst(yyyymmddb, yyyymmdde, eraitype) 94 ; With ERA-I type 1: 95 ; 96 ; .. code-block:: idl 97 ; 98 ; .compile file_interp 99 ; yyyymmddb = 20000101L 100 ; yyyymmdde = 20001231L 101 ; eraitype = 1 102 ; result = interp_erai_sst(yyyymmddb, yyyymmdde, eraitype) 103 ; print, result 104 ; 105 ; With ERA-I type 2: 106 ; 107 ; .. code-block:: idl 108 ; 109 ; .compile file_interp 110 ; yyyymmddb = 20000101L 111 ; yyyymmdde = 20001231L 112 ; eraitype = 2 113 ; result = interp_erai_sst(yyyymmddb, yyyymmdde, eraitype) 110 114 ; 111 115 ; TODO -
trunk/src/interp_erai_t2m.pro
r191 r203 96 96 ; ======== 97 97 ; 98 ; With ERA-I type 1:: 99 ; 100 ; .compile file_interp 101 ; yyyymmddb = 20000101L 102 ; yyyymmdde = 20001231L 103 ; eraitype = 1 104 ; result = interp_erai_t2m(yyyymmddb, yyyymmdde, eraitype) 105 ; print, result 106 ; 107 ; With ERA-I type 2:: 108 ; 109 ; .compile file_interp 110 ; yyyymmddb = 20000101L 111 ; yyyymmdde = 20001231L 112 ; eraitype = 2 113 ; result = interp_erai_t2m(yyyymmddb, yyyymmdde, eraitype) 114 ; print, result 98 ; With ERA-I type 1: 99 ; 100 ; .. code-block:: idl 101 ; 102 ; .compile file_interp 103 ; yyyymmddb = 20000101L 104 ; yyyymmdde = 20001231L 105 ; eraitype = 1 106 ; result = interp_erai_t2m(yyyymmddb, yyyymmdde, eraitype) 107 ; print, result 108 ; 109 ; With ERA-I type 2: 110 ; 111 ; .. code-block:: idl 112 ; 113 ; .compile file_interp 114 ; yyyymmddb = 20000101L 115 ; yyyymmdde = 20001231L 116 ; eraitype = 2 117 ; result = interp_erai_t2m(yyyymmddb, yyyymmdde, eraitype) 118 ; print, result 115 119 ; 116 120 ; TODO … … 127 131 ; make it work : pb on loholt1 idl8 128 132 ; 129 ; reach end but bad time and t2m values :: 130 ; 131 ; $ ncks -v t2m -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/erai_t2m_19890101_20091231_oafluxgrid.nc 133 ; reach end but bad time and t2m values : 134 ; 135 ; .. code-block:: bash 136 ; 137 ; ncks -v t2m -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/erai_t2m_19890101_20091231_oafluxgrid.nc 132 138 ; latitude[0]=-29.5 degrees_north 133 139 ; latitude[1]=-28.5 degrees_north … … 227 233 ; usage of timestep keyword in read_ncdf was not efficient because of memory problem : 228 234 ; can not read the whole time range (ok with 7580, not ok with 7591 while need is 7670 229 ; :: 230 ; 231 ; % Unable to allocate memory: to make array. 232 ; Cannot allocate memory 233 ; 234 ; When timestep keyword is not used we can see these messages:: 235 ; 236 ; /usr/work/incas/fplod/tropflux_d/20c3m_erai_t2_TROP_1989_2009.nc as no time axis variable 237 ; given by Praveen 238 ; 235 ; 236 ; .. parsed-literal:: 237 ; 238 ; % Unable to allocate memory: to make array. 239 ; Cannot allocate memory 240 ; 241 ; When timestep keyword is not used we can see these messages: 242 ; 243 ; .. parsed-literal:: 244 ; 245 ; /usr/work/incas/fplod/tropflux_d/20c3m_erai_t2_TROP_1989_2009.nc has no time axis variable 246 ; 247 ; given by Praveen 248 ; 249 ; .. parsed-literal:: 250 239 251 ; Value of Julian date is out of allowed range 240 252 ; -
trunk/src/interp_erai_ws.pro
r191 r203 108 108 ; ======== 109 109 ; 110 ; With ERA-I type 1:: 111 ; 112 ; .compile file_interp 113 ; yyyymmddb = 20000101L 114 ; yyyymmdde = 20001231L 115 ; eraitype = 1 116 ; result = interp_erai_ws(yyyymmddb, yyyymmdde, eraitype) 117 ; print, result 118 ; 119 ; With ERA-I type 2:: 120 ; 121 ; .compile file_interp 122 ; yyyymmddb = 20000101L 123 ; yyyymmdde = 20001231L 124 ; eraitype = 2 125 ; result = interp_erai_ws(yyyymmddb, yyyymmdde, eraitype) 110 ; With ERA-I type 1: 111 ; 112 ; .. code-block:: idl 113 ; 114 ; .compile file_interp 115 ; yyyymmddb = 20000101L 116 ; yyyymmdde = 20001231L 117 ; eraitype = 1 118 ; result = interp_erai_ws(yyyymmddb, yyyymmdde, eraitype) 119 ; print, result 120 ; 121 ; With ERA-I type 2: 122 ; 123 ; .. code-block:: idl 124 ; 125 ; .compile file_interp 126 ; yyyymmddb = 20000101L 127 ; yyyymmdde = 20001231L 128 ; eraitype = 2 129 ; result = interp_erai_ws(yyyymmddb, yyyymmdde, eraitype) 126 130 ; 127 131 ; TODO … … 132 136 ; make it work : pb on loholt1 idl8 133 137 ; 134 ; reach end but bad values et nb timestep 4581:: 135 ; 136 ; ncks -v u10 -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/erai_ws_19890101_20091231_oafluxgrid.nc 137 ; latitude[0]=-29.5 degrees_north 138 ; latitude[1]=-28.5 degrees_north 139 ; 140 ; longitude[0]=30.5 degrees_east 141 ; longitude[1]=31.5 degrees_east 142 ; 143 ; time[0] latitude[0]=-29.5 longitude[0]=30.5 u10[0]=9.96921e+36 m/s 144 ; time[0] latitude[0]=-29.5 longitude[1]=31.5 u10[1]=9.96921e+36 m/s 145 ; time[0] latitude[1]=-28.5 longitude[0]=30.5 u10[350]=9.96921e+36 m/s 146 ; time[0] latitude[1]=-28.5 longitude[1]=31.5 u10[351]=9.96921e+36 m/s 147 ; time[1] latitude[0]=-29.5 longitude[0]=30.5 u10[21000]=9.96921e+36 m/s 148 ; time[1] latitude[0]=-29.5 longitude[1]=31.5 u10[21001]=9.96921e+36 m/s 149 ; time[1] latitude[1]=-28.5 longitude[0]=30.5 u10[21350]=9.96921e+36 m/s 150 ; time[1] latitude[1]=-28.5 longitude[1]=31.5 u10[21351]=9.96921e+36 m/s 151 ; 152 ; make it work : pb on loholt1 idl6:: 153 ; 154 ; Writing fields: 155 ; u10[longitude,latitude,time]=u10out:u10_attr; v10[longitude,latitude,time]=v10out:v10_attr; longitude[]=xlon:lon_attr; latitude[]=ylat:lat_attr; tt[*time]=tt:time_attr @ globattr 156 ; % NCDF_VARPUT: Operation Failed, bad file (6) or variable [0] id ? 157 ; (NC_ERROR=-31) 158 ; % Stop encountered: INTERP_ERAI_WS_1989_2009 1 138 ; reach end but bad values et nb timestep 4581: 139 ; 140 ; .. code-block:: bash 141 ; 142 ; ncks -v u10 -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/erai_ws_19890101_20091231_oafluxgrid.nc 143 ; latitude[0]=-29.5 degrees_north 144 ; latitude[1]=-28.5 degrees_north 145 ; 146 ; longitude[0]=30.5 degrees_east 147 ; longitude[1]=31.5 degrees_east 148 ; 149 ; time[0] latitude[0]=-29.5 longitude[0]=30.5 u10[0]=9.96921e+36 m/s 150 ; time[0] latitude[0]=-29.5 longitude[1]=31.5 u10[1]=9.96921e+36 m/s 151 ; time[0] latitude[1]=-28.5 longitude[0]=30.5 u10[350]=9.96921e+36 m/s 152 ; time[0] latitude[1]=-28.5 longitude[1]=31.5 u10[351]=9.96921e+36 m/s 153 ; time[1] latitude[0]=-29.5 longitude[0]=30.5 u10[21000]=9.96921e+36 m/s 154 ; time[1] latitude[0]=-29.5 longitude[1]=31.5 u10[21001]=9.96921e+36 m/s 155 ; time[1] latitude[1]=-28.5 longitude[0]=30.5 u10[21350]=9.96921e+36 m/s 156 ; time[1] latitude[1]=-28.5 longitude[1]=31.5 u10[21351]=9.96921e+36 m/s 157 ; 158 ; make it work : pb on loholt1 idl6: 159 ; 160 ; .. parsed-literal:: 161 ; 162 ; Writing fields: 163 ; u10[longitude,latitude,time]=u10out:u10_attr; v10[longitude,latitude,time]=v10out:v10_attr; longitude[]=xlon:lon_attr; latitude[]=ylat:lat_attr; tt[*time]=tt:time_attr @ globattr 164 ; % NCDF_VARPUT: Operation Failed, bad file (6) or variable [0] id ? 165 ; (NC_ERROR=-31) 166 ; % Stop encountered: INTERP_ERAI_WS_1989_2009 1 159 167 ; 160 168 ; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call -
trunk/src/interp_olr_30n30s.pro
r180 r203 68 68 ; ======== 69 69 ; 70 ; ::71 ; 72 ; .compile file_interp73 ; yyyymmddb = 20000101L74 ; yyyymmdde = 20001231L75 ; result = interp_olr_30n30s(yyyymmddb, yyyymmdde)76 ; print, result70 ; .. code-block:: idl 71 ; 72 ; .compile file_interp 73 ; yyyymmddb = 20000101L 74 ; yyyymmdde = 20001231L 75 ; result = interp_olr_30n30s(yyyymmddb, yyyymmdde) 76 ; print, result 77 77 ; 78 78 ; TODO … … 81 81 ; hard coded attributes for time origine 82 82 ; 83 ; how can we avoid this message :: 84 ; 85 ; % initncdf: the zaxis was not found..., check the use of ZAXISNAME keyword if you want to find one... 83 ; how can we avoid this message : 84 ; 85 ; .. parsed-literal:: 86 ; 87 ; % initncdf: the zaxis was not found..., check the use of ZAXISNAME keyword if you want to find one... 86 88 ; 87 89 ; I think we do not need any zaxis 88 90 ; 89 ; strange second value [1] in the file produced on cratos idl 7 20110812:: 90 ; 91 ; $ ncdump $PROJECT_OD/olr_oafluxgrid_30n30s_19890101_20091231.nc 92 ; olr = 91 ; strange second value [1] in the file produced on cratos idl 7 20110812: 92 ; 93 ; .. code-block:: bash 94 ; 95 ; ncdump $PROJECT_OD/olr_oafluxgrid_30n30s_19890101_20091231.nc 96 ; 97 ; .. parsed-literal:: 98 ; 99 ; olr = 93 100 ; 1e+20, 1, 258.15, 264.882, 271.614, 273.8116, 271.4748, 269.138, 266.6868, 94 101 ; … … 172 179 nparam = N_PARAMS() 173 180 IF (nparam NE 2) THEN BEGIN 174 ras = report(['Incorrect number of arguments.' $181 ras = report(['Incorrect number of arguments.' $ 175 182 + '!C' $ 176 183 + 'Usage : ' + usage]) 177 return, result184 return, result 178 185 ENDIF 179 186 ; … … 183 190 CASE project_id_env OF 184 191 '' : BEGIN 185 msg = 'eee : ${PROJECT_ID} is not defined'186 ras = report(msg)187 return, result188 189 ELSE: BEGIN190 msg = 'iii : ${PROJECT_ID} is ' + project_id_env191 ras = report(msg)192 192 msg = 'eee : ${PROJECT_ID} is not defined' 193 ras = report(msg) 194 return, result 195 END 196 ELSE: BEGIN 197 msg = 'iii : ${PROJECT_ID} is ' + project_id_env 198 ras = report(msg) 199 END 193 200 ENDCASE 194 201 ; … … 197 204 ; existence and protection of ${PROJECT_ID} 198 205 IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 199 msg = 'eee : the directory' + iodirin + ' is not accessible.'200 ras = report(msg)201 return, result206 msg = 'eee : the directory' + iodirin + ' is not accessible.' 207 ras = report(msg) 208 return, result 202 209 ENDIF 203 210 ; … … 210 217 fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 211 218 IF fullfilename_msk[0] EQ '' THEN BEGIN 212 msg = 'eee : the file ' + fullfilename_msk + ' was not found.'213 ras = report(msg)214 return, result219 msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 220 ras = report(msg) 221 return, result 215 222 ENDIF 216 223 ; … … 223 230 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 224 231 IF fullfilename[0] EQ '' THEN BEGIN 225 msg = 'eee : the file ' + fullfilename + ' was not found.'226 ras = report(msg)227 return, result232 msg = 'eee : the file ' + fullfilename + ' was not found.' 233 ras = report(msg) 234 return, result 228 235 ENDIF 229 236 ; 230 237 ; test if ${PROJECT_OD} defined 231 238 CASE project_od_env OF 232 '' : BEGIN239 '' : BEGIN 233 240 msg = 'eee : ${PROJECT_OD} is not defined' 234 241 ras = report(msg) 235 242 return, result 236 237 ELSE: BEGIN243 END 244 ELSE: BEGIN 238 245 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 239 246 ras = report(msg) 240 247 END 241 248 ENDCASE 242 249 ; … … 256 263 ; in order to avoid unexpected overwritten 257 264 IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN 258 msg = 'eee : the file ' + fullfilename_out + ' already exists.'259 ras = report(msg)260 return, result265 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 266 ras = report(msg) 267 return, result 261 268 ENDIF 262 269 ; … … 294 301 for jt=0,jptin-1 do begin 295 302 ; 296 print, 'Interpolation jt=',jt,' / ',jptin-1297 tab_olr=reform(olrin[*,*,jt])298 ; 299 olrout[*,*,jt]=call_interp2d(tab_olr,lonin,latin,mskin $303 print, 'Interpolation jt=',jt,' / ',jptin-1 304 tab_olr=reform(olrin[*,*,jt]) 305 ; 306 olrout[*,*,jt]=call_interp2d(tab_olr,lonin,latin,mskin $ 300 307 , lonout,latout,method='bilinear' $ 301 308 , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 302 olrout[*,*,jt]=olrout[*,*,jt]*mskout+(1.-mskout)*1.e20309 olrout[*,*,jt]=olrout[*,*,jt]*mskout+(1.-mskout)*1.e20 303 310 ; 304 311 endfor -
trunk/src/lwdown_clark.pro
r181 r203 43 43 @common 44 44 ; 45 eps=.97 46 sig=5.67e-8 47 Ts=(sst+273.15) 48 Ta=(tair+273.15) 45 eps=.97 ; emissivity of sea-water 46 sig=5.67e-8 ; Stefan-Boltzman constant (W/m2/K4) 47 Ts=(sst+273.15) ; SST in K 48 Ta=(tair+273.15) ; Tair in K 49 49 q=qair/1000. ; specific humidity (kg/kg) 50 r=q/(1-q) 50 r=q/(1-q) ; Mixing ratio 51 51 ea=ps*r/(r+.62197) ; Specific humidity into vapor pressure 52 52 ; -
trunk/src/lwnet_clark.pro
r181 r203 44 44 @common 45 45 ; 46 eps=.97 47 sig=5.67e-8 48 Ts=(sst+273.15) 49 Ta=(tair+273.15) 46 eps=.97 ; emissivity of sea-water 47 sig=5.67e-8 ; Stefan-Boltzman constant (W/m2/K4) 48 Ts=(sst+273.15) ; SST in K 49 Ta=(tair+273.15) ; Tair in K 50 50 q=qair/1000. ; specific humidity (kg/kg) 51 r=q/(1-q) 51 r=q/(1-q) ; Mixing ratio 52 52 ea=ps*r/(r+.62197) ; Specific humidity into vapor pressure 53 53 ; -
trunk/src/lwr_correction_ncdf.pro
r180 r203 72 72 ; ======== 73 73 ; 74 ; ::75 ; 76 ; yyyymmddb = 20000101L77 ; yyyymmdde = 20001231L78 ; result = lwr_correction_ncdf(yyyymmddb, yyyymmdde)79 ; print, result74 ; .. code-block:: idl 75 ; 76 ; yyyymmddb = 20000101L 77 ; yyyymmdde = 20001231L 78 ; result = lwr_correction_ncdf(yyyymmddb, yyyymmdde) 79 ; print, result 80 80 ; 81 81 ; TODO … … 138 138 ;- 139 139 function lwr_correction_ncdf $ 140 141 140 , yyyymmddb $ 141 , yyyymmdde 142 142 ; 143 143 ;++compile_opt idl2, strictarrsubs, logical_predicate … … 165 165 ; test if ${PROJECT_OD} defined 166 166 CASE project_od_env OF 167 '' : BEGIN167 '' : BEGIN 168 168 msg = 'eee : ${PROJECT_OD} is not defined' 169 169 ras = report(msg) 170 170 return, result 171 172 ELSE: BEGIN171 END 172 ELSE: BEGIN 173 173 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 174 174 ras = report(msg) 175 176 175 END 176 ENDCASE 177 177 ; 178 178 ; check if output data will be possible … … 181 181 ; existence and protection for reading 182 182 IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 183 msg = 'eee : the directory' + iodirout + ' is not accessible.'184 ras = report(msg)185 return, result183 msg = 'eee : the directory' + iodirout + ' is not accessible.' 184 ras = report(msg) 185 return, result 186 186 ENDIF 187 187 ; … … 201 201 fullfilename = isafile(iodirout + filename, NEW=0, /MUST_EXIST) 202 202 IF fullfilename[0] EQ '' THEN BEGIN 203 msg = 'eee : the file ' + fullfilename + ' was not found.'204 ras = report(msg)205 return, result203 msg = 'eee : the file ' + fullfilename + ' was not found.' 204 ras = report(msg) 205 return, result 206 206 ENDIF 207 207 ; … … 211 211 ; in order to avoid unexpected overwritten 212 212 IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN 213 msg = 'eee : the file ' + fullfilename_out + ' already exists.'214 ras = report(msg)215 return, result213 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 214 ras = report(msg) 215 return, result 216 216 ENDIF 217 217 ; … … 237 237 ; 238 238 for jt=0,jpt-1 do begin 239 jtt=(time[jt]-julday(1,1,yea[jt])) < 364240 t=reform(lwr_mean[*,*])241 lwr_m[*,*,jt]=t239 jtt=(time[jt]-julday(1,1,yea[jt])) < 364 240 t=reform(lwr_mean[*,*]) 241 lwr_m[*,*,jt]=t 242 242 endfor 243 243 help, lwr_m -
trunk/src/oaflux_mask_30n30s.pro
r180 r203 73 73 ; ======== 74 74 ; 75 ; ::76 ; 77 ; result = oaflux_mask_30n30s()75 ; .. code-block:: idl 76 ; 77 ; result = oaflux_mask_30n30s() 78 78 ; 79 79 ; TODO -
trunk/src/paper01/fig1/fig1_no_obs_map.pro
r182 r203 55 55 ; ======== 56 56 ; 57 ; ::58 ; 59 ; fig1_no_obs_map57 ; .. code-block:: idl 58 ; 59 ; fig1_no_obs_map 60 60 ; 61 61 ; TODO -
trunk/src/paper01/fig10/fig10_swr_correction.pro
r182 r203 38 38 ; ======== 39 39 ; 40 ; ::40 ; .. code-block:: idl 41 41 ; 42 ; @project_init43 ; fig10_swr_correction42 ; @project_init 43 ; fig10_swr_correction 44 44 ; 45 45 ; TODO -
trunk/src/paper01/fig11/swr_isccp_tropflux_correlation_fig10.pro
r182 r203 49 49 ; ======== 50 50 ; 51 ; ::51 ; .. code-block:: idl 52 52 ; 53 ; swr_isccp_tropflux_correlation_fig1053 ; swr_isccp_tropflux_correlation_fig10 54 54 ; 55 55 ; TODO -
trunk/src/paper01/fig11/swr_isccp_tropflux_new_v1.pro
r182 r203 54 54 ; ======== 55 55 ; 56 ; ::57 ; 58 ; swr_isccp_tropflux_new_v156 ; .. code-block:: idl 57 ; 58 ; swr_isccp_tropflux_new_v1 59 59 ; 60 60 ; TODO -
trunk/src/paper01/fig12/swr_statistics_map_2000_2009_v50.pro
r182 r203 40 40 ; ======== 41 41 ; 42 ; ::43 ; 44 ; swr_statistics_map_2000_2009_v5042 ; .. code-block:: idl 43 ; 44 ; swr_statistics_map_2000_2009_v50 45 45 ; 46 46 ; TODO -
trunk/src/paper01/fig13/net_flux_validation_scatter_2000_2007.pro
r182 r203 71 71 ; ======== 72 72 ; 73 ; ::74 ; 75 ; date1 = 19890101L76 ; date2 = 20091231L77 ; net_flux_validation_scatter_2000_2007, date1, date273 ; .. code-block:: idl 74 ; 75 ; date1 = 19890101L 76 ; date2 = 20091231L 77 ; net_flux_validation_scatter_2000_2007, date1, date2 78 78 ; 79 79 ; TODO -
trunk/src/paper01/fig14/as_validation_net_1994_95_v10.pro
r182 r203 52 52 ; ======== 53 53 ; 54 ; ::55 ; 56 ; as_validation_net_1994_95_v1054 ; .. code-block:: idl 55 ; 56 ; as_validation_net_1994_95_v10 57 57 ; 58 58 ; TODO -
trunk/src/paper01/fig14/coare_validation_net_1992_93_all_v10.pro
r182 r203 54 54 ; ======== 55 55 ; 56 ; ::57 ; 58 ; coare_validation_net_1992_93_all_v1056 ; .. code-block:: idl 57 ; 58 ; coare_validation_net_1992_93_all_v10 59 59 ; 60 60 ; TODO -
trunk/src/paper01/fig14/stratus_validation_net_2001_2002_all_v10.pro
r182 r203 54 54 ; ======== 55 55 ; 56 ; ::57 ; 58 ; stratus_validation_net_2001_2002_all_v1056 ; .. code-block:: idl 57 ; 58 ; stratus_validation_net_2001_2002_all_v10 59 59 ; 60 60 ; TODO -
trunk/src/paper01/fig14/subdctn_cs_validation_net_1991_93_all_v10.pro
r182 r203 54 54 ; ======== 55 55 ; 56 ; ::57 ; 58 ; subdctn_cs_validation_net_1991_93_all_v1056 ; .. code-block:: idl 57 ; 58 ; subdctn_cs_validation_net_1991_93_all_v10 59 59 ; 60 60 ; TODO -
trunk/src/paper01/fig14/subdctn_ses_validation_net_1991_93_all_v10.pro
r182 r203 54 54 ; ======== 55 55 ; 56 ; ::57 ; 58 ; subdctn_ses_validation_net_1991_93_all_v1056 ; .. code-block:: idl 57 ; 58 ; subdctn_ses_validation_net_1991_93_all_v10 59 59 ; 60 60 ; TODO -
trunk/src/paper01/fig14/subdctn_sws_validation_net_1991_93_all_v10.pro
r182 r203 54 54 ; ======== 55 55 ; 56 ; ::57 ; 58 ; subdctn_sws_validation_net_1991_93_all_v1056 ; .. code-block:: idl 57 ; 58 ; subdctn_sws_validation_net_1991_93_all_v10 59 59 ; 60 60 ; TODO -
trunk/src/paper01/fig14/whots_validation_net_2004_2007_all_v10.pro
r182 r203 54 54 ; ======== 55 55 ; 56 ; ::57 ; 58 ; whots_validation_net_2004_2007_all_v1056 ; .. code-block:: idl 57 ; 58 ; whots_validation_net_2004_2007_all_v10 59 59 ; 60 60 ; TODO -
trunk/src/paper01/fig15/fig15_timeseries_mjo.pro
r182 r203 44 44 ; ======== 45 45 ; 46 ; ::47 ; 48 ; fig15_timeseries_mjo46 ; .. code-block:: idl 47 ; 48 ; fig15_timeseries_mjo 49 49 ; 50 50 ; TODO -
trunk/src/paper01/fig16/fig16_timeseries_nino3.pro
r182 r203 50 50 ; ======== 51 51 ; 52 ; ::53 ; 54 ; fig16_timeseries_nino352 ; .. code-block:: idl 53 ; 54 ; fig16_timeseries_nino3 55 55 ; 56 56 ; TODO -
trunk/src/paper01/fig2/fig2_timeline_diagram.pro
r182 r203 49 49 ; ======== 50 50 ; 51 ; ::52 ; 53 ; fig2_timeline_diagram51 ; .. code-block:: idl 52 ; 53 ; fig2_timeline_diagram 54 54 ; 55 55 ; TODO 56 56 ; ==== 57 57 ; 58 ; make it work on cratos and loholt1:: 58 ; make it work on cratos and loholt1: 59 ; 60 ; .. parsed-literal:: 59 61 ; 60 62 ; % Error: -
trunk/src/paper01/fig2/read_lh.pro
r182 r203 40 40 ; ======== 41 41 ; 42 ; ::42 ; .. code-block:: idl 43 43 ; 44 ; csite = '8s67e'45 ; date1 = 19890101L46 ; date2 = 20091231L47 ; nsmooth = 1.48 ; read_lh, csite, date1, date2, nsmooth, lh44 ; csite = '8s67e' 45 ; date1 = 19890101L 46 ; date2 = 20091231L 47 ; nsmooth = 1. 48 ; read_lh, csite, date1, date2, nsmooth, lh 49 49 ; 50 50 ; TODO -
trunk/src/paper01/fig2/read_lw.pro
r182 r203 38 38 ; ======== 39 39 ; 40 ; ::40 ; .. code-block:: idl 41 41 ; 42 ; csite = '8s67e'43 ; date1 = 19890101L44 ; date2 = 20091231L45 ; box = [249.500,250.500,-0.500000,0.500000]46 ; read_lw, csite, date1, date2, box, lw42 ; csite = '8s67e' 43 ; date1 = 19890101L 44 ; date2 = 20091231L 45 ; box = [249.500,250.500,-0.500000,0.500000] 46 ; read_lw, csite, date1, date2, box, lw 47 47 ; 48 48 ; TODO -
trunk/src/paper01/fig2/read_sw.pro
r182 r203 38 38 ; ======== 39 39 ; 40 ; ::40 ; .. code-block:: idl 41 41 ; 42 ; csite = '8s67e'43 ; date1 = 19890101L44 ; date2 = 20091231L45 ; box = ++46 ; read_sw, csite, date1, date2, box, sw42 ; csite = '8s67e' 43 ; date1 = 19890101L 44 ; date2 = 20091231L 45 ; box = ++ 46 ; read_sw, csite, date1, date2, box, sw 47 47 ; 48 48 ; TODO -
trunk/src/paper01/fig2/time_lec.pro
r182 r203 12 12 ; ======== 13 13 ; 14 ; ::14 ; .. code-block:: idl 15 15 ; 16 16 ; fi = ++ -
trunk/src/paper01/fig2/x_site_location.pro
r182 r203 15 15 ; ======== 16 16 ; 17 ; ::17 ; .. code-block:: idl 18 18 ; 19 ; site = ++20 ; result = x_site_location(site)19 ; site = ++ 20 ; result = x_site_location(site) 21 21 ; 22 22 ; SEE ALSO -
trunk/src/paper01/fig2/y_site_location.pro
r182 r203 15 15 ; ======== 16 16 ; 17 ; ::17 ; .. code-block:: idl 18 18 ; 19 ; site = ++20 ; result = y_site_location(site)19 ; site = ++ 20 ; result = y_site_location(site) 21 21 ; 22 22 ; SEE ALSO -
trunk/src/paper01/fig3/air_validation_scatter_2000_2009_v50.pro
r182 r203 58 58 ; ======== 59 59 ; 60 ; ::61 ; 62 ; date1 = 20001001L63 ; date2 = 20091231L64 ; air_validation_scatter_2000_2009_v50, date1, date260 ; .. code-block:: idl 61 ; 62 ; date1 = 20001001L 63 ; date2 = 20091231L 64 ; air_validation_scatter_2000_2009_v50, date1, date2 65 65 ; 66 66 ; TODO -
trunk/src/paper01/fig3/q2m_validation_scatter_2000_2009_v50.pro
r182 r203 57 57 ; ======== 58 58 ; 59 ; ::60 ; 61 ; date1 = 20001001L62 ; date2 = 20091231L63 ; q2m_validation_scatter_2000_2009_v50, date1, date259 ; .. code-block:: idl 60 ; 61 ; date1 = 20001001L 62 ; date2 = 20091231L 63 ; q2m_validation_scatter_2000_2009_v50, date1, date2 64 64 ; 65 65 ; TODO -
trunk/src/paper01/fig3/read_variables_v2.pro
r182 r203 56 56 ; ======== 57 57 ; 58 ; ::59 ; 60 ; csite = ++61 ; ++62 ; read_variables_v2, csite, date1, date2, nsmooth, at, sw, rh, sst, wu, wv, ws, lh58 ; .. code-block:: idl 59 ; 60 ; csite = ++ 61 ; ++ 62 ; read_variables_v2, csite, date1, date2, nsmooth, at, sw, rh, sst, wu, wv, ws, lh 63 63 ; 64 64 ; TODO -
trunk/src/paper01/fig3/sst_validation_scatter_2000_2009_v50.pro
r182 r203 53 53 ; ======== 54 54 ; 55 ; ::56 ; 57 ; date1 = 19890101L58 ; date2 = 20091231L59 ; sst_validation_scatter_2000_2009_v50, date1, date255 ; .. code-block:: idl 56 ; 57 ; date1 = 19890101L 58 ; date2 = 20091231L 59 ; sst_validation_scatter_2000_2009_v50, date1, date2 60 60 ; 61 61 ; TODO -
trunk/src/paper01/fig3/statistics_3var_v1.pro
r182 r203 31 31 ; ======== 32 32 ; 33 ; ::33 ; .. code-block:: idl 34 34 ; 35 ; tao = ++36 ; ++37 ; statistics_3var_v1, tao, var1, var2, cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd235 ; tao = ++ 36 ; ++ 37 ; statistics_3var_v1, tao, var1, var2, cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 38 38 ; 39 39 ; EVOLUTIONS -
trunk/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro
r182 r203 52 52 ; ======== 53 53 ; 54 ; ::55 ; 56 ; date1 = 19890101L57 ; date2 = 20091231L58 ; ws_validation_scatter_2000_2009_v50, date1, date254 ; .. code-block:: idl 55 ; 56 ; date1 = 19890101L 57 ; date2 = 20091231L 58 ; ws_validation_scatter_2000_2009_v50, date1, date2 59 59 ; 60 60 ; TODO -
trunk/src/paper01/fig4/fig4_met_var_correction_scatter.pro
r182 r203 40 40 ; ======== 41 41 ; 42 ; ::43 ; 44 ; fig4_met_var_correction_scatter42 ; .. code-block:: idl 43 ; 44 ; fig4_met_var_correction_scatter 45 45 ; 46 46 ; TODO -
trunk/src/paper01/fig4/significance_test_99.pro
r182 r203 20 20 ; ======== 21 21 ; 22 ; ::22 ; .. code-block:: idl 23 23 ; 24 ; @project_init25 ; x = ++26 ; y = ++27 ; sig_value = ++28 ; significance_test_99, x, y, sig_value24 ; @project_init 25 ; x = ++ 26 ; y = ++ 27 ; sig_value = ++ 28 ; significance_test_99, x, y, sig_value 29 29 ; 30 30 ; TODO -
trunk/src/paper01/fig5/fig5_gustiness_scatter.pro
r182 r203 36 36 ; ======== 37 37 ; 38 ; ::38 ; .. code-block:: idl 39 39 ; 40 ; fig5_gustiness_scatter40 ; fig5_gustiness_scatter 41 41 ; 42 42 ; TODO -
trunk/src/paper01/fig6/icoads_q2m_stats_paper.pro
r182 r203 42 42 ; ======== 43 43 ; 44 ; ::45 ; 46 ; icoads_q2m_stats_paper44 ; .. code-block:: idl 45 ; 46 ; icoads_q2m_stats_paper 47 47 ; 48 48 ; TODO … … 143 143 list=0 144 144 for n=0, nn-1 do begin 145 x=lat_tao(n)146 y=lon_tao(n)147 dx=abs(reform(glamt-x))148 dy=abs(reform(gphit)-y)149 ind=where((dx le 0.5) and (dy le 0.5))150 if (total(ind) ge 0.) then begin151 list=[list,ind]152 endif145 x=lat_tao(n) 146 y=lon_tao(n) 147 dx=abs(reform(glamt-x)) 148 dy=abs(reform(gphit)-y) 149 ind=where((dx le 0.5) and (dy le 0.5)) 150 if (total(ind) ge 0.) then begin 151 list=[list,ind] 152 endif 153 153 endfor 154 154 ; … … 158 158 mask=trop*0 159 159 for jt=0,jpt-1 do begin 160 t=reform(msk(*,*))161 mask(*,*,jt)=t160 t=reform(msk(*,*)) 161 mask(*,*,jt)=t 162 162 endfor 163 163 ; … … 180 180 ; 181 181 statistics, param, trop, $ 182 182 cor, bias, std, rmsd 183 183 print, cor, bias, std, rmsd 184 184 cstat_trop=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') … … 187 187 ; 188 188 statistics, param, oaf, $ 189 189 cor, bias, std, rmsd 190 190 print, cor, bias, std, rmsd 191 191 cstat_oaf=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') … … 194 194 ; 195 195 statistics, param, erai, $ 196 196 cor, bias, std, rmsd 197 197 print, cor, bias, std, rmsd 198 198 cstat_erai=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') … … 201 201 ; 202 202 statistics, param, ncep2, $ 203 203 cor, bias, std, rmsd 204 204 print, cor, bias, std, rmsd 205 205 cstat_ncep2=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') … … 208 208 ; 209 209 statistics, param, ncep1, $ 210 210 cor, bias, std, rmsd 211 211 print, cor, bias, std, rmsd 212 212 cstat_ncep1=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') … … 226 226 ; 227 227 pdf, param,trop,mio,mao,inx,mis,mas,iny, $ 228 229 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 230 228 pdf,xx,yy 229 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 230 title="q2m - ICOADS/TropFlux", small=[2,3,1] 231 231 xyouts, 10, 6, cstat_trop, charsize=1 232 232 xyouts, 10, 4, abs_trop, charsize=1 233 233 ; 234 234 pdf, param,oaf,mio,mao,inx,mis,mas,iny, $ 235 236 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 237 235 pdf,xx,yy 236 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 237 title="q2m - ICOADS/OAFlux", small=[2,3,2] 238 238 xyouts, 10, 6, cstat_oaf, charsize=1 239 239 xyouts, 10, 4, abs_oaf, charsize=1 240 240 ; 241 241 pdf, param,erai,mio,mao,inx,mis,mas,iny, $ 242 243 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 244 242 pdf,xx,yy 243 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 244 title="q2m - ICOADS/ERAI", small=[2,3,3] 245 245 xyouts, 10, 6, cstat_erai, charsize=1 246 246 xyouts, 10, 4, abs_erai, charsize=1 247 247 ; 248 248 pdf, param,ncep2,mio,mao,inx,mis,mas,iny, $ 249 250 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 251 249 pdf,xx,yy 250 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 251 title="q2m - ICOADS/NCEP2", small=[2,3,4] 252 252 xyouts, 10, 6, cstat_ncep2, charsize=1 253 253 xyouts, 10, 4, abs_ncep2, charsize=1 254 254 ; 255 255 pdf, param,ncep1,mio,mao,inx,mis,mas,iny, $ 256 257 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 258 256 pdf,xx,yy 257 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 258 title="q2m - ICOADS/NCEP1", small=[2,3,5] 259 259 xyouts, 10, 6, cstat_ncep1, charsize=1 260 260 xyouts, 10, 4, abs_ncep1, charsize=1 -
trunk/src/paper01/fig6/icoads_sst_stats_paper.pro
r182 r203 43 43 ; ======== 44 44 ; 45 ; ::46 ; 47 ; icoads_sst_stats_paper45 ; .. code-block:: idl 46 ; 47 ; icoads_sst_stats_paper 48 48 ; 49 49 ; TODO -
trunk/src/paper01/fig6/icoads_t2m_stats_paper.pro
r182 r203 42 42 ; ======== 43 43 ; 44 ; ::45 ; 46 ; icoads_t2m_stats_paper44 ; .. code-block:: idl 45 ; 46 ; icoads_t2m_stats_paper 47 47 ; 48 48 ; TODO -
trunk/src/paper01/fig6/icoads_ws_stats_paper.pro
r182 r203 43 43 ; ======== 44 44 ; 45 ; ::46 ; 47 ; icoads_ws_stats_paper45 ; .. code-block:: idl 46 ; 47 ; icoads_ws_stats_paper 48 48 ; 49 49 ; TODO -
trunk/src/paper01/fig6/statistics.pro
r182 r203 29 29 ; ======== 30 30 ; 31 ; ::31 ; .. code-block:: idl 32 32 ; 33 ; moor = ++34 ; ++35 ; statistics, moor, erai, cor, bias, std, rmsd33 ; moor = ++ 34 ; ++ 35 ; statistics, moor, erai, cor, bias, std, rmsd 36 36 ; 37 37 ; TODO -
trunk/src/paper01/fig7/air_validation_scatter_2000_2009_basin.pro
r182 r203 47 47 ; ======== 48 48 ; 49 ; ::50 ; 51 ; date1 = 19890101L52 ; date2 = 20091231L53 ; air_validation_scatter_2000_2009_basin, date1, date249 ; .. code-block:: idl 50 ; 51 ; date1 = 19890101L 52 ; date2 = 20091231L 53 ; air_validation_scatter_2000_2009_basin, date1, date2 54 54 ; 55 55 ; TODO -
trunk/src/paper01/fig7/q2m_validation_scatter_2000_2009_basin.pro
r182 r203 47 47 ; ======== 48 48 ; 49 ; ::50 ; 51 ; date1 = 19890101L52 ; date2 = 20091231L53 ; q2m_validation_scatter_2000_2009_basin, date1, date249 ; .. code-block:: idl 50 ; 51 ; date1 = 19890101L 52 ; date2 = 20091231L 53 ; q2m_validation_scatter_2000_2009_basin, date1, date2 54 54 ; 55 55 ; TODO -
trunk/src/paper01/fig7/sst_validation_scatter_2000_2009_basin.pro
r182 r203 47 47 ; ======== 48 48 ; 49 ; ::50 ; 51 ; date1 = 19890101L52 ; date2 = 20091231L53 ; sst_validation_scatter_2000_2009_basin, date1, date249 ; .. code-block:: idl 50 ; 51 ; date1 = 19890101L 52 ; date2 = 20091231L 53 ; sst_validation_scatter_2000_2009_basin, date1, date2 54 54 ; 55 55 ; TODO -
trunk/src/paper01/fig7/ws_validation_scatter_2000_2009_basin.pro
r182 r203 48 48 ; ======== 49 49 ; 50 ; ::51 ; 52 ; date1 = 19890101L53 ; date2 = 20091231L54 ; ws_validation_scatter_2000_2009_basin, date1, date250 ; .. code-block:: idl 51 ; 52 ; date1 = 19890101L 53 ; date2 = 20091231L 54 ; ws_validation_scatter_2000_2009_basin, date1, date2 55 55 ; 56 56 ; TODO -
trunk/src/paper01/fig8/lhf_validation_scatter_2000_2009.pro
r182 r203 51 51 ; ======== 52 52 ; 53 ; ::54 ; 55 ; date1 = 19890101L56 ; date2 = 20091231L57 ; lhf_validation_scatter_2000_2009, date1, date253 ; .. code-block:: idl 54 ; 55 ; date1 = 19890101L 56 ; date2 = 20091231L 57 ; lhf_validation_scatter_2000_2009, date1, date2 58 58 ; 59 59 ; TODO -
trunk/src/paper01/fig8/shf_validation_scatter_2000_2009.pro
r182 r203 51 51 ; ======== 52 52 ; 53 ; ::54 ; 55 ; date1 = 19890101L56 ; date2 = 20091231L57 ; shf_validation_scatter_2000_2009, date1, date253 ; .. code-block:: idl 54 ; 55 ; date1 = 19890101L 56 ; date2 = 20091231L 57 ; shf_validation_scatter_2000_2009, date1, date2 58 58 ; 59 59 ; TODO -
trunk/src/paper01/fig9/lwr_validation_scatter_2000_2007.pro
r182 r203 54 54 ; ======== 55 55 ; 56 ; ::57 ; 58 ; date1 = 19890101L59 ; date2 = 20091231L60 ; lwr_validation_scatter_2000_2007, date1, date256 ; .. code-block:: idl 57 ; 58 ; date1 = 19890101L 59 ; date2 = 20091231L 60 ; lwr_validation_scatter_2000_2007, date1, date2 61 61 ; 62 62 ; TODO -
trunk/src/paper01/fig9/swr_validation_scatter_2000_2007.pro
r182 r203 53 53 ; ======== 54 54 ; 55 ; ::56 ; 57 ; date1 = 19890101L58 ; date2 = 20091231L59 ; swr_validation_scatter_2000_2007, date1, date255 ; .. code-block:: idl 56 ; 57 ; date1 = 19890101L 58 ; date2 = 20091231L 59 ; swr_validation_scatter_2000_2007, date1, date2 60 60 ; 61 61 ; TODO -
trunk/src/plot_tropflux.pro
r181 r203 36 36 ; ======== 37 37 ; 38 ; To plot ++ of q2m from :file:`${PROJECT}/TropFlux_q2m_19890101_20091231.nc`:: 38 ; To plot ++ of q2m from :file:`${PROJECT}/TropFlux_q2m_19890101_20091231.nc`: 39 ; 40 ; .. code-block:: idl 39 41 ; 40 42 ; @project_init … … 47 49 ; :file:`${PROJECT_OD}/plot_tropflux_q2m_month.png` have been created. 48 50 ; 49 ; Same idea for t2m from :file:`${PROJECT}/TropFlux_t2m_19890101_20091231.nc`:: 51 ; Same idea for t2m from :file:`${PROJECT}/TropFlux_t2m_19890101_20091231.nc`: 52 ; 53 ; .. code-block:: idl 50 54 ; 51 55 ; @project_init … … 53 57 ; status = plot_tropflux(tropflux_varname) 54 58 ; 55 ; Same idea for sst from :file:`${PROJECT}/TropFlux_sst_19890101_20091231.nc`:: 59 ; Same idea for sst from :file:`${PROJECT}/TropFlux_sst_19890101_20091231.nc`: 60 ; 61 ; .. code-block:: idl 56 62 ; 57 63 ; @project_init … … 59 65 ; status = plot_tropflux(tropflux_varname) 60 66 ; 61 ; Same idea for ws from :file:`${PROJECT}/TropFlux_ws_19890101_20091231.nc`:: 67 ; Same idea for ws from :file:`${PROJECT}/TropFlux_ws_19890101_20091231.nc`: 68 ; 69 ; .. code-block:: idl 62 70 ; 63 71 ; @project_init … … 65 73 ; status = plot_tropflux(tropflux_varname) 66 74 ; 67 ; Same idea for swr from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`:: 75 ; Same idea for swr from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`: 76 ; 77 ; .. code-block:: idl 68 78 ; 69 79 ; @project_init … … 71 81 ; status = plot_tropflux(tropflux_varname) 72 82 ; 73 ; Same idea for lwr from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`:: 83 ; Same idea for lwr from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`: 84 ; 85 ; .. code-block:: idl 74 86 ; 75 87 ; @project_init … … 77 89 ; status = plot_tropflux(tropflux_varname) 78 90 ; 79 ; Same idea for lhf from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`:: 91 ; Same idea for lhf from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`: 92 ; 93 ; .. code-block:: idl 80 94 ; 81 95 ; @project_init … … 83 97 ; status = plot_tropflux(tropflux_varname) 84 98 ; 85 ; Same idea for shf from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`:: 99 ; Same idea for shf from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`: 100 ; 101 ; .. code-block:: idl 86 102 ; 87 103 ; @project_init -
trunk/src/project_init.pro
r163 r203 14 14 ; .. note:: 15 15 ; 16 ; **project_overwrite** is here set to ``0`` : Existing files won't be 17 ; overwritten. It might be set 16 ; **project_overwrite** is here set to ``0`` : Existing files won't be 17 ; overwritten. It might be set 18 18 ; to ``1`` when you want to overwrite existing files in IDL process. 19 19 ; 20 ; It ++: :20 ; It ++: 21 21 ; 22 ; $ idl -startupfile project_init.pro22 ; .. code-block:: bash 23 23 ; 24 ; or::24 ; idl -startupfile project_init.pro 25 25 ; 26 ; $ idl -IDL_STARTUP project_init.pro26 ; or: 27 27 ; 28 ; or::28 ; .. code-block:: bash 29 29 ; 30 ; $ IDL 31 ; IDL> @project_init 30 ; idl -IDL_STARTUP project_init.pro 31 ; 32 ; or: 33 ; 34 ; .. code-block:: idl 35 ; 36 ; @project_init 32 37 ; 33 38 ; SEE ALSO … … 50 55 ; $URL$ 51 56 ; 52 ; - fplod 20120319 57 ; - fplod 20120319 53 58 ; 54 59 ; * define a overwrite status -
trunk/src/project_profile.sh
r184 r203 13 13 # ======== 14 14 # 15 # Online usage:: 16 # 17 # $ . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 18 # 19 # In ${HOME}/.profile, add the following line:: 20 # 21 # . project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 15 # Online usage: 16 # 17 # .. code-block:: bash 18 # 19 # . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 20 # 21 # In ${HOME}/.profile, add the following line: 22 # 23 # .. code-block:: bash 24 # 25 # . project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 22 26 # 23 27 # DESCRIPTION … … 47 51 # IDL_STARTUP is set to tell IDL where find tools. 48 52 # 49 # If :option:`idl_cmd` is used, **idl_cmd** will be used as the IDL command 50 # when launched from scripts. 51 # By default, ${IDL_CMD} is set to `idl`. 53 # If :option:`idl_cmd` is used, **idl_cmd** will be used as the IDL command 54 # when launched from scripts. 55 # By default, ${IDL_CMD} is set to `idl`. 52 56 # 53 57 # FER_GO is completed with ${PROJECT}/src/ and ${PROJECT}/src/test/. … … 64 68 # ======== 65 69 # 66 # For fplod, on halios.locean-ipsl.upmc.fr using gdl (to be tested):: 67 # 68 # $ cd /usr/home/fplod/incas/tropflux/tropflux_ws/ 69 # $ . ./src/project_profile.sh \ 70 # For fplod, on halios.locean-ipsl.upmc.fr using gdl (to be tested): 71 # 72 # .. code-block:: bash 73 # 74 # cd /usr/home/fplod/incas/tropflux/tropflux_ws/ 75 # . ./src/project_profile.sh \ 70 76 # -d $(pwd) \ 71 77 # -i /usr/temp/${LOGNAME}/tropflux_d/ \ … … 75 81 # -idl_cmd gdl 76 82 # 77 # For fplod on cratos.locean-ipsl.umpc.fr using idl 7.0:: 78 # 79 # $ cd ${HOME}/incas/tropflux/tropflux_ws/ 80 # $ . ./src/project_profile.sh \ 83 # For fplod on cratos.locean-ipsl.umpc.fr using idl 7.0: 84 # 85 # .. code-block:: bash 86 # 87 # cd ${HOME}/incas/tropflux/tropflux_ws/ 88 # . ./src/project_profile.sh \ 81 89 # -d $(pwd) \ 82 90 # -i /usr/temp/${LOGNAME}/tropflux_d/ \ … … 86 94 # -idl_cmd idl70 87 95 # 88 # For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv to use 89 # idl6.4:: 90 # 91 # $ cd ${HOME}/tropflux/ 92 # $ . ./src/project_profile.sh \ 96 # For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv to use 97 # idl6.4: 98 # 99 # .. code-block:: bash 100 # 101 # cd ${HOME}/tropflux/ 102 # . ./src/project_profile.sh \ 93 103 # -d $(pwd) \ 94 104 # -i /homedata/${LOGNAME}/tropflux_d/ \ … … 125 135 # - fplod 20111104T130726Z cratos (Linux) 126 136 # 127 # * add $ PROJECT/src/test to FER_GO137 # * add ${PROJECT}/src/test to FER_GO 128 138 # 129 139 # - fplod 20111010T072623Z aedon.locean-ipsl.upmc.fr (Darwin) … … 150 160 system=$(uname) 151 161 case "${system}" in 152 AIX|IRIX64)153 echo " www : no specific posix checking"154 ;;155 *)156 set -o posix157 ;;162 AIX|IRIX64) 163 echo " www : no specific posix checking" 164 ;; 165 *) 166 set -o posix 167 ;; 158 168 esac 159 169 unset system … … 173 183 while [ ${#} -gt 0 ] 174 184 do 175 case ${1} in176 -d)177 # directory for application choosen by user (see svn checkout command used)178 directory=${2}179 shift180 ;;181 -i)182 # directory for inputs choosen by user183 indir=${2}184 shift185 ;;186 -o)187 # directory for outputs choosen by user188 outdir=${2}189 shift190 ;;191 -t)192 # directory for temporary outputs choosen by user193 tempdir=${2}194 shift195 ;;196 -s)197 # directory for SAXO tools198 saxo_dir=${2}199 shift200 ;;201 -idl_cmd)202 203 204 205 ;;206 *)207 # other choice208 echo "eee : unknown option ${1}"209 echo "${usage}"210 # nb : no exit because this file should be launched by login process211 ;;212 esac213 # next flag214 shift185 case ${1} in 186 -d) 187 # directory for application choosen by user (see svn checkout command used) 188 directory=${2} 189 shift 190 ;; 191 -i) 192 # directory for inputs choosen by user 193 indir=${2} 194 shift 195 ;; 196 -o) 197 # directory for outputs choosen by user 198 outdir=${2} 199 shift 200 ;; 201 -t) 202 # directory for temporary outputs choosen by user 203 tempdir=${2} 204 shift 205 ;; 206 -s) 207 # directory for SAXO tools 208 saxo_dir=${2} 209 shift 210 ;; 211 -idl_cmd) 212 # command for idl 213 idl_cmd=${2} 214 shift 215 ;; 216 *) 217 # other choice 218 echo "eee : unknown option ${1}" 219 echo "${usage}" 220 # nb : no exit because this file should be launched by login process 221 ;; 222 esac 223 # next flag 224 shift 215 225 done 216 226 unset usage … … 219 229 if [ ! -d ${directory} ] 220 230 then 221 echo " eee : ${directory} not found"222 # nb : no exit because this file should be launched by login process231 echo " eee : ${directory} not found" 232 # nb : no exit because this file should be launched by login process 223 233 fi 224 234 # … … 226 236 if [ ! -x ${directory} ] 227 237 then 228 echo " eee : ${directory} not reachable"229 # nb : no exit because this file should be launched by login process238 echo " eee : ${directory} not reachable" 239 # nb : no exit because this file should be launched by login process 230 240 fi 231 241 # … … 241 251 if [ ${test_path} -ne 0 ] 242 252 then 243 PATH=${suppath}:${PATH}244 export PATH253 PATH=${suppath}:${PATH} 254 export PATH 245 255 else 246 # option bavarde oui/non pas encore implantée ++247 echo "${command} : iii : ${suppath} already in \${PATH}"256 # option bavarde oui/non pas encore implantée ++ 257 echo "${command} : iii : ${suppath} already in \${PATH}" 248 258 fi 249 259 unset test_path … … 256 266 if [ ${test_manpath} -ne 0 ] 257 267 then 258 MANPATH=${suppath}:${MANPATH}259 export MANPATH268 MANPATH=${suppath}:${MANPATH} 269 export MANPATH 260 270 else 261 # option bavarde oui/non pas encore implantée ++262 echo "${command} : iii : ${suppath} already in \${MANPATH}"271 # option bavarde oui/non pas encore implantée ++ 272 echo "${command} : iii : ${suppath} already in \${MANPATH}" 263 273 fi 264 274 unset test_manpath … … 270 280 if [ ! -d ${PROJECT_LOG} ] 271 281 then 272 mkdir -p ${PROJECT_LOG}273 status=${?}274 if [ ${status} -ne 0 ]275 then276 echo "${command} : eee : can not create \${PROJECT_LOG}"277 # nb : no exit because this file should be launched by login process278 else279 echo "${command} : iii : creation of \${PROJECT_LOG}"280 fi281 unset status282 mkdir -p ${PROJECT_LOG} 283 status=${?} 284 if [ ${status} -ne 0 ] 285 then 286 echo "${command} : eee : can not create \${PROJECT_LOG}" 287 # nb : no exit because this file should be launched by login process 288 else 289 echo "${command} : iii : creation of \${PROJECT_LOG}" 290 fi 291 unset status 282 292 fi 283 293 # check for permission on PROJECT_LOG 284 294 if [ ! -x ${PROJECT_LOG} ] 285 295 then 286 echo " eee : ${PROJECT_LOG} not reachable"287 # nb : no exit because this file should be launched by login process296 echo " eee : ${PROJECT_LOG} not reachable" 297 # nb : no exit because this file should be launched by login process 288 298 fi 289 299 # … … 291 301 if [ ! -w ${PROJECT_LOG} ] 292 302 then 293 echo " eee : ${PROJECT_LOG} not writable"294 # nb : no exit because this file shouldreachable be launched by login process303 echo " eee : ${PROJECT_LOG} not writable" 304 # nb : no exit because this file shouldreachable be launched by login process 295 305 fi 296 306 # … … 304 314 if [ ! -d ${PROJECT_ID} ] 305 315 then 306 mkdir -p ${PROJECT_ID}307 echo "${command} : iii : creation of \${PROJECT_ID}"316 mkdir -p ${PROJECT_ID} 317 echo "${command} : iii : creation of \${PROJECT_ID}" 308 318 fi 309 319 # check for permission on PROJECT_ID 310 320 if [ ! -x ${PROJECT_ID} ] 311 321 then 312 echo " eee : ${PROJECT_ID} not reachable"313 # nb : no exit because this file should be launched by login process322 echo " eee : ${PROJECT_ID} not reachable" 323 # nb : no exit because this file should be launched by login process 314 324 fi 315 325 # … … 325 335 if [ ! -x ${PROJECT_OD} ] 326 336 then 327 echo " eee : ${PROJECT_OD} not reachable"328 # nb : no exit because this file should be launched by login process337 echo " eee : ${PROJECT_OD} not reachable" 338 # nb : no exit because this file should be launched by login process 329 339 fi 330 340 if [ ! -w ${PROJECT_OD} ] 331 341 then 332 echo " eee : ${PROJECT_OD} not writable"333 # nb : no exit because this file should be launched by login process342 echo " eee : ${PROJECT_OD} not writable" 343 # nb : no exit because this file should be launched by login process 334 344 fi 335 345 # -
trunk/src/q2m_correction_ncdf.pro
r180 r203 69 69 ; ======== 70 70 ; 71 ; ::72 ; 73 ; yyyymmddb = 20000101L74 ; yyyymmdde = 20001231L75 ; result = q2m_correction_ncdf(yyyymmddb, yyyymmdde)76 ; print, result71 ; .. code-block:: idl 72 ; 73 ; yyyymmddb = 20000101L 74 ; yyyymmdde = 20001231L 75 ; result = q2m_correction_ncdf(yyyymmddb, yyyymmdde) 76 ; print, result 77 77 ; 78 78 ; TODO 79 79 ; ==== 80 80 ; 81 ; make it work :: 82 ; 83 ; Writing fields: 84 ; q2m[longitude,latitude,time*]=q2m_new:q2m_attr; longitude[]=lon:lon_attr; latitude[]=lat:lat_attr; time[]=timein:time_attr @ globattr 85 ; % NCDF_DIMDEF: Unable to create dimension. (NC_ERROR=-59) 86 ; % NCDF_VARDEF: Unable to define variable, bad dimension id . 87 ; % NCDF_VARPUT: Variable Inquiry failed, -1 is not a valid variable id. 88 ; % Stop encountered: Q2M_CORRECTION_NCDF 1 89 ; /.autofs/lodyc/incas/fplod/tropflux/tropflux_ws/src/q2m_correction_ncdf.pro 81 ; make it work : 82 ; 83 ; .. parsed-literal: 84 ; 85 ; Writing fields: 86 ; q2m[longitude,latitude,time*]=q2m_new:q2m_attr; longitude[]=lon:lon_attr; latitude[]=lat:lat_attr; time[]=timein:time_attr @ globattr 87 ; % NCDF_DIMDEF: Unable to create dimension. (NC_ERROR=-59) 88 ; % NCDF_VARDEF: Unable to define variable, bad dimension id . 89 ; % NCDF_VARPUT: Variable Inquiry failed, -1 is not a valid variable id. 90 ; % Stop encountered: Q2M_CORRECTION_NCDF 1 91 ; /.autofs/lodyc/incas/fplod/tropflux/tropflux_ws/src/q2m_correction_ncdf.pro 90 92 ; 91 93 ; No way ... NaNf also in this output !! … … 128 130 function q2m_correction_ncdf $ 129 131 , yyyymmddb $ 130 132 , yyyymmdde 131 133 ; 132 134 ;++compile_opt idl2, strictarrsubs, logical_predicate -
trunk/src/qsat.pro
r181 r203 15 15 ; ======== 16 16 ; 17 ; ::17 ; .. code-block:: idl 18 18 ; 19 ; T = +todo+20 ; P = +todo+21 ; result = qsat(T,P)19 ; T = +todo+ 20 ; P = +todo+ 21 ; result = qsat(T,P) 22 22 ; 23 23 ; TODO -
trunk/src/rh_to_spechum.pro
r181 r203 16 16 ; ======== 17 17 ; 18 ; ::18 ; .. code-block:: idl 19 19 ; 20 ; rh = +todo+21 ; ta = +todo+22 ; P = +todo+23 ; result = rh_to_spechum(rh,ta,P)20 ; rh = +todo+ 21 ; ta = +todo+ 22 ; P = +todo+ 23 ; result = rh_to_spechum(rh,ta,P) 24 24 ; 25 25 ; TODO -
trunk/src/sst_correction_ncdf.pro
r180 r203 77 77 ; ======== 78 78 ; 79 ; ::80 ; 81 ; yyyymmddb = 20000101L82 ; yyyymmdde = 20001231L83 ; result = sst_correction_ncdf(yyyymmddb, yyyymmdde)84 ; print, result79 ; .. code-block:: idl 80 ; 81 ; yyyymmddb = 20000101L 82 ; yyyymmdde = 20001231L 83 ; result = sst_correction_ncdf(yyyymmddb, yyyymmdde) 84 ; print, result 85 85 ; 86 86 ; TODO … … 90 90 ; reach end whithout error but with bad values (9.96921e+36 on time and sst, nb timestep 5716 91 91 ; 92 ; see commands:: 93 ; 94 ; ncks -v sst -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/TropFlux_sst_19890101_20091231.nc 95 ; 96 ; very strange value of time on lohlot1 idl6 but not always and not always at the same indices !!:: 92 ; see commands: 93 ; 94 ; .. code-block:: bash 95 ; 96 ; ncks -v sst -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/TropFlux_sst_19890101_20091231.nc 97 ; 98 ; very strange value of time on lohlot1 idl6 but not always and not always at the same indices !!: 99 ; 100 ; .. parsed-literal:: 97 101 ; 98 102 ; print, time[7080:7090] … … 101 105 ; 2454617.5 102 106 ; 103 ; while :: 104 ; 105 ; $ ncks -H -C -v time -d time,7080,7090 ${PROJECT_ID}/20c3m_erai_sstk_TROP_1989_2009.nc 106 ; time[7080]=450432 107 ; time[7081]=450456 108 ; time[7082]=450480 109 ; time[7083]=450504 110 ; time[7084]=450528 111 ; time[7085]=450552 112 ; time[7086]=450576 113 ; time[7087]=450600 114 ; time[7088]=450624 115 ; time[7089]=450648 116 ; time[7090]=450672 107 ; while : 108 ; 109 ; .. code-block:: bash 110 ; 111 ; ncks -H -C -v time -d time,7080,7090 ${PROJECT_ID}/20c3m_erai_sstk_TROP_1989_2009.nc 112 ; 113 ; .. parsed-literal:: 114 ; 115 ; time[7080]=450432 116 ; time[7081]=450456 117 ; time[7082]=450480 118 ; time[7083]=450504 119 ; time[7084]=450528 120 ; time[7085]=450552 121 ; time[7086]=450576 122 ; time[7087]=450600 123 ; time[7088]=450624 124 ; time[7089]=450648 125 ; time[7090]=450672 117 126 ; 118 127 ; and 119 ; ncks -H -C -v time -d time,7080,7090 ${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc 120 ; time[7080]=21325 121 ; time[7081]=21326 122 ; time[7082]=21327 123 ; time[7083]=9.96920996839e+36 124 ; time[7084]=9.96920996839e+36 125 ; time[7085]=9.96920996839e+36 126 ; time[7086]=9.96920996839e+36 127 ; time[7087]=9.96920996839e+36 128 ; time[7088]=9.96920996839e+36 129 ; time[7089]=21334 130 ; time[7090]=21335 131 ; 132 ; and :: 133 ; 134 ; fplod@cratos$ ncks -H -C -v time -d time,7080,7090 ${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc 135 ; time[7080]=21325 136 ; time[7081]=21326 137 ; time[7082]=21327 138 ; time[7083]=21328 139 ; time[7084]=21329 140 ; time[7085]=21330 141 ; time[7086]=21331 142 ; time[7087]=21332 143 ; time[7088]=21333 144 ; time[7089]=21334 145 ; time[7090]=21335 128 ; 129 ; .. code-block:: bash 130 ; 131 ; ncks -H -C -v time -d time,7080,7090 ${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc 132 ; 133 ; .. parsed-literal:: 134 ; 135 ; time[7080]=21325 136 ; time[7081]=21326 137 ; time[7082]=21327 138 ; time[7083]=9.96920996839e+36 139 ; time[7084]=9.96920996839e+36 140 ; time[7085]=9.96920996839e+36 141 ; time[7086]=9.96920996839e+36 142 ; time[7087]=9.96920996839e+36 143 ; time[7088]=9.96920996839e+36 144 ; time[7089]=21334 145 ; time[7090]=21335 146 ; 147 ; and : 148 ; 149 ; .. code-block:: bash 150 ; 151 ; fplod@cratos$ ncks -H -C -v time -d time,7080,7090 ${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc 152 ; 153 ; .. parsed-literal:: 154 ; 155 ; time[7080]=21325 156 ; time[7081]=21326 157 ; time[7082]=21327 158 ; time[7083]=21328 159 ; time[7084]=21329 160 ; time[7085]=21330 161 ; time[7086]=21331 162 ; time[7087]=21332 163 ; time[7088]=21333 164 ; time[7089]=21334 165 ; time[7090]=21335 146 166 ; 147 167 ; coding rules … … 219 239 ; test if ${PROJECT_OD} defined 220 240 CASE project_od_env OF 221 '' : BEGIN241 '' : BEGIN 222 242 msg = 'eee : ${PROJECT_OD} is not defined' 223 243 ras = report(msg) 224 244 return, result 225 226 ELSE: BEGIN245 END 246 ELSE: BEGIN 227 247 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 228 248 ras = report(msg) 229 230 249 END 250 ENDCASE 231 251 ; 232 252 ; check if output data will be possible … … 235 255 ; existence and protection for reading 236 256 IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 237 msg = 'eee : the directory' + iodirout + ' is not accessible.'238 ras = report(msg)239 return, result257 msg = 'eee : the directory' + iodirout + ' is not accessible.' 258 ras = report(msg) 259 return, result 240 260 ENDIF 241 261 ; … … 255 275 fullfilename = isafile(iodirout + filename, NEW=0, /MUST_EXIST) 256 276 IF fullfilename[0] EQ '' THEN BEGIN 257 msg = 'eee : the file ' + fullfilename + ' was not found.'258 ras = report(msg)259 return, result277 msg = 'eee : the file ' + fullfilename + ' was not found.' 278 ras = report(msg) 279 return, result 260 280 ENDIF 261 281 ; … … 265 285 ; in order to avoid unexpected overwritten 266 286 IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN 267 msg = 'eee : the file ' + fullfilename_out + ' already exists.'268 ras = report(msg)269 return, result287 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 288 ras = report(msg) 289 return, result 270 290 ENDIF 271 291 ; … … 296 316 ; 297 317 for jt=0,jpt-1 do begin 298 jtt=(time[jt]-julday(1,1,yea[jt])) < 364299 t=reform(sst_mean[*,*])300 sst_m[*,*,jt]=t318 jtt=(time[jt]-julday(1,1,yea[jt])) < 364 319 t=reform(sst_mean[*,*]) 320 sst_m[*,*,jt]=t 301 321 endfor 302 322 help, sst_m -
trunk/src/t2m_correction_ncdf.pro
r180 r203 75 75 ; ======== 76 76 ; 77 ; ::78 ; 79 ; yyyymmddb = 20000101L80 ; yyyymmdde = 20001231L81 ; result = t2m_correction_ncdf(yyyymmddb, yyyymmdde)82 ; print, result77 ; .. code-block:: idl 78 ; 79 ; yyyymmddb = 20000101L 80 ; yyyymmdde = 20001231L 81 ; result = t2m_correction_ncdf(yyyymmddb, yyyymmdde) 82 ; print, result 83 83 ; 84 84 ; TODO … … 86 86 ; 87 87 ; note .5 in time value ... is this correct ? do others files 88 ; present the same feature ?:: 89 ; 90 ; $ ncks -v time -d time,0,1 /usr/work/incas/fplod/tropflux_d/TropFlux_t2m_19890101_20091231.nc 88 ; present the same feature ? 89 ; 90 ; .. code-block:: bash 91 : 92 ; ncks -v time -d time,0,1 /usr/work/incas/fplod/tropflux_d/TropFlux_t2m_19890101_20091231.nc 93 ; 94 ; .. parsed-literal:: 95 ; 91 96 ; time: type NC_DOUBLE, 1 dimension, 3 attributes, chunked? no, compressed? no, packed? no, ID = 3 92 97 ; time RAM size is 7670*sizeof(NC_DOUBLE) = 7670*8 = 61360 bytes … … 107 112 ; hard coded correction values 108 113 ; 109 ; check side effect of replacement of read_ncdf by ncdf_lec :: 110 ; 111 ; Probleme d'adequation entre les tailles du domaine nx*ny*jpt 350*60*1 et du tableau 350*60*7670 114 ; check side effect of replacement of read_ncdf by ncdf_lec : 115 ; Probleme d'adequation entre les tailles du domaine nx*ny*jpt 350*60*1 et du tableau 350*60*7670 112 116 ; 113 117 ; hard coded attributes … … 171 175 ;- 172 176 function t2m_correction_ncdf $ 173 174 177 , yyyymmddb $ 178 , yyyymmdde 175 179 ; 176 180 ;++compile_opt idl2, strictarrsubs, logical_predicate -
trunk/src/test/read.py
r31 r203 28 28 ======== 29 29 30 :: 30 .. code-block:: bash 31 31 32 $read.py32 read.py 33 33 34 34 SEE ALSO … … 86 86 # controle print 87 87 print zdata.units 88 # plot 88 # plot 89 89 xlabel('xlabel+todo') 90 90 ylabel('ylabel+todo') -
trunk/src/time_axe_modif_TropFlux.pro
r181 r203 31 31 ; ======== 32 32 ; 33 ; ::33 ; .. code-block:: idl 34 34 ; 35 ; time_axe_modif_tropflux35 ; time_axe_modif_tropflux 36 36 ; 37 37 ; TODO -
trunk/src/time_axe_modif_tropflux_1d_1989_2010.pro
r181 r203 33 33 ; ======== 34 34 ; 35 ; ::35 ; .. code-block:: idl 36 36 ; 37 ; time_axe_modif_tropflux_1d_1989_201037 ; time_axe_modif_tropflux_1d_1989_2010 38 38 ; 39 39 ; TODO -
trunk/src/tropflux.pro
r181 r203 127 127 ; ======== 128 128 ; 129 ; ::130 ; 131 ; yyyymmddb = 20000101L132 ; yyyymmdde = 20001231L133 ; result = tropflux(yyyymmddb, yyyymmdde)134 ; print, result129 ; .. code-block:: idl 130 ; 131 ; yyyymmddb = 20000101L 132 ; yyyymmdde = 20001231L 133 ; result = tropflux(yyyymmddb, yyyymmdde) 134 ; print, result 135 135 ; 136 136 ; TODO … … 141 141 ; compare time between all inputs after reading 142 142 ; 143 ; make it work :: 143 ; make it work : 144 ; 145 ; .. parsed-literal:: 144 146 ; 145 147 ; % Compiled module: EXTRAPOLATE. … … 154 156 ; % Program caused arithmetic error: Floating illegal operand 155 157 ; 156 ; the incriminated line is :: 157 ; 158 ; tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(y(*,1)) & tab(ocean)=x & m=fi nite(tab) & tab=extrapolate(tab,m) & lwr(*,*,jt)=tab*msk+valmask*(1-msk) 158 ; the incriminated line is : 159 ; 160 ; .. code-block:: idl 161 ; 162 ; tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(y(*,1)) & tab(ocean)=x & m=fi nite(tab) & tab=extrapolate(tab,m) & lwr(*,*,jt)=tab*msk+valmask*(1-msk) 159 163 ; 160 164 ; to make progress I DO NOT extrapolate anymore lwr, sen and lat 161 165 ; !!!!! must be reactivated 162 166 ; 163 ; when I DO NOT extrapolate lwr, sen and lat , program end with :: 164 ; 165 ; Written to 166 ; !/usr/work/incas/fplod/tropflux_d/TropFlux_19890101_20091231_coarev3.nc 167 ; ------------------------- 168 ; % Program caused arithmetic error: Floating divide by 0 169 ; % Program caused arithmetic error: Floating underflow 170 ; % Program caused arithmetic error: Floating overflow 171 ; % Program caused arithmetic error: Floating illegal operand 167 ; when I DO NOT extrapolate lwr, sen and lat , program end with : 168 ; 169 ; .. parsed-literal:: 170 ; 171 ; Written to 172 ; !/usr/work/incas/fplod/tropflux_d/TropFlux_19890101_20091231_coarev3.nc 173 ; ------------------------- 174 ; % Program caused arithmetic error: Floating divide by 0 175 ; % Program caused arithmetic error: Floating underflow 176 ; % Program caused arithmetic error: Floating overflow 177 ; % Program caused arithmetic error: Floating illegal operand 172 178 ; 173 179 ; explain why :func:`lwdown_clark` is not used … … 175 181 ; check if K or °C in input 176 182 ; 177 ; get rid of:: 178 ; 179 ; % date 1: 19880101 is not found in the time axis. 180 ; 181 ; why :: 182 ; 183 ; da1=19880101 183 ; get rid of: 184 ; 185 ; .. parsed-literal:: 186 ; 187 ; % date 1: 19880101 is not found in the time axis. 188 ; 189 ; why : 190 ; 191 ; .. code-block:: idl 192 ; 193 ; da1=19880101 184 194 ; 185 195 ; 1st date 19890101 no ? 186 196 ; 187 ; why da1-1 (with da1=19880101) when reading gustiness file :: 188 ; 189 ; wg=read_ncdf('wg',da1-1,da2,file=fullfilename_wg,/nostr) 197 ; why da1-1 (with da1=19880101) when reading gustiness file : 198 ; 199 ; .. code-block:: idl 200 ; 201 ; wg=read_ncdf('wg',da1-1,da2,file=fullfilename_wg,/nostr) 190 202 ; 191 203 ; coding rules … … 258 270 ; 259 271 function tropflux $ 260 261 272 , yyyymmddb $ 273 , yyyymmdde 262 274 ; 263 275 compile_opt idl2, strictarrsubs, logical_predicate -
trunk/src/tropflux.sh
r191 r203 13 13 # ======== 14 14 # 15 # ::16 # 17 # $tropflux.sh [-f] -b yyyymmdd -e yyyymmdd15 # .. code-block:: bash 16 # 17 # tropflux.sh [-f] -b yyyymmdd -e yyyymmdd 18 18 # 19 19 # DESCRIPTION … … 62 62 # 63 63 # You already used :ref:`get_erai.sh` to get ERAI data, etc., 64 # during [20000101, 20000302[ and you want to produce NetCDF files:: 65 # 66 # $ tropflux.sh -b 20000101 -e 20000302 67 # 68 # A more global example:: 69 # 70 # $ tropflux.sh -b 19890101 -e 20091231 71 # 72 # And look at log file with :: 73 # 74 # $ tlogd.sh tropflux 64 # during [20000101, 20000302[ and you want to produce NetCDF files: 65 # 66 # .. code-block:: bash 67 # 68 # tropflux.sh -b 20000101 -e 20000302 69 # 70 # A more global example: 71 # 72 # .. code-block:: bash 73 # 74 # tropflux.sh -b 19890101 -e 20091231 75 # 76 # And look at log file with : 77 # 78 # .. code-block:: bash 79 # 80 # tlogd.sh tropflux 75 81 # 76 82 # and of course on files in ${PROJECT_ID}. … … 184 190 system=$(uname) 185 191 case "${system}" in 186 AIX|IRIX64)187 echo "${command} : www : no specific posix checking"188 date_cmd=date189 ;;190 Darwin)191 set -o posix192 date_cmd=gdate193 ;;194 Linux)195 set -o posix196 date_cmd=date197 ;;198 *)199 set -o posix200 ;;192 AIX|IRIX64) 193 echo "${command} : www : no specific posix checking" 194 date_cmd=date 195 ;; 196 Darwin) 197 set -o posix 198 date_cmd=gdate 199 ;; 200 Linux) 201 set -o posix 202 date_cmd=date 203 ;; 204 *) 205 set -o posix 206 ;; 201 207 esac 202 208 unset system … … 225 231 if [ ${#} -lt ${minargcount} ] 226 232 then 227 echo "${command} : eee : not enought arguments"228 echo "${usage}"229 exit 1233 echo "${command} : eee : not enought arguments" 234 echo "${usage}" 235 exit 1 230 236 fi 231 237 unset minargcount … … 233 239 while [ ${#} -gt 0 ] 234 240 do 235 case ${1} in236 -b)237 # first date to process238 yyyymmddb=${2}239 shift240 ;;241 -e)242 # last date to process243 yyyymmdde=${2}244 shift245 ;;246 -f)247 force=1248 ;;249 -h)250 echo "${usage}"251 exit 0252 ;;253 *)254 # other choice255 echo "${command} : eee : unknown option ${1}"256 echo "${usage}"257 exit 1258 ;;259 esac260 # next flag261 shift241 case ${1} in 242 -b) 243 # first date to process 244 yyyymmddb=${2} 245 shift 246 ;; 247 -e) 248 # last date to process 249 yyyymmdde=${2} 250 shift 251 ;; 252 -f) 253 force=1 254 ;; 255 -h) 256 echo "${usage}" 257 exit 0 258 ;; 259 *) 260 # other choice 261 echo "${command} : eee : unknown option ${1}" 262 echo "${usage}" 263 exit 1 264 ;; 265 esac 266 # next flag 267 shift 262 268 done 263 269 unset usage … … 312 318 if [ ${status} -ne 0 ] 313 319 then 314 echo "${command} : eee : tool ${IDL_CMD} not found"315 echo "${command} : eee : check project_profile.sh sequence"316 exit 1320 echo "${command} : eee : tool ${IDL_CMD} not found" 321 echo "${command} : eee : check project_profile.sh sequence" 322 exit 1 317 323 fi 318 324 unset status … … 322 328 if [ ! -w ${PROJECT_LOG} ] 323 329 then 324 echo "${command} : eee : ${PROJECT_LOG} not writable"325 exit 1330 echo "${command} : eee : ${PROJECT_LOG} not writable" 331 exit 1 326 332 fi 327 333 # … … 350 356 ; define overwrite status 351 357 ; set to 1 to overwrite existing files 352 project_overwrite = ${force} 358 project_overwrite = ${force} 353 359 ; define eraitype 354 360 eraitype=2 … … 356 362 result = oaflux_mask_30n30s() 357 363 IF result < 0 THEN BEGIN 358 msg = 'eee : pb after oaflux_mask_30n30s ' + string(result)359 err = report(msg)364 msg = 'eee : pb after oaflux_mask_30n30s ' + string(result) 365 err = report(msg) 360 366 exit 361 367 ENDIF 362 368 result = interp_erai_dewt(${yyyymmddb}, ${yyyymmdde}, eraitype) 363 369 IF result < 0 THEN BEGIN 364 msg = 'eee : pb after interp_erai_dewt ' + string(result)365 err = report(msg)366 exit370 msg = 'eee : pb after interp_erai_dewt ' + string(result) 371 err = report(msg) 372 exit 367 373 ENDIF 368 374 result = interp_erai_lwr(${yyyymmddb}, ${yyyymmdde}, eraitype) 369 375 IF result < 0 THEN BEGIN 370 msg = 'eee : pb after interp_erai_lwr ' + string(result)371 err = report(msg)372 exit376 msg = 'eee : pb after interp_erai_lwr ' + string(result) 377 err = report(msg) 378 exit 373 379 ENDIF 374 380 result = interp_erai_msl(${yyyymmddb}, ${yyyymmdde}, eraitype) 375 381 IF result < 0 THEN BEGIN 376 msg = 'eee : pb after interp_erai_msl ' + string(result)377 err = report(msg)378 exit382 msg = 'eee : pb after interp_erai_msl ' + string(result) 383 err = report(msg) 384 exit 379 385 ENDIF 380 386 result = interp_erai_sst(${yyyymmddb}, ${yyyymmdde}, eraitype) 381 387 IF result < 0 THEN BEGIN 382 msg = 'eee : pb after interp_erai_sst ' + string(result)383 err = report(msg)384 exit388 msg = 'eee : pb after interp_erai_sst ' + string(result) 389 err = report(msg) 390 exit 385 391 ENDIF 386 392 result = interp_erai_t2m(${yyyymmddb}, ${yyyymmdde}, eraitype) 387 393 IF result < 0 THEN BEGIN 388 msg = 'eee : pb after interp_erai_t2m ' + string(result)389 err = report(msg)390 exit394 msg = 'eee : pb after interp_erai_t2m ' + string(result) 395 err = report(msg) 396 exit 391 397 ENDIF 392 398 result = interp_erai_ws(${yyyymmddb}, ${yyyymmdde}, eraitype) 393 399 IF result < 0 THEN BEGIN 394 msg = 'eee : pb after interp_erai_ws ' + string(result)395 err = report(msg)396 exit400 msg = 'eee : pb after interp_erai_ws ' + string(result) 401 err = report(msg) 402 exit 397 403 ENDIF 398 404 result = interp_olr_30n30s(${yyyymmddb}, ${yyyymmdde}) 399 405 IF result < 0 THEN BEGIN 400 msg = 'eee : pb after interp_olr_30n30s ' + string(result)401 err = report(msg)402 exit406 msg = 'eee : pb after interp_olr_30n30s ' + string(result) 407 err = report(msg) 408 exit 403 409 ENDIF 404 410 result = d2m_to_q2m_erai(${yyyymmddb}, ${yyyymmdde}) 405 411 IF result < 0 THEN BEGIN 406 msg = 'eee : pb after d2m_to_q2m_erai ' + string(result)407 err = report(msg)408 ;++Program caused arithmetic error: Floating overflow409 ;++ Program caused arithmetic error: Floating illegal operand410 ;++exit412 msg = 'eee : pb after d2m_to_q2m_erai ' + string(result) 413 err = report(msg) 414 ;++Program caused arithmetic error: Floating overflow 415 ;++ Program caused arithmetic error: Floating illegal operand 416 ;++exit 411 417 ENDIF 412 418 result = tropflux_swr_dt(${yyyymmddb}, ${yyyymmdde}) 413 419 IF result < 0 THEN BEGIN 414 msg = 'eee : pb after tropflux_swr_dt ' + string(result)415 err = report(msg)416 exit420 msg = 'eee : pb after tropflux_swr_dt ' + string(result) 421 err = report(msg) 422 exit 417 423 ENDIF 418 424 result = tropflux_swr_nrt(${yyyymmddb}, ${yyyymmdde}) 419 425 IF result < 0 THEN BEGIN 420 msg = 'eee : pb after tropflux_swr_nrt ' + string(result)421 err = report(msg)422 exit426 msg = 'eee : pb after tropflux_swr_nrt ' + string(result) 427 err = report(msg) 428 exit 423 429 ENDIF 424 430 result = sst_correction_ncdf(${yyyymmddb}, ${yyyymmdde}) 425 431 IF result < 0 THEN BEGIN 426 msg = 'eee : pb after sst_correction_ncdf ' + string(result)427 err = report(msg)428 exit432 msg = 'eee : pb after sst_correction_ncdf ' + string(result) 433 err = report(msg) 434 exit 429 435 ENDIF 430 436 result = cronin_gustiness_ncdf(${yyyymmddb}, ${yyyymmdde}) 431 437 IF result < 0 THEN BEGIN 432 msg = 'eee : pb after cronin_gustiness_ncdf ' + string(result)433 err = report(msg)434 exit438 msg = 'eee : pb after cronin_gustiness_ncdf ' + string(result) 439 err = report(msg) 440 exit 435 441 ENDIF 436 442 result = tropflux_swr_blnd(${yyyymmddb}, ${yyyymmdde}) 437 443 IF result < 0 THEN BEGIN 438 msg = 'eee : pb after tropflux_swr_blnd ' + string(result)439 err = report(msg)440 exit444 msg = 'eee : pb after tropflux_swr_blnd ' + string(result) 445 err = report(msg) 446 exit 441 447 ENDIF 442 448 result = lwr_correction_ncdf(${yyyymmddb}, ${yyyymmdde}) 443 449 IF result < 0 THEN BEGIN 444 msg = 'eee : pb after lwr_correction_ncdf ' + string(result)445 err = report(msg)446 exit450 msg = 'eee : pb after lwr_correction_ncdf ' + string(result) 451 err = report(msg) 452 exit 447 453 ENDIF 448 454 result = q2m_correction_ncdf(${yyyymmddb}, ${yyyymmdde}) 449 455 IF result < 0 THEN BEGIN 450 msg = 'eee : pb after q2m_correction_ncdf ' + string(result)451 err = report(msg)452 exit456 msg = 'eee : pb after q2m_correction_ncdf ' + string(result) 457 err = report(msg) 458 exit 453 459 ENDIF 454 460 result = t2m_correction_ncdf(${yyyymmddb}, ${yyyymmdde}) 455 461 IF result < 0 THEN BEGIN 456 msg = 'eee : pb after t2m_correction_ncdf ' + string(result)457 err = report(msg)458 exit462 msg = 'eee : pb after t2m_correction_ncdf ' + string(result) 463 err = report(msg) 464 exit 459 465 ENDIF 460 466 result = ws_correction_ncdf(${yyyymmddb}, ${yyyymmdde}) 461 467 IF result < 0 THEN BEGIN 462 msg = 'eee : pb after ws_correction_ncdf ' + string(result)463 err = report(msg)464 exit468 msg = 'eee : pb after ws_correction_ncdf ' + string(result) 469 err = report(msg) 470 exit 465 471 ENDIF 466 472 result = tropflux(${yyyymmddb}, ${yyyymmdde}) 467 473 IF result < 0 THEN BEGIN 468 msg = 'eee : pb after tropflux' + string(result)469 err = report(msg)470 exit474 msg = 'eee : pb after tropflux' + string(result) 475 err = report(msg) 476 exit 471 477 ENDIF 472 478 result = tropflux_nrt_ncdf(${yyyymmddb}, ${yyyymmdde}) 473 479 IF result < 0 THEN BEGIN 474 msg = 'eee : pb after tropflux_nrt_ncdf' + string(result)475 err = report(msg)476 exit480 msg = 'eee : pb after tropflux_nrt_ncdf' + string(result) 481 err = report(msg) 482 exit 477 483 ENDIF 478 484 result = tropflux_wind_stress(${yyyymmddb}, ${yyyymmdde}) 479 485 IF result < 0 THEN BEGIN 480 msg = 'eee : pb after tropflux_wind_stress' + string(result)481 err = report(msg)482 exit486 msg = 'eee : pb after tropflux_wind_stress' + string(result) 487 err = report(msg) 488 exit 483 489 ENDIF 484 490 end … … 494 500 if [ ${status} -ne 0 ] 495 501 then 496 echo "${command} : eee: ${IDL_CMD} failed : ${status}" >> ${log} 2>&1497 cat ${PROJECT}/src/tropflux_${$}.pro >> ${log} 2>&1498 exit 1502 echo "${command} : eee: ${IDL_CMD} failed : ${status}" >> ${log} 2>&1 503 cat ${PROJECT}/src/tropflux_${$}.pro >> ${log} 2>&1 504 exit 1 499 505 fi 500 506 rm ${PROJECT}/src/tropflux_${$}.pro -
trunk/src/tropflux_nrt_ncdf.pro
r179 r203 64 64 ; ======== 65 65 ; 66 ; ::67 ; 68 ; yyyymmddb = 20000101L69 ; yyyymmdde = 20001231L70 ; result = tropflux_nrt_ncdf(yyyymmddb, yyyymmdde)71 ; print, result66 ; .. code-block:: idl 67 ; 68 ; yyyymmddb = 20000101L 69 ; yyyymmdde = 20001231L 70 ; result = tropflux_nrt_ncdf(yyyymmddb, yyyymmdde) 71 ; print, result 72 72 ; 73 73 ; TODO … … 116 116 ;- 117 117 function tropflux_nrt_ncdf $ 118 119 118 , yyyymmddb $ 119 , yyyymmdde 120 120 ; 121 121 compile_opt idl2, strictarrsubs, logical_predicate -
trunk/src/tropflux_swr_blnd.pro
r180 r203 71 71 ; ======== 72 72 ; 73 ; ::74 ; 75 ; yyyymmddb = 20000101L76 ; yyyymmdde = 20001231L77 ; result = tropflux_swr_blnd(yyyymmddb, yyyymmdde)78 ; print, result73 ; .. code-block:: idl 74 ; 75 ; yyyymmddb = 20000101L 76 ; yyyymmdde = 20001231L 77 ; result = tropflux_swr_blnd(yyyymmddb, yyyymmdde) 78 ; print, result 79 79 ; 80 80 ; TODO … … 83 83 ; handling date > 20071231 84 84 ; 85 ; read_ncdf usage of yyyymmddb yyyymmdde 85 ; read_ncdf usage of yyyymmddb yyyymmdde 86 86 ; 87 87 ; get rid of timegen … … 125 125 ; even if uggly and understanted SAXO strange behaviour 126 126 ; 127 ; this resolve crash on cratos idl7:: 128 ; 129 ; % Attempt to subscript SWR_DT with JT is out of range. 130 ; 131 ; line:: 127 ; this resolve crash on cratos idl7: 128 ; 129 ; .. parsed-literal:: 130 ; 131 ; % Attempt to subscript SWR_DT with JT is out of range. 132 ; 133 ; line: 134 ; 135 ; .. code-block:: idl 132 136 ; 133 137 ; for jt=0,jpt-1 do swr_merged(*,*,jt)=swr_dt(*,*,jt)*a(jt)+(1-a(jt))*swr_nrt(*,*,jt) … … 135 139 ; problably because 6938+731=7669 and not 7670 when 136 140 ; :samp:`dt=read_ncdf('swr', 19890101, 20071231, file=fullfilename_dt,/nostr)` 137 ; was used :: 141 ; was used : 142 ; .. parsed-literal:: 143 ; 138 144 ; 139 145 ; DT FLOAT = Array[350, 60, 6938] … … 142 148 ; SWR_NRT FLOAT = Array[350, 60, 7670] 143 149 ; 144 ; nb jours 19890101-20071231:: 145 ; 146 ; IDL> print, julday(12,31,2007) - julday(01, 01, 1989) +1 150 ; nb jours 19890101-20071231: 151 ; 152 ; .. code-block:: idl 153 ; 154 ; print, julday(12,31,2007) - julday(01, 01, 1989) +1 147 155 ; 6939 148 156 ; 149 157 ; et ncdump -h $PROJECT_OD/TropFlux_swr_19890101_20071231_DT.nc time = UNLIMITED ; // (6939 currently) 150 158 ; 151 ; nb jours 19890101-20091231:: 152 ; 153 ; IDL> print, julday(12,31,2009) - julday(01, 01, 1989) +1 159 ; nb jours 19890101-20091231: 160 ; 161 ; .. code-block:: idl 162 ; 163 ; print, julday(12,31,2009) - julday(01, 01, 1989) +1 154 164 ; 7670 155 165 ; 156 ; strange behaviour of read_ncdf ... see:: 157 ; 158 ; IDL> fullfilename_dt='TropFlux_swr_19890101_20071231_DT.nc' 159 ; IDL> dt=read_ncdf('swr', 19890100, 20071231, file=fullfilename_dt,/nostr) 160 ; IDL> print, 'first time step (should crash with invalid date)', jul2date(time[0]) 166 ; strange behaviour of read_ncdf ... see: 167 ; 168 ; .. code-block:: idl 169 ; 170 ; fullfilename_dt='TropFlux_swr_19890101_20071231_DT.nc' 171 ; dt=read_ncdf('swr', 19890100, 20071231, file=fullfilename_dt,/nostr) 172 ; print, 'first time step (should crash with invalid date)', jul2date(time[0]) 161 173 ; first time step (should be 19890101) 19890101. 162 ; IDL>dt=read_ncdf('swr', 19890101, 20071231, file=fullfilename_dt,/nostr)163 ; IDL>print, 'first time step (should be 19890101)', jul2date(time[0])174 ; dt=read_ncdf('swr', 19890101, 20071231, file=fullfilename_dt,/nostr) 175 ; print, 'first time step (should be 19890101)', jul2date(time[0]) 164 176 ; first time step (should be 19890101) 19890102. 165 177 ; … … 186 198 ;- 187 199 function tropflux_swr_blnd $ 188 189 200 , yyyymmddb $ 201 , yyyymmdde 190 202 ; 191 203 compile_opt idl2, strictarrsubs, logical_predicate … … 205 217 nparam = N_PARAMS() 206 218 IF (nparam NE 2) THEN BEGIN 207 ras = report(['Incorrect number of arguments.' $219 ras = report(['Incorrect number of arguments.' $ 208 220 + '!C' $ 209 221 + 'Usage : ' + usage]) 210 return, result222 return, result 211 223 ENDIF 212 224 ; 213 225 ; test if ${PROJECT_OD} defined 214 226 CASE project_od_env OF 215 '' : BEGIN227 '' : BEGIN 216 228 msg = 'eee : ${PROJECT_OD} is not defined' 217 229 ras = report(msg) 218 230 return, result 219 220 ELSE: BEGIN231 END 232 ELSE: BEGIN 221 233 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 222 234 ras = report(msg) 223 224 235 END 236 ENDCASE 225 237 ; 226 238 ; check if output data will be possible … … 229 241 ; existence and protection for reading 230 242 IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 231 msg = 'eee : the directory' + iodirout + ' is not accessible.'232 ras = report(msg)233 return, result243 msg = 'eee : the directory' + iodirout + ' is not accessible.' 244 ras = report(msg) 245 return, result 234 246 ENDIF 235 247 ; … … 249 261 fullfilename_dt = isafile(iodirout + filename_dt, NEW=0, /MUST_EXIST) 250 262 IF fullfilename_dt[0] EQ '' THEN BEGIN 251 msg = 'eee : the file ' + fullfilename_dt + ' was not found.'252 ras = report(msg)253 return, result263 msg = 'eee : the file ' + fullfilename_dt + ' was not found.' 264 ras = report(msg) 265 return, result 254 266 ENDIF 255 267 ; … … 262 274 fullfilename_nrt = isafile(iodirout + filename_nrt, NEW=0, /MUST_EXIST) 263 275 IF fullfilename_nrt[0] EQ '' THEN BEGIN 264 msg = 'eee : the file ' + fullfilename_nrt + ' was not found.'265 ras = report(msg)266 return, result276 msg = 'eee : the file ' + fullfilename_nrt + ' was not found.' 277 ras = report(msg) 278 return, result 267 279 ENDIF 268 280 ; … … 275 287 fullfilename_wg = isafile(iodirout + filename_wg, NEW=0, /MUST_EXIST) 276 288 IF fullfilename_wg[0] EQ '' THEN BEGIN 277 msg = 'eee : the file ' + fullfilename_wg + ' was not found.'278 ras = report(msg)279 return, result289 msg = 'eee : the file ' + fullfilename_wg + ' was not found.' 290 ras = report(msg) 291 return, result 280 292 ENDIF 281 293 ; … … 285 297 ; in order to avoid unexpected overwritten 286 298 IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN 287 msg = 'eee : the file ' + fullfilename_out + ' already exists.'288 ras = report(msg)289 return, result299 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 300 ras = report(msg) 301 return, result 290 302 ENDIF 291 303 ; -
trunk/src/tropflux_swr_dt.pro
r180 r203 58 58 ; ======== 59 59 ; 60 ; ::61 ; 62 ; yyyymmddb = 20000101L63 ; yyyymmdde = 20001231L64 ; result = tropflux_swr_dt(yyyymmddb, yyyymmdde)65 ; print, result60 ; .. code-block:: idl 61 ; 62 ; yyyymmddb = 20000101L 63 ; yyyymmdde = 20001231L 64 ; result = tropflux_swr_dt(yyyymmddb, yyyymmdde) 65 ; print, result 66 66 ; 67 67 ; TODO … … 126 126 ;- 127 127 function tropflux_swr_dt $ 128 129 128 , yyyymmddb $ 129 , yyyymmdde 130 130 ; 131 131 ;++compile_opt idl2, strictarrsubs, logical_predicate -
trunk/src/tropflux_swr_nrt.pro
r180 r203 13 13 ; 14 14 ; :file:`${PROJECT_OD}/TropFlux_swr_{yyyymmdd}_{yyyymmdd}_DT.nc` 15 ; containing 15 ; containing 16 16 ; Corrected swr delay on OAFLUX grid 17 17 ; has been produced by … … 64 64 ; ======== 65 65 ; 66 ; ::67 ; 68 ; yyyymmddb = 20000101L69 ; yyyymmdde = 20001231L70 ; result = tropflux_swr_nrt(yyyymmddb, yyyymmdde)71 ; print, result66 ; .. code-block:: idl 67 ; 68 ; yyyymmddb = 20000101L 69 ; yyyymmdde = 20001231L 70 ; result = tropflux_swr_nrt(yyyymmddb, yyyymmdde) 71 ; print, result 72 72 ; 73 73 ; TODO … … 128 128 ;- 129 129 function tropflux_swr_nrt $ 130 131 130 , yyyymmddb $ 131 , yyyymmdde 132 132 ; 133 133 compile_opt idl2, strictarrsubs, logical_predicate … … 155 155 ; test if ${PROJECT_OD} defined 156 156 CASE project_od_env OF 157 '' : BEGIN157 '' : BEGIN 158 158 msg = 'eee : ${PROJECT_OD} is not defined' 159 159 ras = report(msg) 160 160 return, result 161 162 ELSE: BEGIN161 END 162 ELSE: BEGIN 163 163 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 164 164 ras = report(msg) 165 166 165 END 166 ENDCASE 167 167 ; check if output data will be possible 168 168 iodirout = isadirectory(project_od_env) … … 170 170 ; existence and protection for reading 171 171 IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 172 msg = 'eee : the directory' + iodirout + ' is not accessible.'173 ras = report(msg)174 return, result172 msg = 'eee : the directory' + iodirout + ' is not accessible.' 173 ras = report(msg) 174 return, result 175 175 ENDIF 176 176 ; … … 190 190 fullfilename_swr_dt = isafile(iodirout + filename_swr_dt, NEW=0, /MUST_EXIST) 191 191 IF fullfilename_swr_dt[0] EQ '' THEN BEGIN 192 msg = 'eee : the file ' + fullfilename_swr_dt + ' was not found.'193 ras = report(msg)194 return, result192 msg = 'eee : the file ' + fullfilename_swr_dt + ' was not found.' 193 ras = report(msg) 194 return, result 195 195 ENDIF 196 196 ; … … 203 203 fullfilename_olr = isafile(iodirout + filename_olr, NEW=0, /MUST_EXIST) 204 204 IF fullfilename_olr[0] EQ '' THEN BEGIN 205 msg = 'eee : the file ' + fullfilename_olr + ' was not found.'206 ras = report(msg)207 return, result205 msg = 'eee : the file ' + fullfilename_olr + ' was not found.' 206 ras = report(msg) 207 return, result 208 208 ENDIF 209 209 ; … … 213 213 ; in order to avoid unexpected overwritten 214 214 IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN 215 msg = 'eee : the file ' + fullfilename_out + ' already exists.'216 ras = report(msg)217 return, result215 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 216 ras = report(msg) 217 return, result 218 218 ENDIF 219 219 ; … … 262 262 ; 263 263 for j=0,n2-1 do begin 264 for i=0,n1-1 do begin265 x=reform(swi[i,j,*])266 y=reform(olri[i,j,*])267 swi[i,j,*]=smooth(x,nsmooth)268 olri[i,j,*]=smooth(y,nsmooth)269 endfor264 for i=0,n1-1 do begin 265 x=reform(swi[i,j,*]) 266 y=reform(olri[i,j,*]) 267 swi[i,j,*]=smooth(x,nsmooth) 268 olri[i,j,*]=smooth(y,nsmooth) 269 endfor 270 270 endfor 271 271 ; … … 290 290 olrm=olr*0. 291 291 for jt=0,jpt-1 do begin 292 jtt=(time[jt]-julday(1,1,yea[jt])) < 364293 swm[*,*,jt]=swi[*,*,jtt]294 olrm[*,*,jt]=olri[*,*,jtt]292 jtt=(time[jt]-julday(1,1,yea[jt])) < 364 293 swm[*,*,jt]=swi[*,*,jtt] 294 olrm[*,*,jt]=olri[*,*,jtt] 295 295 endfor 296 296 ; -
trunk/src/tropflux_wind_stress.pro
r183 r203 37 37 ; tropflux_wind_stress.pro 38 38 ; * hard coded st and en replaced by yyyymmddb and yyyymmdde parameters 39 ; * add compile_opt 39 ; * add compile_opt 40 40 ; * get rid of hard coded path 41 41 ; … … 50 50 ;- 51 51 function tropflux_wind_stress $ 52 53 52 , yyyymmddb $ 53 , yyyymmdde 54 54 ; 55 55 compile_opt idl2, strictarrsubs, logical_predicate … … 128 128 ; 129 129 ncfields = 'tau[longitude,latitude,time]=tau:tau_attr; ' $ 130 131 132 133 134 135 130 +'taux[longitude,latitude,time]=taux:taux_attr; ' $ 131 +'tauy[longitude,latitude,time]=tauy:tauy_attr; ' $ 132 + 'longitude[]=xlon:lon_attr; ' $ 133 + 'latitude[]=ylat:lat_attr; ' $ 134 + 'time[*time]=time:time_attr ' $ 135 + ' @ globattr' 136 136 ; 137 137 @ncdf_quickwrite -
trunk/src/ws_correction_ncdf.pro
r180 r203 72 72 ; ======== 73 73 ; 74 ; ::75 ; 76 ; yyyymmddb = 20000101L77 ; yyyymmdde = 20001231L78 ; result = ws_correction_ncdf(yyyymmddb, yyyymmdde)79 ; print, result74 ; .. code-block:: idl 75 ; 76 ; yyyymmddb = 20000101L 77 ; yyyymmdde = 20001231L 78 ; result = ws_correction_ncdf(yyyymmddb, yyyymmdde) 79 ; print, result 80 80 ; 81 81 ; TODO … … 127 127 ;- 128 128 function ws_correction_ncdf $ 129 130 129 , yyyymmddb $ 130 , yyyymmdde 131 131 ; 132 132 ;++compile_opt idl2, strictarrsubs, logical_predicate … … 154 154 ; test if ${PROJECT_OD} defined 155 155 CASE project_od_env OF 156 '' : BEGIN156 '' : BEGIN 157 157 msg = 'eee : ${PROJECT_OD} is not defined' 158 158 ras = report(msg) 159 return, result160 161 ELSE: BEGIN159 return, result 160 END 161 ELSE: BEGIN 162 162 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 163 163 ras = report(msg) 164 164 END 165 165 ENDCASE 166 166 ; … … 170 170 ; existence and protection for reading 171 171 IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 172 msg = 'eee : the directory' + iodirout + ' is not accessible.'173 ras = report(msg)174 return, result172 msg = 'eee : the directory' + iodirout + ' is not accessible.' 173 ras = report(msg) 174 return, result 175 175 ENDIF 176 176 ; … … 194 194 fullfilename = isafile(iodirout + filename, NEW=0, /MUST_EXIST) 195 195 IF fullfilename[0] EQ '' THEN BEGIN 196 msg = 'eee : the file ' + fullfilename + ' was not found.'197 ras = report(msg)198 return, result196 msg = 'eee : the file ' + fullfilename + ' was not found.' 197 ras = report(msg) 198 return, result 199 199 ENDIF 200 200 ; … … 208 208 ; in order to avoid unexpected overwritten 209 209 IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN 210 msg = 'eee : the file ' + fullfilename_out + ' already exists.'211 ras = report(msg)212 return, result210 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 211 ras = report(msg) 212 return, result 213 213 ENDIF 214 214 ; … … 246 246 ; 247 247 for jt=0,jpt-1 do begin 248 jtt=(time[jt]-julday(1,1,yea[jt])) < 364249 q=reform(w_mean[*,*])250 w_m[*,*,jt]=q248 jtt=(time[jt]-julday(1,1,yea[jt])) < 364 249 q=reform(w_mean[*,*]) 250 w_m[*,*,jt]=q 251 251 endfor 252 252 help, w_m -
trunk/src/ws_tropflux_1d_to_1m_ncdf.pro
r181 r203 46 46 ; ======== 47 47 ; 48 ; ::49 ; 50 ; ws_tropflux_1d_to_1m_ncdf48 ; .. code-block:: idl 49 ; 50 ; ws_tropflux_1d_to_1m_ncdf 51 51 ; 52 52 ; KNOWN ISSUES -
trunk/src/x_site_location.pro
r181 r203 15 15 ; ======== 16 16 ; 17 ; ::17 ; .. code-block:: idl 18 18 ; 19 ; site = ++20 ; result = x_site_location(site)19 ; site = ++ 20 ; result = x_site_location(site) 21 21 ; 22 22 ; SEE ALSO -
trunk/src/y_site_location.pro
r181 r203 15 15 ; ======== 16 16 ; 17 ; ::17 ; .. code-block:: idl 18 18 ; 19 ; site = ++20 ; result = y_site_location(site)19 ; site = ++ 20 ; result = y_site_location(site) 21 21 ; 22 22 ; SEE ALSO
Note: See TracChangeset
for help on using the changeset viewer.