Changeset 153 for trunk/src/oaflux_mask_30n30s.pro
- Timestamp:
- 03/05/12 18:59:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/oaflux_mask_30n30s.pro
- Property svn:keywords set to Id URL
r99 r153 1 1 ;+ 2 2 ; 3 ; .. _oaflux_mask_30n30s.pro:4 ;5 3 ; ====================== 6 ; oaflux_mask_30n30s.pro 4 ; oaflux_mask_30n30s.pro 7 5 ; ====================== 6 ; 7 ; .. function:: oaflux_mask_30n30s() 8 ; 9 ; DESCRIPTION 10 ; =========== 8 11 ; 9 12 ; Produce a NetCDF file with OAFLUX mask over global tropical oceans (30N-30S) … … 33 36 ; } 34 37 ; 38 ; :returns: 0 if ok, -1 if error 39 ; :rtype: integer 40 ; 35 41 ; SEE ALSO 36 42 ; ======== … … 40 46 ; :ref:`guide data OAFLUX <data_in_oaflux>` 41 47 ; 42 ; :ref:`project_profile.sh` 43 ; :ref:`project_init.pro` 48 ; Environement : 49 ; :ref:`project_profile.sh`, 50 ; :ref:`project_init.pro`, 44 51 ; :ref:`cm_project.pro` 45 52 ; 46 ; :ref:`get_oaflux.sh` 47 ; 48 ; :func:`report <saxo:report>` 49 ; :func:`initncdf <saxo:initncdf>` 50 ; :func:`ncdf_lec <saxo:ncdf_lec>` 51 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 52 ; :func:`isadirectory <saxo:isadirectory>` 53 ; Previous step : :ref:`get_oaflux.sh` 54 ; 55 ; Use : 56 ; :func:`report <saxo:report>`, 57 ; :func:`initncdf <saxo:initncdf>`, 58 ; :func:`ncdf_lec <saxo:ncdf_lec>`, 59 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>`, 60 ; :func:`isadirectory <saxo:isadirectory>`, 53 61 ; :func:`isafile <saxo:isafile>` 54 62 ; 55 ; :ref:`TropFlux_19890101_20091231.pro` 56 ; :ref:`interp_erai_dewt_1989_2009.pro` 57 ; :ref:`interp_erai_lwr_1989_2009.pro` 58 ; :ref:`interp_erai_sst_1989_2009.pro` 59 ; :ref:`interp_erai_t2m_1989_2009.pro` 60 ; :ref:`interp_erai_ws_1989_2009.pro` 63 ; Following program use :func:`oaflux_mask_30n30s` output: 64 ; :ref:`TropFlux_19890101_20091231.pro`, 65 ; :ref:`interp_erai_dewt_1989_2009.pro`, 66 ; :ref:`interp_erai_lwr_1989_2009.pro`, 67 ; :ref:`interp_erai_sst_1989_2009.pro`, 68 ; :ref:`interp_erai_t2m_1989_2009.pro`, 69 ; :ref:`interp_erai_ws_1989_2009.pro`, 61 70 ; :ref:`interp_olr_30n30s_1989_2009.pro` 62 71 ; … … 66 75 ; :: 67 76 ; 68 ; IDL> oaflux_mask_30n30s77 ; IDL> result = oaflux_mask_30n30s() 69 78 ; 70 79 ; TODO … … 74 83 ; 75 84 ; coding rules 76 ;77 ; pro -> function78 85 ; 79 86 ; NetCDF CF (may be area_type) … … 83 90 ; - while data latitude=[-29.5,+29.5] longitude=[30.5,379.5] 84 91 ; 92 ; 30n30s in name vs future global output ... parameters lat and long max 93 ; 85 94 ; KNOWN ISSUES 86 95 ; ============ … … 91 100 ; EVOLUTIONS 92 101 ; ========== 93 ; 102 ; 94 103 ; $Id$ 104 ; 105 ; $URL$ 106 ; 107 ; - fplod 20120305 108 ; 109 ; * pro -> function 95 110 ; 96 111 ; - fplod 20110411T140133Z aedon.locean-ipsl.upmc.fr (Darwin) … … 98 113 ; * usage of tropflux_init and cm_project 99 114 ; * replace 30N30S by 30n30s 100 ; 115 ; 101 116 ; - fplod 20101217T081915Z aedon.locean-ipsl.upmc.fr (Darwin) 102 117 ; … … 114 129 ;- 115 130 ; 116 PROoaflux_mask_30n30s131 FUNCTION oaflux_mask_30n30s 117 132 ; 118 133 @cm_4cal … … 122 137 @cm_project 123 138 139 ; Return to caller if errors 140 on_error, 2 141 ; 142 result = -1 143 ; 144 usage = 'result=oaflux_mask_30n30s()' 145 nparam = N_PARAMS() 146 IF (nparam NE 0) THEN BEGIN 147 ras = report(['Incorrect number of arguments.' $ 148 + '!C' $ 149 + 'Usage : ' + usage]) 150 return, -1 151 ENDIF 152 ; 124 153 ; check for input file 125 154 ; build input filename … … 133 162 msg = 'eee : the file ' + fullfilename_in + ' was not found.' 134 163 ras = report(msg) 135 STOP164 return, -1 136 165 ENDIF 137 166 ; … … 141 170 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 142 171 ras = report(msg) 143 STOP172 return, -1 144 173 ENDIF 145 174 ; 146 175 ; Read oaflux grid and mask 147 176 initncdf, fullfilename_in 148 lh=ncdf_lec(fullfilename_in,var='lhtfl',count=[jpi,jpj,1]) 177 lh=ncdf_lec(fullfilename_in,var='lhtfl',count=[jpi,jpj,1]) 149 178 lh=float(lh) 150 179 valmask=1.e20 151 ind=where(lh ge 32000,compl=nind) 152 lh(ind)=valmask 180 ind=where(lh ge 32000,compl=nind) 181 lh(ind)=valmask 153 182 lh(nind)=-0.1*lh(nind) 154 183 mask_out=(lh ne valmask) … … 178 207 @ncdf_quickwrite 179 208 209 result = 0 210 211 return, result 180 212 END
Note: See TracChangeset
for help on using the changeset viewer.