! Re: create new OBC files that include DMS and DMSPd in the water column.
! To run the DMS model, I need to set an open boundary condition for dms and dmspd. For now, I will just create an OBC that has a minimum value (0.01) for all time/space, such as done for some of the PISCES variables (e.g. ZOO). In the current setup, the same OBC files are used (obc_[east,west]_trc_cmoc_y0000m00_canesm.nc) for interannual runs, so I will create two new files (east and west, although they may be identical) that include both dms and dmspd.
! Copy the source OBC files into the tmp folder.
cp obc_east_trc_cmoc_y0000m00_canesm.nc ~/tmp/
cp obc_west_trc_cmoc_y0000m00_canesm.nc ~/tmp/
! Extract the OBC data for ZOO and ZOO2 (which are all constant values of 0.01) and save to a new file.
ncks -v ZOO,ZOO2 obc_east_trc_cmoc_y0000m00_canesm.nc tmp_east.nc
ncks -v ZOO,ZOO2 obc_west_trc_cmoc_y0000m00_canesm.nc tmp_west.nc
! Rename the variables to dms and dmspd.
ncrename -O -v ZOO,dms tmp_east.nc
ncrename -O -v ZOO,dms tmp_west.nc
ncrename -O -v ZOO2,dmspd tmp_east.nc
ncrename -O -v ZOO2,dmspd tmp_west.nc
! Add the new variables to the existing files.
ncks -A -v dms,dmspd tmp_east.nc obc_east_trc_cmoc_y0000m00_canesm.nc
ncks -A -v dms,dmspd tmp_west.nc obc_west_trc_cmoc_y0000m00_canesm.nc
! Rename the files, so that I don't get confused with the source files.
mv obc_east_trc_cmoc_y0000m00_canesm.nc hh_obc_east_trc_cmoc_y0000m00_canesm.nc
mv obc_west_trc_cmoc_y0000m00_canesm.nc hh_obc_west_trc_cmoc_y0000m00_canesm.nc
! Remove the tmp files.
rm tmp_east.nc tmp_west.nc
0 件のコメント:
コメントを投稿