Skip to content

Commit

Permalink
Merge pull request #524 from GEOS-ESM/feature/borescan_merge_sm_peat
Browse files Browse the repository at this point in the history
Feature/borescan merge sm peat
  • Loading branch information
sdrabenh authored Feb 13, 2022
2 parents b37677a + 24635de commit db83d28
Show file tree
Hide file tree
Showing 19 changed files with 1,549 additions and 2,021 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2697,6 +2697,24 @@ subroutine SetServices ( GC, RC )
RC=STATUS )
VERIFY_(STATUS)

call MAPL_AddExportSpec(GC ,&
LONG_NAME = 'depth_to_water_table_from_surface',&
UNITS = 'm' ,&
SHORT_NAME = 'WATERTABLED' ,&
DIMS = MAPL_DimsHorzOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)

call MAPL_AddExportSpec(GC ,&
LONG_NAME = 'change_in_free_surface_water_reservoir_on_peat',&
UNITS = 'kg m-2 s-1' ,&
SHORT_NAME = 'FSWCHANGE' ,&
DIMS = MAPL_DimsHorzOnly ,&
VLOCATION = MAPL_VLocationNone ,&
RC=STATUS )
VERIFY_(STATUS)

IF(LSM_CHOICE > 1) THEN
call MAPL_AddExportSpec(GC ,&
LONG_NAME = 'CN_exposed_leaf-area_index',&
Expand Down Expand Up @@ -5052,24 +5070,26 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC )
real, pointer, dimension(:,:) :: T2MWET => NULL()

! GOSWIM (internal/export variables from catch/catchcn)
real, pointer, dimension(:,:,:) :: RDU001 => NULL()
real, pointer, dimension(:,:,:) :: RDU002 => NULL()
real, pointer, dimension(:,:,:) :: RDU003 => NULL()
real, pointer, dimension(:,:,:) :: RDU004 => NULL()
real, pointer, dimension(:,:,:) :: RDU005 => NULL()
real, pointer, dimension(:,:,:) :: RBC001 => NULL()
real, pointer, dimension(:,:,:) :: RBC002 => NULL()
real, pointer, dimension(:,:,:) :: ROC001 => NULL()
real, pointer, dimension(:,:,:) :: ROC002 => NULL()
real, pointer, dimension(:,:) :: RMELTDU001 => NULL()
real, pointer, dimension(:,:) :: RMELTDU002 => NULL()
real, pointer, dimension(:,:) :: RMELTDU003 => NULL()
real, pointer, dimension(:,:) :: RMELTDU004 => NULL()
real, pointer, dimension(:,:) :: RMELTDU005 => NULL()
real, pointer, dimension(:,:) :: RMELTBC001 => NULL()
real, pointer, dimension(:,:) :: RMELTBC002 => NULL()
real, pointer, dimension(:,:) :: RMELTOC001 => NULL()
real, pointer, dimension(:,:) :: RMELTOC002 => NULL()
real, pointer, dimension(:,:,:) :: RDU001 => NULL()
real, pointer, dimension(:,:,:) :: RDU002 => NULL()
real, pointer, dimension(:,:,:) :: RDU003 => NULL()
real, pointer, dimension(:,:,:) :: RDU004 => NULL()
real, pointer, dimension(:,:,:) :: RDU005 => NULL()
real, pointer, dimension(:,:,:) :: RBC001 => NULL()
real, pointer, dimension(:,:,:) :: RBC002 => NULL()
real, pointer, dimension(:,:,:) :: ROC001 => NULL()
real, pointer, dimension(:,:,:) :: ROC002 => NULL()
real, pointer, dimension(:,:) :: RMELTDU001 => NULL()
real, pointer, dimension(:,:) :: RMELTDU002 => NULL()
real, pointer, dimension(:,:) :: RMELTDU003 => NULL()
real, pointer, dimension(:,:) :: RMELTDU004 => NULL()
real, pointer, dimension(:,:) :: RMELTDU005 => NULL()
real, pointer, dimension(:,:) :: RMELTBC001 => NULL()
real, pointer, dimension(:,:) :: RMELTBC002 => NULL()
real, pointer, dimension(:,:) :: RMELTOC001 => NULL()
real, pointer, dimension(:,:) :: RMELTOC002 => NULL()
real, pointer, dimension(:,:) :: WATERTABLED => NULL()
real, pointer, dimension(:,:) :: FSWCHANGE => NULL()

! CN model
real, pointer, dimension(:,:) :: CNLAI => NULL()
Expand Down Expand Up @@ -5329,6 +5349,8 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC )
real, pointer, dimension(:) :: RMELTBC002TILE => NULL()
real, pointer, dimension(:) :: RMELTOC001TILE => NULL()
real, pointer, dimension(:) :: RMELTOC002TILE => NULL()
real, pointer, dimension(:) :: WATERTABLEDTILE => NULL()
real, pointer, dimension(:) :: FSWCHANGETILE => NULL()

real, pointer, dimension(:) :: CNLAITILE => NULL()
real, pointer, dimension(:) :: CNTLAITILE => NULL()
Expand Down Expand Up @@ -6141,6 +6163,9 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC )
call MAPL_GetPointer(EXPORT , RMELTBC002 , 'RMELTBC002', RC=STATUS); VERIFY_(STATUS)
call MAPL_GetPointer(EXPORT , RMELTOC001 , 'RMELTOC001', RC=STATUS); VERIFY_(STATUS)
call MAPL_GetPointer(EXPORT , RMELTOC002 , 'RMELTOC002', RC=STATUS); VERIFY_(STATUS)
call MAPL_GetPointer(EXPORT , WATERTABLED, 'WATERTABLED', RC=STATUS); VERIFY_(STATUS)
call MAPL_GetPointer(EXPORT , FSWCHANGE , 'FSWCHANGE', RC=STATUS); VERIFY_(STATUS)


IF(LSM_CHOICE > 1) THEN
call MAPL_GetPointer(EXPORT , CNLAI , 'CNLAI' , RC=STATUS); VERIFY_(STATUS)
Expand Down Expand Up @@ -6714,6 +6739,8 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC )
call MKTILE(RMELTBC002 ,RMELTBC002TILE ,NT,RC=STATUS); VERIFY_(STATUS)
call MKTILE(RMELTOC001 ,RMELTOC001TILE ,NT,RC=STATUS); VERIFY_(STATUS)
call MKTILE(RMELTOC002 ,RMELTOC002TILE ,NT,RC=STATUS); VERIFY_(STATUS)
call MKTILE(WATERTABLED,WATERTABLEDTILE,NT,RC=STATUS); VERIFY_(STATUS)
call MKTILE(FSWCHANGE ,FSWCHANGETILE ,NT,RC=STATUS); VERIFY_(STATUS)

IF (LSM_CHOICE > 1) THEN
call MKTILE(CNLAI ,CNLAITILE ,NT,RC=STATUS); VERIFY_(STATUS)
Expand Down Expand Up @@ -7532,15 +7559,17 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC )
if(associated(ROC002)) call MAPL_LocStreamTransform( LOCSTREAM,ROC002(:,:,N) ,ROC002TILE(:,N), RC=STATUS); VERIFY_(STATUS)
END DO

if(associated(RMELTDU001))call MAPL_LocStreamTransform( LOCSTREAM,RMELTDU001 ,RMELTDU001TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTDU002))call MAPL_LocStreamTransform( LOCSTREAM,RMELTDU002 ,RMELTDU002TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTDU003))call MAPL_LocStreamTransform( LOCSTREAM,RMELTDU003 ,RMELTDU003TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTDU004))call MAPL_LocStreamTransform( LOCSTREAM,RMELTDU004 ,RMELTDU004TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTDU005))call MAPL_LocStreamTransform( LOCSTREAM,RMELTDU005 ,RMELTDU005TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTBC001))call MAPL_LocStreamTransform( LOCSTREAM,RMELTBC001 ,RMELTBC001TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTBC002))call MAPL_LocStreamTransform( LOCSTREAM,RMELTBC002 ,RMELTBC002TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTOC001))call MAPL_LocStreamTransform( LOCSTREAM,RMELTOC001 ,RMELTOC001TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTOC002))call MAPL_LocStreamTransform( LOCSTREAM,RMELTOC002 ,RMELTOC002TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTDU001 ))call MAPL_LocStreamTransform(LOCSTREAM,RMELTDU001 ,RMELTDU001TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTDU002 ))call MAPL_LocStreamTransform(LOCSTREAM,RMELTDU002 ,RMELTDU002TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTDU003 ))call MAPL_LocStreamTransform(LOCSTREAM,RMELTDU003 ,RMELTDU003TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTDU004 ))call MAPL_LocStreamTransform(LOCSTREAM,RMELTDU004 ,RMELTDU004TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTDU005 ))call MAPL_LocStreamTransform(LOCSTREAM,RMELTDU005 ,RMELTDU005TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTBC001 ))call MAPL_LocStreamTransform(LOCSTREAM,RMELTBC001 ,RMELTBC001TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTBC002 ))call MAPL_LocStreamTransform(LOCSTREAM,RMELTBC002 ,RMELTBC002TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTOC001 ))call MAPL_LocStreamTransform(LOCSTREAM,RMELTOC001 ,RMELTOC001TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(RMELTOC002 ))call MAPL_LocStreamTransform(LOCSTREAM,RMELTOC002 ,RMELTOC002TILE, RC=STATUS); VERIFY_(STATUS)
if(associated(WATERTABLED))call MAPL_LocStreamTransform(LOCSTREAM,WATERTABLED,WATERTABLEDTILE,RC=STATUS); VERIFY_(STATUS)
if(associated(FSWCHANGE ))call MAPL_LocStreamTransform(LOCSTREAM,FSWCHANGE ,FSWCHANGETILE, RC=STATUS); VERIFY_(STATUS)

if(associated(CNLAI)) then
call MAPL_LocStreamTransform( LOCSTREAM,CNLAI ,CNLAITILE , RC=STATUS)
Expand Down Expand Up @@ -8074,6 +8103,8 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC )
if(associated(RMELTBC002TILE )) deallocate(RMELTBC002TILE )
if(associated(RMELTOC001TILE )) deallocate(RMELTOC001TILE )
if(associated(RMELTOC002TILE )) deallocate(RMELTOC002TILE )
if(associated(WATERTABLEDTILE)) deallocate(WATERTABLEDTILE)
if(associated(FSWCHANGETILE )) deallocate(FSWCHANGETILE )
if(associated(CNLAITILE )) deallocate(CNLAITILE )
if(associated(CNTLAITILE )) deallocate(CNTLAITILE )
if(associated(CNSAITILE )) deallocate(CNSAITILE )
Expand Down Expand Up @@ -8409,6 +8440,10 @@ subroutine DOTYPE(type,RC)
VERIFY_(STATUS)
call MAPL_GetPointer(GEX(type), dum, 'RMELTOC002' , ALLOC=associated(RMELTOC002TILE ), notFoundOK=.true., RC=STATUS)
VERIFY_(STATUS)
call MAPL_GetPointer(GEX(type), dum, 'WATERTABLED', ALLOC=associated(WATERTABLEDTILE ),notFoundOK=.true., RC=STATUS)
VERIFY_(STATUS)
call MAPL_GetPointer(GEX(type), dum, 'FSWCHANGE' , ALLOC=associated(FSWCHANGETILE ) , notFoundOK=.true., RC=STATUS)
VERIFY_(STATUS)

IF (LSM_CHOICE > 1) THEN
call MAPL_GetPointer(GEX(type), dum, 'CNLAI' , ALLOC=associated(CNLAITILE ), notFoundOK=.true., RC=STATUS)
Expand Down Expand Up @@ -8977,6 +9012,8 @@ subroutine DOTYPE(type,RC)
if(associated(RMELTBC002TILE)) call FILLOUT_TILE(GEX(type), 'RMELTBC002' , RMELTBC002TILE , XFORM, RC=STATUS);VERIFY_(STATUS)
if(associated(RMELTOC001TILE)) call FILLOUT_TILE(GEX(type), 'RMELTOC001' , RMELTOC001TILE , XFORM, RC=STATUS);VERIFY_(STATUS)
if(associated(RMELTOC002TILE)) call FILLOUT_TILE(GEX(type), 'RMELTOC002' , RMELTOC002TILE , XFORM, RC=STATUS);VERIFY_(STATUS)
if(associated(WATERTABLEDTILE))call FILLOUT_TILE(GEX(type), 'WATERTABLED', WATERTABLEDTILE, XFORM, RC=STATUS);VERIFY_(STATUS)
if(associated(FSWCHANGETILE)) call FILLOUT_TILE(GEX(type), 'FSWCHANGE' , FSWCHANGETILE , XFORM, RC=STATUS);VERIFY_(STATUS)

if(associated(CNLAITILE)) then
call FILLOUT_TILE(GEX(type), 'CNLAI' , CNLAITILE , XFORM, RC=STATUS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,8 @@ subroutine SetServices ( GC, RC )
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RMELTBC002', CHILD_ID = CATCH(1), RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RMELTOC001', CHILD_ID = CATCH(1), RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RMELTOC002', CHILD_ID = CATCH(1), RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'WATERTABLED',CHILD_ID = CATCH(1), RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'FSWCHANGE', CHILD_ID = CATCH(1), RC=STATUS) ; VERIFY_(STATUS)

if (DO_GOSWIM /= 0) then
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RDU001', CHILD_ID = CATCH(1), RC=STATUS) ; VERIFY_(STATUS)
Expand Down Expand Up @@ -1290,6 +1292,8 @@ subroutine SetServices ( GC, RC )
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RMELTBC002', CHILD_ID = CATCHCN(1), RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RMELTOC001', CHILD_ID = CATCHCN(1), RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RMELTOC002', CHILD_ID = CATCHCN(1), RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'WATERTABLED',CHILD_ID = CATCHCN(1), RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'FSWCHANGE', CHILD_ID = CATCHCN(1), RC=STATUS) ; VERIFY_(STATUS)

if (DO_GOSWIM /= 0) then
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RDU001', CHILD_ID = CATCHCN(1), RC=STATUS) ; VERIFY_(STATUS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,8 @@ subroutine SetServices ( GC, RC )
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RMELTBC002', CHILD_ID = CATCHCN, RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RMELTOC001', CHILD_ID = CATCHCN, RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RMELTOC002', CHILD_ID = CATCHCN, RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'WATERTABLED',CHILD_ID = CATCHCN, RC=STATUS) ; VERIFY_(STATUS)
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'FSWCHANGE' , CHILD_ID = CATCHCN, RC=STATUS) ; VERIFY_(STATUS)

if (DO_GOSWIM /= 0) then
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'RDU001', CHILD_ID = CATCHCN, RC=STATUS) ; VERIFY_(STATUS)
Expand Down
Loading

0 comments on commit db83d28

Please sign in to comment.