Skip to content

Commit 0bff3ec

Browse files
author
Mariana Vertenstein
committed
updates that will only work now with the cmeps_update branches for NEMS and FV3
1 parent feec06a commit 0bff3ec

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

mediator/esmFldsExchange.F90

+12
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ subroutine esmFldsExchange(gcomp, phase, rc)
3737
use esmflds , only : mapuv_with_cart3d
3838
use esmflds , only : fldListTo, fldListFr, fldListMed_aoflux, fldListMed_ocnalb
3939
use esmFlds , only : coupling_mode
40+
use med_internalstate_mod , only : mastertask, logunit
4041

4142
! input/output parameters:
4243
type(ESMF_GridComp) :: gcomp
@@ -126,6 +127,11 @@ subroutine esmFldsExchange(gcomp, phase, rc)
126127
coupling_mode = 'nems_frac'
127128

128129
end if
130+
131+
call ESMF_LogWrite(trim(subname) //' coupling mode is '//trim(coupling_mode), ESMF_LOGMSG_INFO)
132+
if (mastertask) then
133+
write(logunit,*) trim(subname) //' coupling mode is '//trim(coupling_mode)
134+
end if
129135
end if
130136

131137
!--------------------------------------
@@ -821,6 +827,9 @@ subroutine esmFldsExchange(gcomp, phase, rc)
821827
mrg_from1=compice, mrg_fld1='Si_t', mrg_type1='copy')
822828
call addmrg(fldListTo(compatm)%flds, 'So_t', &
823829
mrg_from1=compocn, mrg_fld1='So_t', mrg_type1='copy')
830+
else
831+
call ESMF_LogWrite(trim(subname) //'incorrect fields for nems_orig mode', ESMF_LOGMSG_INFO)
832+
call ESMF_Finalize(endflag=ESMF_END_ABORT)
824833
end if
825834

826835
else if (coupling_mode == 'nems_frac') then
@@ -830,6 +839,9 @@ subroutine esmFldsExchange(gcomp, phase, rc)
830839
call addmap(fldListFr(compice)%flds, 'Si_t', compatm, mapconsf , 'ifrac', ice2atm_fmap)
831840
call addmrg(fldListTo(compatm)%flds, 'Si_t', &
832841
mrg_from1=compice, mrg_fld1='Si_t', mrg_type1='copy')
842+
else
843+
call ESMF_LogWrite(trim(subname) //'incorrect fields for nems_frac mode', ESMF_LOGMSG_INFO)
844+
call ESMF_Finalize(endflag=ESMF_END_ABORT)
833845
end if
834846
end if
835847
end if

mediator/med_io_mod.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ subroutine med_io_init()
128128
use shr_pio_mod , only : shr_pio_getiosys, shr_pio_getiotype, shr_pio_getioformat
129129
#ifdef INTERNAL_PIO_INIT
130130
! if CMEPS is the only component using PIO, then it needs to initialize PIO
131-
use shr_pio_mod , only : shr_pio_init2
131+
use shr_pio_mod , only : shr_pio_init1, shr_pio_init2
132132

133133
type(ESMF_VM) :: vm
134134
integer :: comms(1), comps(1)
@@ -147,6 +147,7 @@ subroutine med_io_init()
147147
compLabels(1) = "MED"
148148
comp_iamin(1) = .true.
149149

150+
call shr_pio_init1(1, "pio_in", comms(1))
150151
call shr_pio_init2(comps, compLabels, comp_iamin, comms, comp_comm_iam)
151152
#endif
152153

nems/fd.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
description: atmosphere export
241241
instantaneous downward long wave radiation flux (fv3 only)
242242
#
243-
- standard_name: inst_net_lw_flx_atm
243+
- standard_name: inst_net_lw_flx
244244
canonical_units: W m-2
245245
description: atmosphere export
246246
instantaneous NET long wave radiation flux (fv3 only)
@@ -646,21 +646,21 @@
646646
canonical_units: W m-2
647647
description: atmosphere export
648648
#
649-
- standard_name: inst_zonal_moment_flx_atm
649+
- standard_name: inst_zonal_moment_flx
650650
canonical_units: N m-2
651651
description: atmosphere export
652652
zonal component of momentum flux
653653
#
654-
- standard_name: inst_merid_moment_flx_atm
654+
- standard_name: inst_merid_moment_flx
655655
canonical_units: N m-2
656656
description: atmosphere export
657657
meridional component of momentum flux
658658
#
659-
- standard_name: inst_laten_heat_flx_atm
659+
- standard_name: inst_laten_heat_flx
660660
canonical_units: W m-2
661661
description: atmosphere export
662662
#
663-
- standard_name: inst_sensi_heat_flx_atm
663+
- standard_name: inst_sensi_heat_flx
664664
canonical_units: W m-2
665665
description: atmosphere export
666666

nems/lib/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ CMAKE_ENV_VARS := CC="$(CC)" \
1818

1919
CMAKE_OPTS := -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \
2020
-D PIO_ENABLE_TESTS:BOOL=OFF \
21-
-D PIO_ENABLE_TIMING:BOOL=ON \
22-
-D PIO_USE_MALLOC:BOOL=OFF \
21+
-D PIO_ENABLE_TIMING:BOOL=OFF \
22+
-D PIO_USE_MALLOC:BOOL=ON \
2323
-D GENF90_PATH=$(BASE_DIR)/genf90 \
2424
-D USER_CMAKE_MODULE_PATH=$(PIO_SRC_DIR)/cmake \
2525
-D CMAKE_INSTALL_PREFIX=$(PIO_INSTALL_DIR)

0 commit comments

Comments
 (0)