Skip to content
Snippets Groups Projects
Commit 3cb1ef0a authored by Sebastien MASSON's avatar Sebastien MASSON
Browse files

add missing fix on stpctl.F90 for STATION_ASF, #68

parent cf05dbcc
No related branches found
No related tags found
No related merge requests found
...@@ -159,9 +159,9 @@ CONTAINS ...@@ -159,9 +159,9 @@ CONTAINS
! first: close the netcdf file, so we can read it ! first: close the netcdf file, so we can read it
IF( lwm .AND. kt /= nitend ) istatus = NF90_CLOSE(nrunid) IF( lwm .AND. kt /= nitend ) istatus = NF90_CLOSE(nrunid)
! get global loc on the min/max ! get global loc on the min/max
CALL mpp_maxloc( 'stpctl', taum(:,:) , llmsk, zzz, iloc(1:2,1) ) ! mpp_maxloc ok if mask = F CALL mpp_maxloc( 'stpctl', taum(:,:) , llmsk(A2D(0)), zzz, iloc(1:2,1) ) ! mpp_maxloc ok if mask = F
CALL mpp_maxloc( 'stpctl',ABS( qns(:,:) ), llmsk, zzz, iloc(1:2,2) ) CALL mpp_maxloc( 'stpctl',ABS( qns(:,:) ), llmsk(A2D(0)), zzz, iloc(1:2,2) )
CALL mpp_minloc( 'stpctl',ABS( emp(:,:) ), llmsk, zzz, iloc(1:2,3) ) CALL mpp_minloc( 'stpctl',ABS( emp(:,:) ), llmsk , zzz, iloc(1:2,3) )
! find which subdomain has the max. ! find which subdomain has the max.
iareamin(:) = jpnij+1 ; iareamax(:) = 0 ; iareasum(:) = 0 iareamin(:) = jpnij+1 ; iareamax(:) = 0 ; iareasum(:) = 0
DO ji = 1, jptst DO ji = 1, jptst
...@@ -174,9 +174,9 @@ CONTAINS ...@@ -174,9 +174,9 @@ CONTAINS
CALL mpp_sum( "stpctl", iareasum ) ! sum over the global domain CALL mpp_sum( "stpctl", iareasum ) ! sum over the global domain
ELSE ! find local min and max locations: ELSE ! find local min and max locations:
! if we are here, this means that the subdomain contains some oce points -> no need to test the mask used in maxloc ! if we are here, this means that the subdomain contains some oce points -> no need to test the mask used in maxloc
iloc(1:2,1) = MAXLOC( taum(:,:) , mask = llmsk ) iloc(1:2,1) = MAXLOC( taum(:,:) , mask = llmsk(A2D(0)) )
iloc(1:2,2) = MAXLOC( ABS( qns(:,:) ), mask = llmsk ) iloc(1:2,2) = MAXLOC( ABS( qns(:,:) ), mask = llmsk(A2D(0)) )
iloc(1:2,3) = MINLOC( ABS( emp(:,:) ), mask = llmsk ) iloc(1:2,3) = MINLOC( ABS( emp(:,:) ), mask = llmsk )
DO ji = 1, jptst ! local domain indices ==> global domain indices, excluding halos DO ji = 1, jptst ! local domain indices ==> global domain indices, excluding halos
iloc(1:2,ji) = (/ mig(iloc(1,ji),0), mjg(iloc(2,ji),0) /) iloc(1:2,ji) = (/ mig(iloc(1,ji),0), mjg(iloc(2,ji),0) /)
END DO END DO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment