Skip to content
Snippets Groups Projects
Commit ffad272b authored by Oriol Tintó's avatar Oriol Tintó
Browse files

Fix interpolate_sst.sh

parent 871a8a68
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ function interpolate_SST() {
local SST_OUTPUT="$3"
remap_namelist="tmp_sst_remap.nmp"
cat > ${remap_namelist} << END
cat >${remap_namelist} <<END
&remap_nml
in_filename = "${SST_INPUT}"
......@@ -19,21 +19,71 @@ function interpolate_SST() {
inputname = "T_SEA"
outputname = "T_SEA"
code=167
&input_field_nml
inputname = "T_SEA_CLIM"
outputname = "T_SEA_CLIM"
code=167
/
END
END
iconremap --remap_nml ${remap_namelist} -vvv
# Remove namelist
rm -f ${remap_namelist}
}
\ No newline at end of file
}
#function interpolate_extpar() {
#
#GRID_FILE=icon_grid_0010_R02B04_G.nc
#
#
#
#if [[ ! -e "$GRID_FILE" ]] ; then
#echo "Downloading files"
#
#wget http://icon-downloads.mpimet.mpg.de/grids/public/edzw/icon_grid_0024_R02B06_G.nc -P .
#wget http://icon-downloads.mpimet.mpg.de/grids/public/edzw/icon_extpar_0024_R02B06_G_20200917_tiles.nc -P .
#wget http://icon-downloads.mpimet.mpg.de/grids/public/edzw/${GRID_FILE} -P .
#
#fi
#
#
#echo "Converting extpar file to ICON grid"
#
#cat > remap.nml << END
#
#&remap_nml
#in_filename = "icon_extpar_0024_R02B06_G_20200917_tiles.nc"
#in_grid_filename = "icon_grid_0024_R02B06_G.nc"
#in_type = 2
#out_grid_filename = "${GRID_FILE}"
#out_filename = "extpar.nc"
#out_type = 2
#out_filetype = 4
#/
#
#
#END
#
#python3 create_extpar_conversion_namelist.py
#
#
#module purge
#module load icon-tools/2.4.14.1-gcc-11.2.0
#
#iconremap --remap_nml remap.nml #-vvv
#rm remap.nml
#}
#
#
#function extend_remap_namelist() {
#
##import xarray as xr
##ds=xr.open_dataset("icon_extpar_0024_R02B06_G_20200917_tiles.nc")
##
##with open('remap.nml', 'a') as file:
## for ida, da in enumerate(ds):
## if da not in ["clat","clon","lat","lon"]:
## file.write('&input_field_nml\n')
## file.write(f'inputname = "{da}"\n')
## file.write(f'outputname = "{da}"\n')
## file.write('/\n\n')
#}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment