- Location:
- /trunk
- Files:
-
- 10 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
/trunk/adm/guides/data_content.rst
r20 r30 63 63 ^^^^^^^^^^^^^ 64 64 65 :file:` /Users/jv/data/OAFLUX/mask_oaflux_30N30S.nc`65 :file:`${TROPFLUX_ID}/mask_oaflux_30N30S.nc` 66 66 67 67 size < 100 Ko … … 70 70 ^^^^^ 71 71 72 :ref:`get_oaflux.sh` 73 74 :ref:`oaflux_mask_30N30S.pro` 75 76 :ref:`TropFlux_19890101_20091231.pro` 77 :ref:`interp_erai_dewt_1989_2009.pro` 78 :ref:`interp_erai_lwr_1989_2009.pro` 79 :ref:`interp_erai_sst_1989_2009.pro` 80 :ref:`interp_erai_t2m_1989_2009.pro` 81 :ref:`interp_erai_ws_1989_2009.pro` 82 :ref:`interp_olr_30n30s_1989_2009.pro` 72 - :ref:`get_oaflux.sh` 73 74 - :ref:`oaflux_mask_30N30S.pro` 75 76 - :ref:`TropFlux_19890101_20091231.pro` 77 78 - :ref:`interp_erai_dewt_1989_2009.pro` 79 - :ref:`interp_erai_lwr_1989_2009.pro` 80 - :ref:`interp_erai_sst_1989_2009.pro` 81 - :ref:`interp_erai_t2m_1989_2009.pro` 82 - :ref:`interp_erai_ws_1989_2009.pro` 83 - :ref:`interp_olr_30n30s_1989_2009.pro` 83 84 84 85 .. _data_in_erai: … … 88 89 89 90 Between 1989-now 90 91 92 http://climserv.ipsl.polytechnique.fr/fr/donnees/era-interim.html 93 91 94 Reference files 92 95 ^^^^^^^^^^^^^^^ -
/trunk/adm/guides/generate_tropflux.rst
r20 r30 10 10 .. EVOLUTIONS 11 11 .. ========== 12 .. 13 .. - fplod 20101222T173813Z aedon.locean-ipsl.upmc.fr (Darwin) 14 .. 15 .. * add ref to interpolation tools 12 16 .. 13 17 .. - fplod 20101217T105140Z aedon.locean-ipsl.upmc.fr (Darwin) … … 80 84 ----------------------------------------- 81 85 82 IDL programs. Praveen will send you those. 86 tools : 87 - :ref:`interp_erai_dewt_1989_2009.pro` 88 - :ref:`interp_erai_lwr_1989_2009.pro` 89 - :ref:`interp_erai_sst_1989_2009.pro` 90 - :ref:`interp_erai_t2m_1989_2009.pro` 91 - :ref:`interp_erai_ws_1989_2009.pro` 83 92 84 93 There's also one additional step to convert ERA-I dewpoint T into specific humidity. … … 87 96 datasets, which is not done extremely cleanly now. 88 97 89 Result after that, 7 netcdf files for: NOAA OLR, ERA-I :math:`T_a`, ERA-I :math:`q_a`, ERA-I wind 90 speed, ERA-I SST, ISCCP net SW, ERA-I net LW 98 - :ref:`interp_olr_30n30s_1989_2009.pro` 99 100 Result after that, 7 netcdf files for: NOAA OLR, ERA-I :math:`T_a`, ERA-I :math:`q_a`, ERA-I wind speed, ERA-I SST, ISCCP net SW, ERA-I net LW. 91 101 92 102 .. _mooring_corrections: … … 95 105 --------------------------------------------------------------------------------------------------------- 96 106 97 IDL programs, Praveen will send you those. 107 tools : 108 - :ref:`lwr_correction_ncdf.pro` 109 - :ref:`q2m_correction_ncdf.pro` 110 - :ref:`sst_correction_ncdf.pro` 111 - :ref:`t2m_correction_ncdf.pro` 112 - :ref:`ws_correction_ncdf.pro` 113 - :ref:`cronin_gustiness_ncdf.pro` 98 114 99 115 There are two steps for the wind correction: the statistical correction from 100 116 observations, and the gustiness correction. 101 117 102 Result after that, 7 netcdf files for: NOAA OLR, ERA-I :math:`T_a`, ERA-I :math:`q_a`, ERA-I wind 103 speed, ERA-I SST, ISCCP net SW, ERA-I net LW 118 Result after that, 7 netcdf files for: NOAA OLR, ERA-I :math:`T_a`, ERA-I :math:`q_a`, ERA-I wind speed, ERA-I SST, ISCCP net SW, ERA-I net LW. 104 119 105 120 .. _apply_coare: -
/trunk/adm/makefile
r20 r30 18 18 # IDL and matlab in man_troff 19 19 # 20 # pb with automodule for python path 21 # 20 22 # EVOLUTIONS 21 23 # ========== 22 24 # 25 # - fplod 20110106T135021Z aedon.locean-ipsl.upmc.fr (Darwin) 26 # 27 # * add matlab, ferret files 28 # 29 # - fplod 20101223T083725Z aedon.locean-ipsl.upmc.fr (Darwin) 30 # 31 # * add nco inventory file for sphinx intermapping 32 # 23 33 # - fplod 20101220T092552Z aedon.locean-ipsl.upmc.fr (Darwin) 24 34 # … … 64 74 65 75 LIST_INVENTORY = \ 66 $(DIRADM)/saxo.inv 76 $(DIRADM)/saxo.inv \ 77 $(DIRADM)/nco.inv 67 78 68 79 LIST_RST_GUIDES = \ … … 89 100 sed -e "s+$(DIRSRC)+$(DIRTMP)/sphinx_tmpdir/manuals/+g" \ 90 101 -e "s+\.pro+.pro.rst+g") 102 103 LIST_SRCMATLAB = \ 104 $(DIRSRC)/test/$(PRODUCT)_startup.m \ 105 $(DIRSRC)/test/read.m 106 107 LIST_SRCMATLAB_RST = \ 108 $(shell echo "$(LIST_SRCMATLAB)" | \ 109 sed -e "s+$(DIRSRC)/test/+$(DIRTMP)/sphinx_tmpdir/manuals/+g" \ 110 -e "s+\.m+.m.rst+g") 111 112 LIST_SRCFERRET = \ 113 $(DIRSRC)/test/read.jnl 114 115 LIST_SRCFERRET_RST = \ 116 $(shell echo "$(LIST_SRCFERRET)" | \ 117 sed -e "s+$(DIRSRC)/test/+$(DIRTMP)/sphinx_tmpdir/manuals/+g" \ 118 -e "s+\.jnl+.jnl.rst+g") 119 120 LIST_SRCPYTHON = \ 121 $(DIRSRC)/test/read.py 91 122 92 123 .PHONY : \ … … 194 225 $(DIRTMP)/sphinx_tmpdir/index_manuals.rst \ 195 226 $(LIST_SRCSH_RST) \ 196 $(LIST_SRCIDL_RST) 227 $(LIST_SRCIDL_RST) \ 228 $(LIST_SRCMATLAB_RST) \ 229 $(LIST_SRCFERRET_RST) \ 230 $(LIST_SRCPYTHON) 197 231 @sphinx-build -b man -c $(DIRADM)/sphinx \ 198 232 -d $(DIRTMP)/sphinx_tmpdir/doctrees/ \ … … 214 248 $(LIST_RST_GUIDES) \ 215 249 $(LIST_SRCSH_RST) \ 216 $(LIST_SRCIDL_RST) 250 $(LIST_SRCIDL_RST) \ 251 $(LIST_SRCMATLAB_RST) \ 252 $(LIST_SRCFERRET_RST) \ 253 $(LIST_SRCPYTHON) 217 254 @cp $(DIRADM)/index.rst $(DIRTMP)/sphinx_tmpdir/ 218 255 @cp $(DIRADM)/index_guides.rst $(DIRTMP)/sphinx_tmpdir/ 219 256 @cp $(LIST_RST_GUIDES) $(DIRTMP)/sphinx_tmpdir/guides/ 220 257 @cp $(LIST_INVENTORY) $(DIRTMP)/sphinx_tmpdir/ 258 @cp $(LIST_SRCPYTHON) $(DIRTMP)/sphinx_tmpdir/manuals/ 221 259 @sphinx-build -b html -c $(DIRADM)/sphinx \ 222 260 -d $(DIRTMP)/sphinx_tmpdir/doctrees \ … … 233 271 $(LIST_RST_GUIDES) \ 234 272 $(LIST_SRCSH_RST) \ 235 $(LIST_SRCIDL_RST) 273 $(LIST_SRCIDL_RST) \ 274 $(LIST_SRCMATLAB_RST) \ 275 $(LIST_SRCFERRET_RST) \ 276 $(LIST_SRCPYTHON) 236 277 @cp $(DIRADM)/index.rst $(DIRTMP)/sphinx_tmpdir/ 237 278 @cp $(DIRADM)/index_guides.rst $(DIRTMP)/sphinx_tmpdir/ … … 255 296 $(LIST_RST_GUIDES) \ 256 297 $(LIST_SRCSH_RST) \ 257 $(LIST_SRCIDL_RST) 298 $(LIST_SRCIDL_RST) \ 299 $(LIST_SRCMATLAB_RST) \ 300 $(LIST_SRCFERRET_RST) \ 301 $(LIST_SRCPYTHONS) 258 302 @cp $(DIRADM)/index.rst $(DIRTMP)/sphinx_tmpdir/ 259 303 @cp $(DIRADM)/index_guides.rst $(DIRTMP)/sphinx_tmpdir/ … … 303 347 done >> $@ 304 348 @echo " " >> $@ 349 @echo "MATLAB scripts" >> $@ 350 @echo "MATLAB scripts" | tr [:print:] = >> $@ 351 @echo ".. toctree::" >> $@ 352 @echo " :maxdepth: 1" 1>> $@ 353 @echo " :glob:" 1>> $@ 354 @echo " " >> $@ 355 @for file in $(LIST_SRCMATLAB); \ 356 do \ 357 echo " manuals/$$(basename $${file})"; \ 358 done >> $@ 359 @echo " " >> $@ 360 @echo "FERRET scripts" >> $@ 361 @echo "FERRET scripts" | tr [:print:] = >> $@ 362 @echo ".. toctree::" >> $@ 363 @echo " :maxdepth: 1" 1>> $@ 364 @echo " :glob:" 1>> $@ 365 @echo " " >> $@ 366 @for file in $(LIST_SRCFERRET); \ 367 do \ 368 echo " manuals/$$(basename $${file})"; \ 369 done >> $@ 370 @echo " " >> $@ 371 @echo "PYTHON scripts" >> $@ 372 @echo "PYTHON scripts" | tr [:print:] = >> $@ 373 @echo ".. toctree::" >> $@ 374 @echo " :maxdepth: 1" 1>> $@ 375 @echo " :glob:" 1>> $@ 376 @echo " " >> $@ 377 @for file in $(LIST_SRCPYTHON); \ 378 do \ 379 echo " .. automodule:: $$(basename $${file})"; \ 380 done >> $@ 381 @echo " .. automodule::" 1>> $@ 382 @echo " :members:" 1>> $@ 383 @echo " " >> $@ 305 384 306 385 html_src_browser_doxygen : \ … … 320 399 @$(DIRADM)/extract_rst.sh -i $< -l IDL -o $@ 321 400 322 $(DIRTMP)/sphinx_tmpdir/manuals/%.m.rst : $(DIRSRC)/ %.m $(DIRADM)/extract_rst.sh401 $(DIRTMP)/sphinx_tmpdir/manuals/%.m.rst : $(DIRSRC)/test/%.m $(DIRADM)/extract_rst.sh 323 402 @$(DIRADM)/extract_rst.sh -i $< -l matlab -o $@ 324 403 325 $(DIRTMP)/sphinx_tmpdir/manuals/%.jnl.rst : $(DIRSRC)/ %.jnl $(DIRADM)/extract_rst.sh404 $(DIRTMP)/sphinx_tmpdir/manuals/%.jnl.rst : $(DIRSRC)/test/%.jnl $(DIRADM)/extract_rst.sh 326 405 @$(DIRADM)/extract_rst.sh -i $< -l ferret -o $@ 327 406 -
/trunk/adm/sphinx/Makefile
r20 r30 73 73 @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 74 74 ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 75 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ POMME.qhcp"75 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/TROPFLUX.qhcp" 76 76 @echo "To view the help file:" 77 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ POMME.qhc"77 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TROPFLUX.qhc" 78 78 79 79 devhelp: … … 82 82 @echo "Build finished." 83 83 @echo "To view the help file:" 84 @echo "# mkdir -p $$HOME/.local/share/devhelp/ POMME"85 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ POMME"84 @echo "# mkdir -p $$HOME/.local/share/devhelp/TROPFLUX" 85 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/TROPFLUX" 86 86 @echo "# devhelp" 87 87 -
/trunk/adm/sphinx/conf.py
r20 r30 23 23 # intersphinx_mapping with saxo 24 24 # 25 # make autodoc work for test/read.py 26 # 25 27 # EVOLUTIONS 26 28 # ========== 29 # 30 # - fplod 20110106T151836Z aedon.locean-ipsl.upmc.fr (Darwin) 31 # 32 # * add autodoc extension 33 # 34 # - fplod 20101223T083524Z aedon.locean-ipsl.upmc.fr (Darwin) 35 # 36 # * intersphinx with nco 27 37 # 28 38 # - fplod 20101220T092450Z aedon.locean-ipsl.upmc.fr (Darwin) … … 71 81 # Add any Sphinx extension module names here, as strings. They can be extensions 72 82 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 73 extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig','sphinx.ext.graphviz' ]83 extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig','sphinx.ext.graphviz','sphinx.ext.autodoc'] 74 84 75 85 … … 274 284 # 275 285 # intersphinx with saxo 276 intersphinx_mapping = {'saxo': ('http://forge.ipsl.jussieu.fr/saxo/download/idldoc_html_output/','saxo.inv')} 277 286 intersphinx_mapping = {'saxo': ('http://forge.ipsl.jussieu.fr/saxo/download/idldoc_html_output/','saxo.inv'), 287 'nco' : ('http://nco.sourceforge.net/','nco.inv')} 288 -
/trunk/src/compute_erai_daily_region_2d.sh
r20 r30 20 20 # DESCRIPTION 21 21 # =========== 22 # 23 # Put in ${TROPFLUX_ID} ERA-Intermin reference files 24 # 25 # Log file is written on :file:`${TROPFLUX_LOG}/compute_erai_daily_region_2d.log.{YYYYMMDDTHHMMSSZ}` 22 26 # 23 27 # .. graphviz:: … … 46 50 # filein_v10 [shape=ellipse,fontname=Courier,label="/bdd/ERAI/NETCDF/GLOBAL_075/4xdaily/AN_SF/yyyy/mm/v10.yyyymm.ashei.GLOBAL_075.nc"]; 47 51 # 48 # fileout_lsp [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_lsp_gridOrig.nc"];49 # fileout_cp [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_cp_gridOrig.nc"];50 # fileout_e [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_e_gridOrig.nc"];51 # fileout_slhf [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_slhf_gridOrig.nc"];52 # fileout_ssr [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_ssr_gridOrig.nc"];53 # fileout_trd [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_trd_gridOrig.nc"];54 # fileout_sshf [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_sshf_gridOrig.nc"];55 # fileout_ssrd [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_ssrd_gridOrig.nc"];56 # fileout_str [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_str_gridOrig.nc"];57 # fileout_ewss [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_ewss_gridOrig.nc"];58 # fileout_nsss [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_nsss_gridOrig.nc"];59 # fileout_geopt [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_geopt_gridOrig.nc"];60 # fileout_msl [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_msl_gridOrig.nc"];61 # fileout_sstk [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_sstk_gridOrig.nc"];62 # fileout_t2 [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_t2_gridOrig.nc"];63 # fileout_d2 [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_d2_gridOrig.nc"];64 # fileout_u10 [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_u10_gridOrig.nc"];65 # fileout_v10 [shape=ellipse,fontname=Courier,label=" /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_GLOB_1d_yyyy0101_yyyy1231_v10_gridOrig.nc"];52 # fileout_lsp [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_lsp_gridOrig.nc"]; 53 # fileout_cp [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_cp_gridOrig.nc"]; 54 # fileout_e [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_e_gridOrig.nc"]; 55 # fileout_slhf [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_slhf_gridOrig.nc"]; 56 # fileout_ssr [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_ssr_gridOrig.nc"]; 57 # fileout_trd [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_trd_gridOrig.nc"]; 58 # fileout_sshf [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_sshf_gridOrig.nc"]; 59 # fileout_ssrd [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_ssrd_gridOrig.nc"]; 60 # fileout_str [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_str_gridOrig.nc"]; 61 # fileout_ewss [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_ewss_gridOrig.nc"]; 62 # fileout_nsss [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_nsss_gridOrig.nc"]; 63 # fileout_geopt [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_geopt_gridOrig.nc"]; 64 # fileout_msl [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_msl_gridOrig.nc"]; 65 # fileout_sstk [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_sstk_gridOrig.nc"]; 66 # fileout_t2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_t2_gridOrig.nc"]; 67 # fileout_d2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_d2_gridOrig.nc"]; 68 # fileout_u10 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_u10_gridOrig.nc"]; 69 # fileout_v10 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_GLOB_1d_yyyy0101_yyyy1231_v10_gridOrig.nc"]; 66 70 # 67 71 # compute_erai_daily_region_2d [shape=box, … … 75 79 # } 76 80 # 81 # EXAMPLES 82 # ======== 83 # 84 # On climserv only if you don't have any ERA-I reference data, 85 # you just have to run this tool :: 86 # 87 # $ compute_erai_daily_region_2d.sh 88 # 89 # And look at log file with :: 90 # 91 # $ tlogd.sh compute_erai_daily_region_2d 92 # 93 # and of course on files in ${TROPFLUX_ID}. 94 95 # 77 96 # SEE ALSO 78 97 # ======== … … 80 99 # :ref:`guide data ERA-I <data_in_erai>` 81 100 # 101 # http://climserv.ipsl.polytechnique.fr/fr/les-donnees/era-interim-4.html 102 # for variables names 103 # 104 # :ref:`tropflux_profile.sh` 105 # 106 # :func:`ncpdq <nco:ncpdq>` 107 # :func:`ncks <nco:ncks>` 108 # :func:`ncrcat <nco:ncrcat>` 109 # :func:`ncea <nco:ncea>` 110 # :func:`ncflint <nco:ncflint>` 111 # 112 # :ref:`interp_erai_dewt_1989_2009.pro` 113 # :ref:`interp_erai_lwr_1989_2009.pro` 114 # :ref:`interp_erai_sst_1989_2009.pro` 115 # :ref:`interp_erai_t2m_1989_2009.pro` 116 # :ref:`interp_erai_ws_1989_2009.pro` 117 # 82 118 # TODO 83 119 # ==== 84 120 # 85 # trace 121 # make it work 122 # 123 # avoid ncrcat interactive question 124 # 125 # split get and process files 86 126 # 87 127 # hard coded directory - usage of ${TROPFLUX_ID} 88 128 # 89 129 # coding rules 130 # 131 # ref. to nco commands not function but programs (pb of Sphinx inventory - nco.inv - syntax) 132 # 133 # resolve missing long name variable for Netcdfname in http://climserv.ipsl.polytechnique.fr/fr/les-donnees/era-interim-4.html 134 # 135 # - slhf 136 # - trd 137 # - sshf 90 138 # 91 139 # EVOLUTIONS 92 140 # ========== 93 141 # 142 # - fplod 20101223T084153Z aedon.locean-ipsl.upmc.fr (Darwin) 143 # 144 # * add reference to nco commands 145 # 146 # - fplod 20101220T150356Z aedon.locean-ipsl.upmc.fr# 147 # 148 # * indentation 149 # * replace date by yyyy (date is a shell command) 150 # * replace for yyyy by while yyyy 151 # * replace for month by while month 152 # * replace for day by while day 153 # * work only on existing dates 154 # 155 # - fplod 20101220T142107Z aedon.locean-ipsl.upmc.fr (Darwin) 156 # 157 # * add Long name variables 158 # * replace /bdd/IPCC/Reanalysis/ERAI/${reg}/ by ${TROPFLUX_ID} 159 # * add examples 160 # * add log management 161 # * dirtemp not hard coded values 162 # * check dirin permission 163 # 94 164 # - fplod 20101216T110626Z aedon.locean-ipsl.upmc.fr (Darwin) 95 165 # … … 98 168 # 99 169 #- 170 system=$(uname) 171 case "${system}" in 172 AIX|IRIX64) 173 echo "www : no specific posix checking" 174 ;; 175 *) 176 set -o posix 177 ;; 178 esac 179 unset system 180 # 181 LANG=POSIX 182 # 183 command=$(basename ${0}) 184 log_date=$(date -u +"%Y%m%dT%H%M%SZ") 185 # 186 usage=" Usage : ${command}" 187 # 188 hostname=$(hostname) 189 # default 190 # N.A. because no parameters 191 # 192 set -u 193 # 194 # check for ${TROPFLUX_LOG} definition 195 if [ "${TROPFLUX_LOG}" = "" ] 196 then 197 echo "${command} : eee : \${TROPFLUX_LOG} not defined" 198 exit 1 199 fi 200 # 201 # check for ${TROPFLUX_LOG} existence 202 if [ ! -d ${TROPFLUX_LOG} ] 203 then 204 echo "${command} : eee : ${TROPFLUX_LOG} not found" 205 exit 1 206 fi 207 # 208 # check for permission access on TROPFLUX_LOG 209 if [ ! -x ${TROPFLUX_LOG} ] 210 then 211 echo "${command} : eee : ${TROPFLUX_LOG} not reachable" 212 exit 1 213 fi 214 # 215 # check for write permission on TROPFLUX_LOG 216 if [ ! -w ${TROPFLUX_LOG} ] 217 then 218 echo "${command} : eee : ${TROPFLUX_LOG} not writable" 219 exit 1 220 fi 221 # 222 dirtemp=${TROPFLUX_LOG}/$(basename ${0} .sh).${log_date}.temp/ 223 mkdir -p ${dirtemp} 224 # 225 log=${TROPFLUX_LOG}/$(basename ${0} .sh).log.${log_date} 226 echo "[Context]" 1>> ${log} 227 echo "command=$(basename ${0})" 1>>${log} 228 echo "hostname=${hostname}" 1>> ${log} 229 echo "runtime=${log_date}" 1>> ${log} 230 unset log_date 231 echo "" 1>> ${log} 100 232 # 101 233 minlat=-90. … … 104 236 maxlon=360. 105 237 reg=GLOB 106 dirtemp=/home/mlengaig/ERAI/1d_2d_${reg}/ 238 yearmin=1989 239 yearmax=2010 240 monthmin=1 241 monthmax=12 242 cmonthmin=$(printf "%2.2d" ${monthmin}) 243 cmonthmax=$(printf "%2.2d" ${monthmax}) 107 244 dirin=/bdd/ERAI/NETCDF/GLOBAL_075/4xdaily/ 108 dirout=/bdd/IPCC/Reanalysis/ERAI/${reg}/ 109 mkdir ${dirout} 110 mkdir ${dirtemp} 111 \rm ${dirtemp}/* 245 # check for dirin existence 246 if [ ! -d ${dirin} ] 247 then 248 echo "${command} : eee : ${dirin} not found" 249 exit 1 250 fi 251 # 252 # check for permission access on dirin 253 if [ ! -x ${dirin} ] 254 then 255 echo "${command} : eee : ${dirin} not reachable" 256 exit 1 257 fi 258 # 259 # lsp = Large scale precipitation 260 # cp = Convective precipitation 112 261 for var in lsp cp; do 113 for date in 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010; do 114 for month in 01 02 03 04 05 06 07 08 09 10 11 12; do 115 for day in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do 116 ncpdq -U ${dirin}/FC_SF/${date}/${month}/${var}.${date}${month}${day}* ${dirtemp}/${var}.${date}${month}${day}.temp.GLOBAL_075.nc 262 yyyy=${yearmin} 263 while [ ${yyyy} -le ${yearmax} ] 264 do 265 month=${monthmin} 266 while [ ${month} -le ${monthmax} ] 267 do 268 cmonth=$(printf "%2.2d" ${month}) 269 daymin=1 270 daymax=$(cal ${month} ${yyyy} | grep . | fmt -1 | tail -1) 271 day=${daymin} 272 while [ ${day} -le ${daymax} ] 273 do 274 cday=$(printf "%2.2d" ${day}) 275 if [ -f ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}* ] 276 then 277 ncpdq -U ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}* ${dirtemp}/${var}.${yyyy}${cmonth}${cday}.temp.GLOBAL_075.nc 278 else 279 echo "${command} : iii : no files ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}*" >> ${log} 280 fi 281 day=$(( ${day} + 1 )) 282 done 283 exist_temp_files=$(find ${dirtemp} -name "${var}.${yyyy}${cmonth}*temp*") 284 if [ "${exist_temp_files}" != "" ] 285 then 286 ncrcat ${dirtemp}/${var}.${yyyy}${cmonth}*temp* ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 287 rm ${dirtemp}/${var}.${yyyy}${cmonth}*temp* 2> /dev/null 288 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 289 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 290 ncflint -w -1,1 ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc 291 ncflint -w 1000.,0.0 ${dirtemp}/temp_time.nc ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc 292 rm ${dirtemp}/temp_time* 2> /dev/null 293 rm ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 2> /dev/null 294 else 295 echo "${command} : iii : no files ${dirtemp}/${var}.${yyyy}${cmonth}*temp*" >> ${log} 296 fi 297 unset exist_temp_files 298 month=$(( ${month} + 1 )) 299 done 300 ncrcat ${dirtemp}/temp_int_${var}_${yyyy}* ${TROPFLUX_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc 301 rm ${dirtemp}/temp_int_${var}_${yyyy}* 2> /dev/null 302 yyyy=$(( ${yyyy} + 1 )) 303 done 117 304 done 118 ncrcat ${dirtemp}/${var}.${date}${month}*temp* ${dirtemp}/${var}.${date}${month}.fshei.GLOBAL_075.nc 119 \rm ${dirtemp}/${var}.${date}${month}*temp* 120 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,5 ${dirtemp}/${var}.${date}${month}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time0.nc 121 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,4,,5 ${dirtemp}/${var}.${date}${month}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 122 ncflint -w -1,1 ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc 123 ncflint -w 1000.,0.0 ${dirtemp}/temp_time.nc ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${date}${month}.nc 124 \rm ${dirtemp}/temp_time* 125 \rm ${dirtemp}/${var}.${date}${month}.fshei.GLOBAL_075.nc 305 # 306 # e = Evaporation 307 # slhf = ? 308 # ssr = Surface solar radiation 309 # trd = ? 310 # sshf = ? 311 # ssrd = Downward surface solar radiation 312 # str = Surface thermal radiation 313 # ewss = East /West surface stress 314 # nsss = North/South surface stress 315 for var in e slhf ssr trd sshf ssrd str ewss nsss ; do 316 yyyy=${yearmin} 317 while [ ${yyyy} -le ${yearmax} ] 318 do 319 month=${monthmin} 320 while [ ${month} -le ${monthmax} ] 321 do 322 cmonth=$(printf "%2.2d" ${month}) 323 daymin=1 324 daymax=$(cal ${month} ${yyyy} | grep . | fmt -1 | tail -1) 325 day=${daymin} 326 while [ ${day} -le ${daymax} ] 327 do 328 cday=$(printf "%2.2d" ${day}) 329 if [ -f ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}* ] 330 then 331 ncpdq -U ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}* ${dirtemp}/${var}.${yyyy}${cmonth}${cday}.temp.GLOBAL_075.nc 332 else 333 echo "${command} : iii : no files ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}*" >> ${log} 334 fi 335 day=$(( ${day} + 1 )) 336 done 337 exist_temp_files=$(find ${dirtemp} -name "${var}.${yyyy}${cmonth}*temp*") 338 if [ "${exist_temp_files}" != "" ] 339 then 340 ncrcat ${dirtemp}/${var}.${yyyy}${cmonth}*temp* ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 341 rm ${dirtemp}/${var}.${yyyy}${cmonth}*temp* 2> /dev/null 342 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 343 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 344 ncflint -w 1.1574074,-1.1574074 ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc 345 ncflint -w 0.00001,0.0 ${dirtemp}/temp_time.nc ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc 346 rm ${dirtemp}/temp_time* 2> /dev/null 347 rm ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 2> /dev/null 348 else 349 echo "${command} : iii : no files ${dirtemp}/${var}.${yyyy}${cmonth}*temp*" >> ${log} 350 fi 351 unset exist_temp_files 352 month=$(( ${month} + 1 )) 353 done 354 ncrcat ${dirtemp}/temp_int_${var}_${yyyy}* ${TROPFLUX_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc 355 rm ${dirtemp}/temp_int_${var}_${yyyy}* 2> /dev/null 356 yyyy=$(( ${yyyy} + 1 )) 357 done 126 358 done 127 ncrcat ${dirtemp}/temp_int_${var}_${date}* /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_${reg}_1d_${date}0101_${date}1231_${var}_gridOrig.nc 128 \rm ${dirtemp}/temp_int_${var}_${date}* 359 # 360 # geopt = Geopotentiel 361 # msl = Mean sea level pressure 362 # sstk = Sea surface temperature 363 # t2 = Temperature at 2 meters 364 # d2 = Dew point at 2 meters 365 # u10 = 10m U wind component 366 # v10 = 10m V wind component 367 for var in geopt msl sstk t2 d2 u10 v10 ; do 368 yyyy=${yearmin} 369 while [ ${yyyy} -le ${yearmax} ] 370 do 371 month=${monthmin} 372 while [ ${month} -le ${monthmax} ] 373 do 374 cmonth=$(printf "%2.2d" ${month}) 375 ncpdq -U ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc 376 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 377 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 378 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 379 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 380 ncea ${dirtemp}/temp_time* ${dirtemp}/temp_int_${yyyy}${cmonth}.nc 381 rm ${dirtemp}/temp_time* 2> /dev/null 382 rm ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc 2> /dev/null 383 month=$(( ${month} + 1 )) 384 done 385 ncrcat ${dirtemp}/temp_int_${yyyy}* ${TROPFLUX_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc 386 rm ${dirtemp}/temp_int_${yyyy}* 2> /dev/null 387 yyyy=$(( ${yyyy} + 1 )) 388 done 129 389 done 130 done 131 132 for var in e slhf ssr trd sshf ssrd str ewss nsss ; do 133 for date in 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 ; do 134 for month in 01 02 03 04 05 06 07 08 09 10 11 12; do 135 for day in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do 136 ncpdq -U ${dirin}/FC_SF/${date}/${month}/${var}.${date}${month}${day}* ${dirtemp}/${var}.${date}${month}${day}.temp.GLOBAL_075.nc 137 done 138 ncrcat ${dirtemp}/${var}.${date}${month}*temp* ${dirtemp}/${var}.${date}${month}.fshei.GLOBAL_075.nc 139 \rm ${dirtemp}/${var}.${date}${month}*temp* 140 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,5 ${dirtemp}/${var}.${date}${month}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time0.nc 141 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,4,,5 ${dirtemp}/${var}.${date}${month}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 142 ncflint -w 1.1574074,-1.1574074 ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc 143 ncflint -w 0.00001,0.0 ${dirtemp}/temp_time.nc ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${date}${month}.nc 144 \rm ${dirtemp}/temp_time* 145 \rm ${dirtemp}/${var}.${date}${month}.fshei.GLOBAL_075.nc 146 done 147 ncrcat ${dirtemp}/temp_int_${var}_${date}* /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_${reg}_1d_${date}0101_${date}1231_${var}_gridOrig.nc 148 \rm ${dirtemp}/temp_int_${var}_${date}* 149 done 150 done 151 152 153 for var in geopt msl sstk t2 d2 u10 v10 ; do 154 for date in 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010; do 155 for month in 01 02 03 04 05 06 07 08 09 10 11 12; do 156 157 ncpdq -U ${dirin}/AN_SF/${date}/${var}.${date}${month}.ashei.GLOBAL_075.nc ${dirtemp}/${var}.${date}${month}.ashei.GLOBAL_075.nc 158 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,4 ${dirtemp}/${var}.${date}${month}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time1.nc 159 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,1,,4 ${dirtemp}/${var}.${date}${month}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time2.nc 160 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,2,,4 ${dirtemp}/${var}.${date}${month}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time3.nc 161 ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,3,,4 ${dirtemp}/${var}.${date}${month}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 162 ncea ${dirtemp}/temp_time* ${dirtemp}/temp_int_${date}${month}.nc 163 \rm ${dirtemp}/temp_time* 164 \rm ${dirtemp}/${var}.${date}${month}.ashei.GLOBAL_075.nc 165 done 166 ncrcat ${dirtemp}/temp_int_${date}* /bdd/IPCC/Reanalysis/ERAI/${reg}/erai_${reg}_1d_${date}0101_${date}1231_${var}_gridOrig.nc 167 168 \rm ${dirtemp}/temp_int_${date}* 169 done 170 done 390 # 391 # end 392 exit 0 -
/trunk/src/interp_erai_t2m_1989_2009.pro
r20 r30 3 3 ; .. _interp_erai_t2m_1989_2009.pro: 4 4 ; 5 ; ============================= 6 ; interp_erai_t2m_1989_2009.pro 7 ; ============================= 5 ; ================================================================================== 6 ; interp_erai_t2m_1989_2009.pro - Interpolation of t2 from ERA-I grid to OAFLUX grid 7 ; ================================================================================== 8 ; 9 ; Interpolation of t2 from ERA-I grid to OAFLUX grid 10 ; 11 ; :file:`${TROPFLUX_ID}/20c3m_erai_t2_TROP_1989_2009.nc` containing t2 from ERA-I have been produced 12 ; by :ref:`compute_erai_daily_region_2d.sh`. 13 ; 14 ; :file:`${TROPFLUX_ID}/mask_oaflux_30N30S.nc` containing OAFLUX grid have been produced by :ref:`oaflux_mask_30N30S.pro`. 15 ; 16 ; Interpolated t2 is written in 17 ; :file:`${TROPFLUX_OD}/erai_t2m_19890101_20091231_oafluxgrid.nc` if this file not already exists. 18 ; 19 ; This output file :file:`${TROPFLUX_OD}/erai_t2m_19890101_20091231_oafluxgrid.nc` must be processed after by :ref:`t2m_correction_ncdf.pro`. 8 20 ; 9 21 ; … … 12 24 ; digraph interp_erai_t2m_1989_2009 { 13 25 ; graph [ 14 ; rankdir=" LR",26 ; rankdir="TB", 15 27 ; ] 16 ; file_in [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/ERAI_global/20c3m_erai_t2_TROP_1989_2009.nc"];28 ; file_in [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/20c3m_erai_t2_TROP_1989_2009.nc"]; 17 29 ; mask [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/mask_oaflux_30N30S.nc"]; 18 30 ; 19 ; ncfile [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/TropFlux/input_uncor/erai_t2m_19890101_20091231_oafluxgrid.nc"];31 ; ncfile [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/erai_t2m_19890101_20091231_oafluxgrid.nc"]; 20 32 ; 21 33 ; interp_erai_t2m_1989_2009 [shape=box, … … 33 45 ; ======== 34 46 ; 47 ; :ref:`interpolate_data` 48 ; 35 49 ; :ref:`tropflux_profile.sh` 50 ; 51 ; :ref:`compute_erai_daily_region_2d.sh` 52 ; 53 ; :ref:`oaflux_mask_30N30S.pro` 36 54 ; 37 55 ; :func:`report <saxo:report>` … … 40 58 ; :func:`initncdf <saxo:initncdf>` 41 59 ; :func:`read_ncdf <saxo:read_ncdf>` 60 ; :func:`ncdf_lec <saxo:ncdf_lec>` 42 61 ; :func:`domdef <saxo:domdef>` 43 62 ; :func:`call_interp2d <saxo:call_interp2d>` 44 63 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 64 ; :func:`ncdf_getatt <saxo:ncdf_getatt>` 65 ; 66 ; :ref:`t2m_correction_ncdf.pro` 45 67 ; 46 68 ; EXAMPLES … … 49 71 ; :: 50 72 ; 73 ; IDL> .compile file_interp 51 74 ; IDL> interp_erai_t2m_1989_2009 52 75 ; … … 55 78 ; ==== 56 79 ; 57 ; hard coded directory - usage of ${TROPFLUX_ID} 80 ; strange view (lat and lon shift with ncview) : check grid init 81 ; 82 ; remove useless netcdf_read 83 ; 84 ; check time values 85 ; 86 ; why use :func:`call_interp2d <saxo:call_interp2d>` : this is an hidden function of SAXO 87 ; see :func:`file_interp <saxo:file_interp>` 88 ; 89 ; use as input a file produced by compute_erai_daily_region_2d.sh 58 90 ; 59 91 ; coding rules 92 ; 93 ; hard coded time in module name and in output filename 94 ; 95 ; why two "initncdf, fullfilename_msk" 96 ; 97 ; hard coded attributes for t2m (missing value, short name, axis) and time (origin) : use ncdf_getatt 98 ; 99 ; CF conventions 60 100 ; 61 101 ; KNOWN ISSUES … … 68 108 ; ========== 69 109 ; 110 ; - fplod 20110103T153734Z aedon.locean-ipsl.upmc.fr (Darwin) 111 ; 112 ; * computed first and last dates 113 ; * start using ncdf_getatt instead of hard coded attributes 114 ; 115 ; - fplod 20101223T130406Z aedon.locean-ipsl.upmc.fr (Darwin) 116 ; 117 ; * replace /Volumes/PRAVEEN/TropFlux/input_uncor/ by ${TROPFLUX_OD} 118 ; * complete documentation 119 ; * get time dimension in data file 120 ; * replace read_ncdf by ncdf_lec 121 ; 122 ; usage of timestep keyword in read_ncdf was not efficient because of memory problem : 123 ; can not read the whole time range (ok with 7580, not ok with 7591 while need is 7670 124 ; :: 125 ; 126 ; % Unable to allocate memory: to make array. 127 ; Cannot allocate memory 128 ; 129 ; 130 ; When timestep keyword is not used we can see these messages:: 131 ; 132 ; /usr/work/incas/fplod/tropflux_d/20c3m_erai_t2_TROP_1989_2009.nc as no time axis variable 133 ; given by Praveen 134 ; 135 ; Value of Julian date is out of allowed range 136 ; 137 ; % Array used to subscript array contains out of range subscript: DATAIN 138 ; 139 ; 140 ; - fplod 20101222T163216Z aedon.locean-ipsl.upmc.fr (Darwin) 141 ; 142 ; * replace /Volumes/PRAVEEN/ERAI_global by ${TROPFLUX_ID} 143 ; 70 144 ; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 71 145 ; … … 86 160 ;- 87 161 pro interp_erai_t2m_1989_2009 162 ; 88 163 @common 89 164 ; … … 123 198 STOP 124 199 ENDIF 125 126 filein='/Volumes/PRAVEEN/ERAI_global/20c3m_erai_t2_TROP_1989_2009.nc' 127 128 initncdf, filein 200 ; 201 ; build t2 filename 202 filename_t2='20c3m_erai_t2_TROP_1989_2009.nc' 203 ; 204 ; check if this file exists 205 fullfilename_t2 = isafile(iodirin + filename_t2, NEW=0, /MUST_EXIST) 206 IF fullfilename_t2[0] EQ '' THEN BEGIN 207 msg = 'eee : the file ' + fullfilename_t2 + ' was not found.' 208 ras = report(msg) 209 STOP 210 ENDIF 211 ; 212 ; test if ${TROPFLUX_OD} defined 213 tropflux_od_env=GETENV('TROPFLUX_OD') 214 CASE tropflux_od_env OF 215 '' : BEGIN 216 msg = 'eee : ${TROPFLUX_OD} is not defined' 217 ras = report(msg) 218 STOP 219 END 220 ELSE: BEGIN 221 msg = 'iii : ${TROPFLUX_OD} is ' + tropflux_od_env 222 ras = report(msg) 223 END 224 ENDCASE 225 ; 226 ; check if output data will be possible 227 iodirout = isadirectory(tropflux_od_env) 228 ; 229 ; existence and protection 230 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 231 msg = 'eee : the directory' + iodirout + ' was not found.' 232 ras = report(msg) 233 STOP 234 ENDIF 235 ; 236 ; build output filename 237 filename_out = 'erai_t2m_19890101_20091231_oafluxgrid.nc' 238 fullfilename_out = iodirout + filename_out 239 ; in order to avoid unexpected overwritten 240 IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 241 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 242 ras = report(msg) 243 STOP 244 ENDIF 245 ; 246 ; define grid parameters with t2 file 247 initncdf, fullfilename_t2 129 248 domdef 130 latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0)) 131 print, 'lat grid ',min(latin),max(latin),latin(1)-latin(0) 132 print, 'lon grid ',min(lonin),max(lonin),lonin(1)-lonin(0) 133 t2min=read_ncdf("t2",19880101,20100930,file=filein,/nostr) 134 135 timein=time & jptin=jpt 136 tab=t2min(*,*,0) 249 latin=reform(gphit(0,*)) 250 lonin=reform(glamt(*,0)) 251 print, 'lat grid from data',min(latin),max(latin),latin(1)-latin(0) 252 print, 'lon grid from data',min(lonin),max(lonin),lonin(1)-lonin(0) 253 ; 254 ; get time in t2 file 255 timein=ncdf_lec(fullfilename_t2,var='time') 256 jptin=n_elements(timein) 257 print, 'time steps from data ', jptin 258 print, 'The first 10 time values (variable timein) = ', timein[0:9] 259 ; 260 ; find first and last dates yyyymmdd 261 ; they will be written in global attributes of output file 262 da=jul2date(julday(01, 01, 1957,timein[0])) 263 cda0=string(da,format='(i8.8)') 264 da=jul2date(julday(01, 01, 1957,timein[jptin-1])) 265 cda1=string(da,format='(i8.8)') 266 print, 'first date ', cda0 267 print, 'last date ' , cda1 268 269 ; read t2 data 270 ;++ pb memory t2min=read_ncdf("t2",0,jptin-1,/timestep,file=fullfilename_t2,/nostr) 271 ; the following line is here just to prepare replacement of read_ncdf by ncdf_lec 272 t2min_read_ncdf=read_ncdf("t2",0,10,/timestep,file=fullfilename_t2,/nostr) 273 help, t2min_read_ncdf 274 ;++print, 'The first 10 time values (variable time) = ', time[0:9] 275 ;++print, 'time steps after read_ncdf (variable jpt) ', jpt 276 t2min=ncdf_lec(fullfilename_t2,var='t2') 277 ; 137 278 mskin=glamt*0.+1. 138 279 280 ; define grid parameters with mask file 139 281 initncdf, fullfilename_msk 140 282 domdef 141 latout=reform(gphit(0,*)) & lonout=reform(glamt(*,0)) 142 print, 'lat grid ',min(latout),max(latout),latout(1)-latout(0) 143 print, 'lon grid ',min(lonout),max(lonout),lonout(1)-lonout(0) 283 latout=reform(gphit(0,*)) 284 lonout=reform(glamt(*,0)) 285 print, 'lat grid from mask ',min(latout),max(latout),latout(1)-latout(0) 286 print, 'lon grid from mask ',min(lonout),max(lonout),lonout(1)-lonout(0) 144 287 mskout=read_ncdf("msk", file=fullfilename_msk,/nostr) 145 288 ; 146 289 help, t2min,lonin,latin,mskin,lonout,latout,mskout 147 si=size(t2min) 290 ; 291 ; interpolation and mask 148 292 t2mout=fltarr(jpi,jpj,jptin) 149 293 for jt=0,jptin-1 do begin 150 print, 'Interpolation jt=',jt,' / ',jptin-1151 294 tab=reform(t2min(*,*,jt)) 152 295 t2mout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin,lonout,latout,method='bilinear') … … 154 297 endfor 155 298 156 timein=timein & jptin=jpt157 158 299 initncdf, fullfilename_msk 159 help, t2mout160 tt=timein161 time=julday(1,1,1989)+lindgen(7670)+0.5 & jpt=n_elements(time)162 ;cda0=string(jul2date(time(0)),format='(i8.8)')163 ;cda1=string(jul2date(time(jpt-1)),format='(i8.8)')164 ;cda0=string('19890101') & cda1=string('20091231')165 166 timein=time-julday(1,1,1950,00,00)167 300 168 301 lat=latout 169 302 lon=lonout 170 ncfile='!/Volumes/PRAVEEN/TropFlux/input_uncor/erai_t2m_19890101_20091231_oafluxgrid.nc' 171 lon_attr={units:'degrees_east',long_name:'Longitude'} 172 lat_attr={units:'degrees_north',long_name:'Latitude'} 173 time_attr={units:'hours since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:' 1950-JAN-01 00:00:00'} 174 t2m_attr={units:'degK',missing_value:1e20,long_name:'Air Temperature at 2m',short_name:'t2m',axis:'TYX'} 303 ncfile='!' + fullfilename_out 304 print, 'ncfile ', ncfile 305 ncdf_getatt, fullfilename_msk, 'longitude', units=units 306 ncdf_getatt, fullfilename_msk, 'longitude', long_name=long_name 307 lon_attr={units:units, long_name:long_name} 308 ncdf_getatt, fullfilename_msk, 'latitude', units=units 309 ncdf_getatt, fullfilename_msk, 'latitude', long_name=long_name 310 lat_attr={units:units, long_name:long_name} 311 ncdf_getatt, fullfilename_t2, 'time', units=units 312 ncdf_getatt, fullfilename_t2, 'time', long_name=long_name 313 time_attr={units:units, long_name:long_name, time_origin:' 1957-JAN-01 00:00:00'} 314 ncdf_getatt, fullfilename_t2, 't2', units=units 315 ncdf_getatt, fullfilename_t2, 't2', long_name=long_name 316 t2m_attr={units:units, long_name:long_name, missing_value:1e20, short_name:'t2m',axis:'TYX'} 175 317 globattr={source:'Data are from ECMWF ERA-Interim reanalysis', timerange:cda0+' - '+cda1} 176 318 -
/trunk/src/t2m_correction_ncdf.pro
r20 r30 6 6 ; t2m_correction_ncdf.pro 7 7 ; ======================= 8 ; 9 ; Mean correction for air temperature bias and correction for variability are 10 ; applied. 11 ; 12 ; :file:`${TROPFLUX_ID}/erai_t2m_19890101_20091231_oafluxgrid.nc` have been produced by :ref:`interp_erai_t2m_1989_2009.pro`. 13 ; It contains air temperature at 2 m height from ERA-I interpolated on OAFLUX grid. 14 ; 15 ; Corrected air temperature at 2 m height is written in 16 ; :file:`${TROPFLUX_OD}/TropFlux_t2m_19890101_20091231_v50.nc`. 8 17 ; 9 18 ; .. graphviz:: … … 14 23 ; ] 15 24 ; 16 ; file_t2m [shape=ellipse,fontname=Courier,label=" /Volumes/Iomega_HDD/TropFlux/input_uncor/erai_t2m_19890101_20091231_oafluxgrid.nc"];17 ; 18 ; ncfile [shape=ellipse,fontname=Courier,label=" /Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_t2m_19890101_20091231_v20.nc"];25 ; file_t2m [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_t2m_19890101_20091231_oafluxgrid.nc"]; 26 ; 27 ; ncfile [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/TropFlux_t2m_19890101_20091231_v50.nc"]; 19 28 ; 20 29 ; t2m_correction_ncdf [shape=box, … … 30 39 ; SEE ALSO 31 40 ; ======== 41 ; 42 ; :ref:`tropflux_profile.sh` 43 ; 44 ; :ref:`mooring_corrections` 45 ; 46 ; :ref:`interp_erai_t2m_1989_2009.pro` 32 47 ; 33 48 ; :func:`initncdf <saxo:initncdf>` … … 38 53 ; :func:`jul2date <saxo:jul2date>` 39 54 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 55 ; :func:`ncdf_getatt <saxo:ncdf_getatt>` 40 56 ; 41 57 ; EXAMPLES … … 49 65 ; ==== 50 66 ; 51 ; hard coded directory - usage of ${TROPFLUX_ID}67 ; make it work !! 52 68 ; 53 69 ; coding rules 70 ; 71 ; understand usage of jtt 72 ; 73 ; check time values 74 ; 75 ; hard coded time in module name and in output filename 76 ; 77 ; why v50 in filename output 78 ; 79 ; hard coded correction values 80 ; 81 ; check side effect of replacement of read_ncdf by ncdf_lec :: 82 ; 83 ; Probleme d'adequation entre les tailles du domaine nx*ny*jpt 350*60*1 et du tableau 350*60*7670 84 ; 85 ; 86 ; hard coded attributes 87 ; 88 ; CF conventions 89 ; 90 ; KNOWN ISSUES 91 ; ============ 92 ; 93 ; test of existence of fullfilename_msk not very efficient because 94 ; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented 54 95 ; 55 96 ; EVOLUTIONS 56 97 ; ========== 57 98 ; 99 ; - fplod 20110104T093758Z aedon.locean-ipsl.upmc.fr (Darwin) 100 ; 101 ; * complete header 102 ; * replace /Volumes/Iomega_HDD/TropFlux/input_uncor/ by ${TROPFLUX_ID} 103 ; * replace /Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/ by 104 ; ${TROPFLUX_OD} 105 ; * use :func:`ncdf_getatt <saxo:ncdf_getatt>` for attributes of lat and long 106 ; variables 107 ; * same problem of time axis and memory like in interp_erai_t2m_1989_2009 108 ; using read_ncdf. 109 ; replace read_ncdf by netcdf_lec 110 ; 58 111 ; - fplod 20101215T114503Z aedon.locean-ipsl.upmc.fr (Darwin) 59 112 ; … … 70 123 ;- 71 124 pro t2m_correction_ncdf 125 ; 72 126 @common 73 da1=19890101 & da2=20091231 74 75 file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_t2m_19890101_20091231_oafluxgrid.nc' 76 initncdf, file 77 t2m=read_ncdf('t2m',da1,da2,file=file,/nostr) & t2m=t2m-273.15 127 ; check for input directory 128 ; 129 ; test if ${TROPFLUX_ID} defined 130 tropflux_id_env=GETENV('TROPFLUX_ID') 131 CASE tropflux_id_env OF 132 '' : BEGIN 133 msg = 'eee : ${TROPFLUX_ID} is not defined' 134 ras = report(msg) 135 STOP 136 END 137 ELSE: BEGIN 138 msg = 'iii : ${TROPFLUX_ID} is ' + tropflux_id_env 139 ras = report(msg) 140 END 141 ENDCASE 142 ; 143 iodirin = isadirectory(tropflux_id_env) 144 ; 145 ; existence and protection of ${TROPFLUX_ID} 146 IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 147 msg = 'eee : the directory' + iodirin + ' is not accessible.' 148 ras = report(msg) 149 STOP 150 ENDIF 151 ; 152 ; build uncorrected t2 filename 153 da1=19890101 154 da2=20091231 155 filename_t2_uncor='erai_t2m_'+ string(da1,format='(i8.8)')+'_'+ string(da2,format='(i8.8)')+'_oafluxgrid.nc' 156 ; 157 ; check if this file exists 158 fullfilename_t2_uncor = isafile(iodirin + filename_t2_uncor, NEW=0, /MUST_EXIST) 159 IF fullfilename_t2_uncor[0] EQ '' THEN BEGIN 160 msg = 'eee : the file ' + fullfilename_t2_uncor + ' was not found.' 161 ras = report(msg) 162 STOP 163 ENDIF 164 ; test if ${TROPFLUX_OD} defined 165 tropflux_od_env=GETENV('TROPFLUX_OD') 166 CASE tropflux_od_env OF 167 '' : BEGIN 168 msg = 'eee : ${TROPFLUX_OD} is not defined' 169 ras = report(msg) 170 STOP 171 END 172 ELSE: BEGIN 173 msg = 'iii : ${TROPFLUX_OD} is ' + tropflux_od_env 174 ras = report(msg) 175 END 176 ENDCASE 177 ; 178 ; check if output data will be possible 179 iodirout = isadirectory(tropflux_od_env) 180 ; 181 ; existence and protection 182 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 183 msg = 'eee : the directory' + iodirout + ' was not found.' 184 ras = report(msg) 185 STOP 186 ENDIF 187 ; 188 ; build output filename 189 filename_out='TropFlux_t2m_'+ string(da1,format='(i8.8)')+'_'+ string(da2,format='(i8.8)')+'_v50.nc' 190 fullfilename_out = iodirout + filename_out 191 ; in order to avoid unexpected overwritten 192 IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 193 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 194 ras = report(msg) 195 STOP 196 ENDIF 197 ; 198 ; define grid parameters with t2 file 199 initncdf, fullfilename_t2_uncor 200 ; 201 ; get time in t2 file 202 timein=ncdf_lec(fullfilename_t2_uncor,var='time') 203 jptin=n_elements(timein) 204 print, 'time steps from data ', jptin 205 print, 'The first 10 time values (variable timein) = ', timein[0:9] 206 ; 207 ; find first and last dates yyyymmdd 208 ; they will be written in global attributes of output file 209 da=jul2date(julday(01, 01, 1957,timein[0])) 210 cda0=string(da,format='(i8.8)') 211 da=jul2date(julday(01, 01, 1957,timein[jptin-1])) 212 cda1=string(da,format='(i8.8)') 213 print, 'first date ', cda0 214 print, 'last date ' , cda1 215 ; 216 ; read t2 data 217 t2m=ncdf_lec(fullfilename_t2_uncor,var='t2m') 218 ; 219 t2m=t2m-273.15 78 220 help, t2m 79 221 ; 222 jpt=jptin 80 223 t2m_mean=grossemoyenne(t2m,'t',/nan) 81 help, w_mean 82 83 tt=time & jpt=n_elements(time) 84 caldat, time,mon,day,yea 224 help, t2m_mean 225 85 226 t2m_m=t2m*0. 86 227 bias_cor=t2m*0. … … 89 230 ;; line fit -> -0.0741607x + 1.67601 ;; (2000-2009) 90 231 91 for jt=0,jpt-1 do begin 92 jtt=(time(jt)-julday(1,1,yea(jt))) < 364 232 for jt=0,jptin-1 do begin 233 caldat, julday(01, 01, 1957,timein[jt]),mon,day,yea 234 ;++print,day 235 jtt=(julday(01, 01, 1957,timein[jt])-julday(1,1,yea)) < 364 93 236 t=reform(t2m_mean(*,*)) 94 237 t2m_m(*,*,jt)=t … … 116 259 lat=reform(gphit(0,0:jpj-1)) 117 260 lon=reform(glamt(0:jpi-1,0)) 118 time=timegen(7670, units='days', start=julday(1,1,1989)) & jpt=n_elements(time) 119 120 cda0=string(jul2date(time(0)),format='(i8.8)') 121 cda1=string(jul2date(time(jpt-1)),format='(i8.8)') 122 123 time=time-julday(1,1,1950) & jpt=n_elements(time) 124 125 ;ncfile='!/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_t2m_19890101_20091231_v20.nc' 126 ncfile='!/Users/pkb/data/TropFlux/TropFlux_t2m_19890101_20091231_v50.nc' 127 lon_attr={units:'degrees_east',long_name:'Longitude'} 128 lat_attr={units:'degrees_north',long_name:'Latitude'} 261 cda0=string(da1) 262 cda1=string(da2) 263 264 time=time-julday(1,1,1950) 265 jpt=n_elements(time) 266 267 ncfile='!' + fullfilename_out 268 269 ncdf_getatt, fullfilename_t2_uncor, 'longitude', units=units 270 ncdf_getatt, fullfilename_t2_uncor, 'longitude', long_name=long_name 271 lon_attr={units:units, long_name:long_name} 272 ncdf_getatt, fullfilename_t2_uncor, 'latitude', units=units 273 ncdf_getatt, fullfilename_t2_uncor, 'latitude', long_name=long_name 274 lat_attr={units:units, long_name:long_name} 275 129 276 time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'} 130 t2m_attr={units:'degK',missing_value:1.e20,long_name:'Air Temperature at 2m',short_name:'t2m',axis:'TYX'} 277 278 ncdf_getatt, fullfilename_t2_uncor, 't2m', units=units 279 ncdf_getatt, fullfilename_t2_uncor, 't2m', long_name=long_name 280 t2m_attr={units:units,missing_value:1.e20,long_name:long_name,short_name:'t2m',axis:'TYX'} 131 281 globattr={source:'Basic data obtained from ERAI. Mean correction for air temperautre bias and correction for variability are applied',timerange:cda0+' - '+cda1} 132 282 -
/trunk/src/time_axe_modif_TropFlux.pro
r20 r30 30 30 ; ======== 31 31 ; 32 ; :func:`initncdf <saxo:initncdf>`33 ; :func:`read_ncdf <saxo:read_ncdf>`34 ; :func:`grossemoyenne <saxo:grossemoyenne>`35 32 ; :func:`julday <saxo:julday>` 36 ; :func:`jul2date <saxo:jul2date>`37 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>`38 33 ; 39 34 ; EXAMPLES … … 50 45 ; 51 46 ; coding rules 47 ; 48 ; why 1950 whereas "hours since 1957-01-01 00:00:0.0" can be read in 49 ; 20c3m_erai_t2_TROP_1989_2009.nc 50 ; 51 ; no change off attributs : wrong info vs data on time 52 52 ; 53 53 ; EVOLUTIONS
Note: See TracChangeset
for help on using the changeset viewer.