diff --git a/lis/core/LIS_lsm_FTable.c b/lis/core/LIS_lsm_FTable.c index 46271d765..2ce61391b 100644 --- a/lis/core/LIS_lsm_FTable.c +++ b/lis/core/LIS_lsm_FTable.c @@ -1961,63 +1961,6 @@ void FTN(lsmdaupdatestate)(char *j, int *n, void *LSM_State, void *LSM_Incr_Stat current->func(n,LSM_State, LSM_Incr_State); } -//BOP -// !ROUTINE: registerwritestatevar -// \label{registerwritestatevar} -// -// !INTERFACE: -//void FTN(registerwritestatevar)(char *j, int *j, void (*func)(int *, int*, void*),int len) -// -// !DESCRIPTION: -// Makes an entry in the registry for the routine -// for obtaining the specified prognostic variables from the -// land surface model -// -// \begin{description} -// \item[j] -// name of the LSM -// \item[j] -// index of the variable -// \end{description} -//EOP -//{ -// ft_check_index(*i, FT_MAX_LSM, "registerwritestatevar"); -// ft_check_index(*j, FT_MAX_DAVAROBS, "registerwritestatevar"); -// wrtvar[*i][*j].func = func; -//} -//BOP -// !ROUTINE: writelsmstatevar -// \label{writelsmstatevar} -// -// !INTERFACE: -//void FTN(writelsmstatevar)(char *j, int *j, int *ftn, int *n, void *state) -// -// !DESCRIPTION: -// Invokes the routine from the registry for obtaining -// the specified prognostic variables from the land surface model -// -// \begin{description} -// \item[j] -// name of the LSM -// \item[j] -// index of the variable -// \item[n] -// index of the nest -// \item[statevars] -// pointer to the prognostic variable array -// \end{description} -//EOP -//{ -// if(wrtvar[*i][*j].func==NULL) { -// printf("****************Error****************************\n"); -// printf("routine that writes state prognostic variables for lsm %d and variable %d is not defined \n",*i,*j); -// printf("program will segfault.....\n"); -// printf("****************Error****************************\n"); -// exit; -// } -// wrtvar[*i][*j].func(ftn, n, state); -//} - //BOP // !ROUTINE: registerlsmcplsetexport // \label{registerlsmcplsetexport} diff --git a/lis/plugins/LIS_lsmda_pluginMod.F90 b/lis/plugins/LIS_lsmda_pluginMod.F90 index b146699a1..a0581dc27 100644 --- a/lis/plugins/LIS_lsmda_pluginMod.F90 +++ b/lis/plugins/LIS_lsmda_pluginMod.F90 @@ -740,6 +740,19 @@ subroutine LIS_lsmda_plugin #endif #endif + external :: registerlsmdainit + external :: registerlsmdagetstatevar + external :: registerlsmdaobstransform + external :: registerlsmdamapobstolsm + external :: registerlsmdaupdatestate + external :: registerlsmdaqcstate + external :: registerlsmdasetstatevar + external :: registerlsmdagetobspred + external :: registerlsmdaqcobsstate + external :: registerlsmdascalestatevar + external :: registerlsmdadescalestatevar + external :: registerlsmdadiagnosevars + #if ( defined SM_NOAH_2_7_1 ) #if ( defined DA_OBS_SNODEP ) ! Noah-2.7.1 snow depth @@ -3269,7 +3282,6 @@ subroutine LIS_lsmda_plugin trim(LIS_GRACEtwsobsId)//char(0),clsmf25_descale_tws) call registerlsmdaupdatestate(trim(LIS_clsmf25Id)//"+"//& trim(LIS_GRACEtwsobsId)//char(0), clsmf25_update_tws) -! call registerwritestatevar(trim(LIS_clsmf25Id)//"+"trim(LIS_GRACEtwsobsId)//char(0),clsmf25_write_tws) call registerlsmdadiagnosevars(trim(LIS_clsmf25Id)//"+"//& trim(LIS_GRACEtwsobsId)//char(0),clsmf25_tws_DAlog) @@ -3290,7 +3302,6 @@ subroutine LIS_lsmda_plugin trim(LIS_simGRACEJPLobsId)//char(0),clsmf25_descale_tws) call registerlsmdaupdatestate(trim(LIS_clsmf25Id)//"+"//& trim(LIS_simGRACEJPLobsId)//char(0), clsmf25_update_tws) -! call registerwritestatevar(trim(LIS_clsmf25Id)//"+"trim(LIS_simGRACEJPLobsId)//char(0),clsmf25_write_tws) call registerlsmdadiagnosevars(trim(LIS_clsmf25Id)//"+"//& trim(LIS_simGRACEJPLobsId)//char(0),clsmf25_tws_DAlog) #endif diff --git a/lis/surfacemodels/land/clsm.f2.5/da_tws/clsmf25_write_tws.F90 b/lis/surfacemodels/land/clsm.f2.5/da_tws/clsmf25_write_tws.F90 deleted file mode 100644 index 597df017a..000000000 --- a/lis/surfacemodels/land/clsm.f2.5/da_tws/clsmf25_write_tws.F90 +++ /dev/null @@ -1,75 +0,0 @@ -!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- -! NASA Goddard Space Flight Center -! Land Information System Framework (LISF) -! Version 7.5 -! -! Copyright (c) 2024 United States Government as represented by the -! Administrator of the National Aeronautics and Space Administration. -! All Rights Reserved. -!-------------------------END NOTICE -- DO NOT EDIT----------------------- -!BOP -! !ROUTINE: clsmf25_write_tws -! \label{clsmf25_write_tws} -! -! !REVISION HISTORY: -! 27Feb2005: Sujay Kumar; Initial Specification -! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 29Sep2011: Ben Zaitchik: Applied to GRACE -! -! !INTERFACE: -subroutine clsmf25_write_tws(ftn,n, LSM_State) - -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc - use clsmf25_lsmMod - use LIS_historyMod, only : LIS_writevar_restart - implicit none -! !ARGUMENTS: - integer, intent(in) :: ftn - integer, intent(in) :: n - type(ESMF_State) :: LSM_State -! -! !DESCRIPTION: -! -! Returns the TWS related state prognostic variables for -! data assimilation -! -! The arguments are: -! \begin{description} -! \item[n] index of the nest \newline -! \item[LSM\_State] ESMF State container for LSM state variables \newline -! \end{description} -!EOP - integer :: t - real, allocatable :: tmp(:) - - allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = clsmf25_struc(n)%cat_progn(t)%catdef - enddo - call LIS_writevar_restart(ftn,n,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = clsmf25_struc(n)%cat_progn(t)%srfexc - enddo - call LIS_writevar_restart(ftn,n,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = clsmf25_struc(n)%cat_progn(t)%wesn(1) - enddo - call LIS_writevar_restart(ftn,n,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = clsmf25_struc(n)%cat_progn(t)%wesn(2) - enddo - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = clsmf25_struc(n)%cat_progn(t)%wesn(3) - enddo - - call LIS_writevar_restart(ftn,n,tmp) - deallocate(tmp) - -end subroutine clsmf25_write_tws - diff --git a/lis/surfacemodels/land/noahmp.4.0.1/da_LAI/noahmp401_write_veg.F90 b/lis/surfacemodels/land/noahmp.4.0.1/da_LAI/noahmp401_write_veg.F90 deleted file mode 100755 index 804436f67..000000000 --- a/lis/surfacemodels/land/noahmp.4.0.1/da_LAI/noahmp401_write_veg.F90 +++ /dev/null @@ -1,69 +0,0 @@ -!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- -! NASA Goddard Space Flight Center -! Land Information System Framework (LISF) -! Version 7.5 -! -! Copyright (c) 2024 United States Government as represented by the -! Administrator of the National Aeronautics and Space Administration. -! All Rights Reserved. -!-------------------------END NOTICE -- DO NOT EDIT----------------------- -!BOP -! !ROUTINE: noahmp401_write_veg -! \label{noahmp401_write_veg} -! -! !REVISION HISTORY: -! 13 Feb 2020: Sujay Kumar; Initial Specification -! -! !INTERFACE: -subroutine noahmp401_write_veg(ftn,n, LSM_State) - -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc - use noahmp401_lsmMod - use LIS_historyMod, only : LIS_writevar_restart - implicit none -! !ARGUMENTS: - integer, intent(in) :: ftn - integer, intent(in) :: n - type(ESMF_State) :: LSM_State -! -! !DESCRIPTION: -! -! Returns the esioisture related state prognostic variables for -! data assimilation -! -! The arguments are: -! \begin{description} -! \item[n] index of the nest \newline -! \item[LSM\_State] ESMF State container for LSM state variables \newline -! \end{description} -!EOP - integer :: t - real, allocatable :: tmp(:) - - allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(2) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(3) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(4) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - deallocate(tmp) - -end subroutine noahmp401_write_veg - diff --git a/lis/surfacemodels/land/noahmp.4.0.1/da_soilm/noahmp401_write_soilm.F90 b/lis/surfacemodels/land/noahmp.4.0.1/da_soilm/noahmp401_write_soilm.F90 deleted file mode 100644 index 78a7356cc..000000000 --- a/lis/surfacemodels/land/noahmp.4.0.1/da_soilm/noahmp401_write_soilm.F90 +++ /dev/null @@ -1,71 +0,0 @@ -!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- -! NASA Goddard Space Flight Center -! Land Information System Framework (LISF) -! Version 7.5 -! -! Copyright (c) 2024 United States Government as represented by the -! Administrator of the National Aeronautics and Space Administration. -! All Rights Reserved. -!-------------------------END NOTICE -- DO NOT EDIT----------------------- -!BOP -! !ROUTINE: NoahMP401_write_soilm -! \label{NoahMP401_write_soilm} -! -! !REVISION HISTORY: -! 27Feb2005: Sujay Kumar; Initial Specification -! 25Jun2006: Sujay Kumar: Updated for the ESMF design -! 15 Dec 2018: Mahdi Navari; Modified for NoahMP401 -! -! !INTERFACE: -subroutine NoahMP401_write_soilm(ftn,n, LSM_State) - -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc - use NoahMP401_lsmMod - use LIS_historyMod, only : LIS_writevar_restart - implicit none -! !ARGUMENTS: - integer, intent(in) :: ftn - integer, intent(in) :: n - type(ESMF_State) :: LSM_State -! -! !DESCRIPTION: -! -! Returns the soilmoisture related state prognostic variables for -! data assimilation -! -! The arguments are: -! \begin{description} -! \item[n] index of the nest \newline -! \item[LSM\_State] ESMF State container for LSM state variables \newline -! \end{description} -!EOP - integer :: t - real, allocatable :: tmp(:) - - allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(1) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(2) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(3) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = noahmp401_struc(n)%noahmp401(t)%smc(4) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - deallocate(tmp) - -end subroutine NoahMP401_write_soilm - diff --git a/lis/surfacemodels/land/noahmp.4.0.1/da_tws/noahmp401_write_tws.F90 b/lis/surfacemodels/land/noahmp.4.0.1/da_tws/noahmp401_write_tws.F90 deleted file mode 100755 index 7eb016ceb..000000000 --- a/lis/surfacemodels/land/noahmp.4.0.1/da_tws/noahmp401_write_tws.F90 +++ /dev/null @@ -1,75 +0,0 @@ -!-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- -! NASA Goddard Space Flight Center -! Land Information System Framework (LISF) -! Version 7.5 -! -! Copyright (c) 2024 United States Government as represented by the -! Administrator of the National Aeronautics and Space Administration. -! All Rights Reserved. -!-------------------------END NOTICE -- DO NOT EDIT----------------------- -!BOP -! !ROUTINE: noahmp401_write_tws -! \label{noahmp401_write_tws} -! -! !REVISION HISTORY: -! 14 Mar 2017: Sujay Kumar; Initial Specification -! -! !INTERFACE: -subroutine noahmp401_write_tws(ftn,n, LSM_State) - -! !USES: - use ESMF - use LIS_coreMod, only : LIS_rc - use noahmp401_lsmMod - use LIS_historyMod, only : LIS_writevar_restart - - implicit none -! !ARGUMENTS: - integer, intent(in) :: ftn - integer, intent(in) :: n - type(ESMF_State) :: LSM_State -! -! !DESCRIPTION: -! -! Returns the twsoisture related state prognostic variables for -! data assimilation -! -! The arguments are: -! \begin{description} -! \item[n] index of the nest \newline -! \item[LSM\_State] ESMF State container for LSM state variables \newline -! \end{description} -!EOP - integer :: t - real, allocatable :: tmp(:) - - allocate(tmp(LIS_rc%npatch(n,LIS_rc%lsm_index))) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(1) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(2) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(3) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%smc(4) - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - !Wanshu - do t=1,LIS_rc%npatch(n,LIS_rc%lsm_index) - tmp(t) = NOAHMP401_struc(n)%noahmp401(t)%wa - enddo - call LIS_writevar_restart(ftn,n,1,tmp) - !--------- - deallocate(tmp) - -end subroutine noahmp401_write_tws