pyremo.preproc.remap_remo

remap_remo(ds, domain_info, vc, surflib, initial=False, static=False, lice=True, uvcor=True, domain_info_em=None)[source]

Remap nested REMO (external model) output to a higher-resolution REMO domain.

This is the double-nesting analogue of remap() operating on an existing REMO atmospheric forcing / restart (t file) instead of CF GCM data. It reprojects the coarse external model (EM) REMO grid to a higher-resolution host model (HM) grid and optionally augments fields required for initial conditions.

Parameters:
  • ds (xarray.Dataset) – REMO external / driving model dataset containing at minimum 3‑D atmospheric fields (T, U, V, QD (specific humidity), QW (total water), PS) and 2‑D surface fields (TSW, TSI, FIB, BLA). May include SEAICE; if absent and lice is True it will be diagnosed from TSW.

  • domain_info (dict) – Target (high-resolution) REMO domain description (see remap()).

  • vc (pandas.DataFrame) – Target vertical coordinate definition with ak / bk (half) and akh / bkh (mid) coefficients.

  • surflib (xarray.Dataset) – Surface library on the target domain providing at least BLA and FIB.

  • initial (bool, default: False) – If True, include soil fields and perform additional adjustments required for model cold / warm starts (e.g. soil moisture normalization, glacier mask).

  • lice (bool or None, default: True) – If True, (re)compute sea ice fraction from surface temperature; if False, keep provided SEAICE values; if None auto-detect (derive when SEAICE missing).

  • uvcor (bool, default: True) – Apply wind vector correction / rotation to remove artificial divergence and conform to the rotated pole geometry.

  • domain_info_em (dict, optional) – Domain description of the external (coarser) REMO grid. If not supplied it is inferred from ds.cx.info().

Returns:

xarray.Dataset – Nested-domain forcing dataset on (rlon, rlat) with vertical lev plus surface and (optionally) soil fields. Contains the transformed dynamic fields (T, U, V, PS, humidity diagnostics, TSW, TSI, SEAICE), vertical coordinate coefficients (hyai, hybi, hyam, hybm) and any soil variables added for initialisation when initial is True.

Notes

The function performs two-stage pressure correction analogous to the global remap, but uses REMO-native hybrid coefficients from the external model (EM) as source. Wind fields are interpolated on staggered points and then re-centred / rotated.