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

Using iconremap to convert netcdf.

parent 4882b390
No related branches found
No related tags found
No related merge requests found
Pipeline #19171 passed
...@@ -55,10 +55,6 @@ interpolate_SST "${DESTINATION_GRID}" "${SST_FORCING}" "${INTERPOLATED_SST}" ...@@ -55,10 +55,6 @@ interpolate_SST "${DESTINATION_GRID}" "${SST_FORCING}" "${INTERPOLATED_SST}"
integrate_sst_to_extpar "${INTERPOLATED_SST}" "${EXTERNAL_PARAMETERS_FILE}" integrate_sst_to_extpar "${INTERPOLATED_SST}" "${EXTERNAL_PARAMETERS_FILE}"
#old_integrate_sst_to_analysis "${INTERPOLATED_SST}" "${ANALYSIS_FILE}"
# Trying to unset ECCCODES variables.
unset ECCODES_DEFINITION_PATH
old_integrate_sst_to_analysis "${INTERPOLATED_SST}" "${ANALYSIS_FILE}"
# Integrate sst to analysis # Integrate sst to analysis
#integrate_sst_to_analysis "${DESTINATION_GRID}" "${ANALYSIS_FILE}" integrate_sst_to_analysis "${DESTINATION_GRID}" "${ANALYSIS_FILE}"
...@@ -133,10 +133,16 @@ END ...@@ -133,10 +133,16 @@ END
from enstools.io import read from enstools.io import read
with read("${ANALYSIS_FILE}") as ds, open('remap.nml', 'a') as file: with read("${ANALYSIS_FILE}") as ds, open('remap.nml', 'a') as file:
for ida, da in enumerate(ds): all_vars = list(ds.data_vars)
remap_vars = []
for var in all_vars:
if not "bnds" in var and not '_vertices' in var and not 'lat' in var and not 'lon' in var:
remap_vars.append(var)
for var in remap_vars:
file.write('&input_field_nml\n') file.write('&input_field_nml\n')
file.write(f'inputname = "{da}"\n') file.write(f'inputname = "{var}"\n')
file.write(f'outputname = "{da}"\n') file.write(f'outputname = "{var}"\n')
file.write('/\n\n') file.write('/\n\n')
END END
......
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