[MITgcm-support] Initial Wind on Cubed Sphere

Chris Watkins chris at tw1.me.uk
Thu May 3 10:27:20 EDT 2012


Jean-Michel,

Thank you for your help. I'm afraid I have a few more questions.

I note uvLatLon2cube.m uses a file 'proj_cs32_2uEvN.bin' to get the
cosalpha, sinalpha values. I have found that this is available in one of
the verification examples. Are similar files available for C16 and C64
grids? If not how do I make such files?

You say to calculate the wind field at the cell center, rotate and move to
the CS-grid - I'm not quite sure what to do to achieve that.

Finally, is the output of uvLatLon2cube.m in the right order for conversion
into .bin files to be used to initialize a run? I guess what I am asking is
does reshape(uCs,1,numel(uCs)) put the data in to correct order conversion
to u_ini.bin to be read into MITgcm as uVelInitFile? And similarly for vCs?

Thanks,

Chris

On 1 May 2012 18:33, Jean-Michel Campin <jmc at ocean.mit.edu> wrote:

> Chris,
>
> This is a good question (I did not look to this script for some time,
> need to remember how things are done) and should be documented at the
> top ofuvLatLon2cube.m.
> "spv" is an optional argument (but it's unfortunate that it's before
> cosalpha,sinalpha,
> which you may want to specify without providing "spv") for an
> exclusion-value
> (or "special value") that could be found in the input uFld,vFld over dead
> region
> (e.g., continent when processing oceanic velocity).
> And when "spv" is specified, the interpolation discard these "dead regions"
> and, at the end, put back "spv" over these regions.
> So if you specify a value for "spv" that is not present anywhere neither in
> uFld nor in vFld, then it will have no effect on the result.
>
> Cheers,
> Jean-Michel
>
> On Tue, May 01, 2012 at 04:28:43PM +0100, Chris Watkins wrote:
> > Hi Jean-Michel,
> >
> > Thank you for such a quick response. I was looking at
> > utils/matlab/cs_grid/uvLatLon2cube.m. It asks for spv as one of its
> input.
> > Can you tell me what spv is?
> >
> > Thanks again,
> >
> > Chris
> >
> > On 1 May 2012 16:11, Jean-Michel Campin <jmc at ocean.mit.edu> wrote:
> >
> > > Hi Chris,
> > >
> > > Depending on the wind field, you may try one of the 2 methods:
> > > 1) general method (similar to what is done within matlab script
> > >  utils/matlab/cs_grid/uvLatLon2cube.m): your can define your wind field
> > >  on a lat-lon grid and then use uvLatLon2cube.m to interpolate + rotate
> > >  to CS-grid direction + put the uVel,vVel on to C-grid location;
> > > Or, you can skip the interpolation stage and define your wind field
> > >  on the CS-grid, at the grid-cell center location and then just do
> > >  the rotation + the move to C-grid location.
> > > 2) specific method for non-divergent wind-field (this is a special case
> > >  which is not uncommon): From the analytical expression of the wind,
> > >  you can derive an analytical expression of the horizontal
> stream-function.
> > >  Then you evaluate the stream-function on the CS-grid at the grid-cell
> > > corner
> > >  (position XG,YG) and from there you can compute directly the wind
> > >  at the C-grid location (this ensure that uVel,vVel field is non
> > > divergent).
> > >  There are few matlab scripts that uses this 2nd method (e.g., in
> > >  MITgcm_contrib/dyncore_ASP/mat_scripts ) and also some fortran code
> > >  (e.g., verification/advect_cs/code/ini_vel.F or
> > >   verification/code/solid-body.cs-32x32x1/code/ini_vel.F).
> > >
> > > Cheers,
> > > Jean-Michel
> > >
> > > On Tue, May 01, 2012 at 02:34:45PM +0100, Chris Watkins wrote:
> > > > I am trying to set up an initial wind field using the file ini_vel.f
> on a
> > > > cubed sphere. I know analytically what the meridional and zonal winds
> > > > should be on a latitude-longitude grid. Can anyone help me understand
> > > what
> > > > adjustments I need to make to these values to make them into the
> uVel and
> > > > vVel variables.
> > > >
> > > > I originally set uVel to the zonal wind and vVel to the meridional
> wind
> > > but
> > > > the output for U & V  for timestep 0 does not match.
> > > >
> > > > --
> > > > Chris Watkins
> > >
> > > > _______________________________________________
> > > > MITgcm-support mailing list
> > > > MITgcm-support at mitgcm.org
> > > > http://mitgcm.org/mailman/listinfo/mitgcm-support
> > >
> > >
> > > _______________________________________________
> > > MITgcm-support mailing list
> > > MITgcm-support at mitgcm.org
> > > http://mitgcm.org/mailman/listinfo/mitgcm-support
> > >
> >
> >
> >
> > --
> > 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
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
>



-- 
Chris Watkins

G+ GPlus.to/ChrisWatkins <http://gplus.to/ChrisWatkins>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20120503/f627e02c/attachment.htm>


More information about the MITgcm-support mailing list