diff --git a/tests/data/convert-ece4pyreader-grids.sh b/tests/data/convert-ece4pyreader-grids.sh index d7f61bc39c974cef906c3b27ecda47e6e36b4c95..b3a979cd8066ee86cea903cf5e249374668e3ed1 100755 --- a/tests/data/convert-ece4pyreader-grids.sh +++ b/tests/data/convert-ece4pyreader-grids.sh @@ -16,11 +16,34 @@ griddef_amip=grid-amip.txt # cdo griddes tosbcs_input4MIPs_SSTsAndSeaIce_CMIP_PC gridname_co2=CO2 griddef_co2=grid-co2_emis.txt # cdo griddes > grid-co2_emis.txt model_ifs=IFS_TOY -[$model_mode = "co2box" ] && CO2BOX=true || CO2BOX=false +# set vars according to model_mode +# TODO: They will be replaced by python YAML reader -grids="AMIP L128" #B128 A128 R128 -[[ ${CO2FLUX} == true ]] && grids+=" CO2_emis" +[ $model_mode = "co2box" ] && CO2BOX=true || CO2BOX=false +[ $model_mode = "co2flux" ] && CO2FLUX=true || CO2FLUX=false + +if [[ ${CO2BOX} == true ]] ; then + grids="" + vars_amip="" + vars_ifs="" + model_amip=CO2BOX + model_co2=CO2BOX + vars_co2="" + vars_co2_co2box="CO2BOX_CO2_cconc CO2BOX_CO2_econc" + vars_co2_ifs="A_CO2_cconc A_CO2_econc" +else + grids="AMIP L128" #B128 A128 R128 + [[ ${CO2FLUX} == true ]] && grids+=" CO2_emis" + vars_amip="AMIP_sst AMIP_sic" + vars_ifs="A_SST A_Ice_frac" + [[ ${CO2FLUX} == true ]] && vars_ifs+=" A_CO2_emis A_CO2_land A_CO2_ocean" + model_amip=AMIPFORC + model_co2=AMIPFORC + [[ ${CO2FLUX} == true ]] && vars_co2="AMIP_CO2_emis" || vars_co2="" + vars_co2_co2box="" + vars_co2_ifs="" +fi # copy from runtime dir the following files grids.nc areas.nc masks.nc for gridname in ${grids} @@ -47,20 +70,6 @@ do fi done -vars_co2="" -vars_co2_co2box="" -vars_co2_ifs="" -if [[ ${CO2BOX} == true ]]; then - model_amip=CO2BOX - model_co2=CO2BOX - [[ ${CO2_CMODE} == true ]] && vars_co2_co2box="CO2BOX_CO2_cconc CO2BOX_CO2_econc" - [[ ${CO2_CMODE} == true ]] && vars_co2_ifs="A_CO2_cconc A_CO2_econc" - [[ ${CO2FLUX} == true ]] && vars_co2="CO2BOX_CO2_emis" -else - model_amip=AMIPFORC - model_co2=AMIPFORC - [[ ${CO2FLUX} == true ]] && vars_co2="AMIP_CO2_emis" -fi for v in $vars_ifs do diff --git a/tests/data/template_conf_datacoupler_co2flux.yaml b/tests/data/template_conf_datacoupler_co2flux.yaml index dd29224ab1b25bd5adb0af2ba31819fcf8592054..995e8b06115adbfc8aae2b22ad5663ad5f6f9742 100755 --- a/tests/data/template_conf_datacoupler_co2flux.yaml +++ b/tests/data/template_conf_datacoupler_co2flux.yaml @@ -1,12 +1,10 @@ cat << EOF # YAML input file for DataCoupler, It will be ingested and turn to Experiment YAML file - ## Model Information ModelNameSend : AMIPFORC ModelNameReceive : IFS_TOY LogFileName : amip.log -YamlConfName : ${yaml_conf_file} ## Run Information RunLengthSec : ${leg_length_sec} @@ -17,16 +15,13 @@ StartDay : ${leg_start_date_yyyymmdd:6:2} FixYear : ${ifs_cmip_fixyear} GridInfo : 88838 # number of grid cells : L080_NX = 35718 @ T159 resolution / L128_NX = 88838 @ T255 resolution / L256_NX = 348528 @ T511 resolution - - - ## Coupling Information FileInputVars: AMIP_sst_monthly : { id : AMIP_sst_monthly, grid_name: AMIP, oasis_name: AMIP_sst, file_pattern: tosbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-3_gn_187001-201706.nc, netcdf_variable: tosbcs, yref_min : 1870, yref_max: 2016, timestep: monthly, interpolate : true, scale_factor: 1, offset: 273.15, min: 271.38, max: , update: true, accum: true} AMIP_sic_monthly : { id : AMIP_sic_monthly, grid_name: AMIP, oasis_name: AMIP_sic, file_pattern: siconcbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-3_gn_187001-201706.nc, netcdf_variable: siconcbcs, yref_min : 1870, yref_max: 2016, timestep: monthly, interpolate : true, scale_factor: 0.01, offset: 0, min: 0, max: 1, update: true, accum: true} - CO2_em_monthly : { id : CO2_em_monthly, grid_name: CO2_emis, oasis_name: AMIP_CO2_emis, file_pattern: CO2-em-anthro_input4MIPs_emissions_CMIP_CEDS-2017-05-18_gn_200001-201412.nc, netcdf_variable: CO2_em_anthro, yref_min : 1750, yref_max: 2018, timestep: monthly, interpolate : false, scale_factor: 0.01, offset: 1, min: 0, max: , update: true, accum: true} - CO2_land_monthly: { id : CO2_land_monthly, grid_name: CO2_emis, oasis_name: AMIP_CO2_land, file_pattern: CO2-em-anthro_input4MIPs_emissions_CMIP_CEDS-2017-05-18_gn_200001-201412.nc, netcdf_variable: CO2_em_anthro, yref_min : 1750, yref_max: 2018, timestep: monthly, interpolate : false, scale_factor: 0.01, offset: 0.5, min: 0, max: , update: true, accum: true} - CO2_ocean_monthly: { id : CO2_ocean_monthly, grid_name: CO2_emis, oasis_name: AMIP_CO2_ocean, file_pattern: CO2-em-anthro_input4MIPs_emissions_CMIP_CEDS-2017-05-18_gn_200001-201412.nc, netcdf_variable: CO2_em_anthro, yref_min : 1750, yref_max: 2018, timestep: monthly, interpolate : false, scale_factor: 0.01, offset: 0.1, min: 0, max: , update: true, accum: true} + CO2_em_monthly : { id : CO2_em_monthly, grid_name: CO2_emis, oasis_name: AMIP_CO2_emis, file_pattern: CO2-em-anthro_input4MIPs_emissions_CMIP_CEDS-2017-05-18_gn_200001-201412.nc, netcdf_variable: CO2_em_anthro, yref_min : 1750, yref_max: 2018, timestep: monthly, interpolate : false, scale_factor: 1, offset: 0, min: , max: , update: true, accum: true} + CO2_land_monthly: { id : CO2_land_monthly, grid_name: CO2_emis, oasis_name: AMIP_CO2_land, file_pattern: CO2-em-anthro_input4MIPs_emissions_CMIP_CEDS-2017-05-18_gn_200001-201412.nc, netcdf_variable: CO2_em_anthro, yref_min : 1750, yref_max: 2018, timestep: monthly, interpolate : false, scale_factor: 0.5, offset: 0, min: , max: , update: true, accum: true} + CO2_ocean_monthly: { id : CO2_ocean_monthly, grid_name: CO2_emis, oasis_name: AMIP_CO2_ocean, file_pattern: CO2-em-anthro_input4MIPs_emissions_CMIP_CEDS-2017-05-18_gn_200001-201412.nc, netcdf_variable: CO2_em_anthro, yref_min : 1750, yref_max: 2018, timestep: monthly, interpolate : false, scale_factor: 0.1, offset: 0, min: , max: , update: true, accum: true} OasisOutputVars: AMIP_sst : { send_id: AMIP_sst, receive_id: A_SST, send_grid_name: 'AMIP', receive_grid_name: L128, timestep: 'daily', scale_factor: 1, offset: 0, reset: true } diff --git a/tests/data/template_conf_datacoupler_forcing.yaml b/tests/data/template_conf_datacoupler_forcing.yaml index 2e0ab98ee7af41c2d4d98b197e253277178c0167..a22dcc226183e6403b5f167da76f505aade5cac6 100755 --- a/tests/data/template_conf_datacoupler_forcing.yaml +++ b/tests/data/template_conf_datacoupler_forcing.yaml @@ -1,7 +1,6 @@ cat << EOF # YAML input file for DataCoupler, It will be ingested and turn to Experiment YAML file - ## Model Information ModelNameSend : AMIPFORC ModelNameReceive : IFS_TOY @@ -16,9 +15,6 @@ StartDay : ${leg_start_date_yyyymmdd:6:2} FixYear : ${ifs_cmip_fixyear} GridInfo : 88838 # number of grid cells : L080_NX = 35718 @ T159 resolution / L128_NX = 88838 @ T255 resolution / L256_NX = 348528 @ T511 resolution - - - ## Coupling Information FileInputVars: AMIP_sst_monthly : { id : AMIP_sst_monthly, grid_name: AMIP, oasis_name: AMIP_sst, file_pattern: tosbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-3_gn_187001-201706.nc, netcdf_variable: tosbcs, yref_min : 1870, yref_max: 2016, timestep: monthly, interpolate : true, scale_factor: 1, offset: 273.15, min: 271.38, max: , update: true, accum: true} diff --git a/tests/launch_ece3_data_coupler_mn4.cmd b/tests/launch_ece3_data_coupler_mn4.cmd index b5c4c4e75e772d8f763e7d5e7feba9f1fec07bd3..771dccbe1a2c9330604eeafc253dd30619ca97a0 100644 --- a/tests/launch_ece3_data_coupler_mn4.cmd +++ b/tests/launch_ece3_data_coupler_mn4.cmd @@ -32,17 +32,18 @@ fi source ../sources/oasis3-mct/generated/python/init.sh +#AMIP Forcing only +#bash ./run_example.sh datacoupler forcing 4 2005-01-01 2005-03-01 0 128 true false template_conf_datacoupler_forcing.yaml +#AMIP Forcing + co2flux +bash ./run_example.sh datacoupler co2flux 4 2005-01-01 2005-03-01 0 128 true false template_conf_datacoupler_co2flux.yaml +#co2box only +#bash ./run_example.sh datacoupler co2box 1 2005-01-01 2005-03-01 0 128 true false template_conf_datacoupler_co2box.yaml + +# old tests, TODO test them #bash ./run_example.sh pythoncompat forcing 4 2005-01-01 2005-03-01 0 128 true #bash ./run_example.sh fortran forcing 4 2005-01-01 2005-03-01 0 128 true #bash ./run_example-t1279.sh python forcing 4 2010-01-01 2010-03-01 0 128 true - #bash ./run_example.sh co2box co2 4 2005-01-01 2005-03-01 0 128 true false - -#AMIP + Forcing -bash ./run_example.sh datacoupler forcing 4 2005-01-01 2005-03-01 0 128 true false template_conf_datacoupler_forcing.yaml -#AMIP + Forcing for co2flux -#bash ./run_example.sh datacoupler co2flux 4 2005-01-01 2005-03-01 0 128 true false template_conf_datacoupler_co2flux.yaml - #bash ./run_example.sh python co2 4 2005-01-01 2005-03-01 0 128 true #bash ./run_example.sh co2box co2 4 2005-01-01 2005-03-01 0 128 true #bash ./run_example.sh co2box co2 4 2005-01-01 2005-03-01 0 128 true false diff --git a/tests/run_example.sh b/tests/run_example.sh index b04c75d7c346742ffabf64655e3f5925b8ccf25e..f88c4d187998940c3a779fd30151816be84bfa77 100755 --- a/tests/run_example.sh +++ b/tests/run_example.sh @@ -56,9 +56,6 @@ else exit 1 fi -CO2_CMODE=false -CO2FLUX=false - # - Define rundir rundir=${srcdir}/work_${model}_${model_mode}_${nproc_exe1}_${leg_start_date}_${leg_end_date}_${ifs_cmip_fixyear}_${ifs_grid}_${amip_interpolate} @@ -92,6 +89,10 @@ elif [ $model_mode = primavera ]; then ln -sf $datadir/$model_mode/rmp_PSST_to_${ifs_grid}_GAUSWGT.nc $rundir/. fi if [ $model=datacoupler ]; then + ln -sf $datadir/forcing/siconcbcs*.nc $rundir/. + ln -sf $datadir/forcing/tosbcs*.nc $rundir/. + ln -sf $datadir/forcing/rmp_AMIP_to_L${ifs_grid}_GAUSWGT*.nc $rundir/. + ln -sf $datadir/co2/CO2-em-anthro_*.nc $rundir/. ln -sf $datadir/co2/CO2-em-AIR-anthro_*.nc $rundir/. ln -sf $datadir/co2/mole-fraction-of-carbon-dioxide-in-air_*.nc* $rundir/.