Home > Versions documentation > Surfex V8_1 > Practical changes > 4). Changes in the results (reproducibility)

4). Changes in the results (reproducibility)

The automatic base of tests STRATO was run with old version = V8_0 and new version = V8_1.

There are several differences in the results between V8_0 and V8_1.

1). Some of these differences are purely numerical:

  • changes disappearing if the same order of components is established in the calculations:
    • files horibl_surf.F90, snowcro.F90, avg_urban_fluxes.F90, urban_fluxes.F90, init_isba_sbl.F90, mode_gridtype_conf_proj.F90, window_e_budget.F90, wall_layer_e_budget.F90, coef_ver_interp_lin_surf.F90, av_pgd.F90
  • Changes disappearing if the same round numbers are done in the two versions:
    • also linked to calculations done in different orders, but not easy to do in the same order in the two versions.
    • files average2_cti.F90, average2_orography.F90, average2_mesh.F90, average2_ldb.F90, average2_cover.F90:
      • related to the parallelization of the PGD step
      • numbers rounded at the precision 1.0E+8
    • file vegtype_grid_to_patch_grid.F90:
      • called in the subroutines prep_hor_..._field.F90, that are simplified in V8_1.
      • numbers rounded at the precision 1.0E+16
  • Changes caused by the simplification of calculations in the PREP step, disappearing if these simplifications are added in V8_0:
    • init_veg_pgdn.F90: in V8_1, for GARDEN and GREENROOF which have only 1 patch, XVEGTYPE_PATCH(:,:,1) = XVEGTYPE(:,:) and it’s not calculated by surf_patch.F90.
    • In PREP_GRIB, for SNOW, GARDEN and GREENROOF, input fields are no longer defined for all vegtypes, because in V8_0, only a duplication of the same values is done, and then the interpolation is done the same way NVEGTYPE times. The impacted files are prep_snow_grib.F90, prep_teb_garden_grib.F90 and prep_teb_greenroof_grib.F90.
    • In PREP_UNIF, for the snow, the same thing occurs. The impacted file are prep_snow_unif.F90, prep_teb_garden_unif.F90, prep_teb_greenroof_unif.F90.
    • In PREP_EXTERN, if the input snow model has only 1 layer, we don’t put the snow fields on the fine grid (40 layers). We keep the only layer and put its values on all output layers (for RHO, HEAT, GRAN1, GRAN2, HIST and AGE). The impacted files are prep_snow_extern.F90 and prep_hor_snow_field.F90.
    • For ISBA, GARDEN and GREENROOF, if the input field is defined on 1 patch, the call to PUT_ON_ALL_VEGTYPES and to VEGTYPE_GRID_TO_PATCH_GRID is removed. The impacted files are prep_hor_isba_field.F90, prep_hor_teb_garden_field.F90, prep_hor_teb_greenroof_field.F90.
  • Changes associated to the treatment of urban points without GARDEN/GREENROOF, slighly different in V8_1 compared to V8_1:
    • impacted files in V8_0: soil_albedo.F90, init_teb_gardenn.F90, init_teb_greenroofn.F90.
  • Changes because the default value for NHALO is 0 in V8_1 and no more 2 like in V8_0:
    • in interpol_npts.F90, in V8_0, ISCAN can be equal to 0 and in this case, KCODE must be -4.
  • Changes because now in snow3L_isba, snow fields are masked with XUNDEF where there is no snow (WSNOW=0.0).

2). Other differences are related to bugs or updates missing in V8_0:

  • In init_coupl_topd.F90, initializations are missing and change the results of the simulations. It’s corrected in V8_1.
  • In convert_patch_isba.F90, there is a correction for the error due to machine precision, to calculate ZDTOT, ZDG2 and XDROOT, but the function INT is called instead of NINT. The adjustment is missing for XROOTFRAC. It’s corrected in V8_1.
  • In adapt_horibl_surf.F90, the calculation of the closest input latitude in the southern direction is wrong. It’s corrected in V8_1.
  • In init_isba_mixpar.F90, a reference to KDECADE2 should be to KDECADE. It’s corrected in V8_1.
  • The flag values put in fields arrays when XGARDEN/XGREENROOF=0. are missing in a case. It’s corrected in V8_1.
    • impacted files: read_pgd_teb_garden_parn.F90, read_pgd_teb_greenroof_parn.F90, init_teb_garden_pgdn.F90, init_teb_greenroof_pgdn.F90
  • The call to VEGETATION_UPDATE is done before the call to ISBA in coupling_isban.F90, but after in garden.F90 and greenroof.F90:
    • in V8_1, the call to VEGETATION_UPDATE is done before the call to ISBA in the 3 schemes
    • impacted files: garden.F90, greenroof.F90
  • Like in ISBA, in GARDEN and GREENROOF, the parameters ALBNIR/VIS/UV_VEG/SOIL must be updated even if CPHOTO=NIT/NCB:
    • impacted files: read_pgd_teb_gardenn.F90, read_pgd_teb_greenroofn.F90, vegetation_update_garden.F90, vegetation_update_greenroof.F90, garden.F90, greenroof.F90
  • Some PGD diagnostic fields for TEB depend on the TEB patches. In write_diag_tebn.F90, before the call to write_diag_pgd_tebn.F90, the TEB patch is not set in V8_0:
    • we set it to TEB patch 1 in V8_1.
    • impacted file: write_diag_tebn.F90.

3) Adds to V8_0 and V8_1 allowing to obtain the perfect reproducibility (with OPTLEVEL=DEBUG) between the two versions:

GZ - 188.7 kb
Needed adds for V8_0 / trunk_rev4173 (reproducibility with V8_1 )
GZ - 2.8 kb
Needed adds for V8_1 (reproducibility with V8_0 / trunk_rev4173)

4) Remarks:

  • The snow schemes ISBA-ES and CROCUS seem quite sensible to numerical tiny differences at the PREP initialization step.
  • The parameter XPREC = 1.0E+8 is introduced in modd_pgdwork.F90. It allows to round some values to get exactly the same results in parallel and not-parallel modes. If it happens that you have not exactly the same results in parallel and not parallel modes, and if you need to have exactly the same results, you can decrease the value of XPREC in modd_pgdwork.F90. It’s used in:
    • average2_....F90, because in treat_field.F90 additions can be done in a different order in parallel mode.
    • convert_patch_isba.F90, SET_GRID_PARAM.

Some bugs corrected after this reproducibility test cause some changes in the results:

  • a change in the definition of the perturbation for WG in SODA-EKF.
  • a correction for the calculation of emissivity.

| Site Map | Download in pdf format | Legal notices | Follow site activity RSS 2.0 | Top of the page | SPIP | ScolaSPIP