Commit 6eb45489 authored by Modellers Operational's avatar Modellers Operational

Merge branch 'master' of gitlab.ecosystem-modelling.pml.ac.uk:pml-modelling/rose_fvcom_setup

parents 8873f598 08d4c020
...@@ -26,6 +26,8 @@ sigma_file = sys.argv[5] ...@@ -26,6 +26,8 @@ sigma_file = sys.argv[5]
native_coordinates = sys.argv[6] native_coordinates = sys.argv[6]
fvcom_harmonics = sys.argv[7] fvcom_harmonics = sys.argv[7]
interval = 1/float(sys.argv[8]) interval = 1/float(sys.argv[8])
adjust_tides = sys.argv[9].split(',')
constituents = ['M2', 'S2'] constituents = ['M2', 'S2']
output_file = 'boundary_nest.nc'.format(grid) output_file = 'boundary_nest.nc'.format(grid)
...@@ -82,4 +84,4 @@ for this_fvcom, this_var in fvcom_cmems_names.items(): ...@@ -82,4 +84,4 @@ for this_fvcom, this_var in fvcom_cmems_names.items():
aqua_prep.avg_nest_force_vel() aqua_prep.avg_nest_force_vel()
# Write the forcing file # Write the forcing file
aqua_prep.write_nested_forcing(output_file, adjust_tides=['zeta', 'u', 'v', 'ua', 'va']) aqua_prep.write_nested_forcing(output_file, adjust_tides=adjust_tides)
[command] [command]
default = python3 make_nest_bound.py ${CMEMS_DATA_DIR} ${START_DAY} ${END_DAY} ${ROSE_DATAC}/${GRID_NAME}_grd.dat ${ROSE_DATAC}/sigma_gen.dat ${COORDINATES} ${HARMONICS_FILE_PATH} ${NEST_INTERVAL}; cp boundary_nest.nc /${REMOTE_TRANSFER_DIR}/ default = python3 make_nest_bound.py ${CMEMS_DATA_DIR} ${START_DAY} ${END_DAY} ${ROSE_DATAC}/${GRID_NAME}_grd.dat ${ROSE_DATAC}/sigma_gen.dat ${COORDINATES} ${HARMONICS_FILE_PATH} ${NEST_INTERVAL} ${ADJUST_TIDES}; mv boundary_nest.nc /${REMOTE_TRANSFER_DIR}/
...@@ -14,7 +14,6 @@ end_date = dt.datetime.strptime(sys.argv[4],'%Y-%m-%d_%H:%M:%S') ...@@ -14,7 +14,6 @@ end_date = dt.datetime.strptime(sys.argv[4],'%Y-%m-%d_%H:%M:%S')
native_coordinates = sys.argv[5] native_coordinates = sys.argv[5]
wrf_nc_file_str = sys.argv[6] wrf_nc_file_str = sys.argv[6]
# Load the river model # Load the river model
with open('river_model.pk1','rb') as f: with open('river_model.pk1','rb') as f:
river_dict = pk.load(f) river_dict = pk.load(f)
......
[command] [command]
default = cp -r ${RIVER_MODEL_PATH}/* .; python3 river_make.py ${GRID_NAME} ${ROSE_DATAC} ${START_DATE_STR} ${END_DATE_STR} ${COORDINATES} ${TODAY_WRF_FILE}; mv ${GRID_NAME}_riv* /${REMOTE_TRANSFER_DIR} default = ln -s ${RIVER_MODEL_PATH}/* .; python3 river_make.py ${GRID_NAME} ${ROSE_DATAC} ${START_DATE_STR} ${END_DATE_STR} ${COORDINATES} ${TODAY_WRF_FILE}; mv ${GRID_NAME}_riv* /${REMOTE_TRANSFER_DIR}
...@@ -173,12 +173,12 @@ BACKWARD_STEP = 1 ...@@ -173,12 +173,12 @@ BACKWARD_STEP = 1
[namelist:NML_RIVER_TYPE] [namelist:NML_RIVER_TYPE]
RIVER_NUMBER = 0 RIVER_NUMBER = 0
RIVER_KIND = 'variable' RIVER_KIND = 'variable'
RIVER_TS_SETTING = 'specified' RIVER_TS_SETTING = ${RIVER_TS_SETTING}
RIVER_INFLOW_LOCATION = 'node' RIVER_INFLOW_LOCATION = 'node'
RIVER_INFO_FILE = '${GRID_NAME}_riv.nml' RIVER_INFO_FILE = '${GRID_NAME}_riv.nml'
[namelist:NML_OPEN_BOUNDARY_CONTROL] [namelist:NML_OPEN_BOUNDARY_CONTROL]
OBC_ON = T OBC_ON = ${OBC_ON}
OBC_NODE_LIST_FILE = '${GRID_NAME}_obc.dat' OBC_NODE_LIST_FILE = '${GRID_NAME}_obc.dat'
OBC_ELEVATION_FORCING_ON = ${ELEV_FORCE} OBC_ELEVATION_FORCING_ON = ${ELEV_FORCE}
OBC_ELEVATION_FILE = '${GRID_NAME}_elevtide.nc' OBC_ELEVATION_FILE = '${GRID_NAME}_elevtide.nc'
......
rose-suite_ROSA.conf rose-suite_TAMAR.conf
\ No newline at end of file \ No newline at end of file
[jinja2:suite.rc] [jinja2:suite.rc]
## Run properties ## Run properties
COLD_START=False COLD_START=False
ARCHIVE_RESTART=False
SEDIMENT=False SEDIMENT=False
USE_CETO=True USE_CETO=True
NODES=10 NODES=10
...@@ -13,13 +14,13 @@ FINAL_CYCLE_POINT='NONE' ...@@ -13,13 +14,13 @@ FINAL_CYCLE_POINT='NONE'
HINDCAST_DAYS=1 HINDCAST_DAYS=1
FORECAST_DAYS=2 FORECAST_DAYS=2
ARCHIVE_DIR='data/sthenno1/scratch/modop/Model/FVCOM_rosa/output'
REMOTE_ARCHIVE_DIR='/gpfs1/users/modellers/modop/Output/FVCOM_rosa_rolling'
## Grid properties and files ## Grid properties and files
GRID_NAME='aqua_v16' GRID_NAME='aqua_v16'
COMMON_FILES_PATH='/users/modellers/modop/Models/FVCOM_rosa_common/' COMMON_FILES_PATH='/users/modellers/modop/Models/FVCOM_rosa_common/'
ARCHIVE_DIR='data/sthenno1/scratch/modop/Model/FVCOM_rosa/output'
REMOTE_ARCHIVE_DIR='/gpfs1/users/modellers/modop/Output/FVCOM_rosa_rolling'
PLOT_DIR='data/sthenno1/scratch/modop/Model/FVCOM_rosa/plots' PLOT_DIR='data/sthenno1/scratch/modop/Model/FVCOM_rosa/plots'
RESTART_ARCHIVE_DIR='data/sthenno1/scratch/modop/Model/FVCOM_rosa/restart_files'
TEMP_ACTIVE='T' TEMP_ACTIVE='T'
SALT_ACTIVE='T' SALT_ACTIVE='T'
...@@ -56,6 +57,7 @@ DONOR_RESTART_FILE_PATH='/users/modellers/modop/Models/FVCOM_rosa_restart/aqua_v ...@@ -56,6 +57,7 @@ DONOR_RESTART_FILE_PATH='/users/modellers/modop/Models/FVCOM_rosa_restart/aqua_v
NEST_RUN_SUITE='rose-rosa' NEST_RUN_SUITE='rose-rosa'
# The time resolution of the nest output, as divisions of 1 day (i.e. 24 would be hourly, 48 every half hour) # The time resolution of the nest output, as divisions of 1 day (i.e. 24 would be hourly, 48 every half hour)
NEST_INTERVAL='24' NEST_INTERVAL='24'
ADJUST_TIDES='zeta,u,v,ua,va'
## FVCOM namelist settings ## FVCOM namelist settings
EXT_TSTEP='1.5' EXT_TSTEP='1.5'
...@@ -64,6 +66,8 @@ STARTUP_DMAX='-3' ...@@ -64,6 +66,8 @@ STARTUP_DMAX='-3'
HORIZONTAL_MIXING_COEFFICIENT='0.04' HORIZONTAL_MIXING_COEFFICIENT='0.04'
VERTICAL_MIXING_COEFFICIENT='1.000000e-06' VERTICAL_MIXING_COEFFICIENT='1.000000e-06'
COORDINATES='cartesian' COORDINATES='cartesian'
RIVER_TS_SETTING='calculated'
OBC_ON='F'
# Output options # Output options
NC_INTERVAL='seconds= 3600.' NC_INTERVAL='seconds= 3600.'
...@@ -75,4 +79,3 @@ SALT_TEMP_OUT='T' ...@@ -75,4 +79,3 @@ SALT_TEMP_OUT='T'
TURBULENCE_OUT='T' TURBULENCE_OUT='T'
WIND_OUT='F' WIND_OUT='F'
HEAT_RAIN_OUT='F' HEAT_RAIN_OUT='F'
[jinja2:suite.rc] [jinja2:suite.rc]
## Run properties ## Run properties
COLD_START=True COLD_START=False
ARCHIVE_RESTART=True
SEDIMENT=False SEDIMENT=False
USE_CETO=True USE_CETO=True
FORECAST=True FORECAST=True
NODES=10 NODES=10
REMOTE_USER='modop' REMOTE_USER='modop'
MAIL_TO='mbe@pml.ac.uk'
INITIAL_START_DATE='2019-02-05T00:00:00Z' INITIAL_START_DATE='2019-08-18T00:00:00Z'
FINAL_CYCLE_POINT='NONE' FINAL_CYCLE_POINT='NONE'
HINDCAST_DAYS=1 HINDCAST_DAYS=1
FORECAST_DAYS=2 FORECAST_DAYS=2
MAIL_TO='mbe@pml.ac.uk'
## Grid properties and files ## Grid properties and files
GRID_NAME='tamar_v2' GRID_NAME='tamar_v2'
COMMON_FILES_PATH='/users/modellers/modop/Models/FVCOM_tamar_common/' COMMON_FILES_PATH='/users/modellers/modop/Models/FVCOM_tamar_common/'
ARCHIVE_DIR='data/sthenno1/scratch/modop/Model/FVCOM_tamar/output' ARCHIVE_DIR='data/sthenno1/scratch/modop/Model/FVCOM_tamar/output'
PLOT_DIR='data/sthenno1/scratch/modop/Model/FVCOM_tamar/plots'
REMOTE_ARCHIVE_DIR='/gpfs1/users/modellers/modop/Output/FVCOM_tamar_rolling' REMOTE_ARCHIVE_DIR='/gpfs1/users/modellers/modop/Output/FVCOM_tamar_rolling'
PLOT_DIR='data/sthenno1/scratch/modop/Model/FVCOM_tamar/plots'
RESTART_ARCHIVE_DIR='data/sthenno1/scratch/modop/Model/FVCOM_tamar/restart_files'
TEMP_ACTIVE='T' TEMP_ACTIVE='T'
SALT_ACTIVE='T' SALT_ACTIVE='T'
...@@ -35,14 +36,13 @@ WRF_FORECAST_FILE_DIR='/gpfs1/users/modellers/modop/Models/WRF_transfer_dir/' ...@@ -35,14 +36,13 @@ WRF_FORECAST_FILE_DIR='/gpfs1/users/modellers/modop/Models/WRF_transfer_dir/'
WRF_ARCHIVE_DIR='/data/sthenno1/scratch/modop/Model/WRF/output' WRF_ARCHIVE_DIR='/data/sthenno1/scratch/modop/Model/WRF/output'
WRF_ARCHIVE_DATEFMT='%Y-%m-%d' WRF_ARCHIVE_DATEFMT='%Y-%m-%d'
## River setup ## River setup
## Between 'NONE', 'NEURAL_NET', and 'CLIMATOLOGY' ## Between 'NONE', 'NEURAL_NET', and 'CLIMATOLOGY'
RIVER_MODEL='NEURAL_NET' RIVER_MODEL='NEURAL_NET'
## Required if 'NEURAL_NET' or 'CLIMATOLOGY', the files expected depend on the RIVER_MODEL value ## Required if 'NEURAL_NET' or 'CLIMATOLOGY', the files expected depend on the RIVER_MODEL value
RIVER_MODEL_PATH='/users/modellers/modop/Models/FVCOM_tamar_rivermod' RIVER_MODEL_PATH='/users/modellers/modop/Models/FVCOM_tamar_rivermod'
## Required if 'NEURAL_NET', must omit first slash to allow use on remote and local ## Required if 'NEURAL_NET', must omit first slash to allow use on remote and local
REMOTE_TRANSFER_DIR='users/modellers/modop/Rose_suites/tamar_transfer_dir' REMOTE_TRANSFER_DIR='users/modellers/modop/Transfer_folders/tamar_transfer_dir'
## Boundary forcing ## Boundary forcing
## Between 'TIDAL', 'CMEMS', and 'NEST_FILE' ## Between 'TIDAL', 'CMEMS', and 'NEST_FILE'
...@@ -57,6 +57,7 @@ DONOR_RESTART_FILE_PATH='/users/modellers/modop/Models/FVCOM_tamar_restart/tamar ...@@ -57,6 +57,7 @@ DONOR_RESTART_FILE_PATH='/users/modellers/modop/Models/FVCOM_tamar_restart/tamar
NEST_RUN_SUITE='fvcom-rosa' NEST_RUN_SUITE='fvcom-rosa'
# The time resolution of the nest output, as divisions of 1 day (i.e. 24 would be hourly, 48 every half hour) # The time resolution of the nest output, as divisions of 1 day (i.e. 24 would be hourly, 48 every half hour)
NEST_INTERVAL='24' NEST_INTERVAL='24'
ADJUST_TIDES='zeta,u,v,ua,va'
# FVCOM namelist settings # FVCOM namelist settings
EXT_TSTEP='.150' EXT_TSTEP='.150'
...@@ -65,6 +66,8 @@ STARTUP_DMAX='5.00' ...@@ -65,6 +66,8 @@ STARTUP_DMAX='5.00'
HORIZONTAL_MIXING_COEFFICIENT='2.000000e-01' HORIZONTAL_MIXING_COEFFICIENT='2.000000e-01'
VERTICAL_MIXING_COEFFICIENT='1.000000e-05' VERTICAL_MIXING_COEFFICIENT='1.000000e-05'
COORDINATES='cartesian' COORDINATES='cartesian'
RIVER_TS_SETTING='calculated'
OBC_ON='F'
# Output options # Output options
NC_INTERVAL='seconds= 3600.' NC_INTERVAL='seconds= 3600.'
...@@ -76,5 +79,3 @@ SALT_TEMP_OUT='T' ...@@ -76,5 +79,3 @@ SALT_TEMP_OUT='T'
TURBULENCE_OUT='T' TURBULENCE_OUT='T'
WIND_OUT='F' WIND_OUT='F'
HEAT_RAIN_OUT='F' HEAT_RAIN_OUT='F'
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
write_run_namelist => adjust_namelist & generate_CMEMS_start => mv_start_file => run_fvcom write_run_namelist => adjust_namelist & generate_CMEMS_start => mv_start_file => run_fvcom
{% elif COLD_START and BOUNDARY_FORCING == 'NEST_FILE' %} {% elif COLD_START and BOUNDARY_FORCING == 'NEST_FILE' %}
write_run_namelist => adjust_namelist & generate_nest_start => mv_start_file => run_fvcom write_run_namelist => adjust_namelist & generate_nest_start => mv_start_file => run_fvcom
{% elif ARCHIVE_RESTART %}
transfer_archive_restart => run_fvcom
{% else %} {% else %}
transfer_restart => run_fvcom transfer_restart => run_fvcom
{% endif %} {% endif %}
...@@ -76,7 +78,7 @@ ...@@ -76,7 +78,7 @@
{% else %} {% else %}
write_run_namelist => run_fvcom => transfer_data => clean_output write_run_namelist => run_fvcom => transfer_data => clean_output
{% endif %} {% endif %}
run_fvcom => nan_check run_fvcom => nan_check
""" """
...@@ -85,6 +87,12 @@ ...@@ -85,6 +87,12 @@
run_fvcom[-P1D] => transfer_restart => run_fvcom run_fvcom[-P1D] => transfer_restart => run_fvcom
""" """
[[[+P2D/P1D]]]
graph = """
run_fvcom => housekeeping
"""
[runtime] [runtime]
[[root]] [[root]]
env-script = eval $(rose task-env --cycle-offset=P1D) env-script = eval $(rose task-env --cycle-offset=P1D)
...@@ -117,6 +125,7 @@ ...@@ -117,6 +125,7 @@
CMEMS_DATA_DIR={{CMEMS_DATA_DIR}} CMEMS_DATA_DIR={{CMEMS_DATA_DIR}}
NEST_RUN_SUITE={{NEST_RUN_SUITE}} NEST_RUN_SUITE={{NEST_RUN_SUITE}}
NEST_INTERVAL={{NEST_INTERVAL}} NEST_INTERVAL={{NEST_INTERVAL}}
ADJUST_TIDES={{ADJUST_TIDES}}
EXT_TSTEP={{EXT_TSTEP}} EXT_TSTEP={{EXT_TSTEP}}
ISPLIT={{ISPLIT}} ISPLIT={{ISPLIT}}
...@@ -128,6 +137,8 @@ ...@@ -128,6 +137,8 @@
HEATING_ON={{HEATING_ON}} HEATING_ON={{HEATING_ON}}
PRECIPITATION_ON={{PRECIPITATION_ON}} PRECIPITATION_ON={{PRECIPITATION_ON}}
AIR_PRESSURE_ON={{AIR_PRESSURE_ON}} AIR_PRESSURE_ON={{AIR_PRESSURE_ON}}
OBC_ON={{OBC_ON}}
RIVER_TS_SETTING={{RIVER_TS_SETTING}}
TEMP_ACTIVE={{TEMP_ACTIVE}} TEMP_ACTIVE={{TEMP_ACTIVE}}
SALT_ACTIVE={{SALT_ACTIVE}} SALT_ACTIVE={{SALT_ACTIVE}}
...@@ -147,6 +158,7 @@ ...@@ -147,6 +158,7 @@
WRF_ARCHIVE_DATEFMT={{WRF_ARCHIVE_DATEFMT}} WRF_ARCHIVE_DATEFMT={{WRF_ARCHIVE_DATEFMT}}
COMMON_FILES_PATH={{COMMON_FILES_PATH}} COMMON_FILES_PATH={{COMMON_FILES_PATH}}
WRF_ARCHIVE_DATESTR=$(rose date --print-format={{WRF_ARCHIVE_DATEFMT}} $CYLC_TASK_CYCLE_POINT) WRF_ARCHIVE_DATESTR=$(rose date --print-format={{WRF_ARCHIVE_DATEFMT}} $CYLC_TASK_CYCLE_POINT)
RESTART_ARCHIVE_DIR={{RESTART_ARCHIVE_DIR}}
{% if FORECAST %} {% if FORECAST %}
TODAY_WRF_FILE=/{{WRF_ARCHIVE_DIR}}/today/today_wrfout.nc TODAY_WRF_FILE=/{{WRF_ARCHIVE_DIR}}/today/today_wrfout.nc
...@@ -313,10 +325,18 @@ ...@@ -313,10 +325,18 @@
echo "starting forecast cycle" echo "starting forecast cycle"
""" """
[[transfer_restart]] [[transfer_restart]]
inherit = slurm_job_1 inherit = remote_job
script = """ script = """
ln -sf ${ROSE_DATACP1D}/output/${GRID_NAME}_restart_0001.nc ${ROSE_DATAC}/${GRID_NAME}_restart_0001.nc ln -sf ${ROSE_DATACP1D}/output/${GRID_NAME}_restart_0001.nc ${ROSE_DATAC}/${GRID_NAME}_restart_0001.nc
mkdir -p /pml${RESTART_ARCHIVE_DIR}/${FORECAST_DAY}
cp ${ROSE_DATACP1D}/output/${GRID_NAME}_restart_0001.nc /pml${RESTART_ARCHIVE_DIR}/${FORECAST_DAY}/
"""
[[transfer_archive_restart]]
inherit = remote_job
script = """
cp /pml${RESTART_ARCHIVE_DIR}/${FORECAST_DAY}/${GRID_NAME}_restart_0001.nc ${ROSE_DATAC}
""" """
[[nan_check]] [[nan_check]]
inherit = remote_job inherit = remote_job
[[remote_archive]] [[remote_archive]]
...@@ -326,3 +346,9 @@ ...@@ -326,3 +346,9 @@
script = """ script = """
rm ${ROSE_DATAC}/output/${GRID_NAME}_0001.nc rm ${ROSE_DATAC}/output/${GRID_NAME}_0001.nc
""" """
[[housekeeping]]
inherit = remote_job
script = """
rm ${ROSE_DATACP2D}/output/${GRID_NAME}_restart_0001.nc
"""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment