Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip flight observations outside a nested domain #21

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
93 changes: 87 additions & 6 deletions GeosCore/planeflight_mod.F
Original file line number Diff line number Diff line change
Expand Up @@ -1057,14 +1057,54 @@ SUBROUTINE READ_POINTS( am_I_Root, Input_Opt, State_Met,
ENDIF

! Skip observations outside the nested domain
#if defined( NESTED_NA )
IF ( LAT < 10e0 .OR. LAT > 70e0 .OR.
! Now consider all nest domains, lei, 11/24/18
#if defined( MERRA2 ) && defined( GRID05x0625 ) && defined( NESTED_AS)
IF ( LAT < -11e0 .OR. LAT > 55e0 .OR.
& LON < 60e0 .OR. LON > 150e0 ) THEN
PRINT*, ' Outside the AS nested domain, skipping record ', N
CYCLE
ENDIF
#endif

#if defined( MERRA2 ) && defined( GRID05x0625 ) && defined( NESTED_NA)
IF ( LAT < 10e0 .OR. LAT > 70e0 .OR.
& LON < -140e0 .OR. LON > -40e0 ) THEN
PRINT*, ' Outside nested domain, skipping record ', N
PRINT*, ' Outside the NA nested domain, skipping record ', N
CYCLE
ENDIF
#endif

#if defined( MERRA2 ) && defined( GRID05x0625 ) && defined( NESTED_EU)
IF ( LAT < 30e0 .OR. LAT > 70e0 .OR.
& LON < -30e0 .OR. LON > 50e0 ) THEN
PRINT*, ' Outside the EU nested domain, skipping record ', N
CYCLE
ENDIF
#endif

#if defined( GEOS_FP ) && defined( GRID025x03125 ) && defined(NESTED_CH)
IF ( LAT < 15e0 .OR. LAT > 55e0 .OR.
& LON < 70e0 .OR. LON > 140e0 ) THEN
PRINT*, ' Outside the CH nested domain, skipping record ', N
CYCLE
ENDIF
#endif

#if defined( GEOS_FP ) && defined( GRID025x03125 ) && defined(NESTED_NA)
IF ( LAT < 9.75e0 .OR. LAT > 60e0 .OR.
& LON < -130e0 .OR. LON > -60e0 ) THEN
PRINT*, ' Outside the NA nested domain, skipping record ', N
CYCLE
ENDIF
#endif

#if defined( GEOS_FP ) && defined( GRID025x03125 ) && defined(NESTED_EU)
IF ( LAT < 32.75e0 .OR. LAT > 61.25e0 .OR.
& LON < -15e0 .OR. LON > 40e0 ) THEN
PRINT*, ' Outside the EU nested domain, skipping record ', N
CYCLE
ENDIF
#endif
! Convert from altitude to pressure if we have CCCG data or
! tower data
NAME = ADJUSTL(PTYPE(N))
Expand Down Expand Up @@ -2449,10 +2489,51 @@ SUBROUTINE WRITE_VARS_TO_FILE( State_Met, IND, VARI )
LAT_TMP = REAL(PLAT(IND),4)

! Skip observations outside the nested domain
#if defined( NESTED_NA )
IF ( LAT_TMP < 10e0 .OR. LAT_TMP > 70e0 .OR.
! Add all nested domain, lei, 11/24/18
#if defined( MERRA2 ) && defined( GRID05x0625 ) && defined( NESTED_AS)
IF ( LAT_TMP < -11e0 .OR. LAT_TMP > 55e0 .OR.
& LON_TMP < 60e0 .OR. LON_TMP > 150e0 ) THEN
PRINT*, ' Outside the AS nested domain, skipping record ', IND
RETURN
ENDIF
#endif

#if defined( MERRA2 ) && defined( GRID05x0625 ) && defined( NESTED_NA)
IF ( LAT_TMP < 10e0 .OR. LAT_TMP > 70e0 .OR.
& LON_TMP < -140e0 .OR. LON_TMP > -40e0 ) THEN
PRINT*, ' Outside nested domain, skipping record ', IND
PRINT*, ' Outside the NA nested domain, skipping record ', IND
RETURN
ENDIF
#endif

#if defined( MERRA2 ) && defined( GRID05x0625 ) && defined( NESTED_EU)
IF ( LAT_TMP < 30e0 .OR. LAT_TMP > 70e0 .OR.
& LON_TMP < -30e0 .OR. LON_TMP > 50e0 ) THEN
PRINT*, ' Outside the EU nested domain, skipping record ', IND
RETURN
ENDIF
#endif

#if defined( GEOS_FP ) && defined( GRID025x03125 ) && defined(NESTED_CH)
IF ( LAT_TMP < 15e0 .OR. LAT_TMP > 55e0 .OR.
& LON_TMP < 70e0 .OR. LON_TMP > 140e0 ) THEN
PRINT*, ' Outside the CH nested domain, skipping record ', IND
RETURN
ENDIF
#endif

#if defined( GEOS_FP ) && defined( GRID025x03125 ) && defined(NESTED_NA)
IF ( LAT_TMP < 9.75e0 .OR. LAT_TMP > 60e0 .OR.
& LON_TMP < -130e0 .OR. LON_TMP > -60e0 ) THEN
PRINT*, ' Outside the NA nested domain, skipping record ', IND
RETURN
ENDIF
#endif

#if defined( GEOS_FP ) && defined( GRID025x03125 ) && defined(NESTED_EU)
IF ( LAT_TMP < 32.75e0 .OR. LAT_TMP > 61.25e0 .OR.
& LON_TMP < -15e0 .OR. LON_TMP > 40e0 ) THEN
PRINT*, ' Outside the EU nested domain, skipping record ', IND
RETURN
ENDIF
#endif
Expand Down