First page Back Continue Last page Overview Graphics
How to use MPP_IO
Example
call mpp_define_domains( (/1,nx,1,ny/), layout, domain, xhalo=halo, yhalo=halo )
call mpp_get_compute_domain( domain, is, ie, js, je )
call mpp_get_data_domain ( domain, isd, ied, jsd, jed )
call mpp_get_domain_components( domain, xdom, ydom )
call mpp_open( unit, trim(file)//'d', action=MPP_OVERWR, form=MPP_NETCDF, threading=MPP_MULTI, fileset=MPP_MULTI )
call mpp_write_meta( unit, x,'X','km','x-coordinate in Cartesian',&
domain=xdom, data=(/(i-1.,i=1,nx)/) )
call mpp_write_meta( unit, y,'Y','km','x-coordinate in Cartesian',&
domain=ydom, data=(/(i-1.,i=1,ny)/) )
call mpp_write_meta( unit, z,'Z','km','height in Cartesian system ',&
sense=1,data=(/(i-1.,i=1,nz)/) )
call mpp_write_meta( unit, t, 'time', 'sec', 'Time' )
call mpp_write_meta( unit, latij, (/x,y/), 'lat', 'degrees_north', &
'latitude')
call mpp_write_meta( unit, lonij, (/x,y/), 'lon', 'degrees_east', &
'longitude')