From 9b1dd027fcef0f53af1630a4e8a770ad590331a9 Mon Sep 17 00:00:00 2001 From: "Patrick.C.Campbell@noaa.gov" Date: Mon, 29 Jun 2020 18:56:03 +0000 Subject: [PATCH] Updated Fengsha variables read/interpolate --- parallel/src/rdfv3.f90 | 12 ++++++------ serial/src/rdfv3.f90 | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/parallel/src/rdfv3.f90 b/parallel/src/rdfv3.f90 index 58bc7f0..bf8a008 100644 --- a/parallel/src/rdfv3.f90 +++ b/parallel/src/rdfv3.f90 @@ -1459,10 +1459,10 @@ END SUBROUTINE windrotation ENDIF CALL get_var_2d_real_cdf (cdfidg, 'CLAY_FRAC', dum2d, 1, rcode) IF ( rcode == nf90_noerr ) THEN - call myinterp(dum2d,met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) + call myinterp(dum2d(1:met_nx, met_ny:1:-1),met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) clayf(1:ncols_x,1:nrows_x) = atmp(1:ncols_x,1:nrows_x) ! CLAYF check over water, set as negative numbers for improved error checking - WHERE ( (INT(landmask) == 0) ) ! FV3 water = 0 and CLAYF < 0.0 + WHERE ( (INT(landmask) == 0) .OR. (clayf > 1.0) ) ! FV3 water = 0 or frac > 1, set CLAYF < 0.0 clayf = -1.0 END WHERE WRITE (*,ifmt2) 'CLAYF ', clayf(lprt_metx,lprt_mety) @@ -1503,10 +1503,10 @@ END SUBROUTINE windrotation ENDIF CALL get_var_2d_real_cdf (cdfidg, 'SAND_FRAC', dum2d, 1, rcode) IF ( rcode == nf90_noerr ) THEN - call myinterp(dum2d,met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) + call myinterp(dum2d(1:met_nx, met_ny:1:-1),met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) sandf(1:ncols_x,1:nrows_x) = atmp(1:ncols_x,1:nrows_x) ! SANDF check over water, set as negative numbers for improved error checking - WHERE ( (INT(landmask) == 0) ) ! FV3 land = 1 and SANDF < 0.0 + WHERE ( (INT(landmask) == 0) .OR. (sandf > 1.0) ) ! FV3 water = 0 or frac > 1, set SANDF < 0.0 sandf = -1.0 END WHERE WRITE (*,ifmt2) 'SANDF ', sandf(lprt_metx,lprt_mety) @@ -1547,7 +1547,7 @@ END SUBROUTINE windrotation ENDIF CALL get_var_2d_real_cdf (cdfidg, 'DRAG_PART', dum2d, 1, rcode) IF ( rcode == nf90_noerr ) THEN - call myinterp(dum2d,met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) + call myinterp(dum2d(1:met_nx, met_ny:1:-1),met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) drag(1:ncols_x,1:nrows_x) = atmp(1:ncols_x,1:nrows_x) ! DRAG check over water, set as negative numbers for improved error checking WHERE ( (INT(landmask) == 0) ) ! FV3 water = 0 and DRAG < 0.0 @@ -1591,7 +1591,7 @@ END SUBROUTINE windrotation ENDIF CALL get_var_2d_real_cdf (cdfidg, 'SSM', dum2d, 1, rcode) IF ( rcode == nf90_noerr ) THEN - call myinterp(dum2d,met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) + call myinterp(dum2d(1:met_nx, met_ny:1:-1),met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) ssm(1:ncols_x,1:nrows_x) = atmp(1:ncols_x,1:nrows_x) ! SSM check over water, set as negative numbers for improved error checking WHERE ( (INT(landmask) == 0) ) ! FV3 water = 0 and CLAYF < 0.0 diff --git a/serial/src/rdfv3.f90 b/serial/src/rdfv3.f90 index 6415426..392b8ba 100644 --- a/serial/src/rdfv3.f90 +++ b/serial/src/rdfv3.f90 @@ -1448,10 +1448,10 @@ END SUBROUTINE windrotation ENDIF CALL get_var_2d_real_cdf (cdfidg, 'CLAY_FRAC', dum2d, 1, rcode) IF ( rcode == nf90_noerr ) THEN - call myinterp(dum2d,met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) + call myinterp(dum2d(1:met_nx, met_ny:1:-1),met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) clayf(1:ncols_x,1:nrows_x) = atmp(1:ncols_x,1:nrows_x) ! CLAYF check over water, set as negative numbers for improved error checking - WHERE ( (INT(landmask) == 0) ) ! FV3 water = 0 and CLAYF < 0.0 + WHERE ( (INT(landmask) == 0) .OR. (clayf > 1.0) ) ! FV3 water = 0 and CLAYF < 0.0 clayf = -1.0 END WHERE WRITE (*,ifmt2) 'CLAYF ', clayf(lprt_metx,lprt_mety) @@ -1492,10 +1492,10 @@ END SUBROUTINE windrotation ENDIF CALL get_var_2d_real_cdf (cdfidg, 'SAND_FRAC', dum2d, 1, rcode) IF ( rcode == nf90_noerr ) THEN - call myinterp(dum2d,met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) + call myinterp(dum2d(1:met_nx, met_ny:1:-1),met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) sandf(1:ncols_x,1:nrows_x) = atmp(1:ncols_x,1:nrows_x) ! SANDF check over water, set as negative numbers for improved error checking - WHERE ( (INT(landmask) == 0) ) ! FV3 land = 1 and SANDF < 0.0 + WHERE ( (INT(landmask) == 0) .OR. (clayf > 1.0) ) ! FV3 land = 1 and SANDF < 0.0 sandf = -1.0 END WHERE WRITE (*,ifmt2) 'SANDF ', sandf(lprt_metx,lprt_mety) @@ -1536,7 +1536,7 @@ END SUBROUTINE windrotation ENDIF CALL get_var_2d_real_cdf (cdfidg, 'DRAG_PART', dum2d, 1, rcode) IF ( rcode == nf90_noerr ) THEN - call myinterp(dum2d,met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) + call myinterp(dum2d(1:met_nx, met_ny:1:-1),met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) drag(1:ncols_x,1:nrows_x) = atmp(1:ncols_x,1:nrows_x) ! DRAG check over water, set as negative numbers for improved error checking WHERE ( (INT(landmask) == 0) ) ! FV3 water = 0 and DRAG < 0.0 @@ -1580,7 +1580,7 @@ END SUBROUTINE windrotation ENDIF CALL get_var_2d_real_cdf (cdfidg, 'SSM', dum2d, 1, rcode) IF ( rcode == nf90_noerr ) THEN - call myinterp(dum2d,met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) + call myinterp(dum2d(1:met_nx, met_ny:1:-1),met_nx,met_ny,atmp,xindex,yindex,ncols_x,nrows_x,1) ssm(1:ncols_x,1:nrows_x) = atmp(1:ncols_x,1:nrows_x) ! SSM check over water, set as negative numbers for improved error checking WHERE ( (INT(landmask) == 0) ) ! FV3 water = 0 and CLAYF < 0.0