You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create the bilinear regrid weights between between the MERRA2 grid and the C96 tiles (MERRA2.to.C96.nc). The following code snip shows the fortran code required:
Interpolate the MERRA2 data to the tiles as shown in the code snip, where mdat is the MERRA2 data for each tracer and each month and the arrays row, col and S are obtained from the weights file generated above and dst3d is the mapped MERRA2 data on each tile.
src_field(:,1:nlev) = reshape(mdat(1:nlons,1:nlats,1:nlev), (/nlons*nlats,nlev/))
dst_field = 0.0
do i = 1,n_s
ii = row(i); jj = col(i)
dst_field(ii,:) = dst_field(ii,:) + S(i)*src_field(jj,:)
enddo
do i = 0,ntile-1
istr = i*npx*npx+1
iend = istr+npx*npx-1
dst3d(:,:,1:nlev) = reshape(dst_field(istr:iend,1:nlev), (/npx,npx,nlev/))
Write the array dst3d into a tiled file for each tracer, writing all months into the same tiled file.
For C96, the above procedure results in 6 files which are approximately 560MB each. For C384, the 6 files are each about 4.8 GB. The current MERRA2 input data is contained in 12 files of approximate 1GB each.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
During a recent code manager tag-up, the possibility of using the MERRA2 data on the tiled grids was raised.
Tiled MERRA2 files can be created off-line using the following procedure:
ncremap
ncremap -g MERRA2_SCRIP.nc -G latlon=361,576#lat_typ=cap
MERRA2.to.C96.nc
). The following code snip shows the fortran code required:mdat
is the MERRA2 data for each tracer and each month and the arraysrow
,col
andS
are obtained from the weights file generated above anddst3d
is the mapped MERRA2 data on each tile.dst3d
into a tiled file for each tracer, writing all months into the same tiled file.For C96, the above procedure results in 6 files which are approximately 560MB each. For C384, the 6 files are each about 4.8 GB. The current MERRA2 input data is contained in 12 files of approximate 1GB each.
Beta Was this translation helpful? Give feedback.
All reactions