[MITgcm-support] changing size of sphere in grid tiles
Angela Marie Zalucha
azalucha at MIT.EDU
Tue Jan 18 16:57:31 EST 2011
Sorry Dave I missed your question. Yes, I did similar to what Jean-Michel
suggested, you read in the tile files, rescale each variable as
appropriate (i.e. pay attention to things that have units of length or
area), and then output them. It's a pretty simple matlab script
(attached).
Angela
On Tue, 18 Jan 2011, Dave Spiegel wrote:
> Dear Angela,
>
> I don't know if you saw my question from earlier today. Are you using the
> cubed sphere grid? If so, how did you set up a grid with Pluto's radius
> instead of Earth's? I'd appreciate any guidance.
>
> Best,
> Dave
>
> On Mon, Jan 17, 2011 at 12:29 PM, Angela Marie Zalucha <azalucha at mit.edu>wrote:
>
>> Hello,
>>
>> I am currently working on applying the MIT GCM to Pluto's atmosphere.
>> Pluto's atmosphere is very extended compared with the its solid body radius,
>> and so the assumption of constant gravitational acceleration with height
>> becomes no longer a good approximation. i.e., I need the 1/r^2 dependence.
>> I was wondering if anyone has made this modification and if not how easy it
>> would be to do.
>>
>> I use the atmosphere model in r* coordinates.
>>
>> Thanks,
>> Angela
>>
>>
>>
>> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
>> Angela Zalucha, Ph.D.
>> Postdoctoral Associate
>> Department of Earth, Atmospheric,
>> and Planetary Sciences
>> Massachusetts Institute of Technology
>>
>> Office located at Southwest Research Institute
>> 1050 Walnut Street, Suite 300
>> Boulder, CO 80302
>> USA
>> (720) 208-7211
>>
>>
>> http://web.mit.edu/azalucha/www/index.html
>> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
>>
>>
>>
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>
>
>
>
> --
> Dave Spiegel, Ph.D.
> Department of Astrophysical Sciences
> Princeton University
> Peyton Hall
> Tel: (609) 258-0566
> Fax: (609) 258-8226
>
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Angela Zalucha, Ph.D.
Postdoctoral Associate
Department of Earth, Atmospheric,
and Planetary Sciences
Massachusetts Institute of Technology
Office located at Southwest Research Institute
1050 Walnut Street, Suite 300
Boulder, CO 80302
USA
(720) 208-7211
http://web.mit.edu/azalucha/www/index.html
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
-------------- next part --------------
%script for rescaling tile files from earth to another planet
%
%user input
rEarth=6370; %radius of the planet in km of your input tile files, probably Earth
rPlanet=1180; % radius of the planet in km you're converting to, here Pluto
%loop over 6 faces
for i=1:6
%read in files
[fid message]=fopen(strcat('tile00',num2str(i),'.mitgrid'),'r','b');
f=fread(fid,inf,'real*8');
fclose(fid);
g=reshape(f,33,33,16);
%loop over 16 variables in the tile files. Depending on whether the variable is a
%distance or an area, it will need to be scaled as the ratio of radii or
%the ratio of radii squared.
for j=1:16
if (j==1) || (j==2) || (j==6) || (j==7)
order=0;
elseif (j==3) || (j==4) || (j==8) || (j==9) || (j==11) || (j==12) || (j==15) || (j==16)
order=1;
else
order=2;
end
h(:,:,j)=g(:,:,j)*(rPlanet/rEarth)^order;
end
%output
fidout=fopen(strcat('planettile.face00',num2str(i),'.bin'),'w','b');
fwrite(fidout,h,'real*8');
fclose(fidout);
end
More information about the MITgcm-support
mailing list