【转载请注明出处: http://blog.csdn.net/lzl124631x】
Massachusetts Institute of Technology (MIT) 麻省理工学院
EE & CS : http://www.eecs.mit.edu/MITgcm ( M.I.T General Circulation Model) : http://mitgcm.org/
Novel Aspects:
- it can be used to study both atmospheric and oceanic phenomena; one hydrodynamical kernel is used to drive forward both atmospheric and oceanic models.
- it has a non-hydrostatic capability and so can be used to study both small-scale and large scale processes.
- finite volume techniques are employed yielding an intuitive discretization and support for the treatment of irregular geometries using orthogonal curvilinear grids and shaved cells.
- tangent linear and adjoint counterparts are automatically maintained along with the forward model, permitting sensitivity and optimization studies.
- the model is developed to perform efficiently on a wide variety of computational platforms.
Environment:
Ubuntu
Download Source:
Visit http://mitgcm.org/public/source_code.html. Three alternative ways are provided for downloading the source.
- Download using CVS pserver
- Download the most recent checkpoint as a "tar" file (112MB for now)
- Download one of the daily snap-shots
Download User Manual:
Visit http://mitgcm.org/public/docs.html. I chose http://mitgcm.org/public/r2_manual/latest/online_documents/manual.pdf.
Build The Code:
Follow the instructions in section 3.4 Building the code.
% cd verification/exp2/build
% ../../../tools/genmake2 -mods=../code
Here I bumped into my first obstacle -- a puzzling error message. It's like that I should manually specify the optfile but finally I figured out that the problem was merely due to lack of a fortran compiler.
% sudo apt-get install gfortran
Now the corresponding optfile is ../../../tools/build_options/linux_ia32_gfortran. Actually genmake2 can determine the optfile automatically now.
% ../../../tools/genmake2 -mods=../code
You can specify the opt-file with command line parameter -of=path_to_optfile
% make depend
% make
If compilation finished succesfully then an executable called mitgcmuvwill now exist in the local directory.
Run The Model:
% cd ../run
% cp ../input/* ./
% cp ../build/mitgcmuv ./
% ./mitgcmuv > output.txt
Install Matlab For Linux:
See http://blog.csdn.net/lzl124631x/article/details/16883831
Read And Visualize Output in Matlab:
% /opt/matlab2009/bin/matlab
>> cd ~/MITgcm/utils/matlab
>> H=rdmds(’../../verification/exp2/run/Depth’);
>> contourf(H’);colorbar;
>> title(’Depth of fluid as used by model’);
>> eta=rdmds(’../../verification/exp4/run/Eta’,10);
>> imagesc(eta’);axis ij;colorbar;
>> title(’Surface height at iter=10’);