[142] | 1 | ;+ |
---|
[163] | 2 | ; @file_comments |
---|
[142] | 3 | ; |
---|
[163] | 4 | ; |
---|
| 5 | ; @categories |
---|
| 6 | ; |
---|
| 7 | ; |
---|
| 8 | ; @param NEWGRID |
---|
| 9 | ; |
---|
| 10 | ; |
---|
| 11 | ; @returns |
---|
| 12 | ; |
---|
| 13 | ; |
---|
| 14 | ; @uses |
---|
| 15 | ; |
---|
| 16 | ; |
---|
| 17 | ; @restrictions |
---|
| 18 | ; |
---|
| 19 | ; |
---|
| 20 | ; @examples |
---|
| 21 | ; |
---|
| 22 | ; |
---|
| 23 | ; @history |
---|
| 24 | ; |
---|
| 25 | ; |
---|
| 26 | ; @version |
---|
| 27 | ; $Id$ |
---|
| 28 | ; |
---|
| 29 | ; |
---|
[142] | 30 | ; @todo seb |
---|
| 31 | ; |
---|
| 32 | ;- |
---|
[2] | 33 | FUNCTION cmpgrid, newgrid |
---|
| 34 | ; |
---|
[114] | 35 | ; |
---|
| 36 | compile_opt idl2, strictarrsubs |
---|
| 37 | ; |
---|
[2] | 38 | @common |
---|
| 39 | ; |
---|
| 40 | ; |
---|
| 41 | ; newgrid must be a structure |
---|
| 42 | ; |
---|
| 43 | if size(newgrid, /type) NE 8 then return, 0 |
---|
| 44 | ; |
---|
| 45 | ; does ccmeshparameters exist ? |
---|
| 46 | ; |
---|
| 47 | if n_elements(ccmeshparameters) EQ 0 then return, 1 |
---|
| 48 | ; |
---|
| 49 | ; we compare the structure which caracterise the grid whith |
---|
| 50 | ; ccmeshparameters |
---|
| 51 | ; |
---|
| 52 | case 1 of |
---|
| 53 | ccmeshparameters.jpiglo NE newgrid.jpiglo: |
---|
| 54 | ccmeshparameters.jpjglo NE newgrid.jpjglo: |
---|
| 55 | ccmeshparameters.jpkglo NE newgrid.jpkglo: |
---|
| 56 | ccmeshparameters.jpi NE newgrid.jpi: |
---|
| 57 | ccmeshparameters.jpj NE newgrid.jpj: |
---|
| 58 | ccmeshparameters.jpk NE newgrid.jpk: |
---|
[74] | 59 | total(ccmeshparameters.glaminfo - newgrid.glaminfo) NE 0: |
---|
| 60 | total(ccmeshparameters.gphiinfo - newgrid.gphiinfo) NE 0: |
---|
[2] | 61 | ccmeshparameters.ixminmesh NE newgrid.ixminmesh: |
---|
| 62 | ccmeshparameters.ixmaxmesh NE newgrid.ixmaxmesh: |
---|
| 63 | ccmeshparameters.iyminmesh NE newgrid.iyminmesh: |
---|
| 64 | ccmeshparameters.iymaxmesh NE newgrid.iymaxmesh: |
---|
| 65 | ccmeshparameters.izminmesh NE newgrid.izminmesh: |
---|
| 66 | ccmeshparameters.izmaxmesh NE newgrid.izmaxmesh: |
---|
| 67 | ccmeshparameters.key_shift NE newgrid.key_shift: |
---|
[69] | 68 | ccmeshparameters.key_periodic NE newgrid.key_periodic: |
---|
| 69 | array_equal(ccmeshparameters.key_stride, newgrid.key_stride) EQ 0: |
---|
| 70 | ccmeshparameters.key_gridtype NE newgrid.key_gridtype: |
---|
| 71 | ccmeshparameters.key_yreverse NE newgrid.key_yreverse: |
---|
| 72 | ccmeshparameters.key_zreverse NE newgrid.key_zreverse: |
---|
| 73 | ccmeshparameters.key_partialstep NE newgrid.key_partialstep: |
---|
| 74 | ccmeshparameters.key_onearth NE newgrid.key_onearth: |
---|
[2] | 75 | ELSE:return, 0 |
---|
| 76 | endcase |
---|
| 77 | |
---|
| 78 | return, 1 |
---|
| 79 | end |
---|