- Timestamp:
- 08/12/11 12:25:19 (13 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/TropFlux_19890101_20091231.pro
r77 r81 92 92 ; ==== 93 93 ; 94 ; I (fp) do not know how95 ; ${PROJECT_OD}/TropFlux_swr_19890101_20091231_BLND.nc is produced.94 ; no ${PROJECT_OD}/TropFlux_swr_19890101_20091231_BLND.nc yet because of pb in 95 ; TropFlux_swr_BLND_19890101_20091231.pro 96 96 ; 97 97 ; avoid mix lower/uppercase in pro name to avoid compile … … 107 107 ; EVOLUTIONS 108 108 ; ========== 109 ; 110 ; $Id 111 ; 112 ; $URL$ 109 113 ; 110 114 ; - fplod 20110809T110911Z aedon.locean-ipsl.upmc.fr (Darwin) -
trunk/src/TropFlux_NRT_ncdf.pro
r78 r81 54 54 ; EVOLUTIONS 55 55 ; ========== 56 ; 57 ; $Id$ 58 ; 59 ; $URL$ 56 60 ; 57 61 ; - fplod 20110809T133815Z cratos (Linux) -
trunk/src/TropFlux_swr_BLND_19890101_20091231.pro
r78 r81 7 7 ; ======================================= 8 8 ; 9 ; DESCRIPTION 10 ; =========== 11 ; 9 12 ; :file:`${PROJECT_OD}/TropFlux_swr_19890101_20071231_DT.nc` 10 13 ; containing ++ … … 22 25 ; if this file not already exists. 23 26 ; 24 ; This file will be used by :ref:`TropFlux_ 19890101_20091231.pro`.27 ; This file will be used by :ref:`TropFlux_NRT_cfd.pro`. 25 28 ; 26 29 ; .. graphviz:: 27 30 ; 28 31 ; digraph tropflux_swr_blnd_19890101_20091231 { 29 ; graph [30 ; rankdir="LR",31 ; ]32 32 ; 33 33 ; file_dt [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20071231_DT.nc"]; … … 49 49 ; ======== 50 50 ; 51 ; :ref:`project_profile.sh` 52 ; 53 ; :ref:`mooring_corrections` 54 ; 55 ; :ref:`data_in_swr` 56 ; 51 57 ; :func:`initncdf <saxo:initncdf>` 52 58 ; :func:`read_ncdf <saxo:read_ncdf>` … … 54 60 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 55 61 ; 62 ; :ref:`Tropflux_NRT_cdf.pro` 63 ; 56 64 ; EXAMPLES 57 65 ; ======== … … 62 70 ; IDL> tropflux_swr_blnd_19890101_20091231 63 71 ; 64 ;65 72 ; TODO 66 73 ; ==== 67 74 ; 75 ; resolve crash on cratos idl7:: 76 ; 77 ; % Attempt to subscript SWR_DT with JT is out of range. 78 ; 79 ; line:: 80 ; 81 ; for jt=0,jpt-1 do swr_merged(*,*,jt)=swr_dt(*,*,jt)*a(jt)+(1-a(jt))*swr_nrt(*,*,jt) 82 ; 68 83 ; avoid mix lower/uppercase in pro name to avoid compile 69 84 ; … … 86 101 ; EVOLUTIONS 87 102 ; ========== 103 ; 104 ; $Id$ 105 ; 106 ; $URL$ 88 107 ; 89 108 ; - fplod 20110809T115747Z aedon.locean-ipsl.upmc.fr (Darwin) -
trunk/src/TropFlux_swr_DT_19890101_20071231.pro
r78 r81 7 7 ; ===================================== 8 8 ; 9 ; DESCRIPTION 10 ; =========== 11 ; 12 ; Correction of swr delay time on OAFLUX grid 13 ; 14 ; :file:`${PROJECT_OD}/swr_oafluxgrid_1985_2007.nc` 15 ; have been produced ++by pk 16 ; 17 ; Corrected swr delay on OAFLUX grid 18 ; is written in 19 ; :file:`${PROJECT_OD}/TropFlux_swr_19890101_20071231_DT.nc` 20 ; if this file not already exists. 21 ; 22 ; This file will be used by :ref:`TropFlux_swr_BLND_19890101_20091231.pro`. 9 23 ; 10 24 ; .. graphviz:: 11 25 ; 12 26 ; digraph tropflux_swr_dt_19890101_20071231 { 13 ; graph [ 14 ; rankdir="LR", 15 ; ] 16 ; 17 ; file_swr [shape=ellipse,fontname=Courier,label="/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc"]; 18 ; 19 ; ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc"]; 27 ; 28 ; file_in [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/swr_oafluxgrid_1985_2007.nc"]; 29 ; file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20071231_DT.nc"]; 20 30 ; 21 31 ; tropflux_swr_dt_19890101_20071231 [shape=box, … … 25 35 ; label="${PROJECT}/src/TropFlux_swr_DT_19890101_20071231.pro"]; 26 36 ; 27 ; {file_ swr}-> {tropflux_swr_dt_19890101_20071231} -> {ncfile}37 ; {file_in}-> {tropflux_swr_dt_19890101_20071231} -> {file_out} 28 38 ; 29 39 ; } … … 31 41 ; SEE ALSO 32 42 ; ======== 43 ; 44 ; :ref:`project_profile.sh` 45 ; 46 ; :ref:`mooring_corrections` 47 ; 48 ; :ref:`data_in_swr` 33 49 ; 34 50 ; :func:`initncdf <saxo:initncdf>` … … 44 60 ; :: 45 61 ; 62 ; IDL> .compile TropFlux_swr_DT_19890101_20071231 46 63 ; IDL> tropflux_swr_dt_19890101_20071231 47 64 ; … … 49 66 ; ==== 50 67 ; 51 ; hard coded directory - usage of ${PROJECT_ID}68 ; NaNf values in ouptut file while 1.e20 in input file !! 52 69 ; 53 70 ; coding rules 54 71 ; 55 ; change the name to swr_dt_correction_ndcf.pro 72 ; why compile is needed ? uppercase in file name 73 ; 74 ; any way change the name to swr_dt_correction_ndcf.pro 75 ; to homogenize names of tools 76 ; 77 ; use the output of concat_swr.sh to be written. 78 ; now use swr_oafluxgrid_1985_2007.nc provided by pk 20110811 79 ; 80 ; KNOWN ISSUES 81 ; ============ 82 ; 83 ; test of existence of fullfilename not very efficient because 84 ; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented 56 85 ; 57 86 ; EVOLUTIONS 58 87 ; ========== 59 88 ; 89 ; $Id$ 90 ; 91 ; $URL$ 92 ; 93 ; - fplod 20110812T073138Z aedon.locean-ipsl.upmc.fr (Darwin) 94 ; 95 ; * usage of ${PROJECT_OD} 96 ; * complete description 97 ; * remove v50 in output filename 98 ; 60 99 ; - fplod 20101215T091726Z aedon.locean-ipsl.upmc.fr (Darwin) 61 100 ; … … 72 111 ;- 73 112 pro TropFlux_swr_DT_19890101_20071231 74 @common 75 file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc' 76 initncdf, file 77 78 sw=read_ncdf("swr", 19890101, 20071231, file=file,/nostr) 113 ; 114 @cm_4cal 115 @cm_4data 116 @cm_4mesh 117 @cm_4data 118 @cm_project 119 ; 120 ; test if ${PROJECT_OD} defined 121 CASE project_od_env OF 122 '' : BEGIN 123 msg = 'eee : ${PROJECT_OD} is not defined' 124 ras = report(msg) 125 STOP 126 END 127 ELSE: BEGIN 128 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 129 ras = report(msg) 130 END 131 ENDCASE 132 ; 133 ; check if output data will be possible 134 iodirout = isadirectory(project_od_env) 135 ; 136 ; existence and protection for reading 137 IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 138 msg = 'eee : the directory' + iodirout + ' is not accessible.' 139 ras = report(msg) 140 STOP 141 ENDIF 142 ; 143 ; existence and protection for writing 144 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 145 msg = 'eee : the directory' + iodirout + ' was not found.' 146 ras = report(msg) 147 STOP 148 ENDIF 149 ; 150 ; build data filename 151 filename='swr_oafluxgrid_1985_2007.nc' 152 ; 153 ; check if this file exists 154 msg='iii : looking for ' + filename 155 ras = report(msg) 156 fullfilename = isafile(iodirout + filename, NEW=0, /MUST_EXIST) 157 IF fullfilename[0] EQ '' THEN BEGIN 158 msg = 'eee : the file ' + fullfilename + ' was not found.' 159 ras = report(msg) 160 STOP 161 ENDIF 162 ; 163 ; build output filename 164 filename_out = 'TropFlux_swr_19890101_20071231_DT.nc' 165 fullfilename_out = iodirout + filename_out 166 ; in order to avoid unexpected overwritten 167 IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 168 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 169 ras = report(msg) 170 STOP 171 ENDIF 172 ; 173 initncdf, filename 174 175 sw=read_ncdf("swr", 19890101, 20071231, file=filename,/nostr) 79 176 help, sw 80 177 … … 107 204 time=time-julday(1,1,1950) & jpt=n_elements(time) 108 205 109 ncfile='! /Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc'206 ncfile='!' + fullfilename_out 110 207 lon_attr={units:'degrees_east',long_name:'Longitude'} 111 208 lat_attr={units:'degrees_north',long_name:'Latitude'} … … 114 211 globattr={source:'Obtained from ISCCP. Corrections has been done on mean bias and variability',timerange:cda0+' - '+cda1} 115 212 116 117 213 ncfields = 'swr[longitude,latitude,time]=swr:sw_attr; ' $ 118 214 + 'longitude[]=lon:lon_attr; ' $ -
trunk/src/TropFlux_swr_NRT_19890101_20091231.pro
r78 r81 7 7 ; ====================================== 8 8 ; 9 ; DESCRITION 10 ; ========== 11 ; 12 ; Correction of swr near real time on OAFLUX grid 13 ; 14 ; Corrected swr delay on OAFLUX grid 15 ; has been produced by 16 ; :file:`${PROJECT_OD}/TropFlux_swr_19890101_20071231_DT.nc` 17 ; 18 ; :file:`${PROJECT_OD}/olr_oafluxgrid_30n30s_19890101_20091231.nc` 19 ; have been produced ++by pk 20 ; 21 ; Corrected swr near real time on OAFLUX grid 22 ; ; is written in 23 ; :file:`${PROJECT_OD}/TropFlux_swr_19890101_20091231_NRT.nc` 24 ; if this file not already exists. 25 ; 26 ; This file will be used by :ref:`TropFlux_swr_BLND_19890101_20091231.pro`. 9 27 ; 10 28 ; .. graphviz:: 11 29 ; 12 30 ; digraph tropflux_swr_nrt_19890101_200912311 { 13 ; graph [ 14 ; rankdir="LR", 15 ; ] 16 ; file_sw [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc"]; 17 ; file_olr [shape=ellipse,fontname=Courier,label="/Users/pkb/data/heat_budget/NOAA_OLR/olr_oafluxgrid_30n30s_19890101_20091231.nc"]; 18 ; ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"]; 31 ; 32 ; file_swr_dt [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20071231_DT.nc"]; 33 ; file_olr [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/olr_oafluxgrid_30n30s_19890101_20091231.nc"]; 34 ; file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20091231_NRT.nc"]; 19 35 ; 20 36 ; tropflux_swr_nrt_19890101_200912311 [shape=box, … … 24 40 ; label="${PROJECT}/src/TropFlux_swr_NRT_19890101_200912311.pro"]; 25 41 ; 26 ; {file_sw file_olr}-> {tropflux_swr_nrt_19890101_200912311} -> {ncfile}42 ; {file_swr_dt file_olr}-> {tropflux_swr_nrt_19890101_200912311} -> {file_out} 27 43 ; } 28 44 ; 29 45 ; SEE ALSO 30 46 ; ======== 47 ; 48 ; :ref:`project_profile.sh` 49 ; 50 ; :ref:`mooring_corrections` 51 ; 52 ; :ref:`data_in_swr` 53 ; :ref:`data_in_olr` 31 54 ; 32 55 ; :func:`initncdf <saxo:initncdf>` … … 40 63 ; :: 41 64 ; 65 ; IDL> .compile TropFlux_swr_NRT_19890101_20091231 42 66 ; IDL> tropflux_swr_nrt_19890101_20091231 43 67 ; … … 45 69 ; ==== 46 70 ; 47 ; hard coded directory - usage of ${PROJECT_ID} 71 ; remove NaNf values in ouptut file (may be not because of this module) 72 ; 73 ; why two sequence initcdf et read_ndcf on olr file ? 48 74 ; 49 75 ; coding rules 50 76 ; 77 ; why compile is needed ? uppercase in file name 78 ; 51 79 ; change the name to swr_nrt_correction_ncdf.pro 80 ; to homogenize names of tools 81 ; 82 ; KNOWN ISSUES 83 ; ============ 84 ; 85 ; test of existence of fullfilename not very efficient because 86 ; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented 52 87 ; 53 88 ; EVOLUTIONS 54 89 ; ========== 55 90 ; 91 ; $Id$ 92 ; 93 ; $URL$ 94 ; 95 ; - fplod 20110812T075406Z aedon.locean-ipsl.upmc.fr (Darwin) 96 ; 97 ; * usage of ${PROJECT_OD} 98 ; * complete description 99 ; * remove v50 in filenames 100 ; 56 101 ; - fplod 20101215T092145Z aedon.locean-ipsl.upmc.fr (Darwin) 57 102 ; … … 68 113 ;- 69 114 pro TropFlux_swr_NRT_19890101_20091231 70 @common 71 file='/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc' 72 initncdf, file 73 sw=read_ncdf("swr", 19890101, 20071231, file=file,/nostr) 115 ; 116 @cm_4cal 117 @cm_4data 118 @cm_4mesh 119 @cm_4data 120 @cm_project 121 ; 122 ; test if ${PROJECT_OD} defined 123 CASE project_od_env OF 124 '' : BEGIN 125 msg = 'eee : ${PROJECT_OD} is not defined' 126 ras = report(msg) 127 STOP 128 END 129 ELSE: BEGIN 130 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 131 ras = report(msg) 132 END 133 ENDCASE 134 ; check if output data will be possible 135 iodirout = isadirectory(project_od_env) 136 ; 137 ; existence and protection for reading 138 IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 139 msg = 'eee : the directory' + iodirout + ' is not accessible.' 140 ras = report(msg) 141 STOP 142 ENDIF 143 ; 144 ; existence and protection for writing 145 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 146 msg = 'eee : the directory' + iodirout + ' was not found.' 147 ras = report(msg) 148 STOP 149 ENDIF 150 ; 151 ; build swr dt data filename 152 filename_swr_dt='TropFlux_swr_19890101_20071231_DT.nc' 153 ; 154 ; check if this file exists 155 msg='iii : looking for ' + filename_swr_dt 156 ras = report(msg) 157 fullfilename_swr_dt = isafile(iodirout + filename_swr_dt, NEW=0, /MUST_EXIST) 158 IF fullfilename_swr_dt[0] EQ '' THEN BEGIN 159 msg = 'eee : the file ' + fullfilename_swr_dt + ' was not found.' 160 ras = report(msg) 161 STOP 162 ENDIF 163 ; 164 ; build olr data filename 165 filename_olr='olr_oafluxgrid_30n30s_19890101_20091231.nc' 166 ; 167 ; check if this file exists 168 msg='iii : looking for ' + filename_olr 169 ras = report(msg) 170 fullfilename_olr = isafile(iodirout + filename_olr, NEW=0, /MUST_EXIST) 171 IF fullfilename_olr[0] EQ '' THEN BEGIN 172 msg = 'eee : the file ' + fullfilename_olr + ' was not found.' 173 ras = report(msg) 174 STOP 175 ENDIF 176 ; 177 ; build output filename 178 filename_out = 'TropFlux_swr_19890101_20091231_NRT.nc' 179 fullfilename_out = iodirout + filename_out 180 ; in order to avoid unexpected overwritten 181 IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 182 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 183 ras = report(msg) 184 STOP 185 ENDIF 186 ; 187 initncdf, fullfilename_swr_dt 188 sw=read_ncdf("swr", 19890101, 20071231, file=fullfilename_swr_dt,/nostr) 74 189 75 190 swi=sw 76 file_olr='/Users/pkb/data/heat_budget/NOAA_OLR/olr_oafluxgrid_30n30s_19890101_20091231.nc' 77 78 initncdf,file_olr 79 olr=read_ncdf('olr',19890100, 20071231,file=file_olr,/nost) 191 192 initncdf, fullfilename_olr 193 olr=read_ncdf('olr',19890100, 20071231, file=fullfilename_olr,/nost) 80 194 81 195 help, sw, olr … … 108 222 help, swi 109 223 110 initncdf, f ile_olr111 olr=read_ncdf('olr', 19890100, 20091231, box=box, file=f ile_olr,/nostr)224 initncdf, fullfilename_olr 225 olr=read_ncdf('olr', 19890100, 20091231, box=box, file=fullfilename_olr,/nostr) 112 226 tt=time & jpt=n_elements(time) 113 227 caldat, time,mon,day,yea … … 132 246 time=time-julday(1,1,1950) & jpt=n_elements(time) 133 247 134 ncfile='! /Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc'248 ncfile='!' + fullfilename_out 135 249 lon_attr={units:'degrees_east',long_name:'Longitude'} 136 250 lat_attr={units:'degrees_north',long_name:'Latitude'} -
trunk/src/cor30a.pro
r74 r81 7 7 ; .. function:: cor30a(u,us,ts,t,Qs,Q,Rs,Rl,rain,zi,P,zu,zt,zq,lat,jcool,jwave,twave,hwave) 8 8 ; 9 ; DESCRIPTION 10 ; =========== 9 11 ; 10 12 ; COARE v3 algorithm to compute fluxes … … 74 76 ; coding rules 75 77 ; 78 ; check for the new module provide by pk 20110811 by mail to fp 79 ; "You can use this coare algorithm in your depositary. It is same as the one you 80 ; have, but with some functions activated, which will be useful in the next stage." 81 ; 76 82 ; EVOLUTIONS 77 83 ; ========== 84 ; 85 ; $Id$ 86 ; 87 ; $URL$ 78 88 ; 79 89 ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) -
trunk/src/cronin_gustiness_ncdf.pro
r72 r81 23 23 ; 24 24 ; digraph cronin_gustiness_ncdf { 25 ; graph [26 ; rankdir="LR",27 ; ]28 25 ; 29 26 ; file_in [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_sst_19890101_20091231.nc"]; … … 74 71 ; EVOLUTIONS 75 72 ; ========== 73 ; 74 ; $Id$ 75 ; 76 ; $URL$ 76 77 ; 77 78 ; - fplod 20110808T144208Z aedon.locean-ipsl.upmc.fr (Darwin) -
trunk/src/get_olr.sh
r50 r81 6 6 # .. _get_olr.sh: 7 7 # 8 # ========== =======================================9 # get_olr.sh -- get OLR interpolated reference file10 # ========== =======================================8 # ========== 9 # get_olr.sh 10 # ========== 11 11 # 12 12 # SYNOPSIS … … 25 25 # ======== 26 26 # 27 # :ref:` guide data OLR <data_in_olr>`27 # :ref:`data_in_olr` 28 28 # 29 29 # :ref:`get_olrnint.sh` … … 32 32 # ==== 33 33 # 34 # trace 35 # 36 # hard coded directory - usage of ${PROJECT_ID} 34 # homogenize with get_oaflux.sh for trace, environnement and so on 37 35 # 38 36 # coding rules … … 40 38 # EVOLUTIONS 41 39 # ========== 40 # 41 # - fplod 20110812T092412Z aedon.locean-ipsl.upmc.fr (Darwin) 42 # 43 # * usage of ${PROJECT_ID} 42 44 # 43 45 # - fplod 20101213T155858Z aedon.locean-ipsl.upmc.fr (Darwin) … … 50 52 # 51 53 #- 52 DIR_DATA='/Users/jv/data/OLR/'53 54 54 cd $DIR_DATA 55 56 mv olr.day.mean.nc olr.day.mean.nc.old 57 58 wget ftp://ftp.cdc.noaa.gov/Datasets/interp_OLR/olr.day.mean.nc 55 wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 56 ftp://ftp.cdc.noaa.gov/Datasets/interp_OLR/olr.day.mean.nc 59 57 60 58 #ftp -n <<@DELIM … … 68 66 #@DELIM 69 67 70 ls -l 71 68 exit 0 -
trunk/src/get_swr.sh
r80 r81 2 2 #+ 3 3 # 4 # .. program:: get_ rama_netcdf.sh5 # 6 # .. _get_ rama_netcdf.sh:7 # 8 # ========== ====================================9 # get_ rama_netcdf.sh -- get RAMA reference files10 # ========== ====================================4 # .. program:: get_swr.sh 5 # 6 # .. _get_swr.sh: 7 # 8 # ========== 9 # get_swr.sh 10 # ========== 11 11 # 12 12 # SYNOPSIS … … 15 15 # :: 16 16 # 17 # $ get_ rama_netcdf.sh17 # $ get_swr.sh 18 18 # 19 19 # DESCRIPTION 20 20 # =========== 21 21 # 22 # ``get_rama_netcdf.sh`` get RAMA reference files 23 # 24 # bf 25 # buoyancy flux 26 # d 27 # sigma-theta 28 # dyn 29 # dynamic height 30 # emp 31 # e-p 32 # iso 33 # 20C depth 34 # met 35 # wind (u,v,speed,direction), airT, hum rel, SST (= w + airt + rh) 36 # pos 37 # lon, lat 38 # rad 39 # shortwave down 40 # rf 41 # rain heat flux 42 # w 43 # wind 44 # 45 # Log file is written on :file:`${PROJECT_LOG}/get_rama_netcdf.log.{YYYYMMDDTHHMMSSZ}` 22 # ``get_swr.sh`` get SWR reference files. 23 # 24 # Log file is written on :file:`${PROJECT_LOG}/get_swr.log.{YYYYMMDDTHHMMSSZ}` 46 25 # 47 26 # .. graphviz:: 48 27 # 49 # digraph get_ rama_netcdf{28 # digraph get_swr { 50 29 # graph [ 51 30 # rankdir="TB", 52 31 # ] 53 32 # 54 # rama_ref [shape=diamond,fontname=Courier,label="ftp://ftp.pmel.noaa.gov/cdf/sites/daily/*_*_dy.cdf"];55 # 56 # file_ rama [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/*_*_dy.cdf"];57 # 58 # get_ rama_netcdf[shape=box,33 # swr_ref [shape=diamond,fontname=Courier,label="ftp://ftp.whoi.edu/pub/science/oaflux/data_v3/daily/radiation_1985-2007/sw_icssp_yyyy.nc.gz"]; 34 # 35 # file_swr [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/sw_icssp_yyyy.nc"]; 36 # 37 # get_swr [shape=box, 59 38 # fontname=Courier, 60 39 # color=blue, 61 # URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/get_ rama_netcdf.sh"62 # label="${PROJECT}/src/get_ rama_netcdf.sh"];63 # 64 # { rama_ref} -> {get_rama_netcdf} -> {file_rama}40 # URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/get_swr.sh" 41 # label="${PROJECT}/src/get_swr.sh"]; 42 # 43 # {swr_ref} -> {get_swr} -> {file_swr} 65 44 # 66 45 # } … … 71 50 # You don't have any RAMA reference data, you just have to run this tool :: 72 51 # 73 # $ get_ rama_netcdf.sh52 # $ get_swr.sh 74 53 # 75 54 # And look at log file with :: 76 55 # 77 # $ tlogd.sh get_ rama_netcdf56 # $ tlogd.sh get_swr 78 57 # 79 58 # and of course on files in ${PROJECT_ID}. … … 82 61 # ======== 83 62 # 84 # :ref:` guide data RAMA <data_in_rama>`63 # :ref:`data_in_swr` 85 64 # 86 65 # :ref:`project_profile.sh` … … 89 68 # ==== 90 69 # 91 # list of variables and sites in DESCRIPTION 92 # 93 # do we really need all these variables and sites 94 # 95 # Liste complète de RAMA:: 96 # 97 # sitelist=" 16s55e 12s55e 8s55e 4s55e 1.5s55e 0n55e 1.5n55e 4n55e" 98 # sitelist="${sitelist} 15n65e" 99 # sitelist="${sitelist} 12s67e 8s67e 4s67e 1.5s67e 0n67e 1.5n67e 4n67e 8n67e" 100 # sitelist="${sitelist} 16s80.5e 12s80.5e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 4n80.5e" 101 # sitelist="${sitelist} 1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 102 # sitelist="${sitelist} 16s95e 12s95e 8s95e 5s95e" 70 # complete description 71 # 72 # Eventually: we should retrieve them from ISCCP page 73 # (ftp://isccp.giss.nasa.gov/pub/data/FC/ ) and interpolate them we need FD${YYYY}${MM}__${SS}${FF}SFC.EQ files where: 74 # 75 # - YYYY and MM are year and month 76 # - SS is LW (longwave) and SW (shortwave) 103 77 # 104 78 # study wget status (no exit now on non null wget status) 79 # 80 # chain to concatenation and geobox reduction .. and rename sw\_ to swr file 81 # variable name ?? to swr 105 82 # 106 83 # EVOLUTIONS … … 109 86 # $Id$ 110 87 # 111 # - fplod 20110421T133632Z aedon.locean-ipsl.upmc.fr (Darwin) 112 # 113 # * consolidation 114 # 115 # - fplod 20101213T160928Z aedon.locean-ipsl.upmc.fr (Darwin) 116 # 117 # * minimal header 118 # 119 # - jv 2008 88 # $URL$ 89 # 90 # - fplod 20110811T153513Z aedon.locean-ipsl.upmc.fr (Darwin) 120 91 # 121 92 # * creation … … 126 97 AIX|IRIX64) 127 98 echo "www : no specific posix checking" 99 date_cmd=date 100 ;; 101 Darwin) 102 set -o posix 103 date_cmd=gdate 104 ;; 105 Linux) 106 set -o posix 107 date_cmd=date 128 108 ;; 129 109 *) … … 195 175 echo "" 1>> ${log} 196 176 # 197 varlist="adcp airt bf bp cur d dyn emp evap heat iso lw lwnet met pos qlat qnet qsen rad rain rf rh s ssd sss sst swnet t tau w" 198 # 199 sitelist="12s55e 8s55e 8s67e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 5s95e" 200 201 # 202 #Liste complète de RAMA: 203 #sitelist=" 16s55e 12s55e 8s55e 4s55e 1.5s55e 0n55e 1.5n55e 4n55e" 204 #sitelist="${sitelist} 15n65e" 205 #sitelist="${sitelist} 12s67e 8s67e 4s67e 1.5s67e 0n67e 1.5n67e 4n67e 8n67e" 206 #sitelist="${sitelist} 16s80.5e 12s80.5e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 4n80.5e" 207 #sitelist="${sitelist} 1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 208 #sitelist="${sitelist} 16s95e 12s95e 8s95e 5s95e" 209 # 210 # 211 locref="ftp://ftp.pmel.noaa.gov/cdf/sites/daily" 177 yearmin=1985 178 yearmax=2007 179 # 180 varlist="sw" 181 # 182 locref="ftp://ftp.whoi.edu/pub/science/oaflux/data_v3/daily/radiation_1985-2007/" 212 183 # 213 184 list_url="" 214 185 # 215 # build URL = f(site,var) 216 for site in ${sitelist} 186 # build URL = f(year,var) 187 yyyy=${yearmin} 188 while [ ${yyyy} -le ${yearmax} ] 217 189 do 218 190 for var in ${varlist} 219 191 do 220 list_url="${list_url} ${locref}/${var} ${site}_dy.cdf"192 list_url="${list_url} ${locref}/${var}_isccp_${yyyy}.nc.gz" 221 193 done 194 unset var 195 yyyy=$(( ${yyyy} + 1 )) 222 196 done 223 unset site224 unset var225 197 unset varlist 226 unset sitelist227 198 unset locref 228 199 # 229 # if file is not already in ${PROJECT_ID}, get it200 # if file_gz is not already in ${PROJECT_ID}, get it 230 201 for url in ${list_url} 231 202 do 232 file=${PROJECT_ID}/$(basename ${url}) 203 file_gz=${PROJECT_ID}/$(basename ${url}) 204 file=${PROJECT_ID}/$(basename ${file_gz} .gz) 233 205 if [ ! -f ${file} ] 234 206 then 235 wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 236 --user=taopmelftp \ 237 --password=G10b@LCh@Ng3 \ 238 ${url} >> ${log} 2>&1 239 wget_status=${?} 240 if [ ${wget_status} -ne 0 ] 241 then 242 echo "${command} : eee : ${url} not found" >> ${log} 2>&1 243 # ++ exit 1 244 else 245 echo "${command} : iii : ${url} found" >> ${log} 2>&1 246 fi 247 unset wget_status 248 else 249 echo "iii : ${file} exists" >> ${log} 250 fi 207 if [ ! -f ${file_gz} ] 208 then 209 wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 210 ${url} >> ${log} 2>&1 211 wget_status=${?} 212 if [ ${wget_status} -ne 0 ] 213 then 214 echo "${command} : eee : ${url} not found" >> ${log} 2>&1 215 # ++ exit 1 216 else 217 echo "${command} : iii : ${url} found" >> ${log} 2>&1 218 fi 219 unset wget_status 220 else 221 echo "iii : ${file_gz} exists" >> ${log} 222 gunzip -c ${file_gz} > ${file} 223 fi 224 else 225 echo "iii : ${file} exists" >> ${log} 226 fi 251 227 done 228 unset file_gz 252 229 unset file 253 230 unset url -
trunk/src/interp_olr_30n30s_1989_2009.pro
r78 r81 7 7 ; =============================== 8 8 ; 9 ; DESCRIPTION 10 ; =========== 11 ; 12 ; Interpolation of OLR to OAFLUX grid 13 ; 14 ; :file:`${PROJECT_ID}/olr.day.mean.nc` 15 ; have been produced by 16 ; :ref:`get_olr.sh` 17 ; 18 ; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` containing OAFLUX grid 19 ; have been produced by 20 ; :ref:`oaflux_mask_30N30S.pro`. 21 ; 22 ; Interpolated OLR is written in 23 ; :file:`${PROJECT_OD}/${PROJECT_OD}/olr_oafluxgrid_30n30s_19890101_20091231.nc` 24 ; if this file not already exists. 25 ; 26 ; This output file will be used by 27 ; :ref:`TropFlux_swr_NRT_19890101_20091231.pro`. 28 ; 9 29 ; .. graphviz:: 10 30 ; 11 31 ; digraph interp_olr_30n30s_1989_2009{ 12 ; graph [ 13 ; rankdir="LR", 14 ; ] 15 ; file_in [shape=ellipse,fontname=Courier,label="/Users/pkb/data/heat_budget/NOAA_OLR/new/olr.day.mean_new.nc"]; 16 ; 32 ; 33 ; file_in [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/olr.day.mean_new.nc"]; 17 34 ; mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 18 ; 19 ; ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/heat_budget/NOAA_OLR/newolr_oafluxgrid_30n30s_19890101_20091231.nc"]; 35 ; file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/olr_oafluxgrid_30n30s_19890101_20091231.nc"]; 20 36 ; 21 37 ; interp_olr_30n30s_1989_2009 [shape=box, … … 25 41 ; label="${PROJECT}/src/interp_olr_30n30s_1989_2009.pro"]; 26 42 ; 27 ; {file_in mask} -> {interp_olr_30n30s_1989_2009} -> { ncfile}43 ; {file_in mask} -> {interp_olr_30n30s_1989_2009} -> {file_out} 28 44 ; 29 45 ; } … … 33 49 ; 34 50 ; :ref:`project_profile.sh` 51 ; 52 ; :ref:`interpolate_data` 53 ; 54 ; :ref:`data_in_olr`, :ref:`get_olr.sh` 35 55 ; 36 56 ; :func:`report <saxo:report>` … … 48 68 ; :: 49 69 ; 70 ; IDL> .compile file_interp 50 71 ; IDL> interp_olr_30n30s_1989_2009 51 72 ; … … 53 74 ; ==== 54 75 ; 55 ; hard coded directory - usage of ${PROJECT_ID} 76 ; how can we avoid this message :: 77 ; 78 ; % initncdf: the zaxis was not found..., check the use of ZAXISNAME keyword if you want to find one... 79 ; 80 ; I think we do not need any zaxis 81 ; 82 ; strange second value (1) in the file produced on cratos idl 7 20110812:: 83 ; 84 ; $ ncdump $PROJECT_OD/olr_oafluxgrid_30n30s_19890101_20091231.nc 85 ; olr = 86 ; 1e+20, 1, 258.15, 264.882, 271.614, 273.8116, 271.4748, 269.138, 266.6868, 56 87 ; 57 88 ; coding rules 89 ; 90 ; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call 91 ; 92 ; pb with mixing interpolated and uninterpolated OLR data 93 ; check if the input file is the right one (interpolated with get_olr.sh vs non interpolated with get_olr_int.sh) 94 ; 95 ; uninterpolated OLR is more timely 96 ; 97 ; cf. pk and jv to solve this issue 58 98 ; 59 99 ; KNOWN ISSUES 60 100 ; ============ 61 101 ; 62 ; pb with mixing interpolated and uninterpolated OLR data63 ;64 ; uninterpolated OLR is more timely65 ;66 ; cf. pk and jv to solve this issue67 ;68 102 ; test of existence of fullfilename_msk not very efficient because 69 103 ; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented … … 72 106 ; ========== 73 107 ; 108 ; $Id$ 109 ; 110 ; $URL$ 111 ; 112 ; - fplod 20110812T084449Z aedon.locean-ipsl.upmc.fr (Darwin) 113 ; 114 ; * remove new from filename 115 ; * usage of $PROJECT_ID and $PROJECT_OD 116 ; * add OUTMASK_IND and SET_OUTMSKVAL to call_interp2d call 117 ; * complete description 118 ; 74 119 ; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 75 120 ; … … 90 135 ;- 91 136 pro interp_olr_30n30s_1989_2009 92 @common 137 ; 138 @cm_4cal 139 @cm_4data 140 @cm_4mesh 141 @cm_4data 142 @cm_project 93 143 ; 94 144 ; check for input directory … … 120 170 ; 121 171 ; check if this file exists 172 msg='iii : looking for ' + filename_msk 173 ras = report(msg) 122 174 fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 123 175 IF fullfilename_msk[0] EQ '' THEN BEGIN … … 126 178 STOP 127 179 ENDIF 128 129 filein='/Users/pkb/data/heat_budget/NOAA_OLR/new/olr.day.mean_new.nc' 130 131 initncdf, filein 180 ; 181 ; build data filename 182 filename='olr.day.mean.nc' 183 ; 184 ; check if this file exists 185 msg='iii : looking for ' + filename 186 ras = report(msg) 187 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 188 IF fullfilename[0] EQ '' THEN BEGIN 189 msg = 'eee : the file ' + fullfilename + ' was not found.' 190 ras = report(msg) 191 STOP 192 ENDIF 193 ; 194 ; test if ${PROJECT_OD} defined 195 CASE project_od_env OF 196 '' : BEGIN 197 msg = 'eee : ${PROJECT_OD} is not defined' 198 ras = report(msg) 199 STOP 200 END 201 ELSE: BEGIN 202 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 203 ras = report(msg) 204 END 205 ENDCASE 206 ; 207 ; check if output data will be possible 208 iodirout = isadirectory(project_od_env) 209 ; 210 ; existence and protection 211 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 212 msg = 'eee : the directory' + iodirout + ' was not found.' 213 ras = report(msg) 214 STOP 215 ENDIF 216 ; 217 ; build output filename 218 filename_out = 'olr_oafluxgrid_30n30s_19890101_20091231.nc' 219 fullfilename_out = iodirout + filename_out 220 ; in order to avoid unexpected overwritten 221 IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 222 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 223 ras = report(msg) 224 STOP 225 ENDIF 226 ; 227 initncdf, fullfilename 132 228 domdef 133 229 latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0)) 134 230 print, 'lat grid ',min(latin),max(latin),latin(1)-latin(0) 135 231 print, 'lon grid ',min(lonin),max(lonin),lonin(1)-lonin(0) 136 olrin=read_ncdf("olr",19881231, 20091231, file=f ilein,/nostr)232 olrin=read_ncdf("olr",19881231, 20091231, file=fullfilename,/nostr) 137 233 138 234 mskin=glamt*0.+1. … … 156 252 tab_olr=reform(olrin(*,*,jt)) 157 253 158 olrout(*,*,jt)=call_interp2d(tab_olr,lonin,latin,mskin,lonout,latout,method='bilinear') 159 254 olrout(*,*,jt)=call_interp2d(tab_olr,lonin,latin,mskin $ 255 , lonout,latout,method='bilinear' $ 256 , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 160 257 olrout(*,*,jt)=olrout(*,*,jt)*mskout+(1.-mskout)*1.e20 161 258 … … 169 266 lat=latout 170 267 lon=lonout 171 ncfile='! /Users/pkb/data/heat_budget/NOAA_OLR/newolr_oafluxgrid_30n30s_19890101_20091231.nc'268 ncfile='!' + fullfilename_out 172 269 lon_attr={units:'degrees_east',long_name:'Longitude'} 173 270 lat_attr={units:'degrees_north',long_name:'Latitude'} … … 177 274 globattr={source:'NOAA OLR, cf http://www.cdc.noaa.gov/cdc/data.interp_OLR.html, interpolated to 1x1 degree grid and with oaflux mask'} 178 275 179 180 276 ncfields = 'olr[longitude,latitude,time]=olrout:olr_attr; ' $ 181 277 + 'longitude[]=lon:lon_attr; ' $ … … 186 282 @ncdf_quickwrite 187 283 188 189 284 end -
trunk/src/q2m_correction_ncdf.pro
r80 r81 7 7 ; ======================= 8 8 ; 9 ; DESCRIPTION 10 ; =========== 11 ; 9 12 ; Correction of q2m on OAFLUX grid 10 13 ; 11 14 ; :file:`${PROJECT_OD}/erai_q2m_19890101_20091231_oafluxgrid.nc` have been 12 ; produced by :ref:`d2m_to_q2m .pro`.15 ; produced by :ref:`d2m_to_q2m_erai.pro`. 13 16 ; 14 17 ; Corrected q2m on OAFLUX grid is written in … … 69 72 ; EVOLUTIONS 70 73 ; ========== 74 ; 75 ; $Id$ 76 ; 77 ; $URL$ 71 78 ; 72 79 ; - fplod 20110808T143129Z aedon.locean-ipsl.upmc.fr (Darwin)
Note: See TracChangeset
for help on using the changeset viewer.