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 (tfile) 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 includeSEAICE; if absent andliceis True it will be diagnosed fromTSW.domain_info (
dict) – Target (high-resolution) REMO domain description (seeremap()).vc (
pandas.DataFrame) – Target vertical coordinate definition withak/bk(half) andakh/bkh(mid) coefficients.surflib (
xarray.Dataset) – Surface library on the target domain providing at leastBLAandFIB.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 (
boolorNone, default:True) – If True, (re)compute sea ice fraction from surface temperature; if False, keep providedSEAICEvalues; ifNoneauto-detect (derive whenSEAICEmissing).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 fromds.cx.info().
- Returns:
xarray.Dataset– Nested-domain forcing dataset on (rlon,rlat) with verticallevplus 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 wheninitialis 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.