- Timestamp:
- 04/26/11 19:05:26 (13 years ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 9 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/fig_mld.pro
r8 r9 9 9 ; main POMME project program 10 10 ; 11 ; - read the 2 mld models :file:`${P OMME_ID}/noeddy_mld.nc` and :file:`${POMME_ID}/eddy_mld.nc`11 ; - read the 2 mld models :file:`${PROJECT_ID}/noeddy_mld.nc` and :file:`${PROJECT_ID}/eddy_mld.nc` 12 12 ; - read mld insitu data and metadata 13 13 ; - compute daily mean insitu mld data … … 15 15 ; measurement location 16 16 ; - plot +todo+ 17 ; - write :file:`${P OMME_OD}/fig_mld.txt` containing for each day between17 ; - write :file:`${PROJECT_OD}/fig_mld.txt` containing for each day between 18 18 ; 20000927 and +todo+ 19 19 ; … … 55 55 ; URL="http://www.locean-ipsl.upmc.fr/~fplod/varamma/varamma_ws/doc/html/sphinx/guides/data_content.html#data_mld_models"]; 56 56 ; pomme_ps [shape=ellipse,fontname=Courier,label="${VARAMMA_OD}/fig_mld_valid_sta.ps"]; 57 ; 57 ; 58 58 ; fig_mld [shape=box, 59 59 ; fontname=Courier, 60 60 ; color=blue, 61 61 ; URL="http://forge.ipsl.jussieu.fr/pomme/browser/trunk/src/fig_mld.pro" 62 ; label="${P OMME}/src/fig_mld.pro"];63 ; 62 ; label="${PROJECT}/src/fig_mld.pro"]; 63 ; 64 64 ; {pomme_asc pomme_prn pomme_nc} -> {fig_mld} -> {pomme_ps}; 65 65 ; } … … 69 69 ; .. code-block:: guess 70 70 ; 71 ; IDL> @init_pom 71 72 ; IDL> fig_mld 72 73 ; IDL> exit 73 74 ; 74 ; :file:`${P OMME_OD}/fig_mld_valid_sta.ps` can be used for future work.75 ; 76 ; :file:`${P OMME_OD}/fig_mld.txt` can be used for future work (mainly75 ; :file:`${PROJECT_OD}/fig_mld_valid_sta.ps` can be used for future work. 76 ; 77 ; :file:`${PROJECT_OD}/fig_mld.txt` can be used for future work (mainly 77 78 ; comparison). 78 79 ; … … 81 82 ; :func:`read_ncdf <saxo:read_ncdf>` 82 83 ; :func:`julday <saxo:julday>` 83 ; :func:`plt t <saxo:pltt>`84 ; :func:`plt1d <saxo:plt1d>` 84 85 ; :func:`moyenne <saxo:moyenne>` 85 86 ; :func:`domdef <saxo:domdef>` 86 87 ; 87 ; :ref:`init_pom.pro`88 88 ; :func:`file_prn_to_mem` 89 89 ; :func:`file_asc_to_mem` … … 97 97 ; figure 4 of submitted paper +todo+ 98 98 ; 99 ; :ref:`project_init.pro` 100 ; :ref:`cm_project.pro` 101 ; 99 102 ; :todo: 103 ; 104 ; 105 ; - fplod 20110426T170242Z aedon.locean-ipsl.upmc.fr (Darwin) 106 ; 107 ; * make it work : now pb with :: 108 ; 109 ; % Error: impossible to make a "t" type plot with jpt = 1 110 ; % Attempt to subscript MLD1 with IDAY is out of range. 100 111 ; 101 112 ; remove hard coded value (95) of time axe of model correction … … 105 116 ; 106 117 ; 250 = red 107 ; 90 = light blue 118 ; 90 = light blue 108 119 ; 150 = green 109 120 ; ++ longitude should be dark blue 110 ; ++ latitude should be orange 121 ; ++ latitude should be orange 111 122 ; 112 123 ; superposer plot latitude et longitude 113 ; 124 ; 114 125 ; mettre les labels et le titre des Y du plot longitude à droite 115 126 ; see x recipe http://www.dfanning.com/graphics_tips/xattop.html … … 118 129 ; 119 130 ; :history: 131 ; 132 ; - fplod 20110426T161700Z aedon.locean-ipsl.upmc.fr (Darwin) 133 ; 134 ; * rely on project_init.pro instead of init_pom.pro 135 ; * fix typo (copy/paste std1 vs mld5) 136 ; * add init_pom 137 ; * handle 2D vs 1D my* because ml use only delta = 0 120 138 ; 121 139 ; - fplod 20101209T100325Z aedon.locean-ipsl.upmc.fr (Darwin) … … 157 175 compile_opt idl2, strictarrsubs 158 176 ; 159 @ init_pom177 @cm_project 160 178 ; 161 179 ; read MLD in insitu files and metafiles … … 165 183 data_insitu=join_dmean_asc(data_dmean,data_asc) 166 184 ; 167 ; temps des données insitu 185 ; temps des données insitu 168 186 time_insitu=data_insitu.doy 169 187 ; … … 174 192 mld3 = findgen(ndays) 175 193 mld4 = findgen(ndays) 194 mld5 = findgen(ndays) 176 195 std1 = findgen(ndays) 177 196 xlon = findgen(ndays) … … 184 203 mld3[iday] = !VALUES.F_NAN 185 204 mld4[iday] = !VALUES.F_NAN 205 mld5[iday] = !VALUES.F_NAN 186 206 std1[iday] = !VALUES.F_NAN 187 207 xlon[iday] = !VALUES.F_NAN … … 192 212 mld3[iday] = data_insitu[indice_insitu].mean_zhom005 193 213 mld4[iday] = data_insitu[indice_insitu].mean_zhom010 194 std1[iday] = data_insitu[indice_insitu].mean_zhomelch214 mld5[iday] = data_insitu[indice_insitu].mean_zhomelch 195 215 std1[iday] = data_insitu[indice_insitu].std_zhom001 196 216 xlon[iday] = data_insitu[indice_insitu].lon … … 224 244 225 245 jt = time_insitu[iday]+95 226 mldm_box = reform(read_ncdf('mld', jt, /timestep, file= iodir+'eddy_mld.nc', /nostruct, box = mybox))227 mldr_box = reform(read_ncdf('mld', jt, /timestep, file= iodir+'noeddy_mld.nc', /nostruct, box = mybox))246 mldm_box = reform(read_ncdf('mld', jt, /timestep, file=project_id_env+'eddy_mld.nc', /nostruct, box = mybox)) 247 mldr_box = reform(read_ncdf('mld', jt, /timestep, file=project_id_env+'noeddy_mld.nc', /nostruct, box = mybox)) 228 248 229 249 mymldm[idelta,iday] = moyenne(mldm_box, box = mybox, 'xy') … … 240 260 ENDFOR 241 261 ; 242 ; plot: 262 ; plot: 243 263 ; selection de la partie qui nous interesse: 244 264 ind = where(finite(mld1) NE 0) 245 265 mld1 = mld1[ind] 246 266 std1 = std1[ind] 247 mymldm = mymldm[0, *]248 mymldm = mymldm[ind]249 mymldr = mymldr[0, *]250 mymldr = mymldr[ind]251 252 myvarm = myvarm[0, *]253 myvarm = myvarm[ind]254 myvarr = myvarr[0, *]255 myvarr = myvarr[ind]267 mymldm_1d = mymldm[0, *] 268 mymldm_1d = mymldm[ind] 269 mymldr_1d = mymldr[0, *] 270 mymldr_1d = mymldr[ind] 271 272 myvarm_1d = myvarm[0, *] 273 myvarm_1d = myvarm[ind] 274 myvarr_1d = myvarr[0, *] 275 myvarr_1d = myvarr[ind] 256 276 257 277 time=julday(01,01,2001)+time_insitu … … 262 282 263 283 264 ;++ ok openps, p omme_od_env+'fig_mld_valid_sta.ps'284 ;++ ok openps, project_od_env+'fig_mld_valid_sta.ps' 265 285 plt1d, -mld1, 't', -300, 0, ytitle="meters", title='MLD along cruise track', color = 10, small = [1, 2, 1] 266 polyfill, [time, reverse(time)], [(-mymldm -myvarm),reverse(-mymldm+myvarm)], color = 250267 polyfill, [time, reverse(time)], [(-mymldr -myvarr),reverse(-mymldr+myvarr)], color = 150286 polyfill, [time, reverse(time)], [(-mymldm_1d-myvarm_1d),reverse(-mymldm_1d+myvarm_1d)], color = 250 287 polyfill, [time, reverse(time)], [(-mymldr_1d-myvarr_1d),reverse(-mymldr_1d+myvarr_1d)], color = 150 268 288 polyfill, [time, reverse(time)], [(-mld1-std1),reverse(-mld1+std1)], color = 90 269 plt1d, -mymldr , 't', /ov1d, line = 2289 plt1d, -mymldr_1d, 't', /ov1d, line = 2 270 290 plt1d, -mld1, 't', /ov1d 271 plt1d, -mymldm , 't', /ov1d, line = 1291 plt1d, -mymldm_1d, 't', /ov1d, line = 1 272 292 273 293 time = time_save … … 278 298 279 299 ; 280 ; Write results in ${P OMME_OD}/fig_mld.txt281 fullfilename=p omme_od_env+'fig_mld.txt'300 ; Write results in ${PROJECT_OD}/fig_mld.txt 301 fullfilename=project_od_env+'fig_mld.txt' 282 302 OPENW, lun, fullfilename, /GET_LUN 283 303 ;++ hanlde error … … 315 335 FREE_LUN, lun 316 336 317 318 337 END -
trunk/src/file_asc_long2mem.pro
r8 r9 44 44 ; test existence of filename 45 45 ; 46 ; usage of ${POMME_ID}46 ; :history: 47 47 ; 48 ; :history: 48 ; - fplod 20110426T152245Z cratos.locean-ipsl.upmc.fr (Linux) 49 ; 50 ; * usage of PROJECT 49 51 ; 50 52 ; - fplod 20101123T122132Z aedon.locean-ipsl.upmc.fr (Darwin) -
trunk/src/file_asc_p1l1_to_mem.pro
r8 r9 43 43 ; 44 44 ; test existence of filename 45 ;46 ; usage of ${POMME_ID}47 45 ; 48 46 ; :history: -
trunk/src/file_asc_p2l1_to_mem.pro
r8 r9 48 48 ; 49 49 ; test existence of filename 50 ;51 ; usage of ${POMME_ID}52 50 ; 53 51 ; add sequence using read/write -
trunk/src/file_asc_p2l2_to_mem.pro
r8 r9 44 44 ; 45 45 ; test existence of filename 46 ;47 ; usage of ${POMME_ID}48 46 ; 49 47 ; :history: -
trunk/src/file_asc_to_mem.pro
r2 r9 25 25 ; 26 26 ; :todo: 27 ;28 ; usage of ${POMME_ID}29 27 ; 30 28 ; parametrisation ?? -
trunk/src/file_prn2mem.pro
r8 r9 62 62 ; 63 63 ; test existence of filename 64 ;65 ; usage of ${POMME_ID}66 64 ; 67 65 ; :history: -
trunk/src/file_prn_to_mem.pro
r6 r9 36 36 ; 37 37 ; parametrisation ?? 38 ;39 ; usage of ${POMME_ID}40 38 ; 41 39 ; learn how to concatenate array of structure (and avoid loop) -
trunk/src/init_pom.pro
r8 r9 12 12 ; - ++ 13 13 ; 14 ; Read :file:`${P OMME_ID}/meshmak.nc`.14 ; Read :file:`${PROJECT_ID}/meshmak.nc`. 15 15 ; 16 16 ; :examples: … … 26 26 ; :ref:`init.pro` 27 27 ; 28 ; :program:`p omme_profile.sh`28 ; :program:`project_profile.sh` 29 29 ; 30 30 ; :uses: … … 40 40 ; SAXO sans compatibility (common) 41 41 ; 42 ; add test if ${POMME_ID} defined42 ; réparer le lien sphinx sur common.pro 43 43 ; 44 ; réparer le lien sphinx sur pomme_profile.sh 44 ; conflict with project_init.pro and init.pro 45 ; :history: 45 46 ; 46 ; réparer le lien sphinx sur common.pro47 ; - fplod 20110426T152454Z cratos.locean-ipsl.upmc.fr (Linux) 47 48 ; 48 ; :history:49 ; * usage of PROJECT 49 50 ; 50 51 ; - fplod 20101129T124507Z aedon.locean-ipsl.upmc.fr (Darwin) … … 63 64 ; 64 65 @common 66 @cm_project 65 67 ; 66 68 ; check environnement 67 69 ; 68 pomme_id_env=GETENV('POMME_ID') 69 pomme_od_env=GETENV('POMME_OD') 70 ; 71 iodir = isadirectory(pomme_id_env) 70 iodir = isadirectory(project_id_env) 72 71 ; 73 72 ;--------------------------------------------------------- -
trunk/src/project_profile.sh
r2 r9 2 2 #+ 3 3 # 4 # .. program:: pomme_profile.sh 5 # 6 # ================ 7 # pomme_profile.sh 8 # ================ 9 # 10 # ------------------------ 11 # define POMME environment 12 # ------------------------ 4 # .. program:: project_profile.sh 5 # 6 # .. _project_profile.sh: 7 # 8 # ============================================= 9 # project_profile.sh - define POMME environment 10 # ============================================= 13 11 # 14 12 # SYNOPSIS … … 17 15 # Online usage:: 18 16 # 19 # $ . ./p omme_profile.sh -d directory -i indir -o outdir -t tempdir17 # $ . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir 20 18 # 21 19 # In ${HOME}/.profile, add the following line:: 22 20 # 23 # . p omme_profile.sh -d directory -i indir -o outdir -t tempdir21 # . project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir 24 22 # 25 23 # DESCRIPTION … … 30 28 # .. option:: -o <outdir> 31 29 # .. option:: -t <tempdir> 30 # .. option:: -s <saxo_dir> 32 31 # 33 32 # define POMME environment 34 33 # 35 # ${POMME} is the base directory of tools. 36 # 37 # ${POMME_LOG} is the directory where log files will be written. 38 # 39 # ${POMME_ID} is the directory where input files must be. 40 # 41 # ${POMME_OD} is the directory where output files will be written. 42 # 43 # PATH is completed with ${POMME}. 34 # ${PROJECT} is the base directory of tools. 35 # 36 # ${PROJECT_LOG} is the directory where log files will be written. 37 # 38 # ${PROJECT_ID} is the directory where input files must be. 39 # 40 # ${PROJECT_OD} is the directory where output files will be written. 41 # 42 # ${SAXO_DIR} is the base directory of SAXO tools. 43 # 44 # PATH is completed with ${PROJECT}. 44 45 # 45 46 # SEE ALSO … … 48 49 # for IDL/GDL environment : 49 50 # 50 # :program:`pomme_startup.pro` 51 # :ref:`project_init.pro` 52 # :ref:`cm_project.pro` 51 53 # 52 54 # EXAMPLES … … 56 58 # 57 59 # $ cd /usr/home/fplod/incas/pomme/pomme_ws/ 58 # $ . ./src/p omme_profile.sh \60 # $ . ./src/project_profile.sh \ 59 61 # -d $(pwd) \ 60 62 # -i /usr/temp/${LOGNAME}/pomme_d/ \ 61 63 # -o /usr/temp/${LOGNAME}/pomme_d/ \ 62 # -t /usr/temp/${LOGNAME}/log/ 63 # 64 # For fplod on zeus.locean-ipsl.umpc.fr:: 64 # -t /usr/temp/${LOGNAME}/log/ \ 65 # -s /usr/home/fplod/SAXO_DIR/ 66 # 67 # For fplod on cratos.locean-ipsl.umpc.fr:: 65 68 # 66 69 # $ cd ${HOME}/incas/pomme/pomme_ws/ 67 # $ . ./src/p omme_profile.sh \70 # $ . ./src/project_profile.sh \ 68 71 # -d $(pwd) \ 69 72 # -i /usr/temp/${LOGNAME}/pomme_d/ \ 70 73 # -o /usr/temp/${LOGNAME}/pomme_d/ \ 71 # -t /usr/temp/${LOGNAME}/log/ 74 # -t /usr/temp/${LOGNAME}/log/ \ 75 # -s ${HOME}/SAXO_DIR/ 72 76 # 73 77 # For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv:: 74 78 # 75 79 # $ cd ${HOME}/pomme/ 76 # $ . ./src/p omme_profile.sh \80 # $ . ./src/project_profile.sh \ 77 81 # -d $(pwd) \ 78 82 # -i /homedata/${LOGNAME}/pomme_d/ \ 79 83 # -o /homedata/${LOGNAME}/pomme_d/ \ 80 # -t /homedata/${LOGNAME}/log/ 84 # -t /homedata/${LOGNAME}/log/ \ 85 # -s ${HOME}/SAXO_DIR/ 81 86 # 82 87 # TODO … … 89 94 # ++ besoin de posix 90 95 # 91 # ++ pas de MANPATH defini par défaut sur zeus et cerbere 92 # 93 # define IDL_STARTUP 96 # ++ pas de MANPATH defini par défaut sur cratos et cerbere 94 97 # 95 98 # EVOLUTIONS 96 99 # ========== 100 # 101 # - fplod 20110426T151058Z cratos.locean-ipsl.upmc.fr (Linux) 102 # 103 # * add IDL and SAXO env. 104 # * replace POMME by PROJECT 105 # * replace zeus by cratos 97 106 # 98 107 # - fplod 20101118T171653Z aedon.locean-ipsl.upmc.fr (Darwin) … … 115 124 # 116 125 # as this script might be launch in .profile, command is forced. 117 command=p omme_profile.sh118 # 119 usage=" Usage : ${command} -d directory -i indir -o outdir -t tempdir "126 command=project_profile.sh 127 # 128 usage=" Usage : ${command} -d directory -i indir -o outdir -t tempdir -s saxo_dir" 120 129 # 121 130 set +u … … 143 152 shift 144 153 ;; 154 -s) 155 saxo_dir=${2} 156 shift 157 ;; 145 158 *) 146 159 # other choice … … 169 182 fi 170 183 # 171 P OMME=${directory}172 export P OMME184 PROJECT=${directory} 185 export PROJECT 173 186 unset drectory 174 187 # 175 # add P OMMEtools to PATH188 # add PROJECT tools to PATH 176 189 # if not already done 177 suppath=$(echo ${P OMME}/src | tr -s "/")190 suppath=$(echo ${PROJECT}/src | tr -s "/") 178 191 echo ${PATH} | grep -q "${suppath}:" 179 192 test_path=${?} … … 188 201 unset test_path 189 202 # 190 # add P OMMEmanuals to MANPATH203 # add PROJECT manuals to MANPATH 191 204 # if not already done 192 suppath=$(echo ${P OMME}/doc/man | tr -s "/")205 suppath=$(echo ${PROJECT}/doc/man | tr -s "/") 193 206 echo ${MANPATH} | grep -q "${suppath}:" 194 207 test_manpath=${?} … … 204 217 unset suppath 205 218 # 206 P OMME_LOG=${tempdir}207 export P OMME_LOG219 PROJECT_LOG=${tempdir} 220 export PROJECT_LOG 208 221 unset tempdir 209 if [ ! -d ${P OMME_LOG} ]210 then 211 mkdir -p ${P OMME_LOG}222 if [ ! -d ${PROJECT_LOG} ] 223 then 224 mkdir -p ${PROJECT_LOG} 212 225 status=${?} 213 226 if [ ${status} -ne 0 ] … … 216 229 # nb : no exit because this file should be launched by login process 217 230 else 218 echo "${command} : iii : creation of \${P OMME_LOG}"231 echo "${command} : iii : creation of \${PROJECT_LOG}" 219 232 fi 220 233 unset status 221 234 fi 222 # check for permission on P OMME_LOG223 if [ ! -x ${P OMME_LOG} ]224 then 225 echo " eee : ${P OMME_LOG} not reachable"226 # nb : no exit because this file should be launched by login process 227 fi 228 # 229 # check for permission on P OMME_LOG230 if [ ! -w ${P OMME_LOG} ]231 then 232 echo " eee : ${P OMME_LOG} not writable"235 # check for permission on PROJECT_LOG 236 if [ ! -x ${PROJECT_LOG} ] 237 then 238 echo " eee : ${PROJECT_LOG} not reachable" 239 # nb : no exit because this file should be launched by login process 240 fi 241 # 242 # check for permission on PROJECT_LOG 243 if [ ! -w ${PROJECT_LOG} ] 244 then 245 echo " eee : ${PROJECT_LOG} not writable" 233 246 # nb : no exit because this file shouldreachable be launched by login process 234 247 fi … … 238 251 # 239 252 # io directories 240 P OMME_ID=${indir}241 export P OMME_ID253 PROJECT_ID=${indir} 254 export PROJECT_ID 242 255 unset indir 243 if [ ! -d ${P OMME_ID} ]244 then 245 mkdir -p ${P OMME_ID}246 echo "${command} : iii : creation of \${P OMME_ID}"247 fi 248 # check for permission on P OMME_ID249 if [ ! -x ${P OMME_ID} ]250 then 251 echo " eee : ${P OMME_ID} not reachable"252 # nb : no exit because this file should be launched by login process 253 fi 254 # 255 P OMME_OD=${outdir}256 export P OMME_OD256 if [ ! -d ${PROJECT_ID} ] 257 then 258 mkdir -p ${PROJECT_ID} 259 echo "${command} : iii : creation of \${PROJECT_ID}" 260 fi 261 # check for permission on PROJECT_ID 262 if [ ! -x ${PROJECT_ID} ] 263 then 264 echo " eee : ${PROJECT_ID} not reachable" 265 # nb : no exit because this file should be launched by login process 266 fi 267 # 268 PROJECT_OD=${outdir} 269 export PROJECT_OD 257 270 unset outdir 258 if [ ! -d ${POMME_OD} ] 259 then 260 mkdir -p ${POMME_OD} 261 echo "${command} : iii : creation of \${POMME_OD}" 262 fi 263 # check for permission on POMME_OD 264 if [ ! -x ${POMME_OD} ] 265 then 266 echo " eee : ${POMME_OD} not reachable" 267 # nb : no exit because this file should be launched by login process 268 fi 269 if [ ! -w ${POMME_OD} ] 270 then 271 echo " eee : ${POMME_OD} not writable" 272 # nb : no exit because this file should be launched by login process 273 fi 274 # 271 if [ ! -d ${PROJECT_OD} ] 272 then 273 mkdir -p ${PROJECT_OD} 274 echo "${command} : iii : creation of \${PROJECT_OD}" 275 fi 276 # check for permission on PROJECT_OD 277 if [ ! -x ${PROJECT_OD} ] 278 then 279 echo " eee : ${PROJECT_OD} not reachable" 280 # nb : no exit because this file should be launched by login process 281 fi 282 if [ ! -w ${PROJECT_OD} ] 283 then 284 echo " eee : ${PROJECT_OD} not writable" 285 # nb : no exit because this file should be launched by login process 286 fi 287 # 288 SAXO_DIR=${saxo_dir} 289 export SAXO_DIR 290 # 291 # IDL startup 292 IDL_STARTUP=${PROJECT}/src/project_init.pro 293 export IDL_STARTUP 275 294 # end 276 295 unset command
Note: See TracChangeset
for help on using the changeset viewer.