diff --git a/atm/src/atm.F90 b/atm/src/atm.F90 index b6c77d0..15dde85 100644 --- a/atm/src/atm.F90 +++ b/atm/src/atm.F90 @@ -2,7 +2,7 @@ program atm use mod_oasis, only : OASIS_IN, OASIS_OUT use forcing_config_mod, only : forcing_config_type => forcing_config - use forcing_field_mod, only : forcing_field_type => forcing_field, FORCING_FIELD_DOMAIN_LAND + use forcing_field_mod, only : forcing_field_type => forcing_field, FORCING_FIELD_REALM_LAND use coupler_mod, only : coupler_type => coupler use error_handler, only : assert use ice_grid_proxy_mod, only : ice_grid_type => ice_grid_proxy @@ -121,7 +121,7 @@ program atm allocate(to_runoff_map(num_atm_to_ice_fields)) ri = 1 do i=1, num_atm_to_ice_fields - if (forcing_fields(i)%domain == FORCING_FIELD_DOMAIN_LAND) then + if (forcing_fields(i)%realm == FORCING_FIELD_REALM_LAND) then to_runoff_map(i) = ri ri = ri + 1 else @@ -135,7 +135,7 @@ program atm ri = to_runoff_map(i) runoff_forcing_fields(ri)%coupling_name = & forcing_fields(i)%coupling_name - runoff_forcing_fields(ri)%domain = forcing_fields(i)%domain + runoff_forcing_fields(ri)%realm = forcing_fields(i)%realm allocate(runoff_forcing_fields(ri)%data_array(ice_shape(1), ice_shape(2))) call coupler%init_field(runoff_forcing_fields(ri)%coupling_name, & OASIS_OUT, & diff --git a/libforcing/src/forcing_field.F90 b/libforcing/src/forcing_field.F90 index ec0a237..9b02ae6 100644 --- a/libforcing/src/forcing_field.F90 +++ b/libforcing/src/forcing_field.F90 @@ -13,16 +13,16 @@ module forcing_field_mod implicit none private -! Forcing fields can have a domain -integer, parameter, public :: FORCING_FIELD_DOMAIN_NONE = 0 -integer, parameter, public :: FORCING_FIELD_DOMAIN_ATMOSPHERE = 10 -integer, parameter, public :: FORCING_FIELD_DOMAIN_LAND = 20 +! Forcing fields can have a realm +integer, parameter, public :: FORCING_FIELD_REALM_NONE = 0 +integer, parameter, public :: FORCING_FIELD_REALM_ATMOSPHERE = 10 +integer, parameter, public :: FORCING_FIELD_REALM_LAND = 20 type, public :: forcing_field character(len=64), dimension(:), allocatable :: names character(len=64) :: coupling_name character(len=1024), dimension(:), allocatable :: filename_templates - integer :: domain + integer :: realm integer :: dt character(len=9) :: calendar @@ -46,13 +46,13 @@ module forcing_field_mod contains -subroutine forcing_field_init(self, name_list, filename_template_list, cname, domain, & +subroutine forcing_field_init(self, name_list, filename_template_list, cname, realm, & start_date, product_name, loggerin, dt, calendar) class(forcing_field), intent(inout) :: self character(len=*), dimension(:), intent(in) :: name_list character(len=*), dimension(:), intent(in) :: filename_template_list character(len=*), intent(in) :: cname - character(len=*), intent(in) :: domain + character(len=*), intent(in) :: realm type(datetime), intent(in) :: start_date character(len=*), intent(in) :: product_name type(logger_type), target, intent(in) :: loggerin @@ -71,12 +71,12 @@ subroutine forcing_field_init(self, name_list, filename_template_list, cname, do self%names(:) = name_list(:) self%filename_templates(:) = filename_template_list(:) self%coupling_name = cname - if (domain == 'atmosphere') then - self%domain = FORCING_FIELD_DOMAIN_ATMOSPHERE + if (realm == 'atmosphere') then + self%realm = FORCING_FIELD_REALM_ATMOSPHERE else - call assert(trim(domain) == 'land', & - "Invalid domain value.") - self%domain = FORCING_FIELD_DOMAIN_LAND + call assert(trim(realm) == 'land', & + "Invalid realm value.") + self%realm = FORCING_FIELD_REALM_LAND endif self%product_name = trim(product_name) diff --git a/tests/ERA5/accessom2.nml b/tests/ERA5/accessom2.nml index 5f91827..cfe9771 100644 --- a/tests/ERA5/accessom2.nml +++ b/tests/ERA5/accessom2.nml @@ -5,7 +5,7 @@ / &date_manager_nml - forcing_start_date = '1980-12-30T00:00:00' - forcing_end_date = '2020-01-01T00:00:00' - restart_period = 1, 0, 0 + forcing_start_date = '1981-01-01T00:00:00' + forcing_end_date = '1981-02-01T00:00:00' + restart_period = 0, 1, 0 / diff --git a/tests/ERA5/forcing.json b/tests/ERA5/forcing.json index aa2a2d7..a49d828 100644 --- a/tests/ERA5/forcing.json +++ b/tests/ERA5/forcing.json @@ -64,7 +64,7 @@ }, { "coupling_field_name": "runof_ai", - "realm": "land", + "realm": "atmosphere", "input_fields": [ { "filename": "/g/data/rt52/era5/single-levels/reanalysis/mror/{{year}}/mror_era5_oper_sfc_{{year}}{{month}}{{start_day}}-{{year}}{{month}}{{end_day}}.nc", diff --git a/tests/ERA5/namcouple b/tests/ERA5/namcouple index 088223e..81199e2 100644 --- a/tests/ERA5/namcouple +++ b/tests/ERA5/namcouple @@ -106,12 +106,14 @@ CONSERV LR SCALAR LATLON 10 FRACNNEI FIRST ########## # Field 06 : runoff. Runoff is passed on the destination grid. ########## -runof_ai runof_i 297 3600 1 a2i.nc EXPORTED +runof_ai runof_i 297 3600 3 a2i.nc EXPORTED cict cict LAG=0 SEQ=+1 P 0 P 0 # -LOCTRANS +LOCTRANS MAPPING SCRIPR INSTANT +../test_data/ERA5_MOM1_conserve.nc dst +CONSERV LR SCALAR LATLON 10 FRACNNEI FIRST ########## # Field 07 : near surface (2m) air temp ##########