Skip to content

Commit 27851f0

Browse files
rodrigoguzman-lmddustinswales
authored andcommitted
bug fix in OPAQ variables (#15)
* bug fix on OPAQ variables * DEBUG comments erased
1 parent d16ea15 commit 27851f0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

driver/src/cosp2_io.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ subroutine write_cosp2_output(Npoints, Ncolumns, Nlevels, lev, lon, lat, cospOUT
568568
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
569569
endif
570570
if (associated(cospOUT%calipso_cldtypemeanz)) then
571-
! Opaque cloud temperature
571+
! Opaque cloud altitude
572572
status = nf90_def_var(fileID,"clopaquemeanz",nf90_float, (/dimID(1)/),varID(101))
573573
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
574574
status = nf90_put_att(fileID,varID(101),"long_name","CALIPSO Opaque Cloud Altitude")
@@ -577,7 +577,7 @@ subroutine write_cosp2_output(Npoints, Ncolumns, Nlevels, lev, lon, lat, cospOUT
577577
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
578578
status = nf90_put_att(fileID,varID(101),"standard_name", "opaque_cloud_altitude")
579579
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
580-
! Thin cloud temperature
580+
! Thin cloud altitude
581581
status = nf90_def_var(fileID,"clthinmeanz",nf90_float, (/dimID(1)/),varID(102))
582582
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
583583
status = nf90_put_att(fileID,varID(102),"long_name","CALIPSO Thin Cloud Altitude")
@@ -608,7 +608,7 @@ subroutine write_cosp2_output(Npoints, Ncolumns, Nlevels, lev, lon, lat, cospOUT
608608
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
609609
status = nf90_put_att(fileID,varID(104),"standard_name", "opaque_cloud_altitude_se")
610610
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
611-
! Thin cloud
611+
! Thin cloud altitude with respect to Surface Elevation
612612
status = nf90_def_var(fileID,"clthinmeanzse",nf90_float, (/dimID(1)/),varID(105))
613613
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
614614
status = nf90_put_att(fileID,varID(105),"long_name","CALIPSO Thin Cloud Altitude with respect to SE")
@@ -617,7 +617,7 @@ subroutine write_cosp2_output(Npoints, Ncolumns, Nlevels, lev, lon, lat, cospOUT
617617
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
618618
status = nf90_put_att(fileID,varID(105),"standard_name", "thin_cloud_altitude_se")
619619
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
620-
! z_opaque
620+
! z_opaque altitude with respect to Surface Elevation
621621
status = nf90_def_var(fileID,"clzopaquecalipsose",nf90_float, (/dimID(1)/),varID(106))
622622
if (status .ne. nf90_NoERR) print*,trim(nf90_strerror(status))
623623
status = nf90_put_att(fileID,varID(106),"long_name","CALIPSO z_opaque Altitude with respect to SE")

src/simulator/actsim/lidar_simulator.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ SUBROUTINE COSP_OPAQ(Npoints,Ncolumns,Nlevels,Ntype,tmp,x,S_att,S_cld,undef,lida
13491349
cldy(:,:,k)=0._wp
13501350
endwhere
13511351
! Fully attenuated layer detection at subgrid-scale:
1352-
where ( (x(:,:,k) .lt. S_att_opaq) .and. (x(:,:,k) .gt. 0.) .and. (x(:,:,k) .ne. undef) ) !DEBUG
1352+
where ( (x(:,:,k) .lt. S_att_opaq) .and. (x(:,:,k) .ge. 0.) .and. (x(:,:,k) .ne. undef) )
13531353
cldyopaq(:,:,k)=1._wp
13541354
elsewhere
13551355
cldyopaq(:,:,k)=0._wp
@@ -1363,7 +1363,7 @@ SUBROUTINE COSP_OPAQ(Npoints,Ncolumns,Nlevels,Ntype,tmp,x,S_att,S_cld,undef,lida
13631363
srok(:,:,k)=0._wp
13641364
endwhere
13651365
! Number of usefull sub-columns layers for z_opaque 3D fraction:
1366-
where ( (x(:,:,k) .gt. 0.) .and. (x(:,:,k) .ne. undef) ) !DEBUG
1366+
where ( (x(:,:,k) .ge. 0.) .and. (x(:,:,k) .ne. undef) )
13671367
srokopaq(:,:,k)=1._wp
13681368
elsewhere
13691369
srokopaq(:,:,k)=0._wp

0 commit comments

Comments
 (0)