[MITgcm-support] CS Grid Generator and Convertor Matlab Scripts
Yuan Lian
lian at ashimaresearch.com
Sun Feb 19 00:34:16 EST 2012
Hi Chris,
The plots you made suggest there are some issues with the XG and YG
data, likely the sequence of the tiles are misplaced. Here are two
example routines I used to generate the C16 grids. The gen_cs.m routine
is essentially a modified version of gengrids_fn.m. I also changed the
permute sequence in convertMITgrid.m.
The gen_cs.m only gives you one resolution (not like gengrids.m that
provides you several grid resolutions). You can modify the Rsphere to
use with the planet radius of interest. Hope these help.
Best,
Yuan
On 2/18/12 10:10 AM, Chris Watkins wrote:
> I'm afraid this hasn't worked. The XG and YG data seem to be wrong.
>
> In the attached two plots I have plotted RA against XG and YG on a
> sphere. Plot CS2.ps uses data from the tileNNN.mitgrid files supplied
> with the code. It looks just as you would expect with regions of
> smaller RA (blue) at the 'corners' with larger RA (deep red) in
> between at the equator and poles.
>
> However, in plot CS1.ps I use data XG, YG and RA from the
> tileNNN.mitgrid files produced by the matlab code. The plot is not at
> all as one would expect. There are 'corners' but they are malformed
> and regions of deep red appear displaced, for example there are no
> deep red regions at the poles.
>
> Finally in CS3.ps I use XC, YC and RA from the matlab code and it
> looks fine. This suggests to me that XG and YG are not what I expect
> them to be.
>
> Sorry for all the attachments I thought that they would
> best illustrate my issue.
>
> Regards,
>
> Chris
>
>
>
> On 16 February 2012 07:45, Chris Watkins <chris at tw1.me.uk
> <mailto:chris at tw1.me.uk>> wrote:
>
> Yuan,
>
> Thanks for all your help.
>
> Regards,
>
> Chris
>
>
> On 15 February 2012 23:04, Yuan Lian <lian at ashimaresearch.com
> <mailto:lian at ashimaresearch.com>> wrote:
>
> Hi Chris,
>
> Glad you figured out the problem. The C32 grids supplied in
> the verifications examples may have different configuration,
> likely they used different nratio, or with some extra tweaks
> about the cube-sphere grid corners (some grid stretching
> etc). One way to ensure that the grids were generated
> correctly is to compare "XG, YG ..." during grid generation
> and those from the .bin files. Additionally you take a look of
> the grid arrangement in "EXCH2" section in the MITgcm manual,
> from which you can check if "XG" and "YG" generated by the
> matlab routines make sense.
>
> The extreme values I mentioned in the 2004 thread were caused
> by the machine format, i.e., big endian and little endian. As
> long as your XG and YG values are confined within the bounds
> (-180, 180) for XG and (-90,90) for YG, you are good to go.
>
> Best,
> Yuan
>
>
>
>
> --
> Chris Watkins
>
> G+ GPlus.to/ChrisWatkins <http://gplus.to/ChrisWatkins>
>
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20120218/4b22999c/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: convertMITgrid.m
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20120218/4b22999c/attachment.el>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gen_cs.m
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20120218/4b22999c/attachment-0001.el>
More information about the MITgcm-support
mailing list