Hello,
I’m a Climate Modelisation PhD student working with WRF and for now, I’m willing to improve my topography using a .grd file at 250m resolution over my region of interest. I need to do 3 things :
- Change longitude system from [0;360]° to [-180;180]° in order to be WRF (WPS) compliant
OK -->gmt grdedit zS_Tahiti_250m_2021.grd -R-150.26/-148.7/-18.3/-16.8
- Replace every (underwater) negative topography values by 0
OK -->gmt grdmath zS_Tahiti_250m_2021.grd 0 MAX = zS_Tahiti_250m_2021_modified.grd
- Convert file from .grd to GeoTIFF (so I can use this process for WPS)
I’m willing to learn more about GMT possibilities, but I struggled finding my way within documentation. Also ChatGPT have been of no help, despite I fed it parts of documentation.
The following information might be usefull :
gmt grdinfo zS_Tahiti_250m_2021.grd
zS_Tahiti_250m_2021.grd: Title: Produced by grdcut
zS_Tahiti_250m_2021.grd: Command: grdcut grd/surface_250m_T0.85.corr.grd -R-150.26/-148.7/-18.3/-16.8 -Ggrd/zS_Tahiti_250m_2021.grd
zS_Tahiti_250m_2021.grd: Remark:
zS_Tahiti_250m_2021.grd: Gridline node registration used [Cartesian grid]
zS_Tahiti_250m_2021.grd: Grid file format: nf = GMT netCDF format (32-bit float), CF-1.7
zS_Tahiti_250m_2021.grd: x_min: 209.74 x_max: 211.3 x_inc: 0.0025 name: x n_columns: 625
zS_Tahiti_250m_2021.grd: y_min: -18.3 y_max: -16.8 y_inc: 0.0025 name: y n_rows: 601
zS_Tahiti_250m_2021.grd: v_min: -4305.20019531 v_max: 1980.54821777 name: z
zS_Tahiti_250m_2021.grd: scale_factor: 1 add_offset: 0
zS_Tahiti_250m_2021.grd: format: netCDF-4 chunk_size: 157,151 shuffle: on deflation_level: 3
zS_Tahiti_250m_2021.grd: Default CPT:
Thanks a lot for your help