[MITgcm-support] Velocity cubed sphere + pickup seaice

Jean-Michel Campin jmc at ocean.mit.edu
Wed Jun 4 16:21:19 EDT 2008


Hi Elja,

I would recommand to look at all the matlab scripts (+README file)
in your MITgcm/utils/matlab/cs_grid and specially: 
 cubeCalcAngle.m & rotate_uv2uvEN.m 

Jean-Michel 

On Wed, Jun 04, 2008 at 08:13:29PM +0200, Elja Huibregtse wrote:
> Thank you all for your advice! I changed the CS grid files, and I think that my results will be much more reliable...
> 
> I still have a (maybe very trivial) question about obtaining the correct zonal and meridional velocities from the cubed sphere coordinates. Martin, you wrote that I first have to interpolate the velocities and after that I have to rotate the velocities according to the values of angleCosC and angleSinC. I found the definitions of angleCosC and angleSinC:
> 
> angleCosC :: cosine of grid orientation angle relative to Geographic direction
>                   at cell center: alpha=(Eastward_dir,grid_uVel_dir)=(North_d,vVel_d)
> angleSinC :: sinus  of grid orientation angle relative to Geographic direction
>                   at cell center: alpha=(Eastward_dir,grid_uVel_dir)=(North_d,vVel_d)
> 
> Actually, I do not understand this explanation; is there an image available, explaining the angles? 
> I think that the velocities are something like:
> 
> U_final = U_cs_grid * angleCosC  -  V_cs_grid * angleSinC
> V_final = V_cs_grid * angleCosC  +  U_cs_grid * angleSinC
> 
> Is this correct?
> 
> Elja
> 
> 
> 
> -----Oorspronkelijk bericht-----
> Van: mitgcm-support-bounces at mitgcm.org namens chris hill
> Verzonden: wo 6/4/2008 6:09
> Aan: mitgcm-support at mitgcm.org
> Onderwerp: Re: [MITgcm-support] Velocity cubed sphere + pickup seaice
>  
> Hi Elja (and others doing non-Earth modeling on cube),
> 
>   The CS grid files are generated using an assumed radius of 6370.10^3 m 
> (which is somewhere between the Earth's polar and equatorial radius).
>   At the moment there is not an automatic way to change this, i.e. you 
> must do it by hand per Martin's recipe.
> 
> Chris
> Martin Losch wrote:
> > Elja,
> > I guess I misunderstood. For cs-runs (and generally for 
> > usingCurvilinearGrid=.true.) the grid parameter have to be provided to 
> > the model, in your case by the grid_cs32.face[n],bin files.
> > 
> > In fact you need to compute the correct quantities for your Jupiter moon 
> > application yourself, sorry. The easiest would be to read the grid 
> > files, scale the fields with (rMoon/rEarth)^n (n=1 for dx*, n=2 for ra*, 
> > etc) and write the to a file again. (you could also do this in 
> > ini_curvilinear_grid, but that's probably more dangerous.
> > 
> > Martin
> > 
> > On 4 Jun 2008, at 16:45, Elja Huibregtse wrote:
> > 
> >> Hi Martin,
> >>
> >> The angles are indeed independent of the radius. But I'm still 
> >> confused about how to change the parameters dxc, dyc, dxg etc.
> >>
> >> The default of the cube-sphere integration (with sea ice on the cs32 
> >> grid) is:  usingCurvilinearGrid=.TRUE.
> >> Trying usingSphericalPolarGrid=.TRUE. to make sure that dxg etc are 
> >> adapted to the correct configuration, doesn't work; I get a 
> >> segmentation fault.
> >>
> >> I use the cubed sphere configuration (cs32), which means that the 
> >> grid_cs32.face[n].bin files, with n=1..6, are read and used. Are these 
> >> files (containing all cubed-sphere grid lengths, areas and grid-point 
> >> positions) 'fixed' or based on the current configuration (radius)? In 
> >> the model, I often use recip_dxc etc, which are (as far as I 
> >> understand) dependent on these grid_cs32.face[n].bin files. Because 
> >> recip_dxc etc, haven't been adapted, I use the wrong values.
> >>
> >> I guess that the grid_cs32.face[n].bin files change if 
> >> usingSphericalPolarGrid=.TRUE., but this doesn't work.
> >> Thus, do I have to adapt the grid_cs32.face[n].bin files myself? Or is 
> >> there another way to automatically change the parameters?
> >>
> >> Thanks for your help,
> >>
> >> Elja
> >>
> >>
> >>
> >> -----Oorspronkelijk bericht-----
> >> Van: mitgcm-support-bounces at mitgcm.org namens Martin Losch
> >> Verzonden: wo 6/4/2008 12:17
> >> Aan: mitgcm-support at mitgcm.org
> >> Onderwerp: Re: [MITgcm-support] Velocity cubed sphere + pickup seaice
> >>
> >> Elja,
> >> you don't need to change set_defaults.F, you can set most of the
> >> relevant parameters (such as rSphere, rotationPeriod or omega, etc in
> >> "data"; have a look at ini_parms.F to see which parameters are
> >> available in namelists.
> >>
> >> rac=dxg*dyg in meters^2 (etc.), dxg etc are computed based on the
> >> value of rSphere (if "usingSphericalPolarGrid=.true."). the radius is
> >> only hard-coded in cubeCalcAngle.m, but does that matter? The angles
> >> are absolutely independent of the radius, right?
> >>
> >> Martin
> >>
> >> On 4 Jun 2008, at 11:06, Elja Huibregtse wrote:
> >>
> >> > Thanks, Martin and Dimitris, for your useful replies.
> >> >
> >> > My study object is a moon of Jupiter, thus the radius and other
> >> > parameters differ from those used for the Earth. I changed all
> >> > these parameters in set_defaults.f. Trying to calculate the values
> >> > of angleCosC and angleSinC, I found out that the radius stored in
> >> > RAC (calculated from: r_earth=sqrt(sum(sum(RAC))./(4.*pi)) in
> >> > cubeCalcAngle.m, line 23), is still the radius of the Earth.
> >> >
> >> > Now, I think that all the 'coordinate' files, like RAC, RAS, RAZ
> >> > etc. still contain the configuration of the Earth, which will, of
> >> > course, influence my results. Is it possible to adapt those files
> >> > to the correct configuration?
> >> >
> >> > Thanks!
> >> > Elja
> >> >
> >> >
> >> > -----Oorspronkelijk bericht-----
> >> > Van: mitgcm-support-bounces at mitgcm.org namens Martin Losch
> >> > Verzonden: wo 6/4/2008 8:54
> >> > Aan: mitgcm-support at mitgcm.org
> >> > Onderwerp: Re: [MITgcm-support] Velocity cubed sphere + pickup seaice
> >> >
> >> > Hi Elja,
> >> >
> >> > in addition, the orientation of u and v-velocity is along grid
> >> > coordinates, which will give you funny results, if you try to plot
> >> > them on some sort of map-projection. After interpolating, you need to
> >> > rotate the velocities according to the values of angleCosC and
> >> > angleSinC. Unfortunately, these fields are often not set, because the
> >> > model does not need them for hydrostatic integrations (so that they
> >> > are 1 and 0). There is a matlab script to compute the angles in
> >> > <utils/matlab/cs_grid/cubeCalcAngle.m>
> >> >
> >> > I am also attaching a matlab function that does the interpolation and
> >> > takes care of the edges (for me, so I am not sure that this will work
> >> > for you or anyone else, too).
> >> >
> >> > Martin
> >> >
> >> > _______________________________________________
> >> > 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
> >>
> >> _______________________________________________
> >> 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
> > 
> 
> _______________________________________________
> 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




More information about the MITgcm-support mailing list