From 88f8547013b7fea9c2e663381b6f8197a889d3be Mon Sep 17 00:00:00 2001 From: Mariana Vertenstein Date: Tue, 29 Oct 2024 19:32:56 +0100 Subject: [PATCH 1/4] fix problem with setting cam_in%cflx for dms in cap --- src/cpl/nuopc/atm_import_export.F90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cpl/nuopc/atm_import_export.F90 b/src/cpl/nuopc/atm_import_export.F90 index 07b7f46ae3..0eacabaca9 100644 --- a/src/cpl/nuopc/atm_import_export.F90 +++ b/src/cpl/nuopc/atm_import_export.F90 @@ -897,11 +897,10 @@ subroutine import_fields( gcomp, cam_in, restart_init, rc) do c = begchunk,endchunk do i = 1,get_ncols_p(c) cam_in(c)%fdms(i) = -fldptr1d(g) * med2mod_areacor(g) - cam_in(c)%cflx(i,pndx_fdms) = cam_in(c)%fdms(i) g = g + 1 end do ncols = get_ncols_p(c) - call outfld( sflxnam(pndx_fdms), cam_in(c)%cflx(:ncols,pndx_fdms), ncols, c) + call outfld( sflxnam(pndx_fdms), cam_in(c)%fdms, ncols, c) end do end if From 3eccd0b9cc1bd4286c0d301d48fc1dd5b3a99bbd Mon Sep 17 00:00:00 2001 From: Mariana Vertenstein Date: Wed, 30 Oct 2024 21:05:28 +0100 Subject: [PATCH 2/4] added comments requested in PR --- src/cpl/nuopc/atm_import_export.F90 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cpl/nuopc/atm_import_export.F90 b/src/cpl/nuopc/atm_import_export.F90 index 0eacabaca9..fffb7410db 100644 --- a/src/cpl/nuopc/atm_import_export.F90 +++ b/src/cpl/nuopc/atm_import_export.F90 @@ -893,6 +893,11 @@ subroutine import_fields( gcomp, cam_in, restart_init, rc) call state_getfldptr(importState, 'Faoo_fdms_ocn', fldptr=fldptr1d, exists=exists, rc=rc) if (exists) then call cnst_get_ind('DMS', pndx_fdms, abort=.true.) + ! Ideally what should happen below is that cam_in%cflx(icol,pndx_fdms) should be set directory from + ! fldptr1d. However, the current code in initializes the chemistry consituents surface fluxes + ! (i.e.cam_in%cflx(:,:)) to zero in the routine chem_emissions in the module chemistry in + ! mozart/chemistry.F90. Introducing cam_in(c)%fdms below stores this information until it can be updated in + ! aero_model.F90 when oslo-aero is used. g = 1 do c = begchunk,endchunk do i = 1,get_ncols_p(c) From 5f8eb76e321343b5d56c4049327da4276f97a291 Mon Sep 17 00:00:00 2001 From: Mariana Vertenstein Date: Thu, 31 Oct 2024 09:35:08 +0100 Subject: [PATCH 3/4] fixed comment --- src/cpl/nuopc/atm_import_export.F90 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cpl/nuopc/atm_import_export.F90 b/src/cpl/nuopc/atm_import_export.F90 index fffb7410db..59a7072ccd 100644 --- a/src/cpl/nuopc/atm_import_export.F90 +++ b/src/cpl/nuopc/atm_import_export.F90 @@ -893,11 +893,14 @@ subroutine import_fields( gcomp, cam_in, restart_init, rc) call state_getfldptr(importState, 'Faoo_fdms_ocn', fldptr=fldptr1d, exists=exists, rc=rc) if (exists) then call cnst_get_ind('DMS', pndx_fdms, abort=.true.) - ! Ideally what should happen below is that cam_in%cflx(icol,pndx_fdms) should be set directory from - ! fldptr1d. However, the current code in initializes the chemistry consituents surface fluxes - ! (i.e.cam_in%cflx(:,:)) to zero in the routine chem_emissions in the module chemistry in - ! mozart/chemistry.F90. Introducing cam_in(c)%fdms below stores this information until it can be updated in - ! aero_model.F90 when oslo-aero is used. + ! Ideally what should happen below is that + ! cam_in%cflx(icol,pndx_fdms) should be set directly from + ! fldptr1d. However, the code initializes the chemistry + ! consituents surface fluxes (i.e.cam_in%cflx(:,:)) to zero in + ! the routine in mozart/chemistry.F90 at the start of every + ! time step. Introducing cam_in(c)%fdms below stores this + ! information until it can be updated in aero_model.F90 when + ! oslo-aero is used. g = 1 do c = begchunk,endchunk do i = 1,get_ncols_p(c) From d7667a449150d2a338d9535f1ed1992de92fc43d Mon Sep 17 00:00:00 2001 From: Mariana Vertenstein Date: Thu, 31 Oct 2024 10:11:05 +0100 Subject: [PATCH 4/4] updated oslo-aero tag --- Externals_CAM.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Externals_CAM.cfg b/Externals_CAM.cfg index 9f63646b32..2a20674140 100644 --- a/Externals_CAM.cfg +++ b/Externals_CAM.cfg @@ -65,7 +65,7 @@ required = True [oslo_aero] protocol = git -hash = 2414f85 +tag = noresm_oslo_aero_v2 repo_url = https://github.com/NorESMhub/OSLO_AERO local_path = src/chemistry/oslo_aero required = True