/[MITgcm]/MITgcm/verification/exp5/input/gendata.m
ViewVC logotype

Contents of /MITgcm/verification/exp5/input/gendata.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Wed May 5 18:32:39 1999 UTC (22 years, 1 month ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint46b_post, checkpoint57t_post, checkpoint58l_post, checkpoint48f_post, checkpoint46k_post, checkpoint51k_post, checkpoint53f_post, checkpoint47j_post, checkpoint54a_pre, checkpoint55c_post, checkpoint40pre1, checkpoint53b_pre, checkpoint48d_pre, checkpoint51l_post, checkpoint45d_post, checkpoint51j_post, branch-exfmods-tag, checkpoint35, checkpoint47e_post, checkpoint57m_post, checkpoint34, checkpoint44h_pre, checkpoint47i_post, checkpoint40pre6, branch-atmos-merge-zonalfilt, checkpoint57i_post, checkpoint48i_post, checkpoint52e_pre, release1_p12, checkpoint58e_post, release1_p10, checkpoint57v_post, release1_p16, checkpoint52n_post, checkpoint52j_post, release1_p15, checkpoint26, release1_p11, pre38tag1, checkpoint47, checkpoint47f_post, checkpoint48d_post, checkpoint51o_pre, checkpoint57f_post, checkpoint46j_post, checkpoint47c_post, checkpoint50e_post, checkpoint52e_post, checkpoint50c_post, checkpoint57s_post, checkpoint51n_pre, checkpoint47d_post, branch-atmos-merge-phase6, checkpoint44e_post, checkpoint40pre3, checkpoint57j_post, checkpoint58b_post, checkpoint58m_post, checkpoint44f_pre, checkpoint47a_post, checkpoint46c_post, checkpoint57b_post, checkpoint46f_post, checkpoint46l_pre, checkpoint53c_post, checkpoint53d_post, checkpoint57f_pre, checkpoint46a_post, checkpoint57k_post, checkpoint48a_post, checkpoint55d_pre, checkpoint46n_post, checkpoint57d_post, release1_beta1, checkpoint46d_pre, checkpoint57g_post, checkpoint48e_post, checkpoint46e_post, checkpoint45b_post, checkpoint21, checkpoint22, checkpoint57a_post, checkpoint48h_post, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint50c_pre, release1-branch_tutorials, checkpoint57h_pre, checkpoint57y_post, checkpoint24, release1_p14, checkpoint44g_post, branchpoint-genmake2, checkpoint46h_pre, checkpoint45c_post, checkpoint44h_post, checkpoint51q_post, chkpt44c_post, checkpoint58g_post, branch-atmos-merge-freeze, checkpoint57x_post, checkpoint52j_pre, checkpoint54a_post, checkpoint46e_pre, checkpoint43a-release1mods, checkpoint27, checkpoint50h_post, branch-netcdf, checkpoint52l_post, checkpoint55h_post, checkpoint58n_post, checkpoint51r_post, checkpoint58x_post, checkpoint52k_post, checkpoint52b_pre, checkpoint57g_pre, checkpoint54b_post, release1_b1, checkpoint46j_pre, checkpoint58h_post, checkpoint46b_pre, checkpoint51i_post, checkpoint57e_post, checkpoint58w_post, checkpoint54d_post, checkpoint47h_post, checkpoint48c_post, checkpoint46l_post, chkpt44a_pre, checkpoint52l_pre, release1-branch-end, checkpoint56c_post, c37_adj, checkpoint54e_post, release1_final_v1, checkpoint58j_post, checkpoint55b_post, checkpoint51e_post, checkpoint51b_post, checkpoint46, checkpoint57h_post, checkpoint44f_post, checkpoint51l_pre, checkpoint52m_post, checkpoint33, checkpoint51c_post, checkpoint57y_pre, checkpoint55, checkpoint53a_post, checkpoint41, checkpoint55a_post, checkpoint57c_pre, checkpoint44, release1_p13, checkpoint48, checkpoint49, checkpoint51f_pre, checkpoint50i_post, checkpoint47b_post, checkpoint40pre2, checkpoint40pre5, checkpoint53b_post, checkpoint57o_post, checkpoint59p, checkpoint55g_post, checkpoint57r_post, checkpoint51o_post, checkpoint40pre8, checkpoint48g_post, release1_p17, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, chkpt44d_post, checkpoint59, checkpoint58, checkpoint42, branch-atmos-merge-shapiro, checkpoint57a_pre, checkpoint54, checkpoint57, checkpoint56, checkpoint51, checkpoint50, checkpoint53, checkpoint52, release1_p8, release1_p9, checkpoint50d_post, checkpoint52d_post, checkpoint46m_post, checkpoint46g_pre, release1_p2, release1_p3, release1_p4, checkpoint51b_pre, release1_p6, checkpoint52a_post, checkpoint57h_done, checkpoint25, checkpoint47g_post, checkpoint58f_post, checkpoint52b_post, branch-atmos-merge-phase3, checkpoint53g_post, chkpt44a_post, checkpoint52f_post, checkpoint44b_pre, checkpoint52c_post, checkpoint29, release1_p1, checkpoint58d_post, checkpoint57w_post, checkpoint57p_post, checkpoint28, checkpint57u_post, checkpoint40pre4, checkpoint51h_pre, checkpoint58a_post, checkpoint46a_pre, branch-atmos-merge-phase5, branch-atmos-merge-phase4, branch-atmos-merge-phase7, checkpoint50g_post, branch-atmos-merge-phase1, checkpoint58i_post, checkpoint57q_post, release1_p5, checkpoint44e_pre, checkpoint51g_post, ecco_c52_e35, chkpt44c_pre, checkpoint40pre9, checkpoint58o_post, checkpoint57z_post, checkpoint54f_post, checkpoint51f_post, pre38-close, checkpoint46d_post, checkpoint48b_post, checkpoint50b_post, eckpoint57e_pre, checkpoint46g_post, checkpoint45a_post, checkpoint58c_post, release1_p13_pre, release1_p12_pre, checkpoint50d_pre, checkpoint58k_post, checkpoint57c_post, checkpoint58u_post, checkpoint50f_post, checkpoint58y_post, checkpoint46c_pre, checkpoint50f_pre, checkpoint52a_pre, checkpoint43, checkpoint47d_pre, checkpoint32, checkpoint31, checkpoint51d_post, checkpoint37, checkpoint40, checkpoint48c_pre, checkpoint50a_post, checkpoint46i_post, checkpoint58v_post, checkpoint51m_post, checkpoint51t_post, checkpoint53d_pre, release1-branch_branchpoint, checkpoint58s_post, checkpoint55e_post, checkpoint40pre7, checkpoint23, checkpoint54c_post, checkpoint58p_post, checkpoint52i_post, checkpoint51a_post, checkpoint58t_post, checkpoint45, checkpoint39, checkpoint46h_post, checkpoint50e_pre, checkpoint38, checkpoint58q_post, checkpoint51p_post, checkpoint51n_post, release1_chkpt44d_post, checkpoint30, checkpoint55i_post, branch-atmos-merge-phase2, checkpoint51i_pre, checkpoint57l_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, release1_p7, branch-atmos-merge-start, checkpoint52f_pre, checkpoint50b_pre, checkpoint36, checkpoint56a_post, checkpoint44b_post, checkpoint51s_post, checkpoint55d_post
Branch point for: branch-nonh, netcdf-sm0, branch-genmake2, pre38, release1_coupled, tg2-branch, release1_final, checkpoint51n_branch, release1-branch, branch-atmos-merge, release1, release1_50yr, branch-exfmods-curt
Changes since 1.1: +1 -1 lines
Implemented new I/O package (mdsio.F). This package does parallel
I/O in much the same way as dfile.F used to except it uses "direct
access" rather than (f77) unformatted sequential access.

Problems with dfile.F package included:
  o unnecessary memory use (each process had two global sized buffers)
  o inability to read the files it had written without post-processing
  o "tiled" files were tiled by process/thread rather than actual tiles
  o created huge numbers of files with no alternatives

Features of the mdsio.F package:
  o direct-access binary writes
  o no excessive memory use
  o ability to read/write from multiple record files
  o "tiled" files are based on "WRAPPER" tiles so that the number
    and content of files is independent of the number of threads
    and/or processes
  o option to create single "global" files rather than "tiled" files
  o ability to read both "global" and "tiled" files
    [Caveat: the tiling of files must match the model tiles]
  o checkpoints now use a single file per model section
    ie.  one file for the hydrostatic model core, one file
    for the non-hydrostatic extensions and one file for the C-D
    extensions
  o the mid-level I/O routines now is broken into more source files
    read_write_fld.F supplies basic I/O routines with the same interface
                     as the original I/O package
    read_write_rec.F supplies I/O routines which allow multiple records
    write_state.F    writes the model state
    checkpoint.F     supplies the read/write checkpoint routines

All the example input data has had to be modified to be direct-access.
Otherwise only routines that used I/O have been affected and not
all of those have been due to the continuity of arguments in
the read_write_fld.F routines.

What needs to be done?  We have to create a suite of conversion
utilities for users with old-style data. Also supply the option
for using old-style I/O, not just for die-hards but for reading
data too extensive to be converted. And more...

1 % This is a matlab script that generates the input data
2
3 % Dimensions of grid
4 nx=64;
5 ny=64;
6 nz=20;
7 % Nominal depth of model (meters)
8 H=2000;
9 % Size of domain
10 Lx=32e3;
11 % Scale of disk (m)
12 L=8e3;
13 % Horizontal resolution (m)
14 dx=Lx/nx;
15 % Rotation
16 f=1e-4;
17 % Stratification
18 N=0. * f*L/H;
19 % Flux
20 Qo=1;
21
22 % Gravity
23 g=9.81;
24 % E.O.S.
25 alpha=2.e-4;
26
27 Tz=N^2/(g*alpha)
28
29 dz=H/nz;
30 sprintf('delZ = %d * %7.6g,',nz,dz)
31
32 x=(1:nx)*dx;x=x-mean(x);
33 y=(1:ny)*dx;y=y-mean(y);
34 z=-dz/2:-dz:-H;
35
36 [Y,X]=meshgrid(y,x);
37
38 % Temperature profile
39 [sprintf('Tref =') sprintf(' %8.6g,',Tz*z-mean(Tz*z))]
40
41 % Gaussian bump
42 Q=Qo*(1+0.01*rand([nx,ny]));
43 r=sqrt(X.^2+Y.^2);
44 %% Q( find(r>L) )=0;
45 fid=fopen('Qnet.circle','w','b'); fwrite(fid,Q,'real*8'); fclose(fid);

  ViewVC Help
Powered by ViewVC 1.1.22