Commit 546dd3e0 authored by Modellers Operational's avatar Modellers Operational

Add ncml conversion step

parent b4f08904
......@@ -21,7 +21,8 @@ all_attributes = {'lon':{'var_name':'longitude','standard_name':'longitude', 'un
'v':{'var_name':'vo','standard_name':'northward_sea_water_velocity','units':'m s-1', 'missing_value':-32768, 'long_name':'Northward Current Velocity', 'shape':'time depth latitude longitude'},
'zeta':{'var_name':'zos','standard_name':'sea_surface_height_above_geoid','units':'m', 'missing_value':-32768,'long_name':'Sea surface height above geoid', 'shape':'time latitude longitude'},
'mask':{'standard_name':'sea_binary_mask','units':'1', 'long_name':'Land-sea mask: sea = 1 ; land = 0', 'shape':'depth latitude longitude'},
'h':{'standard_name':'h', 'units':'m', 'long_name':'model bathymetry depth, measured downwards from geoid', 'axis':'Z', 'positive':'down', 'shape':'depth latitude longitude' }
'h':{'standard_name':'h', 'units':'m', 'long_name':'model bathymetry depth, measured downwards from geoid', 'axis':'Z', 'positive':'down', 'shape':'latitude longitude' },
'ww':{'var_name':'wo', 'standard_name':'upward_sea_water_velocity','units':'m s-1', 'missing_value':-32768, 'long_name':'Upward Current Velocity', 'shape':'time depth latitude longitude'}
}
all_type = {'add_offset':'float', 'scale_factor':'float', '_FillValue':'double'}
......
[command]
default =
base_file=/${PORTAL_BASEDIR}/${FORECAST_YEAR}/${FORECAST_MONTH}/${OUTPUT_FILENAME}_hrly_${FORECAST_DAY}.nc
mkdir -p /${PORTAL_NCML_BASEDIR}/${FORECAST_YEAR}/${FORECAST_MONTH}/
dst_file=/${PORTAL_NCML_BASEDIR}/${FORECAST_YEAR}/${FORECAST_MONTH}/${OUTPUT_FILENAME}_hrly_${FORECAST_DAY}.ncml
dst_file=/${PORTAL_NCML_BASEDIR}/${NCML_FILE_PRE}${NCML_DATE}${NCML_FILE_POST}.ncml
rm ${dst_file} || true
python3 write_ncml_file.py ${base_file} ${dst_file} ${VARS}
[jinja2:suite.rc]
## Run properties
INITIAL_START_DATE='2020-01-01T00:00:00Z'
INITIAL_START_DATE='2020-03-27T00:00:00Z'
FINAL_CYCLE_POINT='NONE'
MAIL_TO='mbe@pml.ac.uk'
NPROCS=12
NPROCS=20
USE_CETO=True
REMOTE_USER='modop'
NODES=3
......@@ -16,11 +16,14 @@ FVCOM_OUTPUT_DIR='data/sthenno1/scratch/modop/Model/FVCOM_tamar/output'
GRID_LOWER_LEFT='-4.3,50.24'
GRID_UPPER_RIGHT='-4.05,50.55'
HORIZ_RES=0.001
DEPTH_LAYERS='0,3,5,10,15,20,25,30,40'
VARS='temp,salinity,u,v,zeta'
DEPTH_LAYERS='0,3,5,10,15,20,25,30,45'
VARS='temp,salinity,u,v,ww,zeta'
OUTPUT_DIR='data/sthenno1/scratch/modop/Model/FVCOM_tamar/estuary_output'
OUTPUT_FILENAME='tamar_estuary_001'
PORTAL_BASEDIR='data/sthenno1/scratch/modop/Portal/Model/TAMAR_ESTUARY_FORECAST_PHY_001/tamar_estuary_forecast_phy_001_hourly_t_s_u_v_ssh'
PORTAL_NCML_BASEDIR='data/sthenno1/scratch/modop/Portal/Model/test_ncml/tamar_estuary_forecast_phy_001_hourly_t_s_u_v_ssh'
PORTAL_NCML_BASEDIR='data/sthenno1/scratch/modop/Portal/Model/FVCOM/tamar'
NCML_FILE_PRE='MyCOAST_V0_PML_FVCOM_tamar_01hr_'
NCML_FILE_DATEFMT='%Y%m%d%H'
NCML_FILE_POST='_ANPR'
......@@ -27,7 +27,7 @@
env-script = eval $(rose task-env --cycle-offset=P1D)
script = rose task-run --verbose
[[[job]]]
execution time limit = PT3H
execution time limit = PT6H
[[[events]]]
mail events = submission timeout, execution timeout, failed
mail to = {{MAIL_TO}}
......@@ -42,13 +42,17 @@
VARS={{VARS}}
OUTPUT_DIR={{OUTPUT_DIR}}
OUTPUT_FILENAME={{OUTPUT_FILENAME}}
NCML_FILE_DATEFMT={{NCML_FILE_DATEFMT}}
FORECAST_DAY=$(rose date --print-format='%Y-%m-%d' $CYLC_TASK_CYCLE_POINT)
FORECAST_YEAR=$(rose date --print-format='%Y' $CYLC_TASK_CYCLE_POINT)
FORECAST_MONTH=$(rose date --print-format='%m' $CYLC_TASK_CYCLE_POINT)
NCML_DATE=$(rose date --print-format=${NCML_FILE_DATEFMT} $CYLC_TASK_CYCLE_POINT)
FVCOM_FILE={{FVCOM_OUTPUT_DIR}}/${FORECAST_DAY}/${FVCOM_GRID_NAME}_0001.nc
PORTAL_BASEDIR={{PORTAL_BASEDIR}}
PORTAL_NCML_BASEDIR={{PORTAL_NCML_BASEDIR}}
NCML_FILE_PRE={{NCML_FILE_PRE}}
NCML_FILE_POST={{NCML_FILE_POST}}
[[start_cycle]]
script = """
......
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