Run Synsat on ICON Data for ABI

Here, we will

  • load ICON test data (limited area simulation, stored in separate files, from IFCES2 project)

  • run Synsat on ICON for ABI and

  • finally store the Synsats into a netcdf file

The workflow is similar to 04-Run-Synsat-on-ICON-Data-for-SEVIRI.ipynb.

Setup Env and Load Libraries

[1]:
import os, sys
os.environ['RTTOV_PYTHON_WRAPPER'] = '/work/bb1262/tools/rttov/rttov-v13.2/wrapper'

import warnings
warnings.filterwarnings("ignore")
[2]:
import synsatipy

from synsatipy.synsat import SynSat

import synsatipy.synsat_example_data as synsat_example_data

Steps towards Synsat

Step I: Initialize Synsat class

[3]:
s = SynSat( synsat_instrument = 'ABI' )
... [synsat] set cloud / aerosol file to /work/bb1262/tools/rttov/rttov-v13.2/rtcoef_rttov13/cldaer_visir/sccldcoef_goes_16_abi.dat
... [synsat] load coefficient file /work/bb1262/tools/rttov/rttov-v13.2/rtcoef_rttov13/rttov13pred54L/rtcoef_goes_16_abi_o3.dat
Load successful >>>>> inst_id : 1, nchannels : 10.
 2025/05/07  14:31:03  Load coefficients:
 2025/05/07  14:31:03  /work/bb1262/tools/rttov/rttov-v13.2/rtcoef_rttov13/rttov13pred54L/rtcoef_goes_16_abi_o3.dat
 2025/05/07  14:31:03  /work/bb1262/tools/rttov/rttov-v13.2/rtcoef_rttov13/cldaer_visir/sccldcoef_goes_16_abi.dat

Step II: Load Example Data

[4]:
iconname = synsat_example_data.get_example_data( 'icon01' )
s.load( iconname, isel = {'lon': slice(0,None,4), 'lat': slice(0,None, 4)} )
... [synsat] read data from file  /work/bb1376/data/icon/atlantic-cases/paulette/ifces2-atlanXL-20200907-exp021/POSTPROC//3d_full_base_DOM01_ML_20200912T000000Z_regrid7km.nc

Step III: Setup Run Options and Start Execution

[5]:
s._options.Nthreads=4
s._options.NprofsPerCall = 2000
[6]:
%%time

s.run( chunked = True )
... [synsat] running 0/27 chunk with {'profile': slice(0, 2000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:08  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 1/27 chunk with {'profile': slice(2000, 4000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:13  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 2/27 chunk with {'profile': slice(4000, 6000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:17  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 3/27 chunk with {'profile': slice(6000, 8000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:22  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 4/27 chunk with {'profile': slice(8000, 10000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:27  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 5/27 chunk with {'profile': slice(10000, 12000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:31  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 6/27 chunk with {'profile': slice(12000, 14000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:35  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 7/27 chunk with {'profile': slice(14000, 16000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:40  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 8/27 chunk with {'profile': slice(16000, 18000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:44  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 9/27 chunk with {'profile': slice(18000, 20000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:49  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 10/27 chunk with {'profile': slice(20000, 22000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:53  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
 2025/05/07  14:31:53  rttov_check_reg_limits.F90
     Input water vapour profile exceeds upper coef limit (profile number =      489)
 2025/05/07  14:31:53  Limit   =    20.3040
 2025/05/07  14:31:53  p (hPa) =    97.1505
 2025/05/07  14:31:53  Value   =    20.7966
... [synsat] running 11/27 chunk with {'profile': slice(22000, 24000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:31:57  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 12/27 chunk with {'profile': slice(24000, 26000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:02  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 13/27 chunk with {'profile': slice(26000, 28000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:06  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 14/27 chunk with {'profile': slice(28000, 30000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:11  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 15/27 chunk with {'profile': slice(30000, 32000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:15  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 16/27 chunk with {'profile': slice(32000, 34000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:20  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 17/27 chunk with {'profile': slice(34000, 36000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:24  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 18/27 chunk with {'profile': slice(36000, 38000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:28  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 19/27 chunk with {'profile': slice(38000, 40000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:32  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 20/27 chunk with {'profile': slice(40000, 42000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:36  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 21/27 chunk with {'profile': slice(42000, 44000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:41  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 22/27 chunk with {'profile': slice(44000, 46000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:45  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 23/27 chunk with {'profile': slice(46000, 48000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:49  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 24/27 chunk with {'profile': slice(48000, 50000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:54  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 25/27 chunk with {'profile': slice(50000, 52000, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:32:58  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
... [synsat] running 26/27 chunk with {'profile': slice(52000, None, None)}
IR emissivity atlas loaded successfully
Atlas deallocated.
 2025/05/07  14:33:02  Running RTTOV using nthreads =    4 and nprofs_per_call =     2000
CPU times: user 2min 35s, sys: 1min 32s, total: 4min 7s
Wall time: 1min 58s

Step IV: Extract the Output

[7]:
icon_synsat = s.extract_output()
[8]:
print( icon_synsat )
<xarray.Dataset> Size: 4MB
Dimensions:  (time: 1, lon: 274, lat: 192)
Coordinates:
  * time     (time) datetime64[ns] 8B 2020-09-12
  * lon      (lon) float32 1kB -85.0 -84.74 -84.49 ... -15.62 -15.37 -15.11
  * lat      (lat) float32 768B 0.0 0.24 0.48 0.72 ... 45.12 45.36 45.6 45.84
Data variables:
    bt039    (time, lon, lat) float64 421kB 304.0 303.6 307.0 ... 286.8 287.4
    bt062    (time, lon, lat) float64 421kB 240.1 240.0 240.0 ... 224.7 224.7
    bt069    (time, lon, lat) float64 421kB 249.5 249.4 249.3 ... 235.2 233.6
    bt073    (time, lon, lat) float64 421kB 260.1 260.0 260.0 ... 245.8 244.1
    bt084    (time, lon, lat) float64 421kB 288.2 288.4 287.6 ... 280.1 280.6
    bt096    (time, lon, lat) float64 421kB 263.1 263.3 262.6 ... 237.8 238.0
    bt103    (time, lon, lat) float64 421kB 290.6 290.9 289.9 ... 284.1 284.6
    bt112    (time, lon, lat) float64 421kB 290.0 290.3 289.5 ... 284.3 285.0
    bt123    (time, lon, lat) float64 421kB 287.7 287.8 287.3 ... 281.4 282.2
    bt133    (time, lon, lat) float64 421kB 275.0 275.0 274.8 ... 257.9 258.3
Attributes:
    author:                Fabian Senf
    contact:               senf@tropos.de
    institution:           Leibniz Institute for Tropospheric Research
    creation_time:         2025-05-07 14:33:03.622154
    synsat_version:        0.1
    synsat_githash:        0df3af024bb4d51374707470fc7c2dacc5df4f96
    license:               CC-BY SA 3.0
    _local_software_path:  /home/b/b380352/proj/2022-01_RTTOV-Synsat/synsatip...
    input_filename:        /work/bb1376/data/icon/atlantic-cases/paulette/ifc...

Step V: Store Data

[9]:
outdir = './Data'

if not os.path.isdir( outdir ):
    os.makedirs( outdir )
outfile = f'{outdir}/abi_synsat_icon_example_data.nc'

print(f'... store synsat at {outfile}')
icon_synsat.to_netcdf(outfile)

... store synsat at ./Data/abi_synsat_icon_example_data.nc