[Dart-dev] DART/branches Revision: 13178

dart at ucar.edu dart at ucar.edu
Tue May 28 14:34:19 MDT 2019


thoar at ucar.edu
2019-05-28 14:34:18 -0600 (Tue, 28 May 2019)
33
Fixed logic error. Working now.




Modified: DART/branches/cesm_clm/observations/obs_converters/NASA_Earthdata/AMSR_E_L2_to_obs.f90
===================================================================
--- DART/branches/cesm_clm/observations/obs_converters/NASA_Earthdata/AMSR_E_L2_to_obs.f90	2019-05-24 22:37:05 UTC (rev 13177)
+++ DART/branches/cesm_clm/observations/obs_converters/NASA_Earthdata/AMSR_E_L2_to_obs.f90	2019-05-28 20:34:18 UTC (rev 13178)
@@ -227,34 +227,33 @@
       oerr  = sm_c_error(i,j) + amsre_rep_error  ! units of standard deviation
       vertvalue  = 0.005_r8  ! 5mm depth for C band
 
-      if (soil_moisture_c(i,j) /= smc_fill .and. &
-               sm_c_error(i,j) /= smce_fill ) then
+      if ((soil_moisture_c(i,j) /= smc_fill) .and. &
+               (sm_c_error(i,j) /= smce_fill) ) then
            call create_3d_obs(lat, lon, vertvalue, VERTISHEIGHT, &
                    soil_moisture_c(i,j), c_observation_kind, &
                    oerr, day, seconds, qc, obs)
-      endif
 
-      write(*,*)'obs_num, day, seconds', obs_num, day, seconds
+         ! first one, insert with no prev.  otherwise, since all times are the
+         ! same for this column, insert with the prev obs as the starting point.
+         ! (the first insert with no prev means it will search for the right
+         ! time ordered starting point.)
+         if (first_obs) then
+            call insert_obs_in_seq(obs_seq, obs)
+            first_obs = .false.
+         else
+           call insert_obs_in_seq(obs_seq, obs, prev_obs)
+         endif
+         obs_num = obs_num+1
+         prev_obs = obs
 
-      ! first one, insert with no prev.  otherwise, since all times are the
-      ! same for this column, insert with the prev obs as the starting point.
-      ! (the first insert with no prev means it will search for the right
-      ! time ordered starting point.)
-      if (first_obs) then
-         call insert_obs_in_seq(obs_seq, obs)
-         first_obs = .false.
-      else
-        call insert_obs_in_seq(obs_seq, obs, prev_obs)
+         if (obs_num > num_new_obs) then
+            write(string1,*)'reached maximum number of observations while'
+            write(string2,*)'reading file # ',filenum,' "'//trim(next_infile)//'"'
+            call error_handler(E_ERR, 'AMSR_E_L2_to_obs', string1, &
+                       source, revision, revdate, text2=string2)
+         endif
+
       endif
-      obs_num = obs_num+1
-      prev_obs = obs
- 
-      if (obs_num > num_new_obs) then
-         write(string1,*)'reached maximum number of observations while'
-         write(string2,*)'reading file # ',filenum,' "'//trim(next_infile)//'"'
-         call error_handler(E_ERR, 'AMSR_E_L2_to_obs', string1, &
-                    source, revision, revdate, text2=string2)
-      endif
 
       !------------------------------------------------------------------
       ! Create X-band observation
@@ -263,31 +262,32 @@
       oerr  = sm_x_error(i,j) + amsre_rep_error
       vertvalue  = 0.005_r8  ! 5mm depth for X band
 
-      if (soil_moisture_x(i,j) /= smx_fill .and. &
-               sm_x_error(i,j) /= smxe_fill ) then
+      if ((soil_moisture_x(i,j) /= smx_fill) .and. &
+               (sm_x_error(i,j) /= smxe_fill) ) then
            call create_3d_obs(lat, lon, vertvalue, VERTISHEIGHT, &
                    soil_moisture_x(i,j), x_observation_kind, &
                    oerr, day, seconds, qc, obs)
-      endif
 
-      ! first one, insert with no prev.  otherwise, since all times are the
-      ! same for this column, insert with the prev obs as the starting point.
-      ! (the first insert with no prev means it will search for the right
-      ! time ordered starting point.)
-      if (first_obs) then
-         call insert_obs_in_seq(obs_seq, obs)
-         first_obs = .false.
-      else
-        call insert_obs_in_seq(obs_seq, obs, prev_obs)
-      endif
-      obs_num = obs_num+1
-      prev_obs = obs
+         ! first one, insert with no prev.  otherwise, since all times are the
+         ! same for this column, insert with the prev obs as the starting point.
+         ! (the first insert with no prev means it will search for the right
+         ! time ordered starting point.)
+         if (first_obs) then
+            call insert_obs_in_seq(obs_seq, obs)
+            first_obs = .false.
+         else
+           call insert_obs_in_seq(obs_seq, obs, prev_obs)
+         endif
+         obs_num = obs_num+1
+         prev_obs = obs
+   
+         if (obs_num > num_new_obs) then
+            write(string1,*)'reached maximum number of observations while'
+            write(string2,*)'reading file # ',filenum,' "'//trim(next_infile)//'"'


More information about the Dart-dev mailing list