Changeset 74 for trunk/SRC/Grid


Ignore:
Timestamp:
05/23/06 15:45:47 (18 years ago)
Author:
smasson
Message:

debug xxx and cie + clean data file + rm perldoc_idl

Location:
trunk/SRC/Grid
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Grid/.idlwave_catalog

    r69 r74  
    22;; IDLWAVE catalog for library saxo 
    33;; Automatically Generated -- do not edit. 
    4 ;; Created by idlwave_catalog on Thu May  4 08:42:55 2006 
     4;; Created by idlwave_catalog on Tue May 23 15:31:07 2006 
    55;; 
    66(setq idlwave-library-catalog-libname "saxo") 
  • trunk/SRC/Grid/computegrid.pro

    r69 r74  
    386386; check the peridicity if iyminmesh and iymaxmesh have the default definitions... 
    387387  IF NOT keyword_set(plain) AND key_onearth EQ 1 AND key_stride[1] EQ 1 $ 
    388     AND iyminmesh EQ 0l AND iymaxmesh eq jpjglo-1 AND jpj GE 3 THEN BEGIN 
     388    AND iyminmesh EQ 0l AND iymaxmesh eq jpjglo-1 AND jpj GE 3 AND jpi GE 2 THEN BEGIN 
    389389 
    390390    CASE 1 OF 
     
    581581    ENDCASE 
    582582    glamf = glamt + 0.5 * stepxf 
    583     IF jpj EQ 1 THEN glamf = reform(glamf, jpi, jpj, /over) 
    584583  ENDIF ELSE glamf = glamt + 0.5 
    585584; 
     
    590589    ENDIF ELSE glamf = glamboundary[0] > temporary(glamf) < glamboundary[1] 
    591590  ENDIF 
     591; 
     592  IF jpj EQ 1 THEN glamf = reform(glamf, jpi, jpj, /over) 
    592593; 
    593594;==================================================== 
     
    614615  IF key_onearth THEN gphif = -90. > gphif < 90. 
    615616; 
     617  IF jpj EQ 1 THEN gphif = reform(gphif, jpi, jpj, /over) 
     618; 
    616619;==================================================== 
    617620; e1t: x distance between U(i-1,j) and U(i,j) 
     
    638641      IF NOT keyword_set(key_periodic) THEN $ 
    639642        e1t[0, *] = e1t[1, *]  
    640       IF jpj EQ 1 THEN e1t = reform(e1t, jpi, jpj, /over) 
    641643    ENDIF ELSE e1t = replicate(stepx, jpi, jpj) 
    642644  ENDIF ELSE e1t = replicate(1b, jpi, jpj) 
     645; 
     646  IF jpj EQ 1 THEN e1t = reform(e1t, jpi, jpj, /over) 
    643647; 
    644648;==================================================== 
     
    660664  IF key_onearth THEN e2t = r * !pi/180. * temporary(e2t) 
    661665; 
     666  IF jpj EQ 1 THEN e2t = reform(e2t, jpi, jpj, /over) 
     667; 
    662668;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    663669  IF keyword_set(fullcgrid) THEN BEGIN 
     
    672678        glamu = glamboundary[0] > temporary(glamu) < glamboundary[1] 
    673679    ENDIF ELSE glamu = glamf 
     680; 
     681    IF jpj EQ 1 THEN glamu = reform(glamu, jpi, jpj, /over) 
    674682; 
    675683;==================================================== 
     
    684692          stepyu[jpi-1, *] = stepyu[jpi-2, *] 
    685693        gphiu = gphit + 0.5 * stepyu 
    686         IF jpj EQ 1 THEN gphiu = reform(gphiu, jpi, jpj, /over) 
    687694      ENDIF ELSE gphiu = gphit 
    688695    ENDIF ELSE gphiu = gphit 
    689696  IF key_onearth THEN gphiu = -90. > gphiu < 90. 
     697; 
     698  IF jpj EQ 1 THEN gphiu = reform(gphiu, jpi, jpj, /over) 
    690699; 
    691700;==================================================== 
     
    718727    IF key_onearth THEN gphiv = -90. > gphiv < 90. 
    719728; 
     729    IF jpj EQ 1 THEN gphiv = reform(gphiv, jpi, jpj, /over) 
     730; 
    720731;==================================================== 
    721732; e1u: x distance between T(i,j) and T(i+1,j) 
     
    734745      IF key_onearth THEN e2u = r * !pi/180. * temporary(e2u) 
    735746    ENDIF ELSE e2u = e2t 
     747; 
     748    IF jpj EQ 1 THEN e2u = reform(e2u, jpi, jpj, /over) 
    736749; 
    737750;==================================================== 
     
    751764    ENDIF ELSE e1v = e1t  
    752765; 
     766    IF jpj EQ 1 THEN e1v = reform(e1v, jpi, jpj, /over) 
     767; 
    753768;==================================================== 
    754769; e2v: y distance between T(i,j) and T(i+1,j) 
     
    776791    ENDIF ELSE e1f = e1u 
    777792; 
     793    IF jpj EQ 1 THEN e1f = reform(e1f, jpi, jpj, /over) 
     794; 
    778795;==================================================== 
    779796; e2f: y distance between U(i,j) and U(i,j+1) 
     
    785802      IF key_onearth THEN e2f = r * !pi/180. * temporary(e2f) 
    786803    ENDIF ELSE e2f = e2v 
     804; 
     805    IF jpj EQ 1 THEN e2f = reform(e2f, jpi, jpj, /over) 
    787806; 
    788807  ENDIF 
     
    802821    ENDIF 
    803822  ENDIF 
     823; 
     824  IF jpj EQ 1 THEN BEGIN  
     825    e1t = reform(e1t, jpi, jpj, /over) 
     826    IF keyword_set(fullcgrid) THEN BEGIN 
     827      e1u = reform(e1u, jpi, jpj, /over) 
     828      e1v = reform(e1v, jpi, jpj, /over) 
     829      e1f = reform(e1f, jpi, jpj, /over) 
     830    ENDIF   
     831  ENDIF   
    804832; 
    805833;==================================================== 
     
    953981    e3w = e3w[0:*:stride[2]] 
    954982; we must recompute glamf and gphif... 
    955    IF jpi GT 1 THEN BEGIN  
    956      if (keyword_set(key_onearth) AND keyword_set(xnotsorted)) $ 
    957        OR (keyword_set(key_periodic) AND key_irregular) then BEGIN 
    958        stepxf = (glamt + 720) MOD 360 
    959        stepxf = shift(stepxf, -1, -1) - stepxf 
    960        stepxf = [ [[stepxf]], [[stepxf + 360]], [[stepxf - 360]] ] 
    961        stepxf = min(abs(stepxf), dimension = 3) 
    962        IF NOT keyword_set(key_periodic) THEN $ 
    963          stepxf[jpi-1, *] = stepxf[jpi-2, *] 
    964      ENDIF ELSE BEGIN 
    965        stepxf = shift(glamt, -1, -1) - glamt 
    966        IF keyword_set(key_periodic) THEN $ 
    967          stepxf[jpi-1, *] = 360 + stepxf[jpi-1, *] $ 
    968        ELSE stepxf[jpi-1, *] = stepxf[jpi-2, *] 
    969      ENDELSE 
    970      IF jpj GT 1 THEN BEGIN  
    971        stepxf[*, jpj-1] = stepxf[*, jpj-2] 
    972        stepxf[jpi-1, jpj-1] = stepxf[jpi-2, jpj-2] 
    973      ENDIF 
    974      glamf = glamt + 0.5 * stepxf 
    975      IF jpj EQ 1 THEN glamf = reform(glamf, jpi, jpj, /over) 
    976    ENDIF ELSE glamf = glamt + 0.5 
    977    IF jpj GT 1 THEN BEGIN  
     983    IF jpi GT 1 THEN BEGIN  
     984      if (keyword_set(key_onearth) AND keyword_set(xnotsorted)) $ 
     985        OR (keyword_set(key_periodic) AND key_irregular) then BEGIN 
     986        stepxf = (glamt + 720) MOD 360 
     987        stepxf = shift(stepxf, -1, -1) - stepxf 
     988        stepxf = [ [[stepxf]], [[stepxf + 360]], [[stepxf - 360]] ] 
     989        stepxf = min(abs(stepxf), dimension = 3) 
     990        IF NOT keyword_set(key_periodic) THEN $ 
     991          stepxf[jpi-1, *] = stepxf[jpi-2, *] 
     992      ENDIF ELSE BEGIN 
     993        stepxf = shift(glamt, -1, -1) - glamt 
     994        IF keyword_set(key_periodic) THEN $ 
     995          stepxf[jpi-1, *] = 360 + stepxf[jpi-1, *] $ 
     996          ELSE stepxf[jpi-1, *] = stepxf[jpi-2, *] 
     997      ENDELSE 
     998      IF jpj GT 1 THEN BEGIN  
     999        stepxf[*, jpj-1] = stepxf[*, jpj-2] 
     1000        stepxf[jpi-1, jpj-1] = stepxf[jpi-2, jpj-2] 
     1001      ENDIF 
     1002      glamf = glamt + 0.5 * stepxf 
     1003    ENDIF ELSE glamf = glamt + 0.5 
     1004    IF jpj GT 1 THEN BEGIN  
    9781005; we must compute stepyf: y distance between T(i,j) T(i+1,j+1) 
    979      stepyf = shift(gphit, -1, -1) - gphit 
    980      stepyf[*, jpj-1] = stepyf[*, jpj-2] 
    981      IF jpi GT 1 THEN BEGIN 
    982        if NOT keyword_set(key_periodic) THEN $ 
    983          stepyf[jpi-1, *] = stepyf[jpi-2, *] 
    984        stepyf[jpi-1, jpj-1] = stepyf[jpi-2, jpj-2] 
    985      ENDIF  
    986      gphif = gphit + 0.5 * stepyf 
    987    ENDIF ELSE gphif = gphit + 0.5 
     1006      stepyf = shift(gphit, -1, -1) - gphit 
     1007      stepyf[*, jpj-1] = stepyf[*, jpj-2] 
     1008      IF jpi GT 1 THEN BEGIN 
     1009        if NOT keyword_set(key_periodic) THEN $ 
     1010          stepyf[jpi-1, *] = stepyf[jpi-2, *] 
     1011        stepyf[jpi-1, jpj-1] = stepyf[jpi-2, jpj-2] 
     1012      ENDIF  
     1013      gphif = gphit + 0.5 * stepyf 
     1014    ENDIF ELSE gphif = gphit + 0.5 
     1015; 
     1016    IF jpj EQ 1 THEN BEGIN  
     1017      glamt = reform(glamt, jpi, jpj, /over) 
     1018      gphit = reform(gphit, jpi, jpj, /over) 
     1019      glamf = reform(glamf, jpi, jpj, /over) 
     1020      gphif = reform(gphif, jpi, jpj, /over) 
     1021      e1t = reform(e1t, jpi, jpj, /over) 
     1022      e2t = reform(e2t, jpi, jpj, /over) 
     1023    ENDIF 
    9881024; 
    9891025    IF keyword_set(fullcgrid) THEN BEGIN 
     
    10021038      fmaskredy = (temporary(fmaskredy))[0, 0:*:stride[1], 0:*:stride[2]] 
    10031039      fmaskredx = (temporary(fmaskredx))[0:*:stride[0], 0, 0:*:stride[2]] 
     1040      IF jpj EQ 1 THEN BEGIN  
     1041        glamu = reform(glamu, jpi, jpj, /over) 
     1042        gphiu = reform(gphiu, jpi, jpj, /over) 
     1043        e1u = reform(e1u, jpi, jpj, /over) 
     1044        e2u = reform(e2u, jpi, jpj, /over) 
     1045        glamv = reform(glamv, jpi, jpj, /over) 
     1046        gphiv = reform(gphiv, jpi, jpj, /over) 
     1047        e1v = reform(e1v, jpi, jpj, /over) 
     1048        e2v = reform(e2v, jpi, jpj, /over) 
     1049        e1f = reform(e1f, jpi, jpj, /over) 
     1050        e2f = reform(e2f, jpi, jpj, /over) 
     1051      ENDIF 
    10041052    ENDIF 
    10051053  ENDIF 
     
    10441092    ELSE strcalling = ccmeshparameters.filename 
    10451093  ENDIF 
    1046   glaminfo = moment(glamt) 
    1047   IF finite(glaminfo[2]) EQ 0 THEN glaminfo = glaminfo[0:1] 
    1048   gphiinfo = moment(gphit) 
    1049   IF finite(gphiinfo[2]) EQ 0 THEN gphiinfo = gphiinfo[0:1] 
     1094  IF n_elements(glamt) GE 2 THEN BEGIN 
     1095    glaminfo = moment(glamt) 
     1096    IF finite(glaminfo[2]) EQ 0 THEN glaminfo = glaminfo[0:1] 
     1097    gphiinfo = moment(gphit) 
     1098    IF finite(gphiinfo[2]) EQ 0 THEN gphiinfo = gphiinfo[0:1] 
     1099  ENDIF ELSE BEGIN  
     1100    glaminfo = glamt 
     1101    gphiinfo = gphit 
     1102  ENDELSE  
    10501103  ccmeshparameters = {filename:strcalling  $ 
    1051           , glaminfo:glaminfo $ 
    1052           , gphiinfo:gphiinfo $ 
     1104          , glaminfo:float(string(glaminfo, format = '(E11.4)')) $ 
     1105          , gphiinfo:float(string(gphiinfo, format = '(E11.4)')) $ 
    10531106          , jpiglo:jpiglo, jpjglo:jpjglo, jpkglo:jpkglo $ 
    10541107          , jpi:jpi, jpj:jpj, jpk:jpk $ 
  • trunk/SRC/Grid/ncdf_meshread.pro

    r69 r74  
    335335      ENDIF 
    336336      glamf = glamt + 0.5 * stepxf 
    337       IF jpj EQ 1 THEN glamf = reform(glamf, jpi, jpj, /over) 
    338337    ENDIF ELSE glamf = glamt + 0.5 
    339338    IF jpj GT 1 THEN BEGIN  
     
    529528  endif 
    530529;------------------------------------------------------- 
     530; make sure we do have 2d arrays when jpj eq 1 
     531;------------------------------------------------------- 
     532  IF jpj EQ 1 THEN BEGIN  
     533    glamt = reform(glamt, jpi, jpj, /over) 
     534    gphit = reform(gphit, jpi, jpj, /over) 
     535    e1t = reform(e1t, jpi, jpj, /over) 
     536    e2t = reform(e2t, jpi, jpj, /over) 
     537    glamu = reform(glamu, jpi, jpj, /over) 
     538    gphiu = reform(gphiu, jpi, jpj, /over) 
     539    e1u = reform(e1u, jpi, jpj, /over) 
     540    e2u = reform(e2u, jpi, jpj, /over) 
     541    glamv = reform(glamv, jpi, jpj, /over) 
     542    gphiv = reform(gphiv, jpi, jpj, /over) 
     543    e1v = reform(e1v, jpi, jpj, /over) 
     544    e2v = reform(e2v, jpi, jpj, /over) 
     545    glamf = reform(glamf, jpi, jpj, /over) 
     546    gphif = reform(gphif, jpi, jpj, /over) 
     547    e1f = reform(e1f, jpi, jpj, /over) 
     548    e2f = reform(e2f, jpi, jpj, /over) 
     549    IF keyword_set(key_partialstep) THEN BEGIN 
     550      hdept = reform(hdept, jpi, jpj, /over) 
     551      hdepw = reform(hdepw, jpi, jpj, /over) 
     552      e3t_ps = reform(e3t_ps, jpi, jpj, /over) 
     553      e3w_ps = reform(e3w_ps, jpi, jpj, /over) 
     554    ENDIF  
     555  ENDIF 
     556;------------------------------------------------------- 
    531557  ixmindta = ixmindtasauve 
    532558  iymindta = iymindtasauve 
     
    547573    ELSE strcalling = ccmeshparameters.filename 
    548574  ENDIF  
    549   glaminfo = moment(glamt) 
    550   IF finite(glaminfo[2]) EQ 0 THEN glaminfo = glaminfo[0:1] 
    551   gphiinfo = moment(gphit) 
    552   IF finite(gphiinfo[2]) EQ 0 THEN gphiinfo = gphiinfo[0:1] 
     575  IF n_elements(glamt) GE 2 THEN BEGIN 
     576    glaminfo = moment(glamt) 
     577    IF finite(glaminfo[2]) EQ 0 THEN glaminfo = glaminfo[0:1] 
     578    gphiinfo = moment(gphit) 
     579    IF finite(gphiinfo[2]) EQ 0 THEN gphiinfo = gphiinfo[0:1] 
     580  ENDIF ELSE BEGIN  
     581    glaminfo = glamt 
     582    gphiinfo = gphit 
     583  ENDELSE  
    553584  ccmeshparameters = {filename:strcalling  $ 
    554           , glaminfo:glaminfo $ 
    555           , gphiinfo:gphiinfo $ 
     585          , glaminfo:float(string(glaminfo, format = '(E11.4)')) $ 
     586          , gphiinfo:float(string(gphiinfo, format = '(E11.4)')) $ 
    556587          , jpiglo:jpiglo, jpjglo:jpjglo, jpkglo:jpkglo $ 
    557588          , jpi:jpi, jpj:jpj, jpk:jpk $ 
Note: See TracChangeset for help on using the changeset viewer.