From b434e88fb409d205eb7e83dd510b8975a8eb4a16 Mon Sep 17 00:00:00 2001 From: Hua Yuan Date: Wed, 8 Jan 2025 12:20:41 +0800 Subject: [PATCH 1/2] Only print warning for the first time-step for reference height less than htop+1m. --- main/MOD_LeafTemperature.F90 | 9 ++++++--- main/MOD_LeafTemperaturePC.F90 | 9 ++++++--- main/URBAN/MOD_Urban_Flux.F90 | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/main/MOD_LeafTemperature.F90 b/main/MOD_LeafTemperature.F90 index 14aaea16..7965ec60 100644 --- a/main/MOD_LeafTemperature.F90 +++ b/main/MOD_LeafTemperature.F90 @@ -529,17 +529,20 @@ SUBROUTINE LeafTemperature ( & IF (hu <= htop+1) THEN hu_ = htop + 1. - write(6,*) 'Warning: the obs height of u less than htop+1, set it to htop+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of u less than htop+1, set it to htop+1.' ENDIF IF (ht <= htop+1) THEN ht_ = htop + 1. - write(6,*) 'Warning: the obs height of t less than htop+1, set it to htop+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of t less than htop+1, set it to htop+1.' ENDIF IF (hq <= htop+1) THEN hq_ = htop + 1. - write(6,*) 'Warning: the obs height of q less than htop+1, set it to htop+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of q less than htop+1, set it to htop+1.' ENDIF ELSE ! relative height diff --git a/main/MOD_LeafTemperaturePC.F90 b/main/MOD_LeafTemperaturePC.F90 index e3cb1487..2914a20b 100644 --- a/main/MOD_LeafTemperaturePC.F90 +++ b/main/MOD_LeafTemperaturePC.F90 @@ -913,17 +913,20 @@ SUBROUTINE LeafTemperaturePC ( & IF (hu <= htop_lay(toplay)+1) THEN hu_ = htop_lay(toplay) + 1. - write(6,*) 'Warning: the obs height of u less than htop+1, set it to htop+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of u less than htop+1, set it to htop+1.' ENDIF IF (ht <= htop_lay(toplay)+1) THEN ht_ = htop_lay(toplay) + 1. - write(6,*) 'Warning: the obs height of t less than htop+1, set it to htop+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of t less than htop+1, set it to htop+1.' ENDIF IF (hq <= htop_lay(toplay)+1) THEN hq_ = htop_lay(toplay) + 1. - write(6,*) 'Warning: the obs height of q less than htop+1, set it to htop+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of q less than htop+1, set it to htop+1.' ENDIF ELSE ! relative height diff --git a/main/URBAN/MOD_Urban_Flux.F90 b/main/URBAN/MOD_Urban_Flux.F90 index 8e5c53a9..2d29c5cc 100644 --- a/main/URBAN/MOD_Urban_Flux.F90 +++ b/main/URBAN/MOD_Urban_Flux.F90 @@ -516,17 +516,20 @@ SUBROUTINE UrbanOnlyFlux ( & IF (hu <= hroof+1) THEN hu_ = hroof + 1. - write(6,*) 'Warning: the obs height of u less than htop+1, set it to hroof+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of u less than htop+1, set it to hroof+1.' ENDIF IF (ht <= hroof+1) THEN ht_ = hroof + 1. - write(6,*) 'Warning: the obs height of t less than htop+1, set it to hroof+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of t less than htop+1, set it to hroof+1.' ENDIF IF (hq <= hroof+1) THEN hq_ = hroof + 1. - write(6,*) 'Warning: the obs height of q less than htop+1, set it to hroof+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of q less than htop+1, set it to hroof+1.' ENDIF ELSE ! relative height From f8b7c46fb9f0ed163b1d562fa622644dee49c5f5 Mon Sep 17 00:00:00 2001 From: Hua Yuan Date: Wed, 8 Jan 2025 16:41:28 +0800 Subject: [PATCH 2/2] Reference height warning only one time for urban model. --- main/URBAN/MOD_Urban_Flux.F90 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/main/URBAN/MOD_Urban_Flux.F90 b/main/URBAN/MOD_Urban_Flux.F90 index 2d29c5cc..0079140a 100644 --- a/main/URBAN/MOD_Urban_Flux.F90 +++ b/main/URBAN/MOD_Urban_Flux.F90 @@ -517,19 +517,19 @@ SUBROUTINE UrbanOnlyFlux ( & IF (hu <= hroof+1) THEN hu_ = hroof + 1. IF (taux == spval) & ! only print warning for the firt time-step - write(6,*) 'Warning: the obs height of u less than htop+1, set it to hroof+1.' + write(6,*) 'Warning: the obs height of u less than hroof+1, set it to hroof+1.' ENDIF IF (ht <= hroof+1) THEN ht_ = hroof + 1. IF (taux == spval) & ! only print warning for the firt time-step - write(6,*) 'Warning: the obs height of t less than htop+1, set it to hroof+1.' + write(6,*) 'Warning: the obs height of t less than hroof+1, set it to hroof+1.' ENDIF IF (hq <= hroof+1) THEN hq_ = hroof + 1. IF (taux == spval) & ! only print warning for the firt time-step - write(6,*) 'Warning: the obs height of q less than htop+1, set it to hroof+1.' + write(6,*) 'Warning: the obs height of q less than hroof+1, set it to hroof+1.' ENDIF ELSE ! relative height @@ -1518,17 +1518,20 @@ SUBROUTINE UrbanVegFlux ( & IF (hu <= hroof+1) THEN hu_ = hroof + 1. - write(6,*) 'Warning: the obs height of u less than hroof+1, set it to hroof+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of u less than hroof+1, set it to hroof+1.' ENDIF IF (ht <= hroof+1) THEN ht_ = hroof + 1. - write(6,*) 'Warning: the obs height of t less than hroof+1, set it to hroof+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of t less than hroof+1, set it to hroof+1.' ENDIF IF (hq <= hroof+1) THEN hq_ = hroof + 1. - write(6,*) 'Warning: the obs height of q less than hroof+1, set it to hroof+1.' + IF (taux == spval) & ! only print warning for the firt time-step + write(6,*) 'Warning: the obs height of q less than hroof+1, set it to hroof+1.' ENDIF ELSE ! relative height