[6] | 1 | ;+ |
---|
| 2 | ; |
---|
| 3 | ; .. _TropFlux_19890101_20091231.pro: |
---|
| 4 | ; |
---|
| 5 | ; ============================== |
---|
| 6 | ; TropFlux_19890101_20091231.pro |
---|
| 7 | ; ============================== |
---|
| 8 | ; |
---|
| 9 | ; This program computes net heat flux components on the 1° oaflux grid. |
---|
| 10 | ; |
---|
| 11 | ; all input variables are corrected for mean bias and variability. |
---|
| 12 | ; |
---|
| 13 | ; gustiness correction is applied for wind speed based on cronin's climatological |
---|
| 14 | ; gustiness values. |
---|
| 15 | ; |
---|
[74] | 16 | ; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` containing OAFLUX grid have been produced by :ref:`oaflux_mask_30N30S.pro`. |
---|
[7] | 17 | ; |
---|
[74] | 18 | ; :file:`${PROJECT_OD}/TropFlux_sst_19890101_20091231.nc` containing sst corrected on OAFLUX grid have been produced by :ref:`sst_correction_ncdf.pro`. |
---|
| 19 | ; |
---|
| 20 | ; :file:`${PROJECT_OD}/TropFlux_ws_19890101_20091231.nc` containing ws corrected on OAFLUX grid have been produced by :ref:`ws_correction_ncdf.pro`. |
---|
| 21 | ; |
---|
| 22 | ; :file:`${PROJECT_OD}/TropFlux_gustiness_19890101_20091231.nc` containing ++ |
---|
[77] | 23 | ; have been produced by :ref:`cronin_gustiness_ncdf.pro`. |
---|
[74] | 24 | ; |
---|
| 25 | ; :file:`${PROJECT_OD}/TropFlux_swr_19890101_20091231_BLND.nc` containing ws corrected on OAFLUX grid |
---|
| 26 | ; have been produced by :ref:`TropFlux_swr_BLND_19890101_20091231.pro`. |
---|
| 27 | ; |
---|
| 28 | ; :file:`${PROJECT_OD}/TropFlux_lwr_19890101_20091231.nc` containing lwr corrected on OAFLUX grid have been produced by :ref:`lwr_correction_ncdf.pro`. |
---|
| 29 | ; |
---|
| 30 | ; :file:`${PROJECT_OD}/TropFlux_t2m_19890101_20091231.nc` containing t2m corrected on OAFLUX grid have been produced by :ref:`t2m_correction_ncdf.pro`. |
---|
| 31 | ; |
---|
| 32 | ; :file:`${PROJECT_OD}/TropFlux_q2m_19890101_20091231.nc` containing q2m corrected on OAFLUX grid have been produced by :ref:`d2m_to_q2m_erai.pro`. |
---|
| 33 | ; |
---|
| 34 | ; net heat flux components are written |
---|
| 35 | ; in :file:`${PROJECT_OD}/TropFlux_19890101_20091231.nc` |
---|
| 36 | ; if this file not already exists. |
---|
| 37 | ; |
---|
[7] | 38 | ; .. graphviz:: |
---|
| 39 | ; |
---|
[74] | 40 | ; digraph tropflux_19890101_20091231 { |
---|
[7] | 41 | ; graph [ |
---|
| 42 | ; rankdir="LR", |
---|
| 43 | ; ] |
---|
[74] | 44 | ; |
---|
[50] | 45 | ; mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; |
---|
[74] | 46 | ; file_sst [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_sst_19890101_20091231.nc"]; |
---|
| 47 | ; file_ws [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_ws_19890101_20091231.nc"]; |
---|
| 48 | ; file_wg [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_gustiness_19890101_20091231.nc"]; |
---|
| 49 | ; file_swr [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20091231_BLND.nc"]; |
---|
| 50 | ; file_lwr [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_lwr_19890101_20091231.nc"]; |
---|
| 51 | ; file_t2m [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_t2m_19890101_20091231.nc"]; |
---|
| 52 | ; file_q2m [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_q2m_19890101_20091231.nc"]; |
---|
[7] | 53 | ; |
---|
[74] | 54 | ; file_out[shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_19890101_20091231.nc"]; |
---|
[7] | 55 | ; |
---|
[74] | 56 | ; tropflux_19890101_20091231 [shape=box, |
---|
[7] | 57 | ; fontname=Courier, |
---|
| 58 | ; color=blue, |
---|
| 59 | ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_19890101_20091231.pro", |
---|
[50] | 60 | ; label="${PROJECT}/src/TropFlux_19890101_20091231.pro"]; |
---|
[7] | 61 | ; |
---|
[74] | 62 | ; {mask file_sst file_ws file_wg file_swr file_lwr file_t2m file_q2m} -> {tropflux_19890101_20091231} -> {file_out} |
---|
[9] | 63 | ; |
---|
[7] | 64 | ; } |
---|
| 65 | ; |
---|
[6] | 66 | ; SEE ALSO |
---|
| 67 | ; ======== |
---|
| 68 | ; |
---|
[50] | 69 | ; :ref:`project_profile.sh` |
---|
[19] | 70 | ; |
---|
[20] | 71 | ; :func:`report <saxo:report>` |
---|
| 72 | ; :func:`isadirectory <saxo:isadirectory>` |
---|
| 73 | ; :func:`isafile <saxo:isafile>` |
---|
| 74 | ; :func:`initncdf <saxo:initncdf>` |
---|
| 75 | ; :func:`ncdf_lec <saxo:ncdf_lec>` |
---|
| 76 | ; :func:`read_ncdf <saxo:read_ncdf>` |
---|
| 77 | ; :func:`caldat <saxo:caldat>` |
---|
| 78 | ; :func:`julday <saxo:julday>` |
---|
| 79 | ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` |
---|
| 80 | ; |
---|
[7] | 81 | ; :func:`cor30a` |
---|
| 82 | ; |
---|
[6] | 83 | ; EXAMPLES |
---|
| 84 | ; ======== |
---|
| 85 | ; |
---|
| 86 | ; :: |
---|
| 87 | ; |
---|
[74] | 88 | ; IDL> .compile TropFlux_19890101_20091231 |
---|
[6] | 89 | ; IDL> tropflux_19890101_20091231 |
---|
| 90 | ; |
---|
| 91 | ; TODO |
---|
| 92 | ; ==== |
---|
| 93 | ; |
---|
[74] | 94 | ; I (fp) do not know how |
---|
| 95 | ; ${PROJECT_OD}/TropFlux_swr_19890101_20091231_BLND.nc is produced. |
---|
[6] | 96 | ; |
---|
[74] | 97 | ; avoid mix lower/uppercase in pro name to avoid compile |
---|
| 98 | ; |
---|
[6] | 99 | ; coding rules |
---|
| 100 | ; |
---|
[19] | 101 | ; KNOWN ISSUES |
---|
| 102 | ; ============ |
---|
| 103 | ; |
---|
| 104 | ; test of existence of fullfilename_msk not very efficient because |
---|
| 105 | ; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented |
---|
| 106 | ; |
---|
[6] | 107 | ; EVOLUTIONS |
---|
| 108 | ; ========== |
---|
| 109 | ; |
---|
[74] | 110 | ; - fplod 20110809T110911Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 111 | ; |
---|
| 112 | ; * complete descritption |
---|
| 113 | ; * remove v* from filenames (in and out) |
---|
| 114 | ; * usage of ${PROJECT_OD} |
---|
| 115 | ; * remove return statement |
---|
| 116 | ; * add test on IO files |
---|
| 117 | ; |
---|
[19] | 118 | ; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 119 | ; |
---|
| 120 | ; * remove hard coded directory for mask_oaflux_30N30S.nc |
---|
| 121 | ; |
---|
[7] | 122 | ; - fplod 20101214T112131Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 123 | ; |
---|
| 124 | ; * add graph |
---|
| 125 | ; |
---|
[6] | 126 | ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 127 | ; |
---|
| 128 | ; * minimal header |
---|
| 129 | ; |
---|
| 130 | ; - pbk 2008 |
---|
| 131 | ; |
---|
| 132 | ; * creation |
---|
| 133 | ; |
---|
| 134 | ;- |
---|
| 135 | ; |
---|
[5] | 136 | pro TropFlux_19890101_20091231 |
---|
[74] | 137 | ; |
---|
| 138 | @cm_4cal |
---|
| 139 | @cm_4data |
---|
| 140 | @cm_4mesh |
---|
| 141 | @cm_4data |
---|
[50] | 142 | @cm_project |
---|
[19] | 143 | ; |
---|
[20] | 144 | ; check for input directory |
---|
[19] | 145 | ; |
---|
[50] | 146 | ; test if ${PROJECT_ID} defined |
---|
| 147 | CASE project_id_env OF |
---|
[19] | 148 | '' : BEGIN |
---|
[50] | 149 | msg = 'eee : ${PROJECT_ID} is not defined' |
---|
[19] | 150 | ras = report(msg) |
---|
| 151 | STOP |
---|
| 152 | END |
---|
| 153 | ELSE: BEGIN |
---|
[50] | 154 | msg = 'iii : ${PROJECT_ID} is ' + project_id_env |
---|
[19] | 155 | ras = report(msg) |
---|
| 156 | END |
---|
| 157 | ENDCASE |
---|
| 158 | ; |
---|
[50] | 159 | iodirin = isadirectory(project_id_env) |
---|
[19] | 160 | ; |
---|
[50] | 161 | ; existence and protection of ${PROJECT_ID} |
---|
[19] | 162 | IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN |
---|
| 163 | msg = 'eee : the directory' + iodirin + ' is not accessible.' |
---|
| 164 | ras = report(msg) |
---|
| 165 | STOP |
---|
| 166 | ENDIF |
---|
| 167 | ; |
---|
| 168 | ; build mask filename |
---|
| 169 | filename_msk='mask_oaflux_30N30S.nc' |
---|
| 170 | ; |
---|
| 171 | ; check if this file exists |
---|
[74] | 172 | msg='iii : looking for ' + filename_msk |
---|
| 173 | ras = report(msg) |
---|
[19] | 174 | fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) |
---|
| 175 | IF fullfilename_msk[0] EQ '' THEN BEGIN |
---|
| 176 | msg = 'eee : the file ' + fullfilename_msk + ' was not found.' |
---|
| 177 | ras = report(msg) |
---|
| 178 | STOP |
---|
| 179 | ENDIF |
---|
[74] | 180 | ; |
---|
| 181 | ; test if ${PROJECT_OD} defined |
---|
| 182 | CASE project_od_env OF |
---|
| 183 | '' : BEGIN |
---|
| 184 | msg = 'eee : ${PROJECT_OD} is not defined' |
---|
| 185 | ras = report(msg) |
---|
| 186 | STOP |
---|
| 187 | END |
---|
| 188 | ELSE: BEGIN |
---|
| 189 | msg = 'iii : ${PROJECT_OD} is ' + project_od_env |
---|
| 190 | ras = report(msg) |
---|
| 191 | END |
---|
| 192 | ENDCASE |
---|
| 193 | ; |
---|
| 194 | ; check if output data will be possible |
---|
| 195 | iodirout = isadirectory(project_od_env) |
---|
| 196 | ; |
---|
| 197 | ; existence and protection for reading |
---|
| 198 | IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN |
---|
| 199 | msg = 'eee : the directory' + iodirout + ' is not accessible.' |
---|
| 200 | ras = report(msg) |
---|
| 201 | STOP |
---|
| 202 | ENDIF |
---|
| 203 | ; |
---|
| 204 | ; existence and protection for writing |
---|
| 205 | IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN |
---|
| 206 | msg = 'eee : the directory' + iodirout + ' was not found.' |
---|
| 207 | ras = report(msg) |
---|
| 208 | STOP |
---|
| 209 | ENDIF |
---|
| 210 | ; |
---|
| 211 | ; build sst data filename |
---|
| 212 | filename_sst='TropFlux_sst_19890101_20091231.nc' |
---|
| 213 | ; |
---|
| 214 | ; check if this file exists |
---|
| 215 | msg='iii : looking for ' + filename_sst |
---|
| 216 | ras = report(msg) |
---|
| 217 | fullfilename_sst = isafile(iodirout + filename_sst, NEW=0, /MUST_EXIST) |
---|
| 218 | IF fullfilename_sst[0] EQ '' THEN BEGIN |
---|
| 219 | msg = 'eee : the file ' + fullfilename_sst + ' was not found.' |
---|
| 220 | ras = report(msg) |
---|
| 221 | STOP |
---|
| 222 | ENDIF |
---|
| 223 | ; |
---|
| 224 | ; build ws data filename |
---|
| 225 | filename_ws='TropFlux_ws_19890101_20091231.nc' |
---|
| 226 | ; |
---|
| 227 | ; check if this file exists |
---|
| 228 | msg='iii : looking for ' + filename_ws |
---|
| 229 | ras = report(msg) |
---|
| 230 | fullfilename_ws = isafile(iodirout + filename_ws, NEW=0, /MUST_EXIST) |
---|
| 231 | IF fullfilename_ws[0] EQ '' THEN BEGIN |
---|
| 232 | msg = 'eee : the file ' + fullfilename_ws + ' was not found.' |
---|
| 233 | ras = report(msg) |
---|
| 234 | STOP |
---|
| 235 | ENDIF |
---|
| 236 | ; |
---|
| 237 | ; build swr data filename |
---|
| 238 | filename_swr='TropFlux_swr_19890101_20091231_BLND.nc' |
---|
| 239 | ; |
---|
| 240 | ; check if this file exists |
---|
| 241 | msg='iii : looking for ' + filename_swr |
---|
| 242 | ras = report(msg) |
---|
| 243 | fullfilename_swr = isafile(iodirout + filename_swr, NEW=0, /MUST_EXIST) |
---|
| 244 | IF fullfilename_swr[0] EQ '' THEN BEGIN |
---|
| 245 | msg = 'eee : the file ' + fullfilename_swr + ' was not found.' |
---|
| 246 | ras = report(msg) |
---|
| 247 | STOP |
---|
| 248 | ENDIF |
---|
| 249 | ; |
---|
| 250 | ; build lwr data filename |
---|
| 251 | filename_lwr='TropFlux_lwr_19890101_20091231.nc' |
---|
| 252 | ; |
---|
| 253 | ; check if this file exists |
---|
| 254 | msg='iii : looking for ' + filename_lwr |
---|
| 255 | ras = report(msg) |
---|
| 256 | fullfilename_lwr = isafile(iodirout + filename_lwr, NEW=0, /MUST_EXIST) |
---|
| 257 | IF fullfilename_lwr[0] EQ '' THEN BEGIN |
---|
| 258 | msg = 'eee : the file ' + fullfilename_lwr + ' was not found.' |
---|
| 259 | ras = report(msg) |
---|
| 260 | STOP |
---|
| 261 | ENDIF |
---|
| 262 | ; |
---|
| 263 | ; build t2m data filename |
---|
| 264 | filename_t2m='TropFlux_t2m_19890101_20091231.nc' |
---|
| 265 | ; |
---|
| 266 | ; check if this file exists |
---|
| 267 | msg='iii : looking for ' + filename_t2m |
---|
| 268 | ras = report(msg) |
---|
| 269 | fullfilename_t2m = isafile(iodirout + filename_t2m, NEW=0, /MUST_EXIST) |
---|
| 270 | IF fullfilename_t2m[0] EQ '' THEN BEGIN |
---|
| 271 | msg = 'eee : the file ' + fullfilename_t2m + ' was not found.' |
---|
| 272 | ras = report(msg) |
---|
| 273 | STOP |
---|
| 274 | ENDIF |
---|
| 275 | ; |
---|
| 276 | ; build q2m data filename |
---|
| 277 | filename_q2m='TropFlux_q2m_19890101_20091231.nc' |
---|
| 278 | ; |
---|
| 279 | ; check if this file exists |
---|
| 280 | msg='iii : looking for ' + filename_q2m |
---|
| 281 | ras = report(msg) |
---|
| 282 | fullfilename_q2m = isafile(iodirout + filename_q2m, NEW=0, /MUST_EXIST) |
---|
| 283 | IF fullfilename_q2m[0] EQ '' THEN BEGIN |
---|
| 284 | msg = 'eee : the file ' + fullfilename_q2m + ' was not found.' |
---|
| 285 | ras = report(msg) |
---|
| 286 | STOP |
---|
| 287 | ENDIF |
---|
| 288 | ; |
---|
| 289 | ; build wg data filename |
---|
| 290 | filename_wg='TropFlux_gustiness_19890101_20091231.nc' |
---|
| 291 | ; |
---|
| 292 | ; check if this file exists |
---|
| 293 | msg='iii : looking for ' + filename_wg |
---|
| 294 | ras = report(msg) |
---|
| 295 | fullfilename_wg = isafile(iodirout + filename_wg, NEW=0, /MUST_EXIST) |
---|
| 296 | IF fullfilename_wg[0] EQ '' THEN BEGIN |
---|
| 297 | msg = 'eee : the file ' + fullfilename_wg + ' was not found.' |
---|
| 298 | ras = report(msg) |
---|
| 299 | STOP |
---|
| 300 | ENDIF |
---|
| 301 | ; |
---|
[5] | 302 | da1=19880101 & da2=20101231 |
---|
[19] | 303 | ; |
---|
[20] | 304 | initncdf, fullfilename_msk |
---|
[19] | 305 | msk=ncdf_lec(fullfilename_msk,var='msk') |
---|
[5] | 306 | |
---|
[74] | 307 | initncdf, fullfilename_sst |
---|
[5] | 308 | |
---|
[74] | 309 | ws=read_ncdf('ws',da1,da2,file=fullfilename_ws,/nostr) |
---|
| 310 | wg=read_ncdf('wg',da1-1,da2,file=fullfilename_wg,/nostr) |
---|
[5] | 311 | tt=time & jpt=n_elements(time) |
---|
[74] | 312 | sst=read_ncdf('sst',da1,da2,file=fullfilename_sst,/nostr) |
---|
[5] | 313 | sst=reform(sst-273.15) |
---|
[74] | 314 | swd=read_ncdf('swr',da1,da2,file=fullfilename_swr,/nostr) |
---|
| 315 | lw=read_ncdf('lwr',da1,da2,file=fullfilename_lwr,/nostr) |
---|
[5] | 316 | swd=swd/0.94 ;; converting from net swr to downward swr |
---|
| 317 | |
---|
[74] | 318 | t2m=read_ncdf('t2m',da1,da2,file=fullfilename_t2m,/nostr)-273.15 ; in C |
---|
| 319 | q2m=read_ncdf('q2m',da1,da2,file=fullfilename_q2m,/nostr) ; in g/kg |
---|
[5] | 320 | |
---|
| 321 | w=sqrt(ws*ws+wg*wg) ;; wind corrected for gustiness |
---|
| 322 | w=ws |
---|
| 323 | tmask=msk |
---|
| 324 | help, ws,w,wg,u,sst,swd,t2m,q2m |
---|
| 325 | ocean=where(msk eq 1,compl=land) |
---|
| 326 | valmask=1.e20 |
---|
| 327 | time=tt & jpt=n_elements(time) |
---|
| 328 | |
---|
| 329 | ; |
---|
| 330 | ;; Constants for flux computation |
---|
| 331 | ; |
---|
| 332 | zu=10. ; height of wind speed measurement (m) |
---|
| 333 | us=0. ; surf current (m/s) |
---|
| 334 | zt=2. ; Height of air T measurement (m) |
---|
| 335 | zq=2. ; height of humidity measurement (m) |
---|
| 336 | P=1008. ; Pressure |
---|
| 337 | zi=600. ; Inversion height (m) |
---|
| 338 | jcool=0 ; Compute cool-skin |
---|
| 339 | jwave=0 ; No waves |
---|
| 340 | twave=5. |
---|
| 341 | hwave=1. |
---|
| 342 | |
---|
| 343 | caldat, time,mon,day,yea |
---|
| 344 | swr=fltarr(jpi,jpj,jpt)+1.e20 |
---|
| 345 | lwr=fltarr(jpi,jpj,jpt)+1.e20 |
---|
| 346 | lat=fltarr(jpi,jpj,jpt)+1.e20 |
---|
| 347 | sen=fltarr(jpi,jpj,jpt)+1.e20 |
---|
| 348 | lwnet_clrk=fltarr(jpi,jpj,jpt)+1.e20 |
---|
| 349 | ;Ch=fltarr(jpi,jpj,jpt)+1.e20 |
---|
| 350 | ;Ce=fltarr(jpi,jpj,jpt)+1.e20 |
---|
| 351 | junk=fltarr(jpi,jpj,jpt)+1.e20 |
---|
| 352 | |
---|
| 353 | for jt=0,jpt-1 do begin |
---|
| 354 | jday=time(jt)-julday(1,1,yea(jt)) |
---|
| 355 | print, 'Computing Fluxes ',jt,' / ',jpt-1 |
---|
| 356 | ; |
---|
| 357 | ; P=msl(*,*,jt) & P=P(ocean) |
---|
| 358 | wn=w(*,*,jt) & wn=wn(ocean) ; wind speed (m/s) |
---|
| 359 | ts=sst(*,*,jt) & ts=ts(ocean) ; Bulk sst (°C) |
---|
| 360 | t=t2m(*,*,jt) & t=t(ocean) ; 2m Air T (°C) |
---|
| 361 | qs=qsee(ts,P) ; Sea surface sat. spec. humidity (g/kg) |
---|
| 362 | q=q2m(*,*,jt) & q=q(ocean) ; 2m AIr specific humidity (g/kg) |
---|
| 363 | Rs=swd(*,*,jt) & Rs=Rs(ocean) ; Downward solar flux (W/m2) |
---|
| 364 | ylat=gphit(ocean) |
---|
| 365 | ; cld=calc_cloud(jday,Rs,ylat) |
---|
| 366 | cld=calc_cloud_vlat(jday,Rs,ylat) |
---|
| 367 | ; Rl=lwdown_clark(ts,q,cld,t,P) ; Downward IR flux (W/m2) |
---|
| 368 | Rl=lw(*,*,jt) & Rl=Rl(ocean) |
---|
| 369 | rain=0. |
---|
| 370 | lw_clrk=-lwnet_clark(ts,q,cld,t,P) |
---|
| 371 | ; junk(*,*,jt)=lw_clrk |
---|
| 372 | ; |
---|
| 373 | ;stop |
---|
| 374 | y=cor30a(wn,us,ts,t,Qs,Q,Rs,Rl,rain,zi,P,zu,zt,zq,ylat,jcool,jwave,twave,hwave) |
---|
| 375 | ; |
---|
| 376 | |
---|
| 377 | ; A few punctual missing values (coare does not converge): filled by spatial extrapolation |
---|
| 378 | tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(y(*,0)) & tab(ocean)=x & m=finite(tab) & tab=extrapolate(tab,m) & swr(*,*,jt)=tab*msk+valmask*(1-msk) |
---|
| 379 | tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(y(*,1)) & tab(ocean)=x & m=finite(tab) & tab=extrapolate(tab,m) & lwr(*,*,jt)=tab*msk+valmask*(1-msk) |
---|
| 380 | tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(y(*,2)) & tab(ocean)=x & m=finite(tab) & tab=extrapolate(tab,m) & lat(*,*,jt)=tab*msk+valmask*(1-msk) |
---|
| 381 | tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(y(*,3)) & tab(ocean)=x & m=finite(tab) & tab=extrapolate(tab,m) & sen(*,*,jt)=tab*msk+valmask*(1-msk) |
---|
| 382 | ; tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(lw_clrk) & tab(ocean)=x & m=finite(tab) & tab=extrapolate(tab,m) & lwnet_clrk(*,*,jt)=tab*msk+valmask*(1-msk) |
---|
| 383 | ; tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(y(*,6)) & tab(ocean)=x & m=finite(tab) & tab=extrapolate(tab,m) & Ch(*,*,jt)=tab*msk+valmask*(1-msk) |
---|
| 384 | ; tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(y(*,7)) & tab(ocean)=x & m=finite(tab) & tab=extrapolate(tab,m) & Ce(*,*,jt)=tab*msk+valmask*(1-msk) |
---|
| 385 | endfor |
---|
| 386 | tt=time |
---|
| 387 | time=timegen(7670, start=julday(1,1,1989,0), units='days') & jpt=n_elements(time) |
---|
[7] | 388 | ; |
---|
[5] | 389 | cda0=string(jul2date(time(0)),format='(i8.8)') |
---|
| 390 | cda1=string(jul2date(time(jpt-1)),format='(i8.8)') |
---|
| 391 | tt=time-julday(1,1,1950,00,00,00) |
---|
| 392 | xlon=reform(glamt(*,0) ) & ylat=reform(gphit(0,*)) |
---|
| 393 | |
---|
[74] | 394 | ncfile='!${PROJECT_OD}/TropFlux_19890101_20091231.nc' |
---|
[5] | 395 | lon_attr={units:'degrees_east',long_name:'Longitude'} |
---|
| 396 | lat_attr={units:'degrees_north',long_name:'Latitude'} |
---|
| 397 | swr_attr={units:'W/m2',missing_value:valmask,long_name:'Surface net shortwave radiation',short_name:'swr',axis:'TYX'} |
---|
| 398 | lwr_attr={units:'W/m2',missing_value:valmask,long_name:'Surface net longwave radiation',short_name:'lwr',axis:'TYX'} |
---|
| 399 | lwr_clrk_attr={units:'W/m2',missing_value:valmask,long_name:'Surface net longwave radiation from clark',short_name:'lwr',axis:'TYX'} |
---|
| 400 | lhf_attr={units:'W/m2',missing_value:valmask,long_name:'Surface latent flux',short_name:'lhf',axis:'TYX'} |
---|
| 401 | shf_attr={units:'W/m2',missing_value:valmask,long_name:'Surface sensible flux',short_name:'shf',axis:'TYX'} |
---|
| 402 | time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:' 1950-JAN-01 00:00:00'} |
---|
| 403 | Ch_attr={units:'',missing_value:valmask,long_name:'heat transfer coefficient at zt',short_name:'Ch',axis:'TYX'} |
---|
| 404 | Ce_attr={units:'',missing_value:valmask,long_name:'moisture transfer coefficient at zq',short_name:'Ce',axis:'TYX'} |
---|
| 405 | |
---|
| 406 | globattr={source:'Fluxes for the Global Tropical Ocean - TropFlux',timerange:cda0+' - '+cda1} |
---|
| 407 | |
---|
| 408 | help, swr,lwr,lat,sen,tt,xlon,ylat |
---|
| 409 | |
---|
| 410 | ncfields = 'swr[longitude,latitude,time]=swr:swr_attr; ' $ |
---|
| 411 | ; +'lwr_coare[longitude,latitude,time]=lwr:lwr_attr; ' $ |
---|
| 412 | +'lwr[longitude,latitude,time]=lwnet_clrk:lwr_clrk_attr; ' $ |
---|
| 413 | +'lhf[longitude,latitude,time]=lat:lhf_attr; ' $ |
---|
| 414 | +'shf[longitude,latitude,time]=sen:shf_attr; ' $ |
---|
| 415 | ; +'Ch[longitude,latitude,time]=Ch:Ch_attr; ' $ |
---|
| 416 | ; +'Ce[longitude,latitude,time]=Ce:Ce_attr; ' $ |
---|
| 417 | + 'longitude[]=xlon:lon_attr; ' $ |
---|
| 418 | + 'latitude[]=ylat:lat_attr; ' $ |
---|
| 419 | + 'tt[*time]=tt:time_attr ' $ |
---|
| 420 | + ' @ globattr' |
---|
| 421 | |
---|
| 422 | @ncdf_quickwrite |
---|
| 423 | |
---|
| 424 | end |
---|